1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.71 for wget2 2.0.0.
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
188  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
189    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
190    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
191    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
192    PATH=/empty FPATH=/empty; export PATH FPATH
193    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
194      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
195  if (eval "$as_required") 2>/dev/null
196then :
197  as_have_required=yes
198else $as_nop
199  as_have_required=no
200fi
201  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
202then :
203
204else $as_nop
205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
206as_found=false
207for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
208do
209  IFS=$as_save_IFS
210  case $as_dir in #(((
211    '') as_dir=./ ;;
212    */) ;;
213    *) as_dir=$as_dir/ ;;
214  esac
215  as_found=:
216  case $as_dir in #(
217	 /*)
218	   for as_base in sh bash ksh sh5; do
219	     # Try only shells that exist, to save several forks.
220	     as_shell=$as_dir$as_base
221	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
222		    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
223then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
226then :
227  break 2
228fi
229fi
230	   done;;
231       esac
232  as_found=false
233done
234IFS=$as_save_IFS
235if $as_found
236then :
237
238else $as_nop
239  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
241then :
242  CONFIG_SHELL=$SHELL as_have_required=yes
243fi
244fi
245
246
247      if test "x$CONFIG_SHELL" != x
248then :
249  export CONFIG_SHELL
250             # We cannot yet assume a decent shell, so we have to provide a
251# neutralization value for shells without unset; and this also
252# works around shells that cannot unset nonexistent variables.
253# Preserve -v and -x to the replacement shell.
254BASH_ENV=/dev/null
255ENV=/dev/null
256(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
257case $- in # ((((
258  *v*x* | *x*v* ) as_opts=-vx ;;
259  *v* ) as_opts=-v ;;
260  *x* ) as_opts=-x ;;
261  * ) as_opts= ;;
262esac
263exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
264# Admittedly, this is quite paranoid, since all the known shells bail
265# out after a failed `exec'.
266printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
267exit 255
268fi
269
270    if test x$as_have_required = xno
271then :
272  printf "%s\n" "$0: This script requires a shell more modern than all"
273  printf "%s\n" "$0: the shells that I found on your system."
274  if test ${ZSH_VERSION+y} ; then
275    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
276    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
277  else
278    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and bug-wget@gnu.org
279$0: about your system, including any error possibly output
280$0: before this message. Then install a modern shell, or
281$0: manually run the script under such a shell if you do
282$0: have one."
283  fi
284  exit 1
285fi
286fi
287fi
288SHELL=${CONFIG_SHELL-/bin/sh}
289export SHELL
290# Unset more variables known to interfere with behavior of common tools.
291CLICOLOR_FORCE= GREP_OPTIONS=
292unset CLICOLOR_FORCE GREP_OPTIONS
293
294## --------------------- ##
295## M4sh Shell Functions. ##
296## --------------------- ##
297# as_fn_unset VAR
298# ---------------
299# Portably unset VAR.
300as_fn_unset ()
301{
302  { eval $1=; unset $1;}
303}
304as_unset=as_fn_unset
305
306
307# as_fn_set_status STATUS
308# -----------------------
309# Set $? to STATUS, without forking.
310as_fn_set_status ()
311{
312  return $1
313} # as_fn_set_status
314
315# as_fn_exit STATUS
316# -----------------
317# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
318as_fn_exit ()
319{
320  set +e
321  as_fn_set_status $1
322  exit $1
323} # as_fn_exit
324# as_fn_nop
325# ---------
326# Do nothing but, unlike ":", preserve the value of $?.
327as_fn_nop ()
328{
329  return $?
330}
331as_nop=as_fn_nop
332
333# as_fn_mkdir_p
334# -------------
335# Create "$as_dir" as a directory, including parents if necessary.
336as_fn_mkdir_p ()
337{
338
339  case $as_dir in #(
340  -*) as_dir=./$as_dir;;
341  esac
342  test -d "$as_dir" || eval $as_mkdir_p || {
343    as_dirs=
344    while :; do
345      case $as_dir in #(
346      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
347      *) as_qdir=$as_dir;;
348      esac
349      as_dirs="'$as_qdir' $as_dirs"
350      as_dir=`$as_dirname -- "$as_dir" ||
351$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
352	 X"$as_dir" : 'X\(//\)[^/]' \| \
353	 X"$as_dir" : 'X\(//\)$' \| \
354	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
355printf "%s\n" X"$as_dir" |
356    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
357	    s//\1/
358	    q
359	  }
360	  /^X\(\/\/\)[^/].*/{
361	    s//\1/
362	    q
363	  }
364	  /^X\(\/\/\)$/{
365	    s//\1/
366	    q
367	  }
368	  /^X\(\/\).*/{
369	    s//\1/
370	    q
371	  }
372	  s/.*/./; q'`
373      test -d "$as_dir" && break
374    done
375    test -z "$as_dirs" || eval "mkdir $as_dirs"
376  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
377
378
379} # as_fn_mkdir_p
380
381# as_fn_executable_p FILE
382# -----------------------
383# Test if FILE is an executable regular file.
384as_fn_executable_p ()
385{
386  test -f "$1" && test -x "$1"
387} # as_fn_executable_p
388# as_fn_append VAR VALUE
389# ----------------------
390# Append the text in VALUE to the end of the definition contained in VAR. Take
391# advantage of any shell optimizations that allow amortized linear growth over
392# repeated appends, instead of the typical quadratic growth present in naive
393# implementations.
394if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
395then :
396  eval 'as_fn_append ()
397  {
398    eval $1+=\$2
399  }'
400else $as_nop
401  as_fn_append ()
402  {
403    eval $1=\$$1\$2
404  }
405fi # as_fn_append
406
407# as_fn_arith ARG...
408# ------------------
409# Perform arithmetic evaluation on the ARGs, and store the result in the
410# global $as_val. Take advantage of shells that can avoid forks. The arguments
411# must be portable across $(()) and expr.
412if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
413then :
414  eval 'as_fn_arith ()
415  {
416    as_val=$(( $* ))
417  }'
418else $as_nop
419  as_fn_arith ()
420  {
421    as_val=`expr "$@" || test $? -eq 1`
422  }
423fi # as_fn_arith
424
425# as_fn_nop
426# ---------
427# Do nothing but, unlike ":", preserve the value of $?.
428as_fn_nop ()
429{
430  return $?
431}
432as_nop=as_fn_nop
433
434# as_fn_error STATUS ERROR [LINENO LOG_FD]
435# ----------------------------------------
436# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
437# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
438# script with STATUS, using 1 if that was 0.
439as_fn_error ()
440{
441  as_status=$1; test $as_status -eq 0 && as_status=1
442  if test "$4"; then
443    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
444    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
445  fi
446  printf "%s\n" "$as_me: error: $2" >&2
447  as_fn_exit $as_status
448} # as_fn_error
449
450if expr a : '\(a\)' >/dev/null 2>&1 &&
451   test "X`expr 00001 : '.*\(...\)'`" = X001; then
452  as_expr=expr
453else
454  as_expr=false
455fi
456
457if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
458  as_basename=basename
459else
460  as_basename=false
461fi
462
463if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
464  as_dirname=dirname
465else
466  as_dirname=false
467fi
468
469as_me=`$as_basename -- "$0" ||
470$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
471	 X"$0" : 'X\(//\)$' \| \
472	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
473printf "%s\n" X/"$0" |
474    sed '/^.*\/\([^/][^/]*\)\/*$/{
475	    s//\1/
476	    q
477	  }
478	  /^X\/\(\/\/\)$/{
479	    s//\1/
480	    q
481	  }
482	  /^X\/\(\/\).*/{
483	    s//\1/
484	    q
485	  }
486	  s/.*/./; q'`
487
488# Avoid depending upon Character Ranges.
489as_cr_letters='abcdefghijklmnopqrstuvwxyz'
490as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
491as_cr_Letters=$as_cr_letters$as_cr_LETTERS
492as_cr_digits='0123456789'
493as_cr_alnum=$as_cr_Letters$as_cr_digits
494
495
496  as_lineno_1=$LINENO as_lineno_1a=$LINENO
497  as_lineno_2=$LINENO as_lineno_2a=$LINENO
498  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
499  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
500  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
501  sed -n '
502    p
503    /[$]LINENO/=
504  ' <$as_myself |
505    sed '
506      s/[$]LINENO.*/&-/
507      t lineno
508      b
509      :lineno
510      N
511      :loop
512      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
513      t loop
514      s/-\n.*//
515    ' >$as_me.lineno &&
516  chmod +x "$as_me.lineno" ||
517    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
518
519  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
520  # already done that, so ensure we don't try to do so again and fall
521  # in an infinite loop.  This has already happened in practice.
522  _as_can_reexec=no; export _as_can_reexec
523  # Don't try to exec as it changes $[0], causing all sort of problems
524  # (the dirname of $[0] is not the place where we might find the
525  # original and so on.  Autoconf is especially sensitive to this).
526  . "./$as_me.lineno"
527  # Exit status is that of the last command.
528  exit
529}
530
531
532# Determine whether it's possible to make 'echo' print without a newline.
533# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
534# for compatibility with existing Makefiles.
535ECHO_C= ECHO_N= ECHO_T=
536case `echo -n x` in #(((((
537-n*)
538  case `echo 'xy\c'` in
539  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
540  xy)  ECHO_C='\c';;
541  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
542       ECHO_T='	';;
543  esac;;
544*)
545  ECHO_N='-n';;
546esac
547
548# For backward compatibility with old third-party macros, we provide
549# the shell variables $as_echo and $as_echo_n.  New code should use
550# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
551as_echo='printf %s\n'
552as_echo_n='printf %s'
553
554
555rm -f conf$$ conf$$.exe conf$$.file
556if test -d conf$$.dir; then
557  rm -f conf$$.dir/conf$$.file
558else
559  rm -f conf$$.dir
560  mkdir conf$$.dir 2>/dev/null
561fi
562if (echo >conf$$.file) 2>/dev/null; then
563  if ln -s conf$$.file conf$$ 2>/dev/null; then
564    as_ln_s='ln -s'
565    # ... but there are two gotchas:
566    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
567    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
568    # In both cases, we have to default to `cp -pR'.
569    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
570      as_ln_s='cp -pR'
571  elif ln conf$$.file conf$$ 2>/dev/null; then
572    as_ln_s=ln
573  else
574    as_ln_s='cp -pR'
575  fi
576else
577  as_ln_s='cp -pR'
578fi
579rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
580rmdir conf$$.dir 2>/dev/null
581
582if mkdir -p . 2>/dev/null; then
583  as_mkdir_p='mkdir -p "$as_dir"'
584else
585  test -d ./-p && rmdir ./-p
586  as_mkdir_p=false
587fi
588
589as_test_x='test -x'
590as_executable_p=as_fn_executable_p
591
592# Sed expression to map a string onto a valid CPP name.
593as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
594
595# Sed expression to map a string onto a valid variable name.
596as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
597
598SHELL=${CONFIG_SHELL-/bin/sh}
599
600
601test -n "$DJDIR" || exec 7<&0 </dev/null
602exec 6>&1
603
604# Name of the host.
605# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
606# so uname gets run too.
607ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
608
609#
610# Initializations.
611#
612ac_default_prefix=/usr/local
613ac_clean_files=
614ac_config_libobj_dir=.
615LIBOBJS=
616cross_compiling=no
617subdirs=
618MFLAGS=
619MAKEFLAGS=
620
621# Identity of this package.
622PACKAGE_NAME='wget2'
623PACKAGE_TARNAME='wget2'
624PACKAGE_VERSION='2.0.0'
625PACKAGE_STRING='wget2 2.0.0'
626PACKAGE_BUGREPORT='bug-wget@gnu.org'
627PACKAGE_URL='https://savannah.gnu.org/projects/wget'
628
629# Factoring default headers for most tests.
630ac_includes_default="\
631#include <stddef.h>
632#ifdef HAVE_STDIO_H
633# include <stdio.h>
634#endif
635#ifdef HAVE_STDLIB_H
636# include <stdlib.h>
637#endif
638#ifdef HAVE_STRING_H
639# include <string.h>
640#endif
641#ifdef HAVE_INTTYPES_H
642# include <inttypes.h>
643#endif
644#ifdef HAVE_STDINT_H
645# include <stdint.h>
646#endif
647#ifdef HAVE_STRINGS_H
648# include <strings.h>
649#endif
650#ifdef HAVE_SYS_TYPES_H
651# include <sys/types.h>
652#endif
653#ifdef HAVE_SYS_STAT_H
654# include <sys/stat.h>
655#endif
656#ifdef HAVE_UNISTD_H
657# include <unistd.h>
658#endif"
659
660ac_header_c_list=
661gl_use_threads_default=
662gl_use_winpthreads_default=
663ac_func_c_list=
664with_openssl_default='no'
665LIB_CRYPTO=
666gl_fnmatch_required=POSIX
667ac_unique_file="src/wget.c"
668gt_needs=
669ac_subst_vars='gltests_LTLIBOBJS
670gltests_LIBOBJS
671gl_LTLIBOBJS
672gl_LIBOBJS
673CONFIG_INCLUDE
674am__EXEEXT_FALSE
675am__EXEEXT_TRUE
676LTLIBOBJS
677LIBOBJS
678ALL_LIBS
679TEST_LIBS
680TEST_CFLAGS
681PLUGIN_SUPPORT_FALSE
682PLUGIN_SUPPORT_TRUE
683FUZZ_LIBS
684WITH_MICROHTTPD_FALSE
685WITH_MICROHTTPD_TRUE
686MICROHTTPD_LIBS
687MICROHTTPD_CFLAGS
688WITH_LIBPCRE_FALSE
689WITH_LIBPCRE_TRUE
690LIBPCRE_LIBS
691LIBPCRE_CFLAGS
692WITH_LIBPCRE2_FALSE
693WITH_LIBPCRE2_TRUE
694LIBPCRE2_LIBS
695LIBPCRE2_CFLAGS
696WITH_LIBIDN_FALSE
697WITH_LIBIDN_TRUE
698LIBIDN_LIBS
699LIBIDN_CFLAGS
700WITH_LIBIDN2_FALSE
701WITH_LIBIDN2_TRUE
702LIBIDN2_LIBS
703LIBIDN2_CFLAGS
704WITH_LZIP_FALSE
705WITH_LZIP_TRUE
706LZIP_LIBS
707LZIP_CFLAGS
708WITH_ZSTD_FALSE
709WITH_ZSTD_TRUE
710ZSTD_LIBS
711ZSTD_CFLAGS
712WITH_BROTLIDEC_FALSE
713WITH_BROTLIDEC_TRUE
714BROTLIDEC_LIBS
715BROTLIDEC_CFLAGS
716WITH_LZMA_FALSE
717WITH_LZMA_TRUE
718LZMA_LIBS
719LZMA_CFLAGS
720WITH_ZLIB_FALSE
721WITH_ZLIB_TRUE
722ZLIB_LIBS
723ZLIB_CFLAGS
724WITH_GPGME_FALSE
725WITH_GPGME_TRUE
726GPGME_CONFIG
727GPGME_LIBS
728GPGME_CFLAGS
729WITH_BZIP2_FALSE
730WITH_BZIP2_TRUE
731BZ2_LIBS
732WITH_LIBNGHTTP2_FALSE
733WITH_LIBNGHTTP2_TRUE
734LIBNGHTTP2_LIBS
735LIBNGHTTP2_CFLAGS
736WITH_LIBHSTS_FALSE
737WITH_LIBHSTS_TRUE
738LIBHSTS_LIBS
739LIBHSTS_CFLAGS
740WITH_LIBPSL_FALSE
741WITH_LIBPSL_TRUE
742LIBPSL_LIBS
743LIBPSL_CFLAGS
744WITH_CRYPT_FALSE
745WITH_CRYPT_TRUE
746WITH_LIBNETTLE_FALSE
747WITH_LIBNETTLE_TRUE
748NETTLE_LIBS
749NETTLE_CFLAGS
750WITH_TLS_FALSE
751WITH_TLS_TRUE
752WITH_WOLFSSL_FALSE
753WITH_WOLFSSL_TRUE
754WITH_OPENSSL_FALSE
755WITH_OPENSSL_TRUE
756WITH_GNUTLS_FALSE
757WITH_GNUTLS_TRUE
758WOLFSSL_LIBS
759WOLFSSL_CFLAGS
760OPENSSL_LIBS
761OPENSSL_CFLAGS
762GNUTLS_LIBS
763GNUTLS_CFLAGS
764PKG_CONFIG_LIBDIR
765PKG_CONFIG_PATH
766PKG_CONFIG
767VALGRIND_TESTS
768HAVE_VALGRIND
769LDCONFIG
770WITH_PANDOC_FALSE
771WITH_PANDOC_TRUE
772WITH_DOXYGEN_FALSE
773WITH_DOXYGEN_TRUE
774WITH_DOCS_FALSE
775WITH_DOCS_TRUE
776PANDOC
777DOXYGEN
778HAVE_PO_FALSE
779HAVE_PO_TRUE
780POSUB
781INTLLIBS
782XGETTEXT_EXTRA_OPTIONS
783MSGMERGE
784XGETTEXT_015
785XGETTEXT
786GMSGFMT_015
787MSGFMT_015
788GMSGFMT
789MSGFMT
790GETTEXT_MACRO_VERSION
791USE_NLS
792FUZZING_FALSE
793FUZZING_TRUE
794LIB_FUZZING_ENGINE
795ENABLE_MANYLIBS_FALSE
796ENABLE_MANYLIBS_TRUE
797GNULIB_WARN_CFLAGS
798WARN_CFLAGS
799MANYWARNINGS
800LEXLIB
801LEX_OUTPUT_ROOT
802LEX
803LIBWGET_VERSION_NUMBER
804LIBWGET_VERSION_PATCH
805LIBWGET_VERSION_MINOR
806LIBWGET_VERSION_MAJOR
807LIBWGET_VERSION
808LIBWGET_SO_VERSION
809LT_SYS_LIBRARY_PATH
810OTOOL64
811OTOOL
812LIPO
813NMEDIT
814DSYMUTIL
815MANIFEST_TOOL
816ac_ct_AR
817DLLTOOL
818OBJDUMP
819LN_S
820NM
821ac_ct_DUMPBIN
822DUMPBIN
823LD
824FGREP
825LIBTOOL
826CODE_COVERAGE_LIBS
827CODE_COVERAGE_CXXFLAGS
828CODE_COVERAGE_CFLAGS
829CODE_COVERAGE_CPPFLAGS
830GENHTML
831LCOV
832GCOV
833ifnGNUmake
834ifGNUmake
835CODE_COVERAGE_ENABLED
836CODE_COVERAGE_ENABLED_FALSE
837CODE_COVERAGE_ENABLED_TRUE
838gltests_WITNESS
839REPLACE_TOWLOWER
840REPLACE_ISWCNTRL
841HAVE_WCTYPE_H
842NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
843NEXT_WCTYPE_H
844HAVE_ISWCNTRL
845REPLACE_ISWXDIGIT
846REPLACE_ISWDIGIT
847REPLACE_ISWBLANK
848HAVE_WCTRANS_T
849HAVE_WCTYPE_T
850HAVE_ISWBLANK
851GNULIB_TOWCTRANS
852GNULIB_WCTRANS
853GNULIB_ISWCTYPE
854GNULIB_WCTYPE
855GNULIB_ISWXDIGIT
856GNULIB_ISWDIGIT
857GNULIB_ISWBLANK
858HAVE_CRTDEFS_H
859HAVE_WINT_T
860NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
861NEXT_WCHAR_H
862HAVE_UTIME_H
863NEXT_AS_FIRST_DIRECTIVE_UTIME_H
864NEXT_UTIME_H
865REPLACE_UTIME
866HAVE_UTIME
867GNULIB_MDA_UTIME
868GNULIB_UTIME
869LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
870LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
871LIBUNISTRING_UNIWIDTH_H
872LIBUNISTRING_UNITYPES_H
873HAVE_UNISTD_H
874NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
875NEXT_UNISTD_H
876TIME_H_DEFINES_TIME_UTC
877UNISTD_H_DEFINES_STRUCT_TIMESPEC
878PTHREAD_H_DEFINES_STRUCT_TIMESPEC
879SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
880TIME_H_DEFINES_STRUCT_TIMESPEC
881NEXT_AS_FIRST_DIRECTIVE_TIME_H
882NEXT_TIME_H
883NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
884NEXT_SYS_WAIT_H
885GNULIB_WAITPID
886HAVE_SYS_UIO_H
887NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
888NEXT_SYS_UIO_H
889HAVE_SYS_RANDOM_H
890NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
891NEXT_SYS_RANDOM_H
892NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
893NEXT_SYS_IOCTL_H
894HAVE_SYS_IOCTL_H
895HAVE_SYS_FILE_H
896NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H
897NEXT_SYS_FILE_H
898HAVE_STRINGS_H
899NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
900NEXT_STRINGS_H
901NEXT_AS_FIRST_DIRECTIVE_STRING_H
902NEXT_STRING_H
903HAVE_DECL_STRNCASECMP
904HAVE_STRCASECMP
905HAVE_FFS
906GNULIB_FFS
907NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
908NEXT_STDLIB_H
909NEXT_AS_FIRST_DIRECTIVE_STDIO_H
910NEXT_STDIO_H
911HAVE__BOOL
912GL_GENERATE_STDBOOL_H_FALSE
913GL_GENERATE_STDBOOL_H_TRUE
914STDBOOL_H
915GL_GENERATE_STDARG_H_FALSE
916GL_GENERATE_STDARG_H_TRUE
917STDARG_H
918NEXT_AS_FIRST_DIRECTIVE_STDARG_H
919NEXT_STDARG_H
920GL_GENERATE_STDALIGN_H_FALSE
921GL_GENERATE_STDALIGN_H_TRUE
922STDALIGN_H
923HAVE_SPAWN_H
924NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
925NEXT_SPAWN_H
926NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
927NEXT_SIGNAL_H
928LIB_SETLOCALE
929HAVE_SYS_CDEFS_H
930HAVE_STRUCT_SCHED_PARAM
931HAVE_SCHED_H
932NEXT_AS_FIRST_DIRECTIVE_SCHED_H
933NEXT_SCHED_H
934REPLACE_SCHED_YIELD
935HAVE_SCHED_YIELD
936GNULIB_SCHED_YIELD
937LIB_PTHREAD_SIGMASK
938REPLACE_RAISE
939REPLACE_PTHREAD_SIGMASK
940HAVE_SIGHANDLER_T
941HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
942HAVE_STRUCT_SIGACTION_SA_SIGACTION
943HAVE_SIGACTION
944HAVE_SIGINFO_T
945HAVE_SIGSET_T
946HAVE_RAISE
947HAVE_PTHREAD_SIGMASK
948HAVE_POSIX_SIGNALBLOCKING
949GNULIB_SIGACTION
950GNULIB_SIGPROCMASK
951GNULIB_SIGNAL_H_SIGPIPE
952GNULIB_RAISE
953GNULIB_PTHREAD_SIGMASK
954LIB_POSIX_SPAWN
955REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
956REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
957REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
958REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
959REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
960REPLACE_POSIX_SPAWN
961HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
962HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
963HAVE_POSIX_SPAWN_FILE_ACTIONS_T
964HAVE_POSIX_SPAWNATTR_T
965HAVE_POSIX_SPAWN
966GNULIB_POSIX_SPAWNATTR_DESTROY
967GNULIB_POSIX_SPAWNATTR_SETSIGMASK
968GNULIB_POSIX_SPAWNATTR_GETSIGMASK
969GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
970GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
971GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
972GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
973GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
974GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
975GNULIB_POSIX_SPAWNATTR_SETPGROUP
976GNULIB_POSIX_SPAWNATTR_GETPGROUP
977GNULIB_POSIX_SPAWNATTR_SETFLAGS
978GNULIB_POSIX_SPAWNATTR_GETFLAGS
979GNULIB_POSIX_SPAWNATTR_INIT
980GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
981GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
982GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
983GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
984GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
985GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
986GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
987GNULIB_POSIX_SPAWNP
988GNULIB_POSIX_SPAWN
989LIB_POLL
990NEXT_AS_FIRST_DIRECTIVE_POLL_H
991NEXT_POLL_H
992HAVE_POLL_H
993REPLACE_POLL
994HAVE_POLL
995GNULIB_POLL
996LIB_NL_LANGINFO
997GL_GENERATE_NETINET_IN_H_FALSE
998GL_GENERATE_NETINET_IN_H_TRUE
999NETINET_IN_H
1000HAVE_NETINET_IN_H
1001NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
1002NEXT_NETINET_IN_H
1003LIB_NANOSLEEP
1004LIB_SELECT
1005LIBSOCKET
1006HAVE_SYS_SELECT_H
1007NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
1008NEXT_SYS_SELECT_H
1009REPLACE_SELECT
1010REPLACE_PSELECT
1011HAVE_PSELECT
1012GNULIB_SELECT
1013GNULIB_PSELECT
1014REPLACE_LOCALTIME
1015REPLACE_GMTIME
1016REPLACE_TZSET
1017REPLACE_TIMEGM
1018REPLACE_STRFTIME
1019REPLACE_NANOSLEEP
1020REPLACE_MKTIME
1021REPLACE_LOCALTIME_R
1022REPLACE_CTIME
1023HAVE_TIMEZONE_T
1024HAVE_TIMESPEC_GET
1025HAVE_TIMEGM
1026HAVE_STRPTIME
1027HAVE_NANOSLEEP
1028HAVE_DECL_LOCALTIME_R
1029GNULIB_MDA_TZSET
1030GNULIB_TZSET
1031GNULIB_TIME_RZ
1032GNULIB_TIME_R
1033GNULIB_TIMESPEC_GET
1034GNULIB_TIMEGM
1035GNULIB_STRPTIME
1036GNULIB_STRFTIME
1037GNULIB_NANOSLEEP
1038GNULIB_LOCALTIME
1039GNULIB_MKTIME
1040GNULIB_CTIME
1041UNDEFINE_STRTOK_R
1042REPLACE_STRSIGNAL
1043REPLACE_STRERRORNAME_NP
1044REPLACE_STRERROR_R
1045REPLACE_STRERROR
1046REPLACE_STRTOK_R
1047REPLACE_STRCASESTR
1048REPLACE_STRSTR
1049REPLACE_STRNLEN
1050REPLACE_STRNDUP
1051REPLACE_STRNCAT
1052REPLACE_STRDUP
1053REPLACE_STRCHRNUL
1054REPLACE_STPNCPY
1055REPLACE_MEMMEM
1056REPLACE_MEMCHR
1057REPLACE_FFSLL
1058HAVE_STRVERSCMP
1059HAVE_DECL_STRSIGNAL
1060HAVE_SIGDESCR_NP
1061HAVE_SIGABBREV_NP
1062HAVE_STRERRORNAME_NP
1063HAVE_DECL_STRERROR_R
1064HAVE_DECL_STRTOK_R
1065HAVE_STRCASESTR
1066HAVE_STRSEP
1067HAVE_STRPBRK
1068HAVE_DECL_STRNLEN
1069HAVE_DECL_STRNDUP
1070HAVE_DECL_STRDUP
1071HAVE_STRCHRNUL
1072HAVE_STPNCPY
1073HAVE_STPCPY
1074HAVE_RAWMEMCHR
1075HAVE_DECL_MEMRCHR
1076HAVE_MEMPCPY
1077HAVE_DECL_MEMMEM
1078HAVE_FFSLL
1079HAVE_FFSL
1080HAVE_EXPLICIT_BZERO
1081GNULIB_MDA_STRDUP
1082GNULIB_MDA_MEMCCPY
1083HAVE_MBSLEN
1084GNULIB_STRVERSCMP
1085GNULIB_STRSIGNAL
1086GNULIB_SIGDESCR_NP
1087GNULIB_SIGABBREV_NP
1088GNULIB_STRERRORNAME_NP
1089GNULIB_STRERROR_R
1090GNULIB_STRERROR
1091GNULIB_MBSTOK_R
1092GNULIB_MBSSEP
1093GNULIB_MBSSPN
1094GNULIB_MBSPBRK
1095GNULIB_MBSCSPN
1096GNULIB_MBSCASESTR
1097GNULIB_MBSPCASECMP
1098GNULIB_MBSNCASECMP
1099GNULIB_MBSCASECMP
1100GNULIB_MBSSTR
1101GNULIB_MBSRCHR
1102GNULIB_MBSCHR
1103GNULIB_MBSNLEN
1104GNULIB_MBSLEN
1105GNULIB_STRTOK_R
1106GNULIB_STRCASESTR
1107GNULIB_STRSTR
1108GNULIB_STRSEP
1109GNULIB_STRPBRK
1110GNULIB_STRNLEN
1111GNULIB_STRNDUP
1112GNULIB_STRNCAT
1113GNULIB_STRDUP
1114GNULIB_STRCHRNUL
1115GNULIB_STPNCPY
1116GNULIB_STPCPY
1117GNULIB_RAWMEMCHR
1118GNULIB_MEMRCHR
1119GNULIB_MEMPCPY
1120GNULIB_MEMMEM
1121GNULIB_MEMCHR
1122GNULIB_FFSLL
1123GNULIB_FFSL
1124GNULIB_EXPLICIT_BZERO
1125LIB_MBRTOWC
1126LOCALE_ZH_CN
1127LOCALE_FR_UTF8
1128LOCALE_JA
1129SED
1130INTL_MACOSX_LIBS
1131NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
1132NEXT_LOCALE_H
1133HAVE_XLOCALE_H
1134NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
1135NEXT_STDDEF_H
1136GL_GENERATE_STDDEF_H_FALSE
1137GL_GENERATE_STDDEF_H_TRUE
1138STDDEF_H
1139HAVE_WCHAR_T
1140HAVE_MAX_ALIGN_T
1141REPLACE_NULL
1142LOCALENAME_ENHANCE_LOCALE_FUNCS
1143REPLACE_STRUCT_LCONV
1144REPLACE_FREELOCALE
1145REPLACE_DUPLOCALE
1146REPLACE_NEWLOCALE
1147REPLACE_SETLOCALE
1148REPLACE_LOCALECONV
1149HAVE_FREELOCALE
1150HAVE_DUPLOCALE
1151HAVE_NEWLOCALE
1152GNULIB_LOCALENAME
1153GNULIB_DUPLOCALE
1154GNULIB_SETLOCALE_NULL
1155GNULIB_SETLOCALE
1156GNULIB_LOCALECONV
1157LOCALCHARSET_TESTS_ENVIRONMENT
1158HAVE_VISIBILITY
1159CFLAG_VISIBILITY
1160HAVE_LANGINFO_YESEXPR
1161HAVE_LANGINFO_ERA
1162HAVE_LANGINFO_ALTMON
1163HAVE_LANGINFO_T_FMT_AMPM
1164HAVE_LANGINFO_CODESET
1165HAVE_LANGINFO_H
1166NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
1167NEXT_LANGINFO_H
1168REPLACE_NL_LANGINFO
1169HAVE_NL_LANGINFO
1170GNULIB_NL_LANGINFO
1171NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1172NEXT_INTTYPES_H
1173UINT64_MAX_EQ_ULONG_MAX
1174UINT32_MAX_LT_UINTMAX_MAX
1175PRIPTR_PREFIX
1176INT64_MAX_EQ_LONG_MAX
1177INT32_MAX_LT_INTMAX_MAX
1178REPLACE_STRTOUMAX
1179REPLACE_STRTOIMAX
1180HAVE_IMAXDIV_T
1181HAVE_DECL_STRTOUMAX
1182HAVE_DECL_STRTOIMAX
1183HAVE_DECL_IMAXDIV
1184HAVE_DECL_IMAXABS
1185GNULIB_STRTOUMAX
1186GNULIB_STRTOIMAX
1187GNULIB_IMAXDIV
1188GNULIB_IMAXABS
1189GL_GENERATE_STDINT_H_FALSE
1190GL_GENERATE_STDINT_H_TRUE
1191STDINT_H
1192HAVE_SYS_INTTYPES_H
1193HAVE_SYS_BITYPES_H
1194HAVE_C99_STDINT_H
1195WINT_T_SUFFIX
1196WCHAR_T_SUFFIX
1197SIG_ATOMIC_T_SUFFIX
1198SIZE_T_SUFFIX
1199PTRDIFF_T_SUFFIX
1200HAVE_SIGNED_WINT_T
1201HAVE_SIGNED_WCHAR_T
1202HAVE_SIGNED_SIG_ATOMIC_T
1203BITSIZEOF_WINT_T
1204BITSIZEOF_WCHAR_T
1205BITSIZEOF_SIG_ATOMIC_T
1206BITSIZEOF_SIZE_T
1207BITSIZEOF_PTRDIFF_T
1208APPLE_UNIVERSAL_BUILD
1209HAVE_STDINT_H
1210NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1211NEXT_STDINT_H
1212HAVE_SYS_TYPES_H
1213HAVE_INTTYPES_H
1214HAVE_WCHAR_H
1215GNULIB_OVERRIDES_WINT_T
1216GL_GENERATE_LIMITS_H_FALSE
1217GL_GENERATE_LIMITS_H_TRUE
1218LIMITS_H
1219NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1220NEXT_LIMITS_H
1221INET_PTON_LIB
1222LTLIBICONV
1223LIBICONV
1224LIB_HARD_LOCALE
1225LIB_SETLOCALE_NULL
1226GL_GENERATE_GLOB_H_FALSE
1227GL_GENERATE_GLOB_H_TRUE
1228GLOB_H
1229HAVE_GLOB_H
1230NEXT_AS_FIRST_DIRECTIVE_GLOB_H
1231NEXT_GLOB_H
1232REPLACE_GLOB_PATTERN_P
1233REPLACE_GLOB
1234HAVE_GLOB_PATTERN_P
1235HAVE_GLOB
1236GNULIB_GLOB
1237NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1238NEXT_SYS_TIME_H
1239REPLACE_STRUCT_TIMEVAL
1240REPLACE_GETTIMEOFDAY
1241HAVE_SYS_TIME_H
1242HAVE_STRUCT_TIMEVAL
1243HAVE_GETTIMEOFDAY
1244GNULIB_GETTIMEOFDAY
1245LTLIBINTL
1246LIBINTL
1247LIB_GETRANDOM
1248REPLACE_GETRANDOM
1249HAVE_GETRANDOM
1250GNULIB_GETRANDOM
1251LIB_GETLOGIN
1252GETHOSTNAME_LIB
1253GETADDRINFO_LIB
1254INET_NTOP_LIB
1255SERVENT_LIB
1256HOSTENT_LIB
1257HAVE_NETDB_H
1258NEXT_AS_FIRST_DIRECTIVE_NETDB_H
1259NEXT_NETDB_H
1260REPLACE_GETADDRINFO
1261REPLACE_GAI_STRERROR
1262HAVE_DECL_GETNAMEINFO
1263HAVE_DECL_GETADDRINFO
1264HAVE_DECL_GAI_STRERROR
1265HAVE_DECL_FREEADDRINFO
1266HAVE_STRUCT_ADDRINFO
1267GNULIB_GETADDRINFO
1268WINDOWS_64_BIT_ST_SIZE
1269WINDOWS_STAT_TIMESPEC
1270NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1271NEXT_SYS_STAT_H
1272REPLACE_UTIMENSAT
1273REPLACE_STAT
1274REPLACE_MKNODAT
1275REPLACE_MKNOD
1276REPLACE_MKFIFOAT
1277REPLACE_MKFIFO
1278REPLACE_MKDIR
1279REPLACE_LSTAT
1280REPLACE_FUTIMENS
1281REPLACE_FSTATAT
1282REPLACE_FSTAT
1283REPLACE_FCHMODAT
1284HAVE_UTIMENSAT
1285HAVE_MKNODAT
1286HAVE_MKNOD
1287HAVE_MKFIFOAT
1288HAVE_MKFIFO
1289HAVE_MKDIRAT
1290HAVE_LSTAT
1291HAVE_LCHMOD
1292HAVE_GETUMASK
1293HAVE_FUTIMENS
1294HAVE_FSTATAT
1295HAVE_FCHMODAT
1296GNULIB_MDA_UMASK
1297GNULIB_MDA_MKDIR
1298GNULIB_MDA_CHMOD
1299GNULIB_OVERRIDES_STRUCT_STAT
1300GNULIB_UTIMENSAT
1301GNULIB_STAT
1302GNULIB_MKNODAT
1303GNULIB_MKNOD
1304GNULIB_MKFIFOAT
1305GNULIB_MKFIFO
1306GNULIB_MKDIRAT
1307GNULIB_MKDIR
1308GNULIB_LSTAT
1309GNULIB_LCHMOD
1310GNULIB_GETUMASK
1311GNULIB_FUTIMENS
1312GNULIB_FSTATAT
1313GNULIB_FSTAT
1314GNULIB_FCHMODAT
1315WINDOWS_STAT_INODES
1316WINDOWS_64_BIT_OFF_T
1317NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
1318NEXT_SYS_TYPES_H
1319GL_GENERATE_FNMATCH_H_FALSE
1320GL_GENERATE_FNMATCH_H_TRUE
1321FNMATCH_H
1322HAVE_FNMATCH_H
1323NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1324NEXT_FNMATCH_H
1325REPLACE_FNMATCH
1326HAVE_FNMATCH
1327GNULIB_FNMATCH
1328HAVE_FLOCK
1329GNULIB_FLOCK
1330REPLACE_ITOLD
1331GL_GENERATE_FLOAT_H_FALSE
1332GL_GENERATE_FLOAT_H_TRUE
1333FLOAT_H
1334NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1335NEXT_FLOAT_H
1336NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1337NEXT_FCNTL_H
1338REPLACE_OPENAT
1339REPLACE_OPEN
1340REPLACE_FCNTL
1341REPLACE_CREAT
1342HAVE_OPENAT
1343HAVE_FCNTL
1344GNULIB_MDA_OPEN
1345GNULIB_MDA_CREAT
1346GNULIB_OPENAT
1347GNULIB_OPEN
1348GNULIB_NONBLOCKING
1349GNULIB_FCNTL
1350GNULIB_CREAT
1351REPLACE_VSPRINTF
1352REPLACE_VSNPRINTF
1353REPLACE_VPRINTF
1354REPLACE_VFPRINTF
1355REPLACE_VDPRINTF
1356REPLACE_VASPRINTF
1357REPLACE_TMPFILE
1358REPLACE_STDIO_WRITE_FUNCS
1359REPLACE_STDIO_READ_FUNCS
1360REPLACE_SPRINTF
1361REPLACE_SNPRINTF
1362REPLACE_RENAMEAT
1363REPLACE_RENAME
1364REPLACE_REMOVE
1365REPLACE_PRINTF
1366REPLACE_POPEN
1367REPLACE_PERROR
1368REPLACE_OBSTACK_PRINTF
1369REPLACE_GETLINE
1370REPLACE_GETDELIM
1371REPLACE_FTELLO
1372REPLACE_FTELL
1373REPLACE_FSEEKO
1374REPLACE_FSEEK
1375REPLACE_FREOPEN
1376REPLACE_FPURGE
1377REPLACE_FPRINTF
1378REPLACE_FOPEN
1379REPLACE_FFLUSH
1380REPLACE_FDOPEN
1381REPLACE_FCLOSE
1382REPLACE_DPRINTF
1383HAVE_VDPRINTF
1384HAVE_VASPRINTF
1385HAVE_RENAMEAT
1386HAVE_POPEN
1387HAVE_PCLOSE
1388HAVE_FTELLO
1389HAVE_FSEEKO
1390HAVE_DPRINTF
1391HAVE_DECL_VSNPRINTF
1392HAVE_DECL_SNPRINTF
1393HAVE_DECL_OBSTACK_PRINTF
1394HAVE_DECL_GETLINE
1395HAVE_DECL_GETDELIM
1396HAVE_DECL_FTELLO
1397HAVE_DECL_FSEEKO
1398HAVE_DECL_FPURGE
1399HAVE_DECL_FCLOSEALL
1400GNULIB_MDA_TEMPNAM
1401GNULIB_MDA_PUTW
1402GNULIB_MDA_GETW
1403GNULIB_MDA_FILENO
1404GNULIB_MDA_FDOPEN
1405GNULIB_MDA_FCLOSEALL
1406GNULIB_VSPRINTF_POSIX
1407GNULIB_VSNPRINTF
1408GNULIB_VPRINTF_POSIX
1409GNULIB_VPRINTF
1410GNULIB_VFPRINTF_POSIX
1411GNULIB_VFPRINTF
1412GNULIB_VDPRINTF
1413GNULIB_VSCANF
1414GNULIB_VFSCANF
1415GNULIB_VASPRINTF
1416GNULIB_TMPFILE
1417GNULIB_STDIO_H_SIGPIPE
1418GNULIB_STDIO_H_NONBLOCKING
1419GNULIB_SPRINTF_POSIX
1420GNULIB_SNPRINTF
1421GNULIB_SCANF
1422GNULIB_RENAMEAT
1423GNULIB_RENAME
1424GNULIB_REMOVE
1425GNULIB_PUTS
1426GNULIB_PUTCHAR
1427GNULIB_PUTC
1428GNULIB_PRINTF_POSIX
1429GNULIB_PRINTF
1430GNULIB_POPEN
1431GNULIB_PERROR
1432GNULIB_PCLOSE
1433GNULIB_OBSTACK_PRINTF_POSIX
1434GNULIB_OBSTACK_PRINTF
1435GNULIB_GETLINE
1436GNULIB_GETDELIM
1437GNULIB_GETCHAR
1438GNULIB_GETC
1439GNULIB_FWRITE
1440GNULIB_FTELLO
1441GNULIB_FTELL
1442GNULIB_FSEEKO
1443GNULIB_FSEEK
1444GNULIB_FSCANF
1445GNULIB_FREOPEN
1446GNULIB_FREAD
1447GNULIB_FPUTS
1448GNULIB_FPUTC
1449GNULIB_FPURGE
1450GNULIB_FPRINTF_POSIX
1451GNULIB_FPRINTF
1452GNULIB_FOPEN
1453GNULIB_FGETS
1454GNULIB_FGETC
1455GNULIB_FFLUSH
1456GNULIB_FDOPEN
1457GNULIB_FCLOSE
1458GNULIB_DPRINTF
1459EOVERFLOW_VALUE
1460EOVERFLOW_HIDDEN
1461ENOLINK_VALUE
1462ENOLINK_HIDDEN
1463EMULTIHOP_VALUE
1464EMULTIHOP_HIDDEN
1465GL_GENERATE_ERRNO_H_FALSE
1466GL_GENERATE_ERRNO_H_TRUE
1467ERRNO_H
1468NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1469NEXT_ERRNO_H
1470HAVE_DIRENT_H
1471NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1472NEXT_DIRENT_H
1473NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1474NEXT_CTYPE_H
1475HAVE_ISBLANK
1476GNULIB_ISBLANK
1477LIB_CRYPTO
1478LTLIBMULTITHREAD
1479LIBMULTITHREAD
1480LTLIBTHREAD
1481LIBTHREAD
1482LIBSTDTHREAD
1483LIB_SCHED_YIELD
1484LIBPMULTITHREAD
1485LIBPTHREAD
1486REPLACE_FDOPENDIR
1487REPLACE_DIRFD
1488REPLACE_CLOSEDIR
1489REPLACE_OPENDIR
1490HAVE_ALPHASORT
1491HAVE_SCANDIR
1492HAVE_FDOPENDIR
1493HAVE_DECL_FDOPENDIR
1494HAVE_DECL_DIRFD
1495HAVE_CLOSEDIR
1496HAVE_REWINDDIR
1497HAVE_READDIR
1498HAVE_OPENDIR
1499GNULIB_ALPHASORT
1500GNULIB_SCANDIR
1501GNULIB_FDOPENDIR
1502GNULIB_DIRFD
1503GNULIB_CLOSEDIR
1504GNULIB_REWINDDIR
1505GNULIB_READDIR
1506GNULIB_OPENDIR
1507HAVE_MSVC_INVALID_PARAMETER_HANDLER
1508LIB_CLOCK_GETTIME
1509GL_GENERATE_BYTESWAP_H_FALSE
1510GL_GENERATE_BYTESWAP_H_TRUE
1511BYTESWAP_H
1512LOCALE_FR
1513REPLACE_WCSTOK
1514REPLACE_WCSFTIME
1515REPLACE_WCSWIDTH
1516REPLACE_WCWIDTH
1517REPLACE_WCSNRTOMBS
1518REPLACE_WCSRTOMBS
1519REPLACE_WCRTOMB
1520REPLACE_MBSNRTOWCS
1521REPLACE_MBSRTOWCS
1522REPLACE_MBRLEN
1523REPLACE_MBRTOWC
1524REPLACE_MBSINIT
1525REPLACE_WCTOB
1526REPLACE_BTOWC
1527REPLACE_MBSTATE_T
1528HAVE_DECL_WCWIDTH
1529HAVE_DECL_WCSDUP
1530HAVE_DECL_WCTOB
1531HAVE_WCSFTIME
1532HAVE_WCSWIDTH
1533HAVE_WCSTOK
1534HAVE_WCSSTR
1535HAVE_WCSPBRK
1536HAVE_WCSSPN
1537HAVE_WCSCSPN
1538HAVE_WCSRCHR
1539HAVE_WCSCHR
1540HAVE_WCSDUP
1541HAVE_WCSXFRM
1542HAVE_WCSCOLL
1543HAVE_WCSNCASECMP
1544HAVE_WCSCASECMP
1545HAVE_WCSNCMP
1546HAVE_WCSCMP
1547HAVE_WCSNCAT
1548HAVE_WCSCAT
1549HAVE_WCPNCPY
1550HAVE_WCSNCPY
1551HAVE_WCPCPY
1552HAVE_WCSCPY
1553HAVE_WCSNLEN
1554HAVE_WCSLEN
1555HAVE_WMEMSET
1556HAVE_WMEMPCPY
1557HAVE_WMEMMOVE
1558HAVE_WMEMCPY
1559HAVE_WMEMCMP
1560HAVE_WMEMCHR
1561HAVE_WCSNRTOMBS
1562HAVE_WCSRTOMBS
1563HAVE_WCRTOMB
1564HAVE_MBSNRTOWCS
1565HAVE_MBSRTOWCS
1566HAVE_MBRLEN
1567HAVE_MBRTOWC
1568HAVE_MBSINIT
1569HAVE_BTOWC
1570GNULIB_MDA_WCSDUP
1571GNULIB_WCSFTIME
1572GNULIB_WCSWIDTH
1573GNULIB_WCSTOK
1574GNULIB_WCSSTR
1575GNULIB_WCSPBRK
1576GNULIB_WCSSPN
1577GNULIB_WCSCSPN
1578GNULIB_WCSRCHR
1579GNULIB_WCSCHR
1580GNULIB_WCSDUP
1581GNULIB_WCSXFRM
1582GNULIB_WCSCOLL
1583GNULIB_WCSNCASECMP
1584GNULIB_WCSCASECMP
1585GNULIB_WCSNCMP
1586GNULIB_WCSCMP
1587GNULIB_WCSNCAT
1588GNULIB_WCSCAT
1589GNULIB_WCPNCPY
1590GNULIB_WCSNCPY
1591GNULIB_WCPCPY
1592GNULIB_WCSCPY
1593GNULIB_WCSNLEN
1594GNULIB_WCSLEN
1595GNULIB_WMEMSET
1596GNULIB_WMEMPCPY
1597GNULIB_WMEMMOVE
1598GNULIB_WMEMCPY
1599GNULIB_WMEMCMP
1600GNULIB_WMEMCHR
1601GNULIB_WCWIDTH
1602GNULIB_WCSNRTOMBS
1603GNULIB_WCSRTOMBS
1604GNULIB_WCRTOMB
1605GNULIB_MBSNRTOWCS
1606GNULIB_MBSRTOWCS
1607GNULIB_MBRLEN
1608GNULIB_MBRTOWC
1609GNULIB_MBSINIT
1610GNULIB_WCTOB
1611GNULIB_BTOWC
1612REPLACE_WCTOMB
1613REPLACE_UNSETENV
1614REPLACE_STRTOLD
1615REPLACE_STRTOD
1616REPLACE_SETSTATE
1617REPLACE_SETENV
1618REPLACE_REALPATH
1619REPLACE_REALLOC
1620REPLACE_RANDOM_R
1621REPLACE_RANDOM
1622REPLACE_QSORT_R
1623REPLACE_PUTENV
1624REPLACE_PTSNAME_R
1625REPLACE_PTSNAME
1626REPLACE_POSIX_MEMALIGN
1627REPLACE_MKSTEMP
1628REPLACE_MBTOWC
1629REPLACE_MALLOC
1630REPLACE_INITSTATE
1631REPLACE_FREE
1632REPLACE_CANONICALIZE_FILE_NAME
1633REPLACE_CALLOC
1634REPLACE_ALIGNED_ALLOC
1635HAVE_DECL_UNSETENV
1636HAVE_UNLOCKPT
1637HAVE_SYS_LOADAVG_H
1638HAVE_STRUCT_RANDOM_DATA
1639HAVE_STRTOULL
1640HAVE_STRTOLL
1641HAVE_STRTOLD
1642HAVE_STRTOD
1643HAVE_DECL_SETSTATE
1644HAVE_SETSTATE
1645HAVE_DECL_SETENV
1646HAVE_SETENV
1647HAVE_SECURE_GETENV
1648HAVE_RPMATCH
1649HAVE_REALPATH
1650HAVE_REALLOCARRAY
1651HAVE_RANDOM_R
1652HAVE_RANDOM_H
1653HAVE_RANDOM
1654HAVE_QSORT_R
1655HAVE_PTSNAME_R
1656HAVE_PTSNAME
1657HAVE_POSIX_OPENPT
1658HAVE_POSIX_MEMALIGN
1659HAVE_MKSTEMPS
1660HAVE_MKSTEMP
1661HAVE_MKOSTEMPS
1662HAVE_MKOSTEMP
1663HAVE_MKDTEMP
1664HAVE_MBTOWC
1665HAVE_DECL_INITSTATE
1666HAVE_INITSTATE
1667HAVE_GRANTPT
1668HAVE_GETSUBOPT
1669HAVE_DECL_GETLOADAVG
1670HAVE_DECL_GCVT
1671HAVE_DECL_FCVT
1672HAVE_DECL_ECVT
1673HAVE_CANONICALIZE_FILE_NAME
1674HAVE_ATOLL
1675HAVE_ALIGNED_ALLOC
1676HAVE__EXIT
1677GNULIB_MDA_PUTENV
1678GNULIB_MDA_MKTEMP
1679GNULIB_MDA_GCVT
1680GNULIB_MDA_FCVT
1681GNULIB_MDA_ECVT
1682GNULIB_WCTOMB
1683GNULIB_UNSETENV
1684GNULIB_UNLOCKPT
1685GNULIB_SYSTEM_POSIX
1686GNULIB_STRTOULL
1687GNULIB_STRTOLL
1688GNULIB_STRTOLD
1689GNULIB_STRTOD
1690GNULIB_SETENV
1691GNULIB_SECURE_GETENV
1692GNULIB_RPMATCH
1693GNULIB_REALPATH
1694GNULIB_REALLOC_POSIX
1695GNULIB_REALLOCARRAY
1696GNULIB_RANDOM_R
1697GNULIB_RANDOM
1698GNULIB_QSORT_R
1699GNULIB_PUTENV
1700GNULIB_PTSNAME_R
1701GNULIB_PTSNAME
1702GNULIB_POSIX_OPENPT
1703GNULIB_POSIX_MEMALIGN
1704GNULIB_MKSTEMPS
1705GNULIB_MKSTEMP
1706GNULIB_MKOSTEMPS
1707GNULIB_MKOSTEMP
1708GNULIB_MKDTEMP
1709GNULIB_MBTOWC
1710GNULIB_MALLOC_POSIX
1711GNULIB_GRANTPT
1712GNULIB_GETSUBOPT
1713GNULIB_GETLOADAVG
1714GNULIB_FREE_POSIX
1715GNULIB_CANONICALIZE_FILE_NAME
1716GNULIB_CALLOC_POSIX
1717GNULIB_ATOLL
1718GNULIB_ALIGNED_ALLOC
1719GNULIB__EXIT
1720HAVE_FEATURES_H
1721NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
1722NEXT_ARPA_INET_H
1723HAVE_ARPA_INET_H
1724REPLACE_INET_PTON
1725REPLACE_INET_NTOP
1726HAVE_DECL_INET_PTON
1727HAVE_DECL_INET_NTOP
1728GNULIB_INET_PTON
1729GNULIB_INET_NTOP
1730HAVE_ALLOCA_H
1731GL_GENERATE_ALLOCA_H_FALSE
1732GL_GENERATE_ALLOCA_H_TRUE
1733ALLOCA_H
1734ALLOCA
1735LTALLOCA
1736HAVE_WINSOCK2_H
1737REPLACE_IOCTL
1738SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1739SYS_IOCTL_H_HAVE_WINSOCK2_H
1740GNULIB_IOCTL
1741UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1742UNISTD_H_HAVE_WINSOCK2_H
1743UNISTD_H_HAVE_SYS_RANDOM_H
1744REPLACE_WRITE
1745REPLACE_USLEEP
1746REPLACE_UNLINKAT
1747REPLACE_UNLINK
1748REPLACE_TTYNAME_R
1749REPLACE_TRUNCATE
1750REPLACE_SYMLINKAT
1751REPLACE_SYMLINK
1752REPLACE_SLEEP
1753REPLACE_RMDIR
1754REPLACE_READLINKAT
1755REPLACE_READLINK
1756REPLACE_READ
1757REPLACE_PWRITE
1758REPLACE_PREAD
1759REPLACE_LSEEK
1760REPLACE_LINKAT
1761REPLACE_LINK
1762REPLACE_LCHOWN
1763REPLACE_ISATTY
1764REPLACE_GETPASS
1765REPLACE_GETPAGESIZE
1766REPLACE_GETGROUPS
1767REPLACE_GETLOGIN_R
1768REPLACE_GETDTABLESIZE
1769REPLACE_GETDOMAINNAME
1770REPLACE_GETCWD
1771REPLACE_FTRUNCATE
1772REPLACE_FCHOWNAT
1773REPLACE_FACCESSAT
1774REPLACE_EXECVPE
1775REPLACE_EXECVP
1776REPLACE_EXECVE
1777REPLACE_EXECV
1778REPLACE_EXECLP
1779REPLACE_EXECLE
1780REPLACE_EXECL
1781REPLACE_DUP2
1782REPLACE_DUP
1783REPLACE_CLOSE
1784REPLACE_CHOWN
1785REPLACE_ACCESS
1786HAVE_SYS_PARAM_H
1787HAVE_OS_H
1788HAVE_DECL_TTYNAME_R
1789HAVE_DECL_TRUNCATE
1790HAVE_DECL_SETHOSTNAME
1791HAVE_DECL_GETUSERSHELL
1792HAVE_DECL_GETPAGESIZE
1793HAVE_DECL_GETLOGIN_R
1794HAVE_DECL_GETLOGIN
1795HAVE_DECL_GETDOMAINNAME
1796HAVE_DECL_FDATASYNC
1797HAVE_DECL_FCHDIR
1798HAVE_DECL_EXECVPE
1799HAVE_DECL_ENVIRON
1800HAVE_USLEEP
1801HAVE_UNLINKAT
1802HAVE_SYMLINKAT
1803HAVE_SYMLINK
1804HAVE_SLEEP
1805HAVE_SETHOSTNAME
1806HAVE_READLINKAT
1807HAVE_READLINK
1808HAVE_PWRITE
1809HAVE_PREAD
1810HAVE_PIPE2
1811HAVE_PIPE
1812HAVE_LINKAT
1813HAVE_LINK
1814HAVE_LCHOWN
1815HAVE_GROUP_MEMBER
1816HAVE_GETPASS
1817HAVE_GETPAGESIZE
1818HAVE_GETLOGIN
1819HAVE_GETHOSTNAME
1820HAVE_GETGROUPS
1821HAVE_GETENTROPY
1822HAVE_GETDTABLESIZE
1823HAVE_FTRUNCATE
1824HAVE_FSYNC
1825HAVE_FDATASYNC
1826HAVE_FCHOWNAT
1827HAVE_FCHDIR
1828HAVE_FACCESSAT
1829HAVE_EXECVPE
1830HAVE_EUIDACCESS
1831HAVE_DUP3
1832HAVE_COPY_FILE_RANGE
1833HAVE_CHOWN
1834GNULIB_MDA_WRITE
1835GNULIB_MDA_UNLINK
1836GNULIB_MDA_SWAB
1837GNULIB_MDA_RMDIR
1838GNULIB_MDA_READ
1839GNULIB_MDA_LSEEK
1840GNULIB_MDA_ISATTY
1841GNULIB_MDA_GETPID
1842GNULIB_MDA_GETCWD
1843GNULIB_MDA_EXECVPE
1844GNULIB_MDA_EXECVP
1845GNULIB_MDA_EXECVE
1846GNULIB_MDA_EXECV
1847GNULIB_MDA_EXECLP
1848GNULIB_MDA_EXECLE
1849GNULIB_MDA_EXECL
1850GNULIB_MDA_DUP2
1851GNULIB_MDA_DUP
1852GNULIB_MDA_CLOSE
1853GNULIB_MDA_CHDIR
1854GNULIB_MDA_ACCESS
1855GNULIB_WRITE
1856GNULIB_USLEEP
1857GNULIB_UNLINKAT
1858GNULIB_UNLINK
1859GNULIB_UNISTD_H_SIGPIPE
1860GNULIB_UNISTD_H_NONBLOCKING
1861GNULIB_TTYNAME_R
1862GNULIB_TRUNCATE
1863GNULIB_SYMLINKAT
1864GNULIB_SYMLINK
1865GNULIB_SLEEP
1866GNULIB_SETHOSTNAME
1867GNULIB_RMDIR
1868GNULIB_READLINKAT
1869GNULIB_READLINK
1870GNULIB_READ
1871GNULIB_PWRITE
1872GNULIB_PREAD
1873GNULIB_PIPE2
1874GNULIB_PIPE
1875GNULIB_LSEEK
1876GNULIB_LINKAT
1877GNULIB_LINK
1878GNULIB_LCHOWN
1879GNULIB_ISATTY
1880GNULIB_GROUP_MEMBER
1881GNULIB_GETUSERSHELL
1882GNULIB_GETPASS
1883GNULIB_GETPAGESIZE
1884GNULIB_GETOPT_POSIX
1885GNULIB_GETLOGIN_R
1886GNULIB_GETLOGIN
1887GNULIB_GETHOSTNAME
1888GNULIB_GETGROUPS
1889GNULIB_GETENTROPY
1890GNULIB_GETDTABLESIZE
1891GNULIB_GETDOMAINNAME
1892GNULIB_GETCWD
1893GNULIB_FTRUNCATE
1894GNULIB_FSYNC
1895GNULIB_FDATASYNC
1896GNULIB_FCHOWNAT
1897GNULIB_FCHDIR
1898GNULIB_FACCESSAT
1899GNULIB_EXECVPE
1900GNULIB_EXECVP
1901GNULIB_EXECVE
1902GNULIB_EXECV
1903GNULIB_EXECLP
1904GNULIB_EXECLE
1905GNULIB_EXECL
1906GNULIB_EUIDACCESS
1907GNULIB_ENVIRON
1908GNULIB_DUP3
1909GNULIB_DUP2
1910GNULIB_DUP
1911GNULIB_COPY_FILE_RANGE
1912GNULIB_CLOSE
1913GNULIB_CHOWN
1914GNULIB_CHDIR
1915GNULIB_ACCESS
1916HAVE_WS2TCPIP_H
1917HAVE_SYS_SOCKET_H
1918NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
1919NEXT_SYS_SOCKET_H
1920PRAGMA_COLUMNS
1921PRAGMA_SYSTEM_HEADER
1922INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1923INCLUDE_NEXT
1924HAVE_ACCEPT4
1925HAVE_SA_FAMILY_T
1926HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
1927HAVE_STRUCT_SOCKADDR_STORAGE
1928GNULIB_ACCEPT4
1929GNULIB_SHUTDOWN
1930GNULIB_SETSOCKOPT
1931GNULIB_SENDTO
1932GNULIB_RECVFROM
1933GNULIB_SEND
1934GNULIB_RECV
1935GNULIB_LISTEN
1936GNULIB_GETSOCKOPT
1937GNULIB_GETSOCKNAME
1938GNULIB_GETPEERNAME
1939GNULIB_BIND
1940GNULIB_ACCEPT
1941GNULIB_CONNECT
1942GNULIB_SOCKET
1943GL_COND_LIBTOOL_FALSE
1944GL_COND_LIBTOOL_TRUE
1945RANLIB
1946ARFLAGS
1947AR
1948EGREP
1949GREP
1950CPP
1951am__fastdepCC_FALSE
1952am__fastdepCC_TRUE
1953CCDEPMODE
1954am__nodep
1955AMDEPBACKSLASH
1956AMDEP_FALSE
1957AMDEP_TRUE
1958am__include
1959DEPDIR
1960OBJEXT
1961EXEEXT
1962ac_ct_CC
1963CPPFLAGS
1964LDFLAGS
1965CFLAGS
1966CC
1967host_os
1968host_vendor
1969host_cpu
1970host
1971build_os
1972build_vendor
1973build_cpu
1974build
1975AM_BACKSLASH
1976AM_DEFAULT_VERBOSITY
1977AM_DEFAULT_V
1978AM_V
1979CSCOPE
1980ETAGS
1981CTAGS
1982am__untar
1983am__tar
1984AMTAR
1985am__leading_dot
1986SET_MAKE
1987AWK
1988mkdir_p
1989MKDIR_P
1990INSTALL_STRIP_PROGRAM
1991STRIP
1992install_sh
1993MAKEINFO
1994AUTOHEADER
1995AUTOMAKE
1996AUTOCONF
1997ACLOCAL
1998VERSION
1999PACKAGE
2000CYGPATH_W
2001am__isrc
2002INSTALL_DATA
2003INSTALL_SCRIPT
2004INSTALL_PROGRAM
2005target_alias
2006host_alias
2007build_alias
2008LIBS
2009ECHO_T
2010ECHO_N
2011ECHO_C
2012DEFS
2013mandir
2014localedir
2015libdir
2016psdir
2017pdfdir
2018dvidir
2019htmldir
2020infodir
2021docdir
2022oldincludedir
2023includedir
2024runstatedir
2025localstatedir
2026sharedstatedir
2027sysconfdir
2028datadir
2029datarootdir
2030libexecdir
2031sbindir
2032bindir
2033program_transform_name
2034prefix
2035exec_prefix
2036PACKAGE_URL
2037PACKAGE_BUGREPORT
2038PACKAGE_STRING
2039PACKAGE_VERSION
2040PACKAGE_TARNAME
2041PACKAGE_NAME
2042PATH_SEPARATOR
2043SHELL
2044am__quote'
2045ac_subst_files=''
2046ac_user_opts='
2047enable_option_checking
2048enable_silent_rules
2049enable_dependency_tracking
2050enable_largefile
2051enable_threads
2052enable_cross_guesses
2053with_linux_crypto
2054with_openssl
2055with_gnu_ld
2056enable_rpath
2057with_libiconv_prefix
2058with_included_regex
2059with_gcov
2060enable_code_coverage
2061enable_shared
2062enable_static
2063with_pic
2064enable_fast_install
2065with_aix_soname
2066with_sysroot
2067enable_libtool_lock
2068enable_manywarnings
2069enable_manylibs
2070enable_fuzzing
2071enable_fsanitize_ubsan
2072enable_fsanitize_asan
2073enable_fsanitize_msan
2074enable_fsanitize_tsan
2075enable_assert
2076enable_xattr
2077enable_nls
2078with_libintl_prefix
2079enable_doc
2080enable_valgrind_tests
2081with_ssl
2082with_libpsl
2083with_libhsts
2084with_libnghttp2
2085with_bzip2
2086with_gpgme
2087with_gpgme_prefix
2088with_zlib
2089with_lzma
2090with_brotlidec
2091with_zstd
2092with_lz
2093with_libidn2
2094with_libidn
2095with_libpcre2
2096with_libpcre
2097with_libmicrohttpd
2098with_plugin_support
2099'
2100      ac_precious_vars='build_alias
2101host_alias
2102target_alias
2103CC
2104CFLAGS
2105LDFLAGS
2106LIBS
2107CPPFLAGS
2108CPP
2109LT_SYS_LIBRARY_PATH
2110PKG_CONFIG
2111PKG_CONFIG_PATH
2112PKG_CONFIG_LIBDIR
2113GNUTLS_CFLAGS
2114GNUTLS_LIBS
2115OPENSSL_CFLAGS
2116OPENSSL_LIBS
2117WOLFSSL_CFLAGS
2118WOLFSSL_LIBS
2119NETTLE_CFLAGS
2120NETTLE_LIBS
2121LIBPSL_CFLAGS
2122LIBPSL_LIBS
2123LIBHSTS_CFLAGS
2124LIBHSTS_LIBS
2125LIBNGHTTP2_CFLAGS
2126LIBNGHTTP2_LIBS
2127GPGME_CFLAGS
2128GPGME_LIBS
2129ZLIB_CFLAGS
2130ZLIB_LIBS
2131LZMA_CFLAGS
2132LZMA_LIBS
2133BROTLIDEC_CFLAGS
2134BROTLIDEC_LIBS
2135ZSTD_CFLAGS
2136ZSTD_LIBS
2137LZIP_CFLAGS
2138LZIP_LIBS
2139LIBIDN2_CFLAGS
2140LIBIDN2_LIBS
2141LIBIDN_CFLAGS
2142LIBIDN_LIBS
2143LIBPCRE2_CFLAGS
2144LIBPCRE2_LIBS
2145LIBPCRE_CFLAGS
2146LIBPCRE_LIBS
2147MICROHTTPD_CFLAGS
2148MICROHTTPD_LIBS'
2149
2150
2151# Initialize some variables set by options.
2152ac_init_help=
2153ac_init_version=false
2154ac_unrecognized_opts=
2155ac_unrecognized_sep=
2156# The variables have the same names as the options, with
2157# dashes changed to underlines.
2158cache_file=/dev/null
2159exec_prefix=NONE
2160no_create=
2161no_recursion=
2162prefix=NONE
2163program_prefix=NONE
2164program_suffix=NONE
2165program_transform_name=s,x,x,
2166silent=
2167site=
2168srcdir=
2169verbose=
2170x_includes=NONE
2171x_libraries=NONE
2172
2173# Installation directory options.
2174# These are left unexpanded so users can "make install exec_prefix=/foo"
2175# and all the variables that are supposed to be based on exec_prefix
2176# by default will actually change.
2177# Use braces instead of parens because sh, perl, etc. also accept them.
2178# (The list follows the same order as the GNU Coding Standards.)
2179bindir='${exec_prefix}/bin'
2180sbindir='${exec_prefix}/sbin'
2181libexecdir='${exec_prefix}/libexec'
2182datarootdir='${prefix}/share'
2183datadir='${datarootdir}'
2184sysconfdir='${prefix}/etc'
2185sharedstatedir='${prefix}/com'
2186localstatedir='${prefix}/var'
2187runstatedir='${localstatedir}/run'
2188includedir='${prefix}/include'
2189oldincludedir='/usr/include'
2190docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2191infodir='${datarootdir}/info'
2192htmldir='${docdir}'
2193dvidir='${docdir}'
2194pdfdir='${docdir}'
2195psdir='${docdir}'
2196libdir='${exec_prefix}/lib'
2197localedir='${datarootdir}/locale'
2198mandir='${datarootdir}/man'
2199
2200ac_prev=
2201ac_dashdash=
2202for ac_option
2203do
2204  # If the previous option needs an argument, assign it.
2205  if test -n "$ac_prev"; then
2206    eval $ac_prev=\$ac_option
2207    ac_prev=
2208    continue
2209  fi
2210
2211  case $ac_option in
2212  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2213  *=)   ac_optarg= ;;
2214  *)    ac_optarg=yes ;;
2215  esac
2216
2217  case $ac_dashdash$ac_option in
2218  --)
2219    ac_dashdash=yes ;;
2220
2221  -bindir | --bindir | --bindi | --bind | --bin | --bi)
2222    ac_prev=bindir ;;
2223  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2224    bindir=$ac_optarg ;;
2225
2226  -build | --build | --buil | --bui | --bu)
2227    ac_prev=build_alias ;;
2228  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2229    build_alias=$ac_optarg ;;
2230
2231  -cache-file | --cache-file | --cache-fil | --cache-fi \
2232  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2233    ac_prev=cache_file ;;
2234  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2235  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2236    cache_file=$ac_optarg ;;
2237
2238  --config-cache | -C)
2239    cache_file=config.cache ;;
2240
2241  -datadir | --datadir | --datadi | --datad)
2242    ac_prev=datadir ;;
2243  -datadir=* | --datadir=* | --datadi=* | --datad=*)
2244    datadir=$ac_optarg ;;
2245
2246  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2247  | --dataroo | --dataro | --datar)
2248    ac_prev=datarootdir ;;
2249  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2250  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2251    datarootdir=$ac_optarg ;;
2252
2253  -disable-* | --disable-*)
2254    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2255    # Reject names that are not valid shell variable names.
2256    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2257      as_fn_error $? "invalid feature name: \`$ac_useropt'"
2258    ac_useropt_orig=$ac_useropt
2259    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2260    case $ac_user_opts in
2261      *"
2262"enable_$ac_useropt"
2263"*) ;;
2264      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2265	 ac_unrecognized_sep=', ';;
2266    esac
2267    eval enable_$ac_useropt=no ;;
2268
2269  -docdir | --docdir | --docdi | --doc | --do)
2270    ac_prev=docdir ;;
2271  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2272    docdir=$ac_optarg ;;
2273
2274  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2275    ac_prev=dvidir ;;
2276  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2277    dvidir=$ac_optarg ;;
2278
2279  -enable-* | --enable-*)
2280    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2281    # Reject names that are not valid shell variable names.
2282    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2283      as_fn_error $? "invalid feature name: \`$ac_useropt'"
2284    ac_useropt_orig=$ac_useropt
2285    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2286    case $ac_user_opts in
2287      *"
2288"enable_$ac_useropt"
2289"*) ;;
2290      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2291	 ac_unrecognized_sep=', ';;
2292    esac
2293    eval enable_$ac_useropt=\$ac_optarg ;;
2294
2295  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2296  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2297  | --exec | --exe | --ex)
2298    ac_prev=exec_prefix ;;
2299  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2300  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2301  | --exec=* | --exe=* | --ex=*)
2302    exec_prefix=$ac_optarg ;;
2303
2304  -gas | --gas | --ga | --g)
2305    # Obsolete; use --with-gas.
2306    with_gas=yes ;;
2307
2308  -help | --help | --hel | --he | -h)
2309    ac_init_help=long ;;
2310  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2311    ac_init_help=recursive ;;
2312  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2313    ac_init_help=short ;;
2314
2315  -host | --host | --hos | --ho)
2316    ac_prev=host_alias ;;
2317  -host=* | --host=* | --hos=* | --ho=*)
2318    host_alias=$ac_optarg ;;
2319
2320  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2321    ac_prev=htmldir ;;
2322  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2323  | --ht=*)
2324    htmldir=$ac_optarg ;;
2325
2326  -includedir | --includedir | --includedi | --included | --include \
2327  | --includ | --inclu | --incl | --inc)
2328    ac_prev=includedir ;;
2329  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2330  | --includ=* | --inclu=* | --incl=* | --inc=*)
2331    includedir=$ac_optarg ;;
2332
2333  -infodir | --infodir | --infodi | --infod | --info | --inf)
2334    ac_prev=infodir ;;
2335  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2336    infodir=$ac_optarg ;;
2337
2338  -libdir | --libdir | --libdi | --libd)
2339    ac_prev=libdir ;;
2340  -libdir=* | --libdir=* | --libdi=* | --libd=*)
2341    libdir=$ac_optarg ;;
2342
2343  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2344  | --libexe | --libex | --libe)
2345    ac_prev=libexecdir ;;
2346  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2347  | --libexe=* | --libex=* | --libe=*)
2348    libexecdir=$ac_optarg ;;
2349
2350  -localedir | --localedir | --localedi | --localed | --locale)
2351    ac_prev=localedir ;;
2352  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2353    localedir=$ac_optarg ;;
2354
2355  -localstatedir | --localstatedir | --localstatedi | --localstated \
2356  | --localstate | --localstat | --localsta | --localst | --locals)
2357    ac_prev=localstatedir ;;
2358  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2359  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2360    localstatedir=$ac_optarg ;;
2361
2362  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2363    ac_prev=mandir ;;
2364  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2365    mandir=$ac_optarg ;;
2366
2367  -nfp | --nfp | --nf)
2368    # Obsolete; use --without-fp.
2369    with_fp=no ;;
2370
2371  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2372  | --no-cr | --no-c | -n)
2373    no_create=yes ;;
2374
2375  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2376  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2377    no_recursion=yes ;;
2378
2379  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2380  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2381  | --oldin | --oldi | --old | --ol | --o)
2382    ac_prev=oldincludedir ;;
2383  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2384  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2385  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2386    oldincludedir=$ac_optarg ;;
2387
2388  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2389    ac_prev=prefix ;;
2390  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2391    prefix=$ac_optarg ;;
2392
2393  -program-prefix | --program-prefix | --program-prefi | --program-pref \
2394  | --program-pre | --program-pr | --program-p)
2395    ac_prev=program_prefix ;;
2396  -program-prefix=* | --program-prefix=* | --program-prefi=* \
2397  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2398    program_prefix=$ac_optarg ;;
2399
2400  -program-suffix | --program-suffix | --program-suffi | --program-suff \
2401  | --program-suf | --program-su | --program-s)
2402    ac_prev=program_suffix ;;
2403  -program-suffix=* | --program-suffix=* | --program-suffi=* \
2404  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2405    program_suffix=$ac_optarg ;;
2406
2407  -program-transform-name | --program-transform-name \
2408  | --program-transform-nam | --program-transform-na \
2409  | --program-transform-n | --program-transform- \
2410  | --program-transform | --program-transfor \
2411  | --program-transfo | --program-transf \
2412  | --program-trans | --program-tran \
2413  | --progr-tra | --program-tr | --program-t)
2414    ac_prev=program_transform_name ;;
2415  -program-transform-name=* | --program-transform-name=* \
2416  | --program-transform-nam=* | --program-transform-na=* \
2417  | --program-transform-n=* | --program-transform-=* \
2418  | --program-transform=* | --program-transfor=* \
2419  | --program-transfo=* | --program-transf=* \
2420  | --program-trans=* | --program-tran=* \
2421  | --progr-tra=* | --program-tr=* | --program-t=*)
2422    program_transform_name=$ac_optarg ;;
2423
2424  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2425    ac_prev=pdfdir ;;
2426  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2427    pdfdir=$ac_optarg ;;
2428
2429  -psdir | --psdir | --psdi | --psd | --ps)
2430    ac_prev=psdir ;;
2431  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2432    psdir=$ac_optarg ;;
2433
2434  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2435  | -silent | --silent | --silen | --sile | --sil)
2436    silent=yes ;;
2437
2438  -runstatedir | --runstatedir | --runstatedi | --runstated \
2439  | --runstate | --runstat | --runsta | --runst | --runs \
2440  | --run | --ru | --r)
2441    ac_prev=runstatedir ;;
2442  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2443  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2444  | --run=* | --ru=* | --r=*)
2445    runstatedir=$ac_optarg ;;
2446
2447  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2448    ac_prev=sbindir ;;
2449  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2450  | --sbi=* | --sb=*)
2451    sbindir=$ac_optarg ;;
2452
2453  -sharedstatedir | --sharedstatedir | --sharedstatedi \
2454  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2455  | --sharedst | --shareds | --shared | --share | --shar \
2456  | --sha | --sh)
2457    ac_prev=sharedstatedir ;;
2458  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2459  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2460  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2461  | --sha=* | --sh=*)
2462    sharedstatedir=$ac_optarg ;;
2463
2464  -site | --site | --sit)
2465    ac_prev=site ;;
2466  -site=* | --site=* | --sit=*)
2467    site=$ac_optarg ;;
2468
2469  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2470    ac_prev=srcdir ;;
2471  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2472    srcdir=$ac_optarg ;;
2473
2474  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2475  | --syscon | --sysco | --sysc | --sys | --sy)
2476    ac_prev=sysconfdir ;;
2477  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2478  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2479    sysconfdir=$ac_optarg ;;
2480
2481  -target | --target | --targe | --targ | --tar | --ta | --t)
2482    ac_prev=target_alias ;;
2483  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2484    target_alias=$ac_optarg ;;
2485
2486  -v | -verbose | --verbose | --verbos | --verbo | --verb)
2487    verbose=yes ;;
2488
2489  -version | --version | --versio | --versi | --vers | -V)
2490    ac_init_version=: ;;
2491
2492  -with-* | --with-*)
2493    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2494    # Reject names that are not valid shell variable names.
2495    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2496      as_fn_error $? "invalid package name: \`$ac_useropt'"
2497    ac_useropt_orig=$ac_useropt
2498    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2499    case $ac_user_opts in
2500      *"
2501"with_$ac_useropt"
2502"*) ;;
2503      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2504	 ac_unrecognized_sep=', ';;
2505    esac
2506    eval with_$ac_useropt=\$ac_optarg ;;
2507
2508  -without-* | --without-*)
2509    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2510    # Reject names that are not valid shell variable names.
2511    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2512      as_fn_error $? "invalid package name: \`$ac_useropt'"
2513    ac_useropt_orig=$ac_useropt
2514    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2515    case $ac_user_opts in
2516      *"
2517"with_$ac_useropt"
2518"*) ;;
2519      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2520	 ac_unrecognized_sep=', ';;
2521    esac
2522    eval with_$ac_useropt=no ;;
2523
2524  --x)
2525    # Obsolete; use --with-x.
2526    with_x=yes ;;
2527
2528  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2529  | --x-incl | --x-inc | --x-in | --x-i)
2530    ac_prev=x_includes ;;
2531  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2532  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2533    x_includes=$ac_optarg ;;
2534
2535  -x-libraries | --x-libraries | --x-librarie | --x-librari \
2536  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2537    ac_prev=x_libraries ;;
2538  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2539  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2540    x_libraries=$ac_optarg ;;
2541
2542  -*) as_fn_error $? "unrecognized option: \`$ac_option'
2543Try \`$0 --help' for more information"
2544    ;;
2545
2546  *=*)
2547    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2548    # Reject names that are not valid shell variable names.
2549    case $ac_envvar in #(
2550      '' | [0-9]* | *[!_$as_cr_alnum]* )
2551      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2552    esac
2553    eval $ac_envvar=\$ac_optarg
2554    export $ac_envvar ;;
2555
2556  *)
2557    # FIXME: should be removed in autoconf 3.0.
2558    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2559    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2560      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2561    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2562    ;;
2563
2564  esac
2565done
2566
2567if test -n "$ac_prev"; then
2568  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2569  as_fn_error $? "missing argument to $ac_option"
2570fi
2571
2572if test -n "$ac_unrecognized_opts"; then
2573  case $enable_option_checking in
2574    no) ;;
2575    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2576    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2577  esac
2578fi
2579
2580# Check all directory arguments for consistency.
2581for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
2582		datadir sysconfdir sharedstatedir localstatedir includedir \
2583		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2584		libdir localedir mandir runstatedir
2585do
2586  eval ac_val=\$$ac_var
2587  # Remove trailing slashes.
2588  case $ac_val in
2589    */ )
2590      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2591      eval $ac_var=\$ac_val;;
2592  esac
2593  # Be sure to have absolute directory names.
2594  case $ac_val in
2595    [\\/$]* | ?:[\\/]* )  continue;;
2596    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2597  esac
2598  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2599done
2600
2601# There might be people who depend on the old broken behavior: `$host'
2602# used to hold the argument of --host etc.
2603# FIXME: To remove some day.
2604build=$build_alias
2605host=$host_alias
2606target=$target_alias
2607
2608# FIXME: To remove some day.
2609if test "x$host_alias" != x; then
2610  if test "x$build_alias" = x; then
2611    cross_compiling=maybe
2612  elif test "x$build_alias" != "x$host_alias"; then
2613    cross_compiling=yes
2614  fi
2615fi
2616
2617ac_tool_prefix=
2618test -n "$host_alias" && ac_tool_prefix=$host_alias-
2619
2620test "$silent" = yes && exec 6>/dev/null
2621
2622
2623ac_pwd=`pwd` && test -n "$ac_pwd" &&
2624ac_ls_di=`ls -di .` &&
2625ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2626  as_fn_error $? "working directory cannot be determined"
2627test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2628  as_fn_error $? "pwd does not report name of working directory"
2629
2630
2631# Find the source files, if location was not specified.
2632if test -z "$srcdir"; then
2633  ac_srcdir_defaulted=yes
2634  # Try the directory containing this script, then the parent directory.
2635  ac_confdir=`$as_dirname -- "$as_myself" ||
2636$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2637	 X"$as_myself" : 'X\(//\)[^/]' \| \
2638	 X"$as_myself" : 'X\(//\)$' \| \
2639	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2640printf "%s\n" X"$as_myself" |
2641    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2642	    s//\1/
2643	    q
2644	  }
2645	  /^X\(\/\/\)[^/].*/{
2646	    s//\1/
2647	    q
2648	  }
2649	  /^X\(\/\/\)$/{
2650	    s//\1/
2651	    q
2652	  }
2653	  /^X\(\/\).*/{
2654	    s//\1/
2655	    q
2656	  }
2657	  s/.*/./; q'`
2658  srcdir=$ac_confdir
2659  if test ! -r "$srcdir/$ac_unique_file"; then
2660    srcdir=..
2661  fi
2662else
2663  ac_srcdir_defaulted=no
2664fi
2665if test ! -r "$srcdir/$ac_unique_file"; then
2666  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2667  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2668fi
2669ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2670ac_abs_confdir=`(
2671	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2672	pwd)`
2673# When building in place, set srcdir=.
2674if test "$ac_abs_confdir" = "$ac_pwd"; then
2675  srcdir=.
2676fi
2677# Remove unnecessary trailing slashes from srcdir.
2678# Double slashes in file names in object file debugging info
2679# mess up M-x gdb in Emacs.
2680case $srcdir in
2681*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2682esac
2683for ac_var in $ac_precious_vars; do
2684  eval ac_env_${ac_var}_set=\${${ac_var}+set}
2685  eval ac_env_${ac_var}_value=\$${ac_var}
2686  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2687  eval ac_cv_env_${ac_var}_value=\$${ac_var}
2688done
2689
2690#
2691# Report the --help message.
2692#
2693if test "$ac_init_help" = "long"; then
2694  # Omit some internal or obsolete options to make the list less imposing.
2695  # This message is too long to be a string in the A/UX 3.1 sh.
2696  cat <<_ACEOF
2697\`configure' configures wget2 2.0.0 to adapt to many kinds of systems.
2698
2699Usage: $0 [OPTION]... [VAR=VALUE]...
2700
2701To assign environment variables (e.g., CC, CFLAGS...), specify them as
2702VAR=VALUE.  See below for descriptions of some of the useful variables.
2703
2704Defaults for the options are specified in brackets.
2705
2706Configuration:
2707  -h, --help              display this help and exit
2708      --help=short        display options specific to this package
2709      --help=recursive    display the short help of all the included packages
2710  -V, --version           display version information and exit
2711  -q, --quiet, --silent   do not print \`checking ...' messages
2712      --cache-file=FILE   cache test results in FILE [disabled]
2713  -C, --config-cache      alias for \`--cache-file=config.cache'
2714  -n, --no-create         do not create output files
2715      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2716
2717Installation directories:
2718  --prefix=PREFIX         install architecture-independent files in PREFIX
2719                          [$ac_default_prefix]
2720  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2721                          [PREFIX]
2722
2723By default, \`make install' will install all the files in
2724\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2725an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2726for instance \`--prefix=\$HOME'.
2727
2728For better control, use the options below.
2729
2730Fine tuning of the installation directories:
2731  --bindir=DIR            user executables [EPREFIX/bin]
2732  --sbindir=DIR           system admin executables [EPREFIX/sbin]
2733  --libexecdir=DIR        program executables [EPREFIX/libexec]
2734  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2735  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2736  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2737  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
2738  --libdir=DIR            object code libraries [EPREFIX/lib]
2739  --includedir=DIR        C header files [PREFIX/include]
2740  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2741  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2742  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2743  --infodir=DIR           info documentation [DATAROOTDIR/info]
2744  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2745  --mandir=DIR            man documentation [DATAROOTDIR/man]
2746  --docdir=DIR            documentation root [DATAROOTDIR/doc/wget2]
2747  --htmldir=DIR           html documentation [DOCDIR]
2748  --dvidir=DIR            dvi documentation [DOCDIR]
2749  --pdfdir=DIR            pdf documentation [DOCDIR]
2750  --psdir=DIR             ps documentation [DOCDIR]
2751_ACEOF
2752
2753  cat <<\_ACEOF
2754
2755Program names:
2756  --program-prefix=PREFIX            prepend PREFIX to installed program names
2757  --program-suffix=SUFFIX            append SUFFIX to installed program names
2758  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2759
2760System types:
2761  --build=BUILD     configure for building on BUILD [guessed]
2762  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2763_ACEOF
2764fi
2765
2766if test -n "$ac_init_help"; then
2767  case $ac_init_help in
2768     short | recursive ) echo "Configuration of wget2 2.0.0:";;
2769   esac
2770  cat <<\_ACEOF
2771
2772Optional Features:
2773  --disable-option-checking  ignore unrecognized --enable/--with options
2774  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2775  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2776  --enable-silent-rules   less verbose build output (undo: "make V=1")
2777  --disable-silent-rules  verbose build output (undo: "make V=0")
2778  --enable-dependency-tracking
2779                          do not reject slow dependency extractors
2780  --disable-dependency-tracking
2781                          speeds up one-time build
2782  --disable-largefile     omit support for large files
2783  --enable-threads={isoc|posix|isoc+posix|windows}
2784                          specify multithreading API
2785  --disable-threads       build without multithread safety
2786  --enable-cross-guesses={conservative|risky}
2787                          specify policy for cross-compilation guesses
2788  --disable-rpath         do not hardcode runtime library paths
2789  --enable-code-coverage  Whether to enable code coverage support
2790  --enable-shared[=PKGS]  build shared libraries [default=yes]
2791  --enable-static[=PKGS]  build static libraries [default=yes]
2792  --enable-fast-install[=PKGS]
2793                          optimize for fast installation [default=yes]
2794  --disable-libtool-lock  avoid locking (might break parallel builds)
2795  --enable-manywarnings   Turn on extra compiler warnings (for developers)
2796  --disable-manylibs      Generate small libraries of libwget functionality
2797                          groups
2798  --enable-fuzzing        Turn on fuzzing build (for developers)
2799  --enable-fsanitize-ubsan
2800                          Turn on Undefined Behavior Sanitizer (for
2801                          developers)
2802  --enable-fsanitize-asan Turn on Address Sanitizer (for developers) (mutually
2803                          exclusive with Memory/Thread sanitizer or Valgrind
2804                          tests)
2805  --enable-fsanitize-msan Turn on Memory Sanitizer (for developers) (mutually
2806                          exclusive with Address/Thread sanitizer or Valgrind
2807                          tests)
2808  --enable-fsanitize-tsan Turn on Thread Sanitizer (for developers) (mutually
2809                          exclusive with Address/Memory sanitizer or Valgrind
2810                          tests)
2811  --enable-assert         Enable assertions in code (for developers)
2812  --disable-xattr         disable support for POSIX Extended Attributes
2813  --disable-nls           do not use Native Language Support
2814  --disable-doc           don t generate any documentation
2815  --enable-valgrind-tests enable using Valgrind for tests (mutually exclusive
2816                          with Address/Memory/Thread sanitizer)
2817
2818Optional Packages:
2819  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2820  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2821  --with-linux-crypto     use Linux kernel cryptographic API (if available)
2822  --with-openssl          use libcrypto hash routines. Valid ARGs are: 'yes',
2823                          'no', 'auto' => use if any version available,
2824                          'auto-gpl-compat' => use if gpl compatible version
2825                          available, 'optional' => use if available and warn
2826                          if not available; default is 'no'. Note also
2827                          --with-linux-crypto, which will enable use of kernel
2828                          crypto routines, which have precedence
2829  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2830  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2831  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2832  --without-included-regex
2833                          don't compile regex; this is the default on systems
2834                          with recent-enough versions of the GNU C Library
2835                          (use with caution on other systems).
2836  --with-gcov=GCOV        use given GCOV for coverage (GCOV=gcov).
2837  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
2838                          both]
2839  --with-aix-soname=aix|svr4|both
2840                          shared library versioning (aka "SONAME") variant to
2841                          provide on AIX, [default=aix].
2842  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2843  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
2844                          compiler's sysroot if not specified).
2845  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2846  --without-libintl-prefix     don't search for libintl in includedir and libdir
2847  --with-ssl              Use SSL/TLS with specified library. Options:
2848                          'gnutls' (default), 'openssl', 'wolfssl' or 'none'
2849  --without-libpsl        disable support for libpsl cookie checking
2850  --without-libhsts       disable support for libhsts checking
2851  --without-libnghttp2    disable support for libnghttp2
2852  --without-bzip2         disable bzip2 compression support
2853  --without-gpgme         support signature verification with gpgme
2854  --with-gpgme-prefix=PFX prefix where GPGME is installed (optional)
2855  --without-zlib          disable gzip compression support
2856  --without-lzma          disable LZMA compression support
2857  --without-brotlidec     disable Brotli compression support
2858  --without-zstd          disable Zstandard compression support
2859  --without-lzip          disable lzip compression support
2860  --without-libidn2       disable IDN2 support
2861  --without-libidn        disable IDN support
2862  --without-libpcre2      disable support for libpcre2
2863  --without-libpcre       disable support for libpcre
2864  --without-libmicrohttpd disable support for libmicrohttpd
2865  --without-plugin-support
2866                          Disable plugin support
2867
2868Some influential environment variables:
2869  CC          C compiler command
2870  CFLAGS      C compiler flags
2871  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2872              nonstandard directory <lib dir>
2873  LIBS        libraries to pass to the linker, e.g. -l<library>
2874  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2875              you have headers in a nonstandard directory <include dir>
2876  CPP         C preprocessor
2877  LT_SYS_LIBRARY_PATH
2878              User-defined run-time library search path.
2879  PKG_CONFIG  path to pkg-config utility
2880  PKG_CONFIG_PATH
2881              directories to add to pkg-config's search path
2882  PKG_CONFIG_LIBDIR
2883              path overriding pkg-config's built-in search path
2884  GNUTLS_CFLAGS
2885              C compiler flags for GNUTLS, overriding pkg-config
2886  GNUTLS_LIBS linker flags for GNUTLS, overriding pkg-config
2887  OPENSSL_CFLAGS
2888              C compiler flags for OPENSSL, overriding pkg-config
2889  OPENSSL_LIBS
2890              linker flags for OPENSSL, overriding pkg-config
2891  WOLFSSL_CFLAGS
2892              C compiler flags for WOLFSSL, overriding pkg-config
2893  WOLFSSL_LIBS
2894              linker flags for WOLFSSL, overriding pkg-config
2895  NETTLE_CFLAGS
2896              C compiler flags for NETTLE, overriding pkg-config
2897  NETTLE_LIBS linker flags for NETTLE, overriding pkg-config
2898  LIBPSL_CFLAGS
2899              C compiler flags for LIBPSL, overriding pkg-config
2900  LIBPSL_LIBS linker flags for LIBPSL, overriding pkg-config
2901  LIBHSTS_CFLAGS
2902              C compiler flags for LIBHSTS, overriding pkg-config
2903  LIBHSTS_LIBS
2904              linker flags for LIBHSTS, overriding pkg-config
2905  LIBNGHTTP2_CFLAGS
2906              C compiler flags for LIBNGHTTP2, overriding pkg-config
2907  LIBNGHTTP2_LIBS
2908              linker flags for LIBNGHTTP2, overriding pkg-config
2909  GPGME_CFLAGS
2910              C compiler flags for GPGME, overriding pkg-config
2911  GPGME_LIBS  linker flags for GPGME, overriding pkg-config
2912  ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config
2913  ZLIB_LIBS   linker flags for ZLIB, overriding pkg-config
2914  LZMA_CFLAGS C compiler flags for LZMA, overriding pkg-config
2915  LZMA_LIBS   linker flags for LZMA, overriding pkg-config
2916  BROTLIDEC_CFLAGS
2917              C compiler flags for BROTLIDEC, overriding pkg-config
2918  BROTLIDEC_LIBS
2919              linker flags for BROTLIDEC, overriding pkg-config
2920  ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
2921  ZSTD_LIBS   linker flags for ZSTD, overriding pkg-config
2922  LZIP_CFLAGS C compiler flags for LZIP, overriding pkg-config
2923  LZIP_LIBS   linker flags for LZIP, overriding pkg-config
2924  LIBIDN2_CFLAGS
2925              C compiler flags for LIBIDN2, overriding pkg-config
2926  LIBIDN2_LIBS
2927              linker flags for LIBIDN2, overriding pkg-config
2928  LIBIDN_CFLAGS
2929              C compiler flags for LIBIDN, overriding pkg-config
2930  LIBIDN_LIBS linker flags for LIBIDN, overriding pkg-config
2931  LIBPCRE2_CFLAGS
2932              C compiler flags for LIBPCRE2, overriding pkg-config
2933  LIBPCRE2_LIBS
2934              linker flags for LIBPCRE2, overriding pkg-config
2935  LIBPCRE_CFLAGS
2936              C compiler flags for LIBPCRE, overriding pkg-config
2937  LIBPCRE_LIBS
2938              linker flags for LIBPCRE, overriding pkg-config
2939  MICROHTTPD_CFLAGS
2940              C compiler flags for MICROHTTPD, overriding pkg-config
2941  MICROHTTPD_LIBS
2942              linker flags for MICROHTTPD, overriding pkg-config
2943
2944Use these variables to override the choices made by `configure' or to help
2945it to find libraries and programs with nonstandard names/locations.
2946
2947Report bugs to <bug-wget@gnu.org>.
2948wget2 home page: <https://savannah.gnu.org/projects/wget>.
2949_ACEOF
2950ac_status=$?
2951fi
2952
2953if test "$ac_init_help" = "recursive"; then
2954  # If there are subdirs, report their specific --help.
2955  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2956    test -d "$ac_dir" ||
2957      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2958      continue
2959    ac_builddir=.
2960
2961case "$ac_dir" in
2962.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2963*)
2964  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2965  # A ".." for each directory in $ac_dir_suffix.
2966  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2967  case $ac_top_builddir_sub in
2968  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2969  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2970  esac ;;
2971esac
2972ac_abs_top_builddir=$ac_pwd
2973ac_abs_builddir=$ac_pwd$ac_dir_suffix
2974# for backward compatibility:
2975ac_top_builddir=$ac_top_build_prefix
2976
2977case $srcdir in
2978  .)  # We are building in place.
2979    ac_srcdir=.
2980    ac_top_srcdir=$ac_top_builddir_sub
2981    ac_abs_top_srcdir=$ac_pwd ;;
2982  [\\/]* | ?:[\\/]* )  # Absolute name.
2983    ac_srcdir=$srcdir$ac_dir_suffix;
2984    ac_top_srcdir=$srcdir
2985    ac_abs_top_srcdir=$srcdir ;;
2986  *) # Relative name.
2987    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2988    ac_top_srcdir=$ac_top_build_prefix$srcdir
2989    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2990esac
2991ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2992
2993    cd "$ac_dir" || { ac_status=$?; continue; }
2994    # Check for configure.gnu first; this name is used for a wrapper for
2995    # Metaconfig's "Configure" on case-insensitive file systems.
2996    if test -f "$ac_srcdir/configure.gnu"; then
2997      echo &&
2998      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2999    elif test -f "$ac_srcdir/configure"; then
3000      echo &&
3001      $SHELL "$ac_srcdir/configure" --help=recursive
3002    else
3003      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
3004    fi || ac_status=$?
3005    cd "$ac_pwd" || { ac_status=$?; break; }
3006  done
3007fi
3008
3009test -n "$ac_init_help" && exit $ac_status
3010if $ac_init_version; then
3011  cat <<\_ACEOF
3012wget2 configure 2.0.0
3013generated by GNU Autoconf 2.71
3014
3015Copyright (C) 2021 Free Software Foundation, Inc.
3016This configure script is free software; the Free Software Foundation
3017gives unlimited permission to copy, distribute and modify it.
3018_ACEOF
3019  exit
3020fi
3021
3022## ------------------------ ##
3023## Autoconf initialization. ##
3024## ------------------------ ##
3025
3026# ac_fn_c_try_compile LINENO
3027# --------------------------
3028# Try to compile conftest.$ac_ext, and return whether this succeeded.
3029ac_fn_c_try_compile ()
3030{
3031  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3032  rm -f conftest.$ac_objext conftest.beam
3033  if { { ac_try="$ac_compile"
3034case "(($ac_try" in
3035  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3036  *) ac_try_echo=$ac_try;;
3037esac
3038eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3039printf "%s\n" "$ac_try_echo"; } >&5
3040  (eval "$ac_compile") 2>conftest.err
3041  ac_status=$?
3042  if test -s conftest.err; then
3043    grep -v '^ *+' conftest.err >conftest.er1
3044    cat conftest.er1 >&5
3045    mv -f conftest.er1 conftest.err
3046  fi
3047  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3048  test $ac_status = 0; } && {
3049	 test -z "$ac_c_werror_flag" ||
3050	 test ! -s conftest.err
3051       } && test -s conftest.$ac_objext
3052then :
3053  ac_retval=0
3054else $as_nop
3055  printf "%s\n" "$as_me: failed program was:" >&5
3056sed 's/^/| /' conftest.$ac_ext >&5
3057
3058	ac_retval=1
3059fi
3060  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3061  as_fn_set_status $ac_retval
3062
3063} # ac_fn_c_try_compile
3064
3065# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3066# -------------------------------------------------------
3067# Tests whether HEADER exists and can be compiled using the include files in
3068# INCLUDES, setting the cache variable VAR accordingly.
3069ac_fn_c_check_header_compile ()
3070{
3071  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3072  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3073printf %s "checking for $2... " >&6; }
3074if eval test \${$3+y}
3075then :
3076  printf %s "(cached) " >&6
3077else $as_nop
3078  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3079/* end confdefs.h.  */
3080$4
3081#include <$2>
3082_ACEOF
3083if ac_fn_c_try_compile "$LINENO"
3084then :
3085  eval "$3=yes"
3086else $as_nop
3087  eval "$3=no"
3088fi
3089rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3090fi
3091eval ac_res=\$$3
3092	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3093printf "%s\n" "$ac_res" >&6; }
3094  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3095
3096} # ac_fn_c_check_header_compile
3097
3098# ac_fn_c_try_cpp LINENO
3099# ----------------------
3100# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
3101ac_fn_c_try_cpp ()
3102{
3103  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3104  if { { ac_try="$ac_cpp conftest.$ac_ext"
3105case "(($ac_try" in
3106  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3107  *) ac_try_echo=$ac_try;;
3108esac
3109eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3110printf "%s\n" "$ac_try_echo"; } >&5
3111  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
3112  ac_status=$?
3113  if test -s conftest.err; then
3114    grep -v '^ *+' conftest.err >conftest.er1
3115    cat conftest.er1 >&5
3116    mv -f conftest.er1 conftest.err
3117  fi
3118  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3119  test $ac_status = 0; } > conftest.i && {
3120	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3121	 test ! -s conftest.err
3122       }
3123then :
3124  ac_retval=0
3125else $as_nop
3126  printf "%s\n" "$as_me: failed program was:" >&5
3127sed 's/^/| /' conftest.$ac_ext >&5
3128
3129    ac_retval=1
3130fi
3131  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3132  as_fn_set_status $ac_retval
3133
3134} # ac_fn_c_try_cpp
3135
3136# ac_fn_c_try_link LINENO
3137# -----------------------
3138# Try to link conftest.$ac_ext, and return whether this succeeded.
3139ac_fn_c_try_link ()
3140{
3141  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3142  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
3143  if { { ac_try="$ac_link"
3144case "(($ac_try" in
3145  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3146  *) ac_try_echo=$ac_try;;
3147esac
3148eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3149printf "%s\n" "$ac_try_echo"; } >&5
3150  (eval "$ac_link") 2>conftest.err
3151  ac_status=$?
3152  if test -s conftest.err; then
3153    grep -v '^ *+' conftest.err >conftest.er1
3154    cat conftest.er1 >&5
3155    mv -f conftest.er1 conftest.err
3156  fi
3157  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3158  test $ac_status = 0; } && {
3159	 test -z "$ac_c_werror_flag" ||
3160	 test ! -s conftest.err
3161       } && test -s conftest$ac_exeext && {
3162	 test "$cross_compiling" = yes ||
3163	 test -x conftest$ac_exeext
3164       }
3165then :
3166  ac_retval=0
3167else $as_nop
3168  printf "%s\n" "$as_me: failed program was:" >&5
3169sed 's/^/| /' conftest.$ac_ext >&5
3170
3171	ac_retval=1
3172fi
3173  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
3174  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
3175  # interfere with the next link command; also delete a directory that is
3176  # left behind by Apple's compiler.  We do this before executing the actions.
3177  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3178  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3179  as_fn_set_status $ac_retval
3180
3181} # ac_fn_c_try_link
3182
3183# ac_fn_c_check_func LINENO FUNC VAR
3184# ----------------------------------
3185# Tests whether FUNC exists, setting the cache variable VAR accordingly
3186ac_fn_c_check_func ()
3187{
3188  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3189  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3190printf %s "checking for $2... " >&6; }
3191if eval test \${$3+y}
3192then :
3193  printf %s "(cached) " >&6
3194else $as_nop
3195  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3196/* end confdefs.h.  */
3197/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3198   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3199#define $2 innocuous_$2
3200
3201/* System header to define __stub macros and hopefully few prototypes,
3202   which can conflict with char $2 (); below.  */
3203
3204#include <limits.h>
3205#undef $2
3206
3207/* Override any GCC internal prototype to avoid an error.
3208   Use char because int might match the return type of a GCC
3209   builtin and then its argument prototype would still apply.  */
3210#ifdef __cplusplus
3211extern "C"
3212#endif
3213char $2 ();
3214/* The GNU C library defines this for functions which it implements
3215    to always fail with ENOSYS.  Some functions are actually named
3216    something starting with __ and the normal name is an alias.  */
3217#if defined __stub_$2 || defined __stub___$2
3218choke me
3219#endif
3220
3221int
3222main (void)
3223{
3224return $2 ();
3225  ;
3226  return 0;
3227}
3228_ACEOF
3229if ac_fn_c_try_link "$LINENO"
3230then :
3231  eval "$3=yes"
3232else $as_nop
3233  eval "$3=no"
3234fi
3235rm -f core conftest.err conftest.$ac_objext conftest.beam \
3236    conftest$ac_exeext conftest.$ac_ext
3237fi
3238eval ac_res=\$$3
3239	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3240printf "%s\n" "$ac_res" >&6; }
3241  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3242
3243} # ac_fn_c_check_func
3244
3245# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
3246# -------------------------------------------
3247# Tests whether TYPE exists after having included INCLUDES, setting cache
3248# variable VAR accordingly.
3249ac_fn_c_check_type ()
3250{
3251  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3252  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3253printf %s "checking for $2... " >&6; }
3254if eval test \${$3+y}
3255then :
3256  printf %s "(cached) " >&6
3257else $as_nop
3258  eval "$3=no"
3259  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3260/* end confdefs.h.  */
3261$4
3262int
3263main (void)
3264{
3265if (sizeof ($2))
3266	 return 0;
3267  ;
3268  return 0;
3269}
3270_ACEOF
3271if ac_fn_c_try_compile "$LINENO"
3272then :
3273  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3274/* end confdefs.h.  */
3275$4
3276int
3277main (void)
3278{
3279if (sizeof (($2)))
3280	    return 0;
3281  ;
3282  return 0;
3283}
3284_ACEOF
3285if ac_fn_c_try_compile "$LINENO"
3286then :
3287
3288else $as_nop
3289  eval "$3=yes"
3290fi
3291rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3292fi
3293rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3294fi
3295eval ac_res=\$$3
3296	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3297printf "%s\n" "$ac_res" >&6; }
3298  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3299
3300} # ac_fn_c_check_type
3301
3302# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3303# ----------------------------------------------------
3304# Tries to find if the field MEMBER exists in type AGGR, after including
3305# INCLUDES, setting cache variable VAR accordingly.
3306ac_fn_c_check_member ()
3307{
3308  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3309  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3310printf %s "checking for $2.$3... " >&6; }
3311if eval test \${$4+y}
3312then :
3313  printf %s "(cached) " >&6
3314else $as_nop
3315  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3316/* end confdefs.h.  */
3317$5
3318int
3319main (void)
3320{
3321static $2 ac_aggr;
3322if (ac_aggr.$3)
3323return 0;
3324  ;
3325  return 0;
3326}
3327_ACEOF
3328if ac_fn_c_try_compile "$LINENO"
3329then :
3330  eval "$4=yes"
3331else $as_nop
3332  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3333/* end confdefs.h.  */
3334$5
3335int
3336main (void)
3337{
3338static $2 ac_aggr;
3339if (sizeof ac_aggr.$3)
3340return 0;
3341  ;
3342  return 0;
3343}
3344_ACEOF
3345if ac_fn_c_try_compile "$LINENO"
3346then :
3347  eval "$4=yes"
3348else $as_nop
3349  eval "$4=no"
3350fi
3351rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3352fi
3353rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3354fi
3355eval ac_res=\$$4
3356	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3357printf "%s\n" "$ac_res" >&6; }
3358  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3359
3360} # ac_fn_c_check_member
3361
3362# ac_fn_c_try_run LINENO
3363# ----------------------
3364# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
3365# executables *can* be run.
3366ac_fn_c_try_run ()
3367{
3368  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3369  if { { ac_try="$ac_link"
3370case "(($ac_try" in
3371  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3372  *) ac_try_echo=$ac_try;;
3373esac
3374eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3375printf "%s\n" "$ac_try_echo"; } >&5
3376  (eval "$ac_link") 2>&5
3377  ac_status=$?
3378  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3379  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
3380  { { case "(($ac_try" in
3381  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3382  *) ac_try_echo=$ac_try;;
3383esac
3384eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3385printf "%s\n" "$ac_try_echo"; } >&5
3386  (eval "$ac_try") 2>&5
3387  ac_status=$?
3388  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3389  test $ac_status = 0; }; }
3390then :
3391  ac_retval=0
3392else $as_nop
3393  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
3394       printf "%s\n" "$as_me: failed program was:" >&5
3395sed 's/^/| /' conftest.$ac_ext >&5
3396
3397       ac_retval=$ac_status
3398fi
3399  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3400  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3401  as_fn_set_status $ac_retval
3402
3403} # ac_fn_c_try_run
3404
3405# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
3406# ------------------------------------------------------------------
3407# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3408# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
3409ac_fn_check_decl ()
3410{
3411  ac_save_ac_compile="$ac_compile"
3412  if test -n "$ac_compile_for_check_decl"; then
3413    ac_compile="$ac_compile_for_check_decl"
3414  fi
3415  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3416  as_decl_name=`echo $2|sed 's/ *(.*//'`
3417  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3418printf %s "checking whether $as_decl_name is declared... " >&6; }
3419if eval test \${$3+y}
3420then :
3421  printf %s "(cached) " >&6
3422else $as_nop
3423  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3424  eval ac_save_FLAGS=\$$6
3425  as_fn_append $6 " $5"
3426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3427/* end confdefs.h.  */
3428$4
3429int
3430main (void)
3431{
3432#ifndef $as_decl_name
3433#ifdef __cplusplus
3434  (void) $as_decl_use;
3435#else
3436  (void) $as_decl_name;
3437#endif
3438#endif
3439
3440  ;
3441  return 0;
3442}
3443_ACEOF
3444if ac_fn_c_try_compile "$LINENO"
3445then :
3446  eval "$3=yes"
3447else $as_nop
3448  eval "$3=no"
3449fi
3450rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3451  eval $6=\$ac_save_FLAGS
3452
3453fi
3454eval ac_res=\$$3
3455	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3456printf "%s\n" "$ac_res" >&6; }
3457  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3458  ac_compile="$ac_save_ac_compile"
3459
3460} # ac_fn_check_decl
3461
3462# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3463# --------------------------------------------
3464# Tries to find the compile-time value of EXPR in a program that includes
3465# INCLUDES, setting VAR accordingly. Returns whether the value could be
3466# computed
3467ac_fn_c_compute_int ()
3468{
3469  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3470  if test "$cross_compiling" = yes; then
3471    # Depending upon the size, compute the lo and hi bounds.
3472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3473/* end confdefs.h.  */
3474$4
3475int
3476main (void)
3477{
3478static int test_array [1 - 2 * !(($2) >= 0)];
3479test_array [0] = 0;
3480return test_array [0];
3481
3482  ;
3483  return 0;
3484}
3485_ACEOF
3486if ac_fn_c_try_compile "$LINENO"
3487then :
3488  ac_lo=0 ac_mid=0
3489  while :; do
3490    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3491/* end confdefs.h.  */
3492$4
3493int
3494main (void)
3495{
3496static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3497test_array [0] = 0;
3498return test_array [0];
3499
3500  ;
3501  return 0;
3502}
3503_ACEOF
3504if ac_fn_c_try_compile "$LINENO"
3505then :
3506  ac_hi=$ac_mid; break
3507else $as_nop
3508  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3509			if test $ac_lo -le $ac_mid; then
3510			  ac_lo= ac_hi=
3511			  break
3512			fi
3513			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3514fi
3515rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3516  done
3517else $as_nop
3518  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3519/* end confdefs.h.  */
3520$4
3521int
3522main (void)
3523{
3524static int test_array [1 - 2 * !(($2) < 0)];
3525test_array [0] = 0;
3526return test_array [0];
3527
3528  ;
3529  return 0;
3530}
3531_ACEOF
3532if ac_fn_c_try_compile "$LINENO"
3533then :
3534  ac_hi=-1 ac_mid=-1
3535  while :; do
3536    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3537/* end confdefs.h.  */
3538$4
3539int
3540main (void)
3541{
3542static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3543test_array [0] = 0;
3544return test_array [0];
3545
3546  ;
3547  return 0;
3548}
3549_ACEOF
3550if ac_fn_c_try_compile "$LINENO"
3551then :
3552  ac_lo=$ac_mid; break
3553else $as_nop
3554  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3555			if test $ac_mid -le $ac_hi; then
3556			  ac_lo= ac_hi=
3557			  break
3558			fi
3559			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3560fi
3561rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3562  done
3563else $as_nop
3564  ac_lo= ac_hi=
3565fi
3566rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3567fi
3568rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3569# Binary search between lo and hi bounds.
3570while test "x$ac_lo" != "x$ac_hi"; do
3571  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3573/* end confdefs.h.  */
3574$4
3575int
3576main (void)
3577{
3578static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3579test_array [0] = 0;
3580return test_array [0];
3581
3582  ;
3583  return 0;
3584}
3585_ACEOF
3586if ac_fn_c_try_compile "$LINENO"
3587then :
3588  ac_hi=$ac_mid
3589else $as_nop
3590  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3591fi
3592rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3593done
3594case $ac_lo in #((
3595?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3596'') ac_retval=1 ;;
3597esac
3598  else
3599    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3600/* end confdefs.h.  */
3601$4
3602static long int longval (void) { return $2; }
3603static unsigned long int ulongval (void) { return $2; }
3604#include <stdio.h>
3605#include <stdlib.h>
3606int
3607main (void)
3608{
3609
3610  FILE *f = fopen ("conftest.val", "w");
3611  if (! f)
3612    return 1;
3613  if (($2) < 0)
3614    {
3615      long int i = longval ();
3616      if (i != ($2))
3617	return 1;
3618      fprintf (f, "%ld", i);
3619    }
3620  else
3621    {
3622      unsigned long int i = ulongval ();
3623      if (i != ($2))
3624	return 1;
3625      fprintf (f, "%lu", i);
3626    }
3627  /* Do not output a trailing newline, as this causes \r\n confusion
3628     on some platforms.  */
3629  return ferror (f) || fclose (f) != 0;
3630
3631  ;
3632  return 0;
3633}
3634_ACEOF
3635if ac_fn_c_try_run "$LINENO"
3636then :
3637  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3638else $as_nop
3639  ac_retval=1
3640fi
3641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3642  conftest.$ac_objext conftest.beam conftest.$ac_ext
3643rm -f conftest.val
3644
3645  fi
3646  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3647  as_fn_set_status $ac_retval
3648
3649} # ac_fn_c_compute_int
3650ac_configure_args_raw=
3651for ac_arg
3652do
3653  case $ac_arg in
3654  *\'*)
3655    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3656  esac
3657  as_fn_append ac_configure_args_raw " '$ac_arg'"
3658done
3659
3660case $ac_configure_args_raw in
3661  *$as_nl*)
3662    ac_safe_unquote= ;;
3663  *)
3664    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
3665    ac_unsafe_a="$ac_unsafe_z#~"
3666    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
3667    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
3668esac
3669
3670cat >config.log <<_ACEOF
3671This file contains any messages produced by compilers while
3672running configure, to aid debugging if configure makes a mistake.
3673
3674It was created by wget2 $as_me 2.0.0, which was
3675generated by GNU Autoconf 2.71.  Invocation command line was
3676
3677  $ $0$ac_configure_args_raw
3678
3679_ACEOF
3680exec 5>>config.log
3681{
3682cat <<_ASUNAME
3683## --------- ##
3684## Platform. ##
3685## --------- ##
3686
3687hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3688uname -m = `(uname -m) 2>/dev/null || echo unknown`
3689uname -r = `(uname -r) 2>/dev/null || echo unknown`
3690uname -s = `(uname -s) 2>/dev/null || echo unknown`
3691uname -v = `(uname -v) 2>/dev/null || echo unknown`
3692
3693/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3694/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3695
3696/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3697/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3698/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3699/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3700/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3701/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3702/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3703
3704_ASUNAME
3705
3706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3707for as_dir in $PATH
3708do
3709  IFS=$as_save_IFS
3710  case $as_dir in #(((
3711    '') as_dir=./ ;;
3712    */) ;;
3713    *) as_dir=$as_dir/ ;;
3714  esac
3715    printf "%s\n" "PATH: $as_dir"
3716  done
3717IFS=$as_save_IFS
3718
3719} >&5
3720
3721cat >&5 <<_ACEOF
3722
3723
3724## ----------- ##
3725## Core tests. ##
3726## ----------- ##
3727
3728_ACEOF
3729
3730
3731# Keep a trace of the command line.
3732# Strip out --no-create and --no-recursion so they do not pile up.
3733# Strip out --silent because we don't want to record it for future runs.
3734# Also quote any args containing shell meta-characters.
3735# Make two passes to allow for proper duplicate-argument suppression.
3736ac_configure_args=
3737ac_configure_args0=
3738ac_configure_args1=
3739ac_must_keep_next=false
3740for ac_pass in 1 2
3741do
3742  for ac_arg
3743  do
3744    case $ac_arg in
3745    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3746    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3747    | -silent | --silent | --silen | --sile | --sil)
3748      continue ;;
3749    *\'*)
3750      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3751    esac
3752    case $ac_pass in
3753    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3754    2)
3755      as_fn_append ac_configure_args1 " '$ac_arg'"
3756      if test $ac_must_keep_next = true; then
3757	ac_must_keep_next=false # Got value, back to normal.
3758      else
3759	case $ac_arg in
3760	  *=* | --config-cache | -C | -disable-* | --disable-* \
3761	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3762	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3763	  | -with-* | --with-* | -without-* | --without-* | --x)
3764	    case "$ac_configure_args0 " in
3765	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3766	    esac
3767	    ;;
3768	  -* ) ac_must_keep_next=true ;;
3769	esac
3770      fi
3771      as_fn_append ac_configure_args " '$ac_arg'"
3772      ;;
3773    esac
3774  done
3775done
3776{ ac_configure_args0=; unset ac_configure_args0;}
3777{ ac_configure_args1=; unset ac_configure_args1;}
3778
3779# When interrupted or exit'd, cleanup temporary files, and complete
3780# config.log.  We remove comments because anyway the quotes in there
3781# would cause problems or look ugly.
3782# WARNING: Use '\'' to represent an apostrophe within the trap.
3783# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3784trap 'exit_status=$?
3785  # Sanitize IFS.
3786  IFS=" ""	$as_nl"
3787  # Save into config.log some information that might help in debugging.
3788  {
3789    echo
3790
3791    printf "%s\n" "## ---------------- ##
3792## Cache variables. ##
3793## ---------------- ##"
3794    echo
3795    # The following way of writing the cache mishandles newlines in values,
3796(
3797  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3798    eval ac_val=\$$ac_var
3799    case $ac_val in #(
3800    *${as_nl}*)
3801      case $ac_var in #(
3802      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3803printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3804      esac
3805      case $ac_var in #(
3806      _ | IFS | as_nl) ;; #(
3807      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3808      *) { eval $ac_var=; unset $ac_var;} ;;
3809      esac ;;
3810    esac
3811  done
3812  (set) 2>&1 |
3813    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3814    *${as_nl}ac_space=\ *)
3815      sed -n \
3816	"s/'\''/'\''\\\\'\'''\''/g;
3817	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3818      ;; #(
3819    *)
3820      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3821      ;;
3822    esac |
3823    sort
3824)
3825    echo
3826
3827    printf "%s\n" "## ----------------- ##
3828## Output variables. ##
3829## ----------------- ##"
3830    echo
3831    for ac_var in $ac_subst_vars
3832    do
3833      eval ac_val=\$$ac_var
3834      case $ac_val in
3835      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3836      esac
3837      printf "%s\n" "$ac_var='\''$ac_val'\''"
3838    done | sort
3839    echo
3840
3841    if test -n "$ac_subst_files"; then
3842      printf "%s\n" "## ------------------- ##
3843## File substitutions. ##
3844## ------------------- ##"
3845      echo
3846      for ac_var in $ac_subst_files
3847      do
3848	eval ac_val=\$$ac_var
3849	case $ac_val in
3850	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3851	esac
3852	printf "%s\n" "$ac_var='\''$ac_val'\''"
3853      done | sort
3854      echo
3855    fi
3856
3857    if test -s confdefs.h; then
3858      printf "%s\n" "## ----------- ##
3859## confdefs.h. ##
3860## ----------- ##"
3861      echo
3862      cat confdefs.h
3863      echo
3864    fi
3865    test "$ac_signal" != 0 &&
3866      printf "%s\n" "$as_me: caught signal $ac_signal"
3867    printf "%s\n" "$as_me: exit $exit_status"
3868  } >&5
3869  rm -f core *.core core.conftest.* &&
3870    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3871    exit $exit_status
3872' 0
3873for ac_signal in 1 2 13 15; do
3874  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3875done
3876ac_signal=0
3877
3878# confdefs.h avoids OS command line length limits that DEFS can exceed.
3879rm -f -r conftest* confdefs.h
3880
3881printf "%s\n" "/* confdefs.h */" > confdefs.h
3882
3883# Predefined preprocessor variables.
3884
3885printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3886
3887printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3888
3889printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3890
3891printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3892
3893printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3894
3895printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3896
3897
3898# Let the site file select an alternate cache file if it wants to.
3899# Prefer an explicitly selected file to automatically selected ones.
3900if test -n "$CONFIG_SITE"; then
3901  ac_site_files="$CONFIG_SITE"
3902elif test "x$prefix" != xNONE; then
3903  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
3904else
3905  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
3906fi
3907
3908for ac_site_file in $ac_site_files
3909do
3910  case $ac_site_file in #(
3911  */*) :
3912     ;; #(
3913  *) :
3914    ac_site_file=./$ac_site_file ;;
3915esac
3916  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
3917    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3918printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3919    sed 's/^/| /' "$ac_site_file" >&5
3920    . "$ac_site_file" \
3921      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3922printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3923as_fn_error $? "failed to load site script $ac_site_file
3924See \`config.log' for more details" "$LINENO" 5; }
3925  fi
3926done
3927
3928if test -r "$cache_file"; then
3929  # Some versions of bash will fail to source /dev/null (special files
3930  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3931  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3932    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3933printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3934    case $cache_file in
3935      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3936      *)                      . "./$cache_file";;
3937    esac
3938  fi
3939else
3940  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3941printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3942  >$cache_file
3943fi
3944
3945as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
3946# Test code for whether the C compiler supports C89 (global declarations)
3947ac_c_conftest_c89_globals='
3948/* Does the compiler advertise C89 conformance?
3949   Do not test the value of __STDC__, because some compilers set it to 0
3950   while being otherwise adequately conformant. */
3951#if !defined __STDC__
3952# error "Compiler does not advertise C89 conformance"
3953#endif
3954
3955#include <stddef.h>
3956#include <stdarg.h>
3957struct stat;
3958/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
3959struct buf { int x; };
3960struct buf * (*rcsopen) (struct buf *, struct stat *, int);
3961static char *e (p, i)
3962     char **p;
3963     int i;
3964{
3965  return p[i];
3966}
3967static char *f (char * (*g) (char **, int), char **p, ...)
3968{
3969  char *s;
3970  va_list v;
3971  va_start (v,p);
3972  s = g (p, va_arg (v,int));
3973  va_end (v);
3974  return s;
3975}
3976
3977/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3978   function prototypes and stuff, but not \xHH hex character constants.
3979   These do not provoke an error unfortunately, instead are silently treated
3980   as an "x".  The following induces an error, until -std is added to get
3981   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
3982   array size at least.  It is necessary to write \x00 == 0 to get something
3983   that is true only with -std.  */
3984int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
3985
3986/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3987   inside strings and character constants.  */
3988#define FOO(x) '\''x'\''
3989int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
3990
3991int test (int i, double x);
3992struct s1 {int (*f) (int a);};
3993struct s2 {int (*f) (double a);};
3994int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
3995               int, int);'
3996
3997# Test code for whether the C compiler supports C89 (body of main).
3998ac_c_conftest_c89_main='
3999ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
4000'
4001
4002# Test code for whether the C compiler supports C99 (global declarations)
4003ac_c_conftest_c99_globals='
4004// Does the compiler advertise C99 conformance?
4005#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
4006# error "Compiler does not advertise C99 conformance"
4007#endif
4008
4009#include <stdbool.h>
4010extern int puts (const char *);
4011extern int printf (const char *, ...);
4012extern int dprintf (int, const char *, ...);
4013extern void *malloc (size_t);
4014
4015// Check varargs macros.  These examples are taken from C99 6.10.3.5.
4016// dprintf is used instead of fprintf to avoid needing to declare
4017// FILE and stderr.
4018#define debug(...) dprintf (2, __VA_ARGS__)
4019#define showlist(...) puts (#__VA_ARGS__)
4020#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4021static void
4022test_varargs_macros (void)
4023{
4024  int x = 1234;
4025  int y = 5678;
4026  debug ("Flag");
4027  debug ("X = %d\n", x);
4028  showlist (The first, second, and third items.);
4029  report (x>y, "x is %d but y is %d", x, y);
4030}
4031
4032// Check long long types.
4033#define BIG64 18446744073709551615ull
4034#define BIG32 4294967295ul
4035#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4036#if !BIG_OK
4037  #error "your preprocessor is broken"
4038#endif
4039#if BIG_OK
4040#else
4041  #error "your preprocessor is broken"
4042#endif
4043static long long int bignum = -9223372036854775807LL;
4044static unsigned long long int ubignum = BIG64;
4045
4046struct incomplete_array
4047{
4048  int datasize;
4049  double data[];
4050};
4051
4052struct named_init {
4053  int number;
4054  const wchar_t *name;
4055  double average;
4056};
4057
4058typedef const char *ccp;
4059
4060static inline int
4061test_restrict (ccp restrict text)
4062{
4063  // See if C++-style comments work.
4064  // Iterate through items via the restricted pointer.
4065  // Also check for declarations in for loops.
4066  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
4067    continue;
4068  return 0;
4069}
4070
4071// Check varargs and va_copy.
4072static bool
4073test_varargs (const char *format, ...)
4074{
4075  va_list args;
4076  va_start (args, format);
4077  va_list args_copy;
4078  va_copy (args_copy, args);
4079
4080  const char *str = "";
4081  int number = 0;
4082  float fnumber = 0;
4083
4084  while (*format)
4085    {
4086      switch (*format++)
4087	{
4088	case '\''s'\'': // string
4089	  str = va_arg (args_copy, const char *);
4090	  break;
4091	case '\''d'\'': // int
4092	  number = va_arg (args_copy, int);
4093	  break;
4094	case '\''f'\'': // float
4095	  fnumber = va_arg (args_copy, double);
4096	  break;
4097	default:
4098	  break;
4099	}
4100    }
4101  va_end (args_copy);
4102  va_end (args);
4103
4104  return *str && number && fnumber;
4105}
4106'
4107
4108# Test code for whether the C compiler supports C99 (body of main).
4109ac_c_conftest_c99_main='
4110  // Check bool.
4111  _Bool success = false;
4112  success |= (argc != 0);
4113
4114  // Check restrict.
4115  if (test_restrict ("String literal") == 0)
4116    success = true;
4117  char *restrict newvar = "Another string";
4118
4119  // Check varargs.
4120  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
4121  test_varargs_macros ();
4122
4123  // Check flexible array members.
4124  struct incomplete_array *ia =
4125    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4126  ia->datasize = 10;
4127  for (int i = 0; i < ia->datasize; ++i)
4128    ia->data[i] = i * 1.234;
4129
4130  // Check named initializers.
4131  struct named_init ni = {
4132    .number = 34,
4133    .name = L"Test wide string",
4134    .average = 543.34343,
4135  };
4136
4137  ni.number = 58;
4138
4139  int dynamic_array[ni.number];
4140  dynamic_array[0] = argv[0][0];
4141  dynamic_array[ni.number - 1] = 543;
4142
4143  // work around unused variable warnings
4144  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
4145	 || dynamic_array[ni.number - 1] != 543);
4146'
4147
4148# Test code for whether the C compiler supports C11 (global declarations)
4149ac_c_conftest_c11_globals='
4150// Does the compiler advertise C11 conformance?
4151#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
4152# error "Compiler does not advertise C11 conformance"
4153#endif
4154
4155// Check _Alignas.
4156char _Alignas (double) aligned_as_double;
4157char _Alignas (0) no_special_alignment;
4158extern char aligned_as_int;
4159char _Alignas (0) _Alignas (int) aligned_as_int;
4160
4161// Check _Alignof.
4162enum
4163{
4164  int_alignment = _Alignof (int),
4165  int_array_alignment = _Alignof (int[100]),
4166  char_alignment = _Alignof (char)
4167};
4168_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4169
4170// Check _Noreturn.
4171int _Noreturn does_not_return (void) { for (;;) continue; }
4172
4173// Check _Static_assert.
4174struct test_static_assert
4175{
4176  int x;
4177  _Static_assert (sizeof (int) <= sizeof (long int),
4178                  "_Static_assert does not work in struct");
4179  long int y;
4180};
4181
4182// Check UTF-8 literals.
4183#define u8 syntax error!
4184char const utf8_literal[] = u8"happens to be ASCII" "another string";
4185
4186// Check duplicate typedefs.
4187typedef long *long_ptr;
4188typedef long int *long_ptr;
4189typedef long_ptr long_ptr;
4190
4191// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4192struct anonymous
4193{
4194  union {
4195    struct { int i; int j; };
4196    struct { int k; long int l; } w;
4197  };
4198  int m;
4199} v1;
4200'
4201
4202# Test code for whether the C compiler supports C11 (body of main).
4203ac_c_conftest_c11_main='
4204  _Static_assert ((offsetof (struct anonymous, i)
4205		   == offsetof (struct anonymous, w.k)),
4206		  "Anonymous union alignment botch");
4207  v1.i = 2;
4208  v1.w.k = 5;
4209  ok |= v1.i != 5;
4210'
4211
4212# Test code for whether the C compiler supports C11 (complete).
4213ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
4214${ac_c_conftest_c99_globals}
4215${ac_c_conftest_c11_globals}
4216
4217int
4218main (int argc, char **argv)
4219{
4220  int ok = 0;
4221  ${ac_c_conftest_c89_main}
4222  ${ac_c_conftest_c99_main}
4223  ${ac_c_conftest_c11_main}
4224  return ok;
4225}
4226"
4227
4228# Test code for whether the C compiler supports C99 (complete).
4229ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
4230${ac_c_conftest_c99_globals}
4231
4232int
4233main (int argc, char **argv)
4234{
4235  int ok = 0;
4236  ${ac_c_conftest_c89_main}
4237  ${ac_c_conftest_c99_main}
4238  return ok;
4239}
4240"
4241
4242# Test code for whether the C compiler supports C89 (complete).
4243ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
4244
4245int
4246main (int argc, char **argv)
4247{
4248  int ok = 0;
4249  ${ac_c_conftest_c89_main}
4250  return ok;
4251}
4252"
4253
4254as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
4255as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
4256as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
4257as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
4258as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
4259as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
4260as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
4261as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
4262as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
4263as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
4264as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
4265as_fn_append ac_header_c_list " arpa/inet.h arpa_inet_h HAVE_ARPA_INET_H"
4266as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
4267as_fn_append ac_func_c_list " btowc HAVE_BTOWC"
4268as_fn_append ac_func_c_list " canonicalize_file_name HAVE_CANONICALIZE_FILE_NAME"
4269as_fn_append ac_func_c_list " faccessat HAVE_FACCESSAT"
4270as_fn_append ac_func_c_list " realpath HAVE_REALPATH"
4271as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
4272as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
4273as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
4274as_fn_append ac_func_c_list " fchdir HAVE_FCHDIR"
4275as_fn_append ac_header_c_list " threads.h threads_h HAVE_THREADS_H"
4276as_fn_append ac_header_c_list " dirent.h dirent_h HAVE_DIRENT_H"
4277as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
4278as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
4279as_fn_append ac_func_c_list " fdopendir HAVE_FDOPENDIR"
4280as_fn_append ac_func_c_list " mempcpy HAVE_MEMPCPY"
4281as_fn_append ac_func_c_list " flock HAVE_FLOCK"
4282as_fn_append ac_header_c_list " fnmatch.h fnmatch_h HAVE_FNMATCH_H"
4283as_fn_append ac_func_c_list " fnmatch HAVE_FNMATCH"
4284as_fn_append ac_func_c_list " mbsrtowcs HAVE_MBSRTOWCS"
4285gl_fnmatch_required=GNU
4286as_fn_append ac_header_c_list " stdio_ext.h stdio_ext_h HAVE_STDIO_EXT_H"
4287as_fn_append ac_func_c_list " fpurge HAVE_FPURGE"
4288as_fn_append ac_func_c_list " __fpurge HAVE___FPURGE"
4289as_fn_append ac_func_c_list " __freading HAVE___FREADING"
4290as_fn_append ac_func_c_list " fstatat HAVE_FSTATAT"
4291as_fn_append ac_func_c_list " fsync HAVE_FSYNC"
4292as_fn_append ac_func_c_list " ftruncate HAVE_FTRUNCATE"
4293as_fn_append ac_func_c_list " futimens HAVE_FUTIMENS"
4294as_fn_append ac_header_c_list " netdb.h netdb_h HAVE_NETDB_H"
4295as_fn_append ac_header_c_list " netinet/in.h netinet_in_h HAVE_NETINET_IN_H"
4296as_fn_append ac_func_c_list " getdelim HAVE_GETDELIM"
4297as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
4298as_fn_append ac_func_c_list " getlogin_r HAVE_GETLOGIN_R"
4299as_fn_append ac_func_c_list " getpass HAVE_GETPASS"
4300as_fn_append ac_header_c_list " termios.h termios_h HAVE_TERMIOS_H"
4301as_fn_append ac_func_c_list " __fsetlocking HAVE___FSETLOCKING"
4302as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME"
4303as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
4304as_fn_append ac_func_c_list " getrandom HAVE_GETRANDOM"
4305as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
4306as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
4307as_fn_append ac_header_c_list " glob.h glob_h HAVE_GLOB_H"
4308as_fn_append ac_func_c_list " glob HAVE_GLOB"
4309as_fn_append ac_func_c_list " glob_pattern_p HAVE_GLOB_PATTERN_P"
4310as_fn_append ac_func_c_list " getpwnam_r HAVE_GETPWNAM_R"
4311as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
4312as_fn_append ac_func_c_list " isblank HAVE_ISBLANK"
4313as_fn_append ac_header_c_list " langinfo.h langinfo_h HAVE_LANGINFO_H"
4314as_fn_append ac_func_c_list " link HAVE_LINK"
4315as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H"
4316as_fn_append ac_func_c_list " uselocale HAVE_USELOCALE"
4317as_fn_append ac_func_c_list " newlocale HAVE_NEWLOCALE"
4318as_fn_append ac_func_c_list " duplocale HAVE_DUPLOCALE"
4319as_fn_append ac_func_c_list " freelocale HAVE_FREELOCALE"
4320as_fn_append ac_func_c_list " mbsinit HAVE_MBSINIT"
4321as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC"
4322as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
4323as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
4324as_fn_append ac_func_c_list " mkstemp HAVE_MKSTEMP"
4325as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
4326as_fn_append ac_func_c_list " nl_langinfo HAVE_NL_LANGINFO"
4327as_fn_append ac_func_c_list " openat HAVE_OPENAT"
4328as_fn_append ac_func_c_list " pclose HAVE_PCLOSE"
4329as_fn_append ac_func_c_list " pipe HAVE_PIPE"
4330as_fn_append ac_func_c_list " pipe2 HAVE_PIPE2"
4331as_fn_append ac_header_c_list " poll.h poll_h HAVE_POLL_H"
4332as_fn_append ac_header_c_list " sys/ioctl.h sys_ioctl_h HAVE_SYS_IOCTL_H"
4333as_fn_append ac_header_c_list " sys/filio.h sys_filio_h HAVE_SYS_FILIO_H"
4334as_fn_append ac_func_c_list " popen HAVE_POPEN"
4335as_fn_append ac_func_c_list " posix_spawn_file_actions_addchdir_np HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP"
4336as_fn_append ac_func_c_list " posix_spawn_file_actions_addchdir HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR"
4337as_fn_append ac_func_c_list " pthread_sigmask HAVE_PTHREAD_SIGMASK"
4338as_fn_append ac_func_c_list " pwrite HAVE_PWRITE"
4339as_fn_append ac_func_c_list " qsort_r HAVE_QSORT_R"
4340as_fn_append ac_func_c_list " readlink HAVE_READLINK"
4341as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
4342as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
4343as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
4344as_fn_append ac_func_c_list " sigaction HAVE_SIGACTION"
4345as_fn_append ac_func_c_list " sigaltstack HAVE_SIGALTSTACK"
4346as_fn_append ac_func_c_list " siginterrupt HAVE_SIGINTERRUPT"
4347as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
4348as_fn_append ac_header_c_list " spawn.h spawn_h HAVE_SPAWN_H"
4349as_fn_append ac_func_c_list " strerror_r HAVE_STRERROR_R"
4350as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
4351as_fn_append ac_func_c_list " strndup HAVE_STRNDUP"
4352as_fn_append ac_header_c_list " sys/file.h sys_file_h HAVE_SYS_FILE_H"
4353as_fn_append ac_header_c_list " sys/random.h sys_random_h HAVE_SYS_RANDOM_H"
4354as_fn_append ac_header_c_list " sys/uio.h sys_uio_h HAVE_SYS_UIO_H"
4355as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H"
4356as_fn_append ac_func_c_list " localtime_r HAVE_LOCALTIME_R"
4357as_fn_append ac_header_c_list " utime.h utime_h HAVE_UTIME_H"
4358as_fn_append ac_func_c_list " futimes HAVE_FUTIMES"
4359as_fn_append ac_func_c_list " futimesat HAVE_FUTIMESAT"
4360as_fn_append ac_func_c_list " utimensat HAVE_UTIMENSAT"
4361as_fn_append ac_func_c_list " lutimes HAVE_LUTIMES"
4362as_fn_append ac_func_c_list " vasnprintf HAVE_VASNPRINTF"
4363as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
4364as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB"
4365as_fn_append ac_func_c_list " iswcntrl HAVE_ISWCNTRL"
4366as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H"
4367as_fn_append ac_func_c_list " wcwidth HAVE_WCWIDTH"
4368as_fn_append ac_func_c_list " wmempcpy HAVE_WMEMPCPY"
4369gt_needs="$gt_needs need-ngettext"
4370as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
4371as_fn_append ac_func_c_list " fork HAVE_FORK"
4372as_fn_append ac_func_c_list " vfork HAVE_VFORK"
4373as_fn_append ac_func_c_list " getpagesize HAVE_GETPAGESIZE"
4374
4375# Auxiliary files required by this configure script.
4376ac_aux_files="ltmain.sh config.rpath compile config.guess config.sub missing install-sh"
4377
4378# Locations in which to look for auxiliary files.
4379ac_aux_dir_candidates="${srcdir}/build-aux"
4380
4381# Search for a directory containing all of the required auxiliary files,
4382# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
4383# If we don't find one directory that contains all the files we need,
4384# we report the set of missing files from the *first* directory in
4385# $ac_aux_dir_candidates and give up.
4386ac_missing_aux_files=""
4387ac_first_candidate=:
4388printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
4389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4390as_found=false
4391for as_dir in $ac_aux_dir_candidates
4392do
4393  IFS=$as_save_IFS
4394  case $as_dir in #(((
4395    '') as_dir=./ ;;
4396    */) ;;
4397    *) as_dir=$as_dir/ ;;
4398  esac
4399  as_found=:
4400
4401  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
4402  ac_aux_dir_found=yes
4403  ac_install_sh=
4404  for ac_aux in $ac_aux_files
4405  do
4406    # As a special case, if "install-sh" is required, that requirement
4407    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
4408    # and $ac_install_sh is set appropriately for whichever one is found.
4409    if test x"$ac_aux" = x"install-sh"
4410    then
4411      if test -f "${as_dir}install-sh"; then
4412        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
4413        ac_install_sh="${as_dir}install-sh -c"
4414      elif test -f "${as_dir}install.sh"; then
4415        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
4416        ac_install_sh="${as_dir}install.sh -c"
4417      elif test -f "${as_dir}shtool"; then
4418        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
4419        ac_install_sh="${as_dir}shtool install -c"
4420      else
4421        ac_aux_dir_found=no
4422        if $ac_first_candidate; then
4423          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
4424        else
4425          break
4426        fi
4427      fi
4428    else
4429      if test -f "${as_dir}${ac_aux}"; then
4430        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
4431      else
4432        ac_aux_dir_found=no
4433        if $ac_first_candidate; then
4434          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
4435        else
4436          break
4437        fi
4438      fi
4439    fi
4440  done
4441  if test "$ac_aux_dir_found" = yes; then
4442    ac_aux_dir="$as_dir"
4443    break
4444  fi
4445  ac_first_candidate=false
4446
4447  as_found=false
4448done
4449IFS=$as_save_IFS
4450if $as_found
4451then :
4452
4453else $as_nop
4454  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
4455fi
4456
4457
4458# These three variables are undocumented and unsupported,
4459# and are intended to be withdrawn in a future Autoconf release.
4460# They can cause serious problems if a builder's source tree is in a directory
4461# whose full name contains unusual characters.
4462if test -f "${ac_aux_dir}config.guess"; then
4463  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
4464fi
4465if test -f "${ac_aux_dir}config.sub"; then
4466  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
4467fi
4468if test -f "$ac_aux_dir/configure"; then
4469  ac_configure="$SHELL ${ac_aux_dir}configure"
4470fi
4471
4472# Check that the precious variables saved in the cache have kept the same
4473# value.
4474ac_cache_corrupted=false
4475for ac_var in $ac_precious_vars; do
4476  eval ac_old_set=\$ac_cv_env_${ac_var}_set
4477  eval ac_new_set=\$ac_env_${ac_var}_set
4478  eval ac_old_val=\$ac_cv_env_${ac_var}_value
4479  eval ac_new_val=\$ac_env_${ac_var}_value
4480  case $ac_old_set,$ac_new_set in
4481    set,)
4482      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
4483printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
4484      ac_cache_corrupted=: ;;
4485    ,set)
4486      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
4487printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
4488      ac_cache_corrupted=: ;;
4489    ,);;
4490    *)
4491      if test "x$ac_old_val" != "x$ac_new_val"; then
4492	# differences in whitespace do not lead to failure.
4493	ac_old_val_w=`echo x $ac_old_val`
4494	ac_new_val_w=`echo x $ac_new_val`
4495	if test "$ac_old_val_w" != "$ac_new_val_w"; then
4496	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
4497printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
4498	  ac_cache_corrupted=:
4499	else
4500	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
4501printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
4502	  eval $ac_var=\$ac_old_val
4503	fi
4504	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
4505printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
4506	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
4507printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
4508      fi;;
4509  esac
4510  # Pass precious variables to config.status.
4511  if test "$ac_new_set" = set; then
4512    case $ac_new_val in
4513    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
4514    *) ac_arg=$ac_var=$ac_new_val ;;
4515    esac
4516    case " $ac_configure_args " in
4517      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
4518      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
4519    esac
4520  fi
4521done
4522if $ac_cache_corrupted; then
4523  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4524printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4525  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
4526printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
4527  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
4528	    and start over" "$LINENO" 5
4529fi
4530## -------------------- ##
4531## Main body of script. ##
4532## -------------------- ##
4533
4534ac_ext=c
4535ac_cpp='$CPP $CPPFLAGS'
4536ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4537ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4538ac_compiler_gnu=$ac_cv_c_compiler_gnu
4539
4540
4541
4542
4543
4544
4545am__api_version='1.16'
4546
4547
4548
4549  # Find a good install program.  We prefer a C program (faster),
4550# so one script is as good as another.  But avoid the broken or
4551# incompatible versions:
4552# SysV /etc/install, /usr/sbin/install
4553# SunOS /usr/etc/install
4554# IRIX /sbin/install
4555# AIX /bin/install
4556# AmigaOS /C/install, which installs bootblocks on floppy discs
4557# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4558# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4559# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4560# OS/2's system install, which has a completely different semantic
4561# ./install, which can be erroneously created by make from ./install.sh.
4562# Reject install programs that cannot install multiple files.
4563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4564printf %s "checking for a BSD-compatible install... " >&6; }
4565if test -z "$INSTALL"; then
4566if test ${ac_cv_path_install+y}
4567then :
4568  printf %s "(cached) " >&6
4569else $as_nop
4570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4571for as_dir in $PATH
4572do
4573  IFS=$as_save_IFS
4574  case $as_dir in #(((
4575    '') as_dir=./ ;;
4576    */) ;;
4577    *) as_dir=$as_dir/ ;;
4578  esac
4579    # Account for fact that we put trailing slashes in our PATH walk.
4580case $as_dir in #((
4581  ./ | /[cC]/* | \
4582  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4583  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4584  /usr/ucb/* ) ;;
4585  *)
4586    # OSF1 and SCO ODT 3.0 have their own names for install.
4587    # Don't use installbsd from OSF since it installs stuff as root
4588    # by default.
4589    for ac_prog in ginstall scoinst install; do
4590      for ac_exec_ext in '' $ac_executable_extensions; do
4591	if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
4592	  if test $ac_prog = install &&
4593	    grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4594	    # AIX install.  It has an incompatible calling convention.
4595	    :
4596	  elif test $ac_prog = install &&
4597	    grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4598	    # program-specific install script used by HP pwplus--don't use.
4599	    :
4600	  else
4601	    rm -rf conftest.one conftest.two conftest.dir
4602	    echo one > conftest.one
4603	    echo two > conftest.two
4604	    mkdir conftest.dir
4605	    if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
4606	      test -s conftest.one && test -s conftest.two &&
4607	      test -s conftest.dir/conftest.one &&
4608	      test -s conftest.dir/conftest.two
4609	    then
4610	      ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
4611	      break 3
4612	    fi
4613	  fi
4614	fi
4615      done
4616    done
4617    ;;
4618esac
4619
4620  done
4621IFS=$as_save_IFS
4622
4623rm -rf conftest.one conftest.two conftest.dir
4624
4625fi
4626  if test ${ac_cv_path_install+y}; then
4627    INSTALL=$ac_cv_path_install
4628  else
4629    # As a last resort, use the slow shell script.  Don't cache a
4630    # value for INSTALL within a source directory, because that will
4631    # break other packages using the cache if that directory is
4632    # removed, or if the value is a relative name.
4633    INSTALL=$ac_install_sh
4634  fi
4635fi
4636{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4637printf "%s\n" "$INSTALL" >&6; }
4638
4639# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4640# It thinks the first close brace ends the variable substitution.
4641test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4642
4643test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4644
4645test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4646
4647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
4648printf %s "checking whether build environment is sane... " >&6; }
4649# Reject unsafe characters in $srcdir or the absolute working directory
4650# name.  Accept space and tab only in the latter.
4651am_lf='
4652'
4653case `pwd` in
4654  *[\\\"\#\$\&\'\`$am_lf]*)
4655    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
4656esac
4657case $srcdir in
4658  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
4659    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
4660esac
4661
4662# Do 'set' in a subshell so we don't clobber the current shell's
4663# arguments.  Must try -L first in case configure is actually a
4664# symlink; some systems play weird games with the mod time of symlinks
4665# (eg FreeBSD returns the mod time of the symlink's containing
4666# directory).
4667if (
4668   am_has_slept=no
4669   for am_try in 1 2; do
4670     echo "timestamp, slept: $am_has_slept" > conftest.file
4671     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
4672     if test "$*" = "X"; then
4673	# -L didn't work.
4674	set X `ls -t "$srcdir/configure" conftest.file`
4675     fi
4676     if test "$*" != "X $srcdir/configure conftest.file" \
4677	&& test "$*" != "X conftest.file $srcdir/configure"; then
4678
4679	# If neither matched, then we have a broken ls.  This can happen
4680	# if, for instance, CONFIG_SHELL is bash and it inherits a
4681	# broken ls alias from the environment.  This has actually
4682	# happened.  Such a system could not be considered "sane".
4683	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
4684  alias in your environment" "$LINENO" 5
4685     fi
4686     if test "$2" = conftest.file || test $am_try -eq 2; then
4687       break
4688     fi
4689     # Just in case.
4690     sleep 1
4691     am_has_slept=yes
4692   done
4693   test "$2" = conftest.file
4694   )
4695then
4696   # Ok.
4697   :
4698else
4699   as_fn_error $? "newly created file is older than distributed files!
4700Check your system clock" "$LINENO" 5
4701fi
4702{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4703printf "%s\n" "yes" >&6; }
4704# If we didn't sleep, we still need to ensure time stamps of config.status and
4705# generated files are strictly newer.
4706am_sleep_pid=
4707if grep 'slept: no' conftest.file >/dev/null 2>&1; then
4708  ( sleep 1 ) &
4709  am_sleep_pid=$!
4710fi
4711
4712rm -f conftest.file
4713
4714test "$program_prefix" != NONE &&
4715  program_transform_name="s&^&$program_prefix&;$program_transform_name"
4716# Use a double $ so make ignores it.
4717test "$program_suffix" != NONE &&
4718  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4719# Double any \ or $.
4720# By default was `s,x,x', remove it if useless.
4721ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4722program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
4723
4724
4725# Expand $ac_aux_dir to an absolute path.
4726am_aux_dir=`cd "$ac_aux_dir" && pwd`
4727
4728
4729  if test x"${MISSING+set}" != xset; then
4730  MISSING="\${SHELL} '$am_aux_dir/missing'"
4731fi
4732# Use eval to expand $SHELL
4733if eval "$MISSING --is-lightweight"; then
4734  am_missing_run="$MISSING "
4735else
4736  am_missing_run=
4737  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
4738printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
4739fi
4740
4741if test x"${install_sh+set}" != xset; then
4742  case $am_aux_dir in
4743  *\ * | *\	*)
4744    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4745  *)
4746    install_sh="\${SHELL} $am_aux_dir/install-sh"
4747  esac
4748fi
4749
4750# Installed binaries are usually stripped using 'strip' when the user
4751# run "make install-strip".  However 'strip' might not be the right
4752# tool to use in cross-compilation environments, therefore Automake
4753# will honor the 'STRIP' environment variable to overrule this program.
4754if test "$cross_compiling" != no; then
4755  if test -n "$ac_tool_prefix"; then
4756  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4757set dummy ${ac_tool_prefix}strip; ac_word=$2
4758{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4759printf %s "checking for $ac_word... " >&6; }
4760if test ${ac_cv_prog_STRIP+y}
4761then :
4762  printf %s "(cached) " >&6
4763else $as_nop
4764  if test -n "$STRIP"; then
4765  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4766else
4767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4768for as_dir in $PATH
4769do
4770  IFS=$as_save_IFS
4771  case $as_dir in #(((
4772    '') as_dir=./ ;;
4773    */) ;;
4774    *) as_dir=$as_dir/ ;;
4775  esac
4776    for ac_exec_ext in '' $ac_executable_extensions; do
4777  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4778    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4779    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4780    break 2
4781  fi
4782done
4783  done
4784IFS=$as_save_IFS
4785
4786fi
4787fi
4788STRIP=$ac_cv_prog_STRIP
4789if test -n "$STRIP"; then
4790  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4791printf "%s\n" "$STRIP" >&6; }
4792else
4793  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4794printf "%s\n" "no" >&6; }
4795fi
4796
4797
4798fi
4799if test -z "$ac_cv_prog_STRIP"; then
4800  ac_ct_STRIP=$STRIP
4801  # Extract the first word of "strip", so it can be a program name with args.
4802set dummy strip; ac_word=$2
4803{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4804printf %s "checking for $ac_word... " >&6; }
4805if test ${ac_cv_prog_ac_ct_STRIP+y}
4806then :
4807  printf %s "(cached) " >&6
4808else $as_nop
4809  if test -n "$ac_ct_STRIP"; then
4810  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4811else
4812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4813for as_dir in $PATH
4814do
4815  IFS=$as_save_IFS
4816  case $as_dir in #(((
4817    '') as_dir=./ ;;
4818    */) ;;
4819    *) as_dir=$as_dir/ ;;
4820  esac
4821    for ac_exec_ext in '' $ac_executable_extensions; do
4822  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4823    ac_cv_prog_ac_ct_STRIP="strip"
4824    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4825    break 2
4826  fi
4827done
4828  done
4829IFS=$as_save_IFS
4830
4831fi
4832fi
4833ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4834if test -n "$ac_ct_STRIP"; then
4835  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4836printf "%s\n" "$ac_ct_STRIP" >&6; }
4837else
4838  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4839printf "%s\n" "no" >&6; }
4840fi
4841
4842  if test "x$ac_ct_STRIP" = x; then
4843    STRIP=":"
4844  else
4845    case $cross_compiling:$ac_tool_warned in
4846yes:)
4847{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4848printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4849ac_tool_warned=yes ;;
4850esac
4851    STRIP=$ac_ct_STRIP
4852  fi
4853else
4854  STRIP="$ac_cv_prog_STRIP"
4855fi
4856
4857fi
4858INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4859
4860
4861  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
4862printf %s "checking for a race-free mkdir -p... " >&6; }
4863if test -z "$MKDIR_P"; then
4864  if test ${ac_cv_path_mkdir+y}
4865then :
4866  printf %s "(cached) " >&6
4867else $as_nop
4868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4869for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4870do
4871  IFS=$as_save_IFS
4872  case $as_dir in #(((
4873    '') as_dir=./ ;;
4874    */) ;;
4875    *) as_dir=$as_dir/ ;;
4876  esac
4877    for ac_prog in mkdir gmkdir; do
4878	 for ac_exec_ext in '' $ac_executable_extensions; do
4879	   as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
4880	   case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
4881	     'mkdir ('*'coreutils) '* | \
4882	     'BusyBox '* | \
4883	     'mkdir (fileutils) '4.1*)
4884	       ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
4885	       break 3;;
4886	   esac
4887	 done
4888       done
4889  done
4890IFS=$as_save_IFS
4891
4892fi
4893
4894  test -d ./--version && rmdir ./--version
4895  if test ${ac_cv_path_mkdir+y}; then
4896    MKDIR_P="$ac_cv_path_mkdir -p"
4897  else
4898    # As a last resort, use the slow shell script.  Don't cache a
4899    # value for MKDIR_P within a source directory, because that will
4900    # break other packages using the cache if that directory is
4901    # removed, or if the value is a relative name.
4902    MKDIR_P="$ac_install_sh -d"
4903  fi
4904fi
4905{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4906printf "%s\n" "$MKDIR_P" >&6; }
4907
4908for ac_prog in gawk mawk nawk awk
4909do
4910  # Extract the first word of "$ac_prog", so it can be a program name with args.
4911set dummy $ac_prog; ac_word=$2
4912{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4913printf %s "checking for $ac_word... " >&6; }
4914if test ${ac_cv_prog_AWK+y}
4915then :
4916  printf %s "(cached) " >&6
4917else $as_nop
4918  if test -n "$AWK"; then
4919  ac_cv_prog_AWK="$AWK" # Let the user override the test.
4920else
4921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4922for as_dir in $PATH
4923do
4924  IFS=$as_save_IFS
4925  case $as_dir in #(((
4926    '') as_dir=./ ;;
4927    */) ;;
4928    *) as_dir=$as_dir/ ;;
4929  esac
4930    for ac_exec_ext in '' $ac_executable_extensions; do
4931  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4932    ac_cv_prog_AWK="$ac_prog"
4933    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4934    break 2
4935  fi
4936done
4937  done
4938IFS=$as_save_IFS
4939
4940fi
4941fi
4942AWK=$ac_cv_prog_AWK
4943if test -n "$AWK"; then
4944  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4945printf "%s\n" "$AWK" >&6; }
4946else
4947  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4948printf "%s\n" "no" >&6; }
4949fi
4950
4951
4952  test -n "$AWK" && break
4953done
4954
4955{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4956printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4957set x ${MAKE-make}
4958ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4959if eval test \${ac_cv_prog_make_${ac_make}_set+y}
4960then :
4961  printf %s "(cached) " >&6
4962else $as_nop
4963  cat >conftest.make <<\_ACEOF
4964SHELL = /bin/sh
4965all:
4966	@echo '@@@%%%=$(MAKE)=@@@%%%'
4967_ACEOF
4968# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4969case `${MAKE-make} -f conftest.make 2>/dev/null` in
4970  *@@@%%%=?*=@@@%%%*)
4971    eval ac_cv_prog_make_${ac_make}_set=yes;;
4972  *)
4973    eval ac_cv_prog_make_${ac_make}_set=no;;
4974esac
4975rm -f conftest.make
4976fi
4977if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4978  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4979printf "%s\n" "yes" >&6; }
4980  SET_MAKE=
4981else
4982  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4983printf "%s\n" "no" >&6; }
4984  SET_MAKE="MAKE=${MAKE-make}"
4985fi
4986
4987rm -rf .tst 2>/dev/null
4988mkdir .tst 2>/dev/null
4989if test -d .tst; then
4990  am__leading_dot=.
4991else
4992  am__leading_dot=_
4993fi
4994rmdir .tst 2>/dev/null
4995
4996# Check whether --enable-silent-rules was given.
4997if test ${enable_silent_rules+y}
4998then :
4999  enableval=$enable_silent_rules;
5000fi
5001
5002case $enable_silent_rules in # (((
5003  yes) AM_DEFAULT_VERBOSITY=0;;
5004   no) AM_DEFAULT_VERBOSITY=1;;
5005    *) AM_DEFAULT_VERBOSITY=1;;
5006esac
5007am_make=${MAKE-make}
5008{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
5009printf %s "checking whether $am_make supports nested variables... " >&6; }
5010if test ${am_cv_make_support_nested_variables+y}
5011then :
5012  printf %s "(cached) " >&6
5013else $as_nop
5014  if printf "%s\n" 'TRUE=$(BAR$(V))
5015BAR0=false
5016BAR1=true
5017V=1
5018am__doit:
5019	@$(TRUE)
5020.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
5021  am_cv_make_support_nested_variables=yes
5022else
5023  am_cv_make_support_nested_variables=no
5024fi
5025fi
5026{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
5027printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
5028if test $am_cv_make_support_nested_variables = yes; then
5029    AM_V='$(V)'
5030  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
5031else
5032  AM_V=$AM_DEFAULT_VERBOSITY
5033  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
5034fi
5035AM_BACKSLASH='\'
5036
5037if test "`cd $srcdir && pwd`" != "`pwd`"; then
5038  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
5039  # is not polluted with repeated "-I."
5040  am__isrc=' -I$(srcdir)'
5041  # test to see if srcdir already configured
5042  if test -f $srcdir/config.status; then
5043    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
5044  fi
5045fi
5046
5047# test whether we have cygpath
5048if test -z "$CYGPATH_W"; then
5049  if (cygpath --version) >/dev/null 2>/dev/null; then
5050    CYGPATH_W='cygpath -w'
5051  else
5052    CYGPATH_W=echo
5053  fi
5054fi
5055
5056
5057# Define the identity of the package.
5058 PACKAGE='wget2'
5059 VERSION='2.0.0'
5060
5061
5062printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
5063
5064
5065printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
5066
5067# Some tools Automake needs.
5068
5069ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
5070
5071
5072AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
5073
5074
5075AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
5076
5077
5078AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
5079
5080
5081MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
5082
5083# For better backward compatibility.  To be removed once Automake 1.9.x
5084# dies out for good.  For more background, see:
5085# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
5086# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
5087mkdir_p='$(MKDIR_P)'
5088
5089# We need awk for the "check" target (and possibly the TAP driver).  The
5090# system "awk" is bad on some platforms.
5091# Always define AMTAR for backward compatibility.  Yes, it's still used
5092# in the wild :-(  We should find a proper way to deprecate it ...
5093AMTAR='$${TAR-tar}'
5094
5095
5096# We'll loop over all known methods to create a tar archive until one works.
5097_am_tools='gnutar  pax cpio none'
5098
5099am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
5100
5101
5102
5103
5104
5105# Variables for tags utilities; see am/tags.am
5106if test -z "$CTAGS"; then
5107  CTAGS=ctags
5108fi
5109
5110if test -z "$ETAGS"; then
5111  ETAGS=etags
5112fi
5113
5114if test -z "$CSCOPE"; then
5115  CSCOPE=cscope
5116fi
5117
5118
5119
5120# POSIX will say in a future version that running "rm -f" with no argument
5121# is OK; and we want to be able to make that assumption in our Makefile
5122# recipes.  So use an aggressive probe to check that the usage we want is
5123# actually supported "in the wild" to an acceptable degree.
5124# See automake bug#10828.
5125# To make any issue more visible, cause the running configure to be aborted
5126# by default if the 'rm' program in use doesn't match our expectations; the
5127# user can still override this though.
5128if rm -f && rm -fr && rm -rf; then : OK; else
5129  cat >&2 <<'END'
5130Oops!
5131
5132Your 'rm' program seems unable to run without file operands specified
5133on the command line, even when the '-f' option is present.  This is contrary
5134to the behaviour of most rm programs out there, and not conforming with
5135the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
5136
5137Please tell bug-automake@gnu.org about your system, including the value
5138of your $PATH and any error possibly output before this message.  This
5139can help us improve future automake versions.
5140
5141END
5142  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
5143    echo 'Configuration will proceed anyway, since you have set the' >&2
5144    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
5145    echo >&2
5146  else
5147    cat >&2 <<'END'
5148Aborting the configuration process, to ensure you take notice of the issue.
5149
5150You can download and install GNU coreutils to get an 'rm' implementation
5151that behaves properly: <https://www.gnu.org/software/coreutils/>.
5152
5153If you want to complete the configuration process using your problematic
5154'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
5155to "yes", and re-run configure.
5156
5157END
5158    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
5159  fi
5160fi
5161
5162
5163
5164
5165  # Make sure we can run config.sub.
5166$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
5167  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
5168
5169{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5170printf %s "checking build system type... " >&6; }
5171if test ${ac_cv_build+y}
5172then :
5173  printf %s "(cached) " >&6
5174else $as_nop
5175  ac_build_alias=$build_alias
5176test "x$ac_build_alias" = x &&
5177  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
5178test "x$ac_build_alias" = x &&
5179  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5180ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
5181  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
5182
5183fi
5184{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5185printf "%s\n" "$ac_cv_build" >&6; }
5186case $ac_cv_build in
5187*-*-*) ;;
5188*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5189esac
5190build=$ac_cv_build
5191ac_save_IFS=$IFS; IFS='-'
5192set x $ac_cv_build
5193shift
5194build_cpu=$1
5195build_vendor=$2
5196shift; shift
5197# Remember, the first character of IFS is used to create $*,
5198# except with old shells:
5199build_os=$*
5200IFS=$ac_save_IFS
5201case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5202
5203
5204{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5205printf %s "checking host system type... " >&6; }
5206if test ${ac_cv_host+y}
5207then :
5208  printf %s "(cached) " >&6
5209else $as_nop
5210  if test "x$host_alias" = x; then
5211  ac_cv_host=$ac_cv_build
5212else
5213  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
5214    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
5215fi
5216
5217fi
5218{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5219printf "%s\n" "$ac_cv_host" >&6; }
5220case $ac_cv_host in
5221*-*-*) ;;
5222*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5223esac
5224host=$ac_cv_host
5225ac_save_IFS=$IFS; IFS='-'
5226set x $ac_cv_host
5227shift
5228host_cpu=$1
5229host_vendor=$2
5230shift; shift
5231# Remember, the first character of IFS is used to create $*,
5232# except with old shells:
5233host_os=$*
5234IFS=$ac_save_IFS
5235case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5236
5237
5238case $host_os in
5239  linux*)
5240    ;;
5241  mingw*)
5242    XTRA_CFLAGS="-Wno-attributes -fno-PIC"
5243#    XTRA_LIBS=-lws2_32
5244    ;;
5245  cygwin*)
5246    XTRA_CFLAGS="-Wno-char-subscripts -fno-PIC"
5247    ;;
5248#  *)
5249#    AC_MSG_ERROR([$host_os is not currently supported])
5250#    ;;
5251esac
5252
5253# Append EXTRA_CFLAGS to CFLAGS, if defined.
5254test -n "$EXTRA_CFLAGS" && CFLAGS="$CFLAGS $EXTRA_CFLAGS"
5255test -n "$XTRA_CFLAGS" && CFLAGS="$CFLAGS $XTRA_CFLAGS"
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266DEPDIR="${am__leading_dot}deps"
5267
5268ac_config_commands="$ac_config_commands depfiles"
5269
5270{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
5271printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
5272cat > confinc.mk << 'END'
5273am__doit:
5274	@echo this is the am__doit target >confinc.out
5275.PHONY: am__doit
5276END
5277am__include="#"
5278am__quote=
5279# BSD make does it like this.
5280echo '.include "confinc.mk" # ignored' > confmf.BSD
5281# Other make implementations (GNU, Solaris 10, AIX) do it like this.
5282echo 'include confinc.mk # ignored' > confmf.GNU
5283_am_result=no
5284for s in GNU BSD; do
5285  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
5286   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
5287   ac_status=$?
5288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5289   (exit $ac_status); }
5290  case $?:`cat confinc.out 2>/dev/null` in #(
5291  '0:this is the am__doit target') :
5292    case $s in #(
5293  BSD) :
5294    am__include='.include' am__quote='"' ;; #(
5295  *) :
5296    am__include='include' am__quote='' ;;
5297esac ;; #(
5298  *) :
5299     ;;
5300esac
5301  if test "$am__include" != "#"; then
5302    _am_result="yes ($s style)"
5303    break
5304  fi
5305done
5306rm -f confinc.* confmf.*
5307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
5308printf "%s\n" "${_am_result}" >&6; }
5309
5310# Check whether --enable-dependency-tracking was given.
5311if test ${enable_dependency_tracking+y}
5312then :
5313  enableval=$enable_dependency_tracking;
5314fi
5315
5316if test "x$enable_dependency_tracking" != xno; then
5317  am_depcomp="$ac_aux_dir/depcomp"
5318  AMDEPBACKSLASH='\'
5319  am__nodep='_no'
5320fi
5321 if test "x$enable_dependency_tracking" != xno; then
5322  AMDEP_TRUE=
5323  AMDEP_FALSE='#'
5324else
5325  AMDEP_TRUE='#'
5326  AMDEP_FALSE=
5327fi
5328
5329
5330ac_ext=c
5331ac_cpp='$CPP $CPPFLAGS'
5332ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5333ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5334ac_compiler_gnu=$ac_cv_c_compiler_gnu
5335if test -n "$ac_tool_prefix"; then
5336  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5337set dummy ${ac_tool_prefix}gcc; 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}gcc"
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
5378fi
5379if test -z "$ac_cv_prog_CC"; then
5380  ac_ct_CC=$CC
5381  # Extract the first word of "gcc", so it can be a program name with args.
5382set dummy gcc; ac_word=$2
5383{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5384printf %s "checking for $ac_word... " >&6; }
5385if test ${ac_cv_prog_ac_ct_CC+y}
5386then :
5387  printf %s "(cached) " >&6
5388else $as_nop
5389  if test -n "$ac_ct_CC"; then
5390  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5391else
5392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5393for as_dir in $PATH
5394do
5395  IFS=$as_save_IFS
5396  case $as_dir in #(((
5397    '') as_dir=./ ;;
5398    */) ;;
5399    *) as_dir=$as_dir/ ;;
5400  esac
5401    for ac_exec_ext in '' $ac_executable_extensions; do
5402  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5403    ac_cv_prog_ac_ct_CC="gcc"
5404    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5405    break 2
5406  fi
5407done
5408  done
5409IFS=$as_save_IFS
5410
5411fi
5412fi
5413ac_ct_CC=$ac_cv_prog_ac_ct_CC
5414if test -n "$ac_ct_CC"; then
5415  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5416printf "%s\n" "$ac_ct_CC" >&6; }
5417else
5418  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5419printf "%s\n" "no" >&6; }
5420fi
5421
5422  if test "x$ac_ct_CC" = x; then
5423    CC=""
5424  else
5425    case $cross_compiling:$ac_tool_warned in
5426yes:)
5427{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5428printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5429ac_tool_warned=yes ;;
5430esac
5431    CC=$ac_ct_CC
5432  fi
5433else
5434  CC="$ac_cv_prog_CC"
5435fi
5436
5437if test -z "$CC"; then
5438          if test -n "$ac_tool_prefix"; then
5439    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5440set dummy ${ac_tool_prefix}cc; ac_word=$2
5441{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5442printf %s "checking for $ac_word... " >&6; }
5443if test ${ac_cv_prog_CC+y}
5444then :
5445  printf %s "(cached) " >&6
5446else $as_nop
5447  if test -n "$CC"; then
5448  ac_cv_prog_CC="$CC" # Let the user override the test.
5449else
5450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5451for as_dir in $PATH
5452do
5453  IFS=$as_save_IFS
5454  case $as_dir in #(((
5455    '') as_dir=./ ;;
5456    */) ;;
5457    *) as_dir=$as_dir/ ;;
5458  esac
5459    for ac_exec_ext in '' $ac_executable_extensions; do
5460  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5461    ac_cv_prog_CC="${ac_tool_prefix}cc"
5462    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5463    break 2
5464  fi
5465done
5466  done
5467IFS=$as_save_IFS
5468
5469fi
5470fi
5471CC=$ac_cv_prog_CC
5472if test -n "$CC"; then
5473  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5474printf "%s\n" "$CC" >&6; }
5475else
5476  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5477printf "%s\n" "no" >&6; }
5478fi
5479
5480
5481  fi
5482fi
5483if test -z "$CC"; then
5484  # Extract the first word of "cc", so it can be a program name with args.
5485set dummy cc; ac_word=$2
5486{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5487printf %s "checking for $ac_word... " >&6; }
5488if test ${ac_cv_prog_CC+y}
5489then :
5490  printf %s "(cached) " >&6
5491else $as_nop
5492  if test -n "$CC"; then
5493  ac_cv_prog_CC="$CC" # Let the user override the test.
5494else
5495  ac_prog_rejected=no
5496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5497for as_dir in $PATH
5498do
5499  IFS=$as_save_IFS
5500  case $as_dir in #(((
5501    '') as_dir=./ ;;
5502    */) ;;
5503    *) as_dir=$as_dir/ ;;
5504  esac
5505    for ac_exec_ext in '' $ac_executable_extensions; do
5506  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5507    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5508       ac_prog_rejected=yes
5509       continue
5510     fi
5511    ac_cv_prog_CC="cc"
5512    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5513    break 2
5514  fi
5515done
5516  done
5517IFS=$as_save_IFS
5518
5519if test $ac_prog_rejected = yes; then
5520  # We found a bogon in the path, so make sure we never use it.
5521  set dummy $ac_cv_prog_CC
5522  shift
5523  if test $# != 0; then
5524    # We chose a different compiler from the bogus one.
5525    # However, it has the same basename, so the bogon will be chosen
5526    # first if we set CC to just the basename; use the full file name.
5527    shift
5528    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
5529  fi
5530fi
5531fi
5532fi
5533CC=$ac_cv_prog_CC
5534if test -n "$CC"; then
5535  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5536printf "%s\n" "$CC" >&6; }
5537else
5538  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5539printf "%s\n" "no" >&6; }
5540fi
5541
5542
5543fi
5544if test -z "$CC"; then
5545  if test -n "$ac_tool_prefix"; then
5546  for ac_prog in cl.exe
5547  do
5548    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5549set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5550{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5551printf %s "checking for $ac_word... " >&6; }
5552if test ${ac_cv_prog_CC+y}
5553then :
5554  printf %s "(cached) " >&6
5555else $as_nop
5556  if test -n "$CC"; then
5557  ac_cv_prog_CC="$CC" # Let the user override the test.
5558else
5559as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5560for as_dir in $PATH
5561do
5562  IFS=$as_save_IFS
5563  case $as_dir in #(((
5564    '') as_dir=./ ;;
5565    */) ;;
5566    *) as_dir=$as_dir/ ;;
5567  esac
5568    for ac_exec_ext in '' $ac_executable_extensions; do
5569  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5570    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5571    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5572    break 2
5573  fi
5574done
5575  done
5576IFS=$as_save_IFS
5577
5578fi
5579fi
5580CC=$ac_cv_prog_CC
5581if test -n "$CC"; then
5582  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5583printf "%s\n" "$CC" >&6; }
5584else
5585  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5586printf "%s\n" "no" >&6; }
5587fi
5588
5589
5590    test -n "$CC" && break
5591  done
5592fi
5593if test -z "$CC"; then
5594  ac_ct_CC=$CC
5595  for ac_prog in cl.exe
5596do
5597  # Extract the first word of "$ac_prog", so it can be a program name with args.
5598set dummy $ac_prog; ac_word=$2
5599{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5600printf %s "checking for $ac_word... " >&6; }
5601if test ${ac_cv_prog_ac_ct_CC+y}
5602then :
5603  printf %s "(cached) " >&6
5604else $as_nop
5605  if test -n "$ac_ct_CC"; then
5606  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5607else
5608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5609for as_dir in $PATH
5610do
5611  IFS=$as_save_IFS
5612  case $as_dir in #(((
5613    '') as_dir=./ ;;
5614    */) ;;
5615    *) as_dir=$as_dir/ ;;
5616  esac
5617    for ac_exec_ext in '' $ac_executable_extensions; do
5618  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5619    ac_cv_prog_ac_ct_CC="$ac_prog"
5620    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5621    break 2
5622  fi
5623done
5624  done
5625IFS=$as_save_IFS
5626
5627fi
5628fi
5629ac_ct_CC=$ac_cv_prog_ac_ct_CC
5630if test -n "$ac_ct_CC"; then
5631  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5632printf "%s\n" "$ac_ct_CC" >&6; }
5633else
5634  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5635printf "%s\n" "no" >&6; }
5636fi
5637
5638
5639  test -n "$ac_ct_CC" && break
5640done
5641
5642  if test "x$ac_ct_CC" = x; then
5643    CC=""
5644  else
5645    case $cross_compiling:$ac_tool_warned in
5646yes:)
5647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5648printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5649ac_tool_warned=yes ;;
5650esac
5651    CC=$ac_ct_CC
5652  fi
5653fi
5654
5655fi
5656if test -z "$CC"; then
5657  if test -n "$ac_tool_prefix"; then
5658  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5659set dummy ${ac_tool_prefix}clang; ac_word=$2
5660{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5661printf %s "checking for $ac_word... " >&6; }
5662if test ${ac_cv_prog_CC+y}
5663then :
5664  printf %s "(cached) " >&6
5665else $as_nop
5666  if test -n "$CC"; then
5667  ac_cv_prog_CC="$CC" # Let the user override the test.
5668else
5669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5670for as_dir in $PATH
5671do
5672  IFS=$as_save_IFS
5673  case $as_dir in #(((
5674    '') as_dir=./ ;;
5675    */) ;;
5676    *) as_dir=$as_dir/ ;;
5677  esac
5678    for ac_exec_ext in '' $ac_executable_extensions; do
5679  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5680    ac_cv_prog_CC="${ac_tool_prefix}clang"
5681    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5682    break 2
5683  fi
5684done
5685  done
5686IFS=$as_save_IFS
5687
5688fi
5689fi
5690CC=$ac_cv_prog_CC
5691if test -n "$CC"; then
5692  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5693printf "%s\n" "$CC" >&6; }
5694else
5695  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5696printf "%s\n" "no" >&6; }
5697fi
5698
5699
5700fi
5701if test -z "$ac_cv_prog_CC"; then
5702  ac_ct_CC=$CC
5703  # Extract the first word of "clang", so it can be a program name with args.
5704set dummy clang; ac_word=$2
5705{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5706printf %s "checking for $ac_word... " >&6; }
5707if test ${ac_cv_prog_ac_ct_CC+y}
5708then :
5709  printf %s "(cached) " >&6
5710else $as_nop
5711  if test -n "$ac_ct_CC"; then
5712  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5713else
5714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5715for as_dir in $PATH
5716do
5717  IFS=$as_save_IFS
5718  case $as_dir in #(((
5719    '') as_dir=./ ;;
5720    */) ;;
5721    *) as_dir=$as_dir/ ;;
5722  esac
5723    for ac_exec_ext in '' $ac_executable_extensions; do
5724  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5725    ac_cv_prog_ac_ct_CC="clang"
5726    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5727    break 2
5728  fi
5729done
5730  done
5731IFS=$as_save_IFS
5732
5733fi
5734fi
5735ac_ct_CC=$ac_cv_prog_ac_ct_CC
5736if test -n "$ac_ct_CC"; then
5737  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5738printf "%s\n" "$ac_ct_CC" >&6; }
5739else
5740  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5741printf "%s\n" "no" >&6; }
5742fi
5743
5744  if test "x$ac_ct_CC" = x; then
5745    CC=""
5746  else
5747    case $cross_compiling:$ac_tool_warned in
5748yes:)
5749{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5750printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5751ac_tool_warned=yes ;;
5752esac
5753    CC=$ac_ct_CC
5754  fi
5755else
5756  CC="$ac_cv_prog_CC"
5757fi
5758
5759fi
5760
5761
5762test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5763printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5764as_fn_error $? "no acceptable C compiler found in \$PATH
5765See \`config.log' for more details" "$LINENO" 5; }
5766
5767# Provide some information about the compiler.
5768printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5769set X $ac_compile
5770ac_compiler=$2
5771for ac_option in --version -v -V -qversion -version; do
5772  { { ac_try="$ac_compiler $ac_option >&5"
5773case "(($ac_try" in
5774  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5775  *) ac_try_echo=$ac_try;;
5776esac
5777eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5778printf "%s\n" "$ac_try_echo"; } >&5
5779  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5780  ac_status=$?
5781  if test -s conftest.err; then
5782    sed '10a\
5783... rest of stderr output deleted ...
5784         10q' conftest.err >conftest.er1
5785    cat conftest.er1 >&5
5786  fi
5787  rm -f conftest.er1 conftest.err
5788  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5789  test $ac_status = 0; }
5790done
5791
5792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5793/* end confdefs.h.  */
5794
5795int
5796main (void)
5797{
5798
5799  ;
5800  return 0;
5801}
5802_ACEOF
5803ac_clean_files_save=$ac_clean_files
5804ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5805# Try to create an executable without -o first, disregard a.out.
5806# It will help us diagnose broken compilers, and finding out an intuition
5807# of exeext.
5808{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5809printf %s "checking whether the C compiler works... " >&6; }
5810ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5811
5812# The possible output files:
5813ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5814
5815ac_rmfiles=
5816for ac_file in $ac_files
5817do
5818  case $ac_file in
5819    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5820    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5821  esac
5822done
5823rm -f $ac_rmfiles
5824
5825if { { ac_try="$ac_link_default"
5826case "(($ac_try" in
5827  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5828  *) ac_try_echo=$ac_try;;
5829esac
5830eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5831printf "%s\n" "$ac_try_echo"; } >&5
5832  (eval "$ac_link_default") 2>&5
5833  ac_status=$?
5834  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5835  test $ac_status = 0; }
5836then :
5837  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5838# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5839# in a Makefile.  We should not override ac_cv_exeext if it was cached,
5840# so that the user can short-circuit this test for compilers unknown to
5841# Autoconf.
5842for ac_file in $ac_files ''
5843do
5844  test -f "$ac_file" || continue
5845  case $ac_file in
5846    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5847	;;
5848    [ab].out )
5849	# We found the default executable, but exeext='' is most
5850	# certainly right.
5851	break;;
5852    *.* )
5853	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
5854	then :; else
5855	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5856	fi
5857	# We set ac_cv_exeext here because the later test for it is not
5858	# safe: cross compilers may not add the suffix if given an `-o'
5859	# argument, so we may need to know it at that point already.
5860	# Even if this section looks crufty: it has the advantage of
5861	# actually working.
5862	break;;
5863    * )
5864	break;;
5865  esac
5866done
5867test "$ac_cv_exeext" = no && ac_cv_exeext=
5868
5869else $as_nop
5870  ac_file=''
5871fi
5872if test -z "$ac_file"
5873then :
5874  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5875printf "%s\n" "no" >&6; }
5876printf "%s\n" "$as_me: failed program was:" >&5
5877sed 's/^/| /' conftest.$ac_ext >&5
5878
5879{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5880printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5881as_fn_error 77 "C compiler cannot create executables
5882See \`config.log' for more details" "$LINENO" 5; }
5883else $as_nop
5884  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5885printf "%s\n" "yes" >&6; }
5886fi
5887{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5888printf %s "checking for C compiler default output file name... " >&6; }
5889{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5890printf "%s\n" "$ac_file" >&6; }
5891ac_exeext=$ac_cv_exeext
5892
5893rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5894ac_clean_files=$ac_clean_files_save
5895{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5896printf %s "checking for suffix of executables... " >&6; }
5897if { { ac_try="$ac_link"
5898case "(($ac_try" in
5899  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5900  *) ac_try_echo=$ac_try;;
5901esac
5902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5903printf "%s\n" "$ac_try_echo"; } >&5
5904  (eval "$ac_link") 2>&5
5905  ac_status=$?
5906  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5907  test $ac_status = 0; }
5908then :
5909  # If both `conftest.exe' and `conftest' are `present' (well, observable)
5910# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
5911# work properly (i.e., refer to `conftest.exe'), while it won't with
5912# `rm'.
5913for ac_file in conftest.exe conftest conftest.*; do
5914  test -f "$ac_file" || continue
5915  case $ac_file in
5916    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5917    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5918	  break;;
5919    * ) break;;
5920  esac
5921done
5922else $as_nop
5923  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5924printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5925as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5926See \`config.log' for more details" "$LINENO" 5; }
5927fi
5928rm -f conftest conftest$ac_cv_exeext
5929{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5930printf "%s\n" "$ac_cv_exeext" >&6; }
5931
5932rm -f conftest.$ac_ext
5933EXEEXT=$ac_cv_exeext
5934ac_exeext=$EXEEXT
5935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5936/* end confdefs.h.  */
5937#include <stdio.h>
5938int
5939main (void)
5940{
5941FILE *f = fopen ("conftest.out", "w");
5942 return ferror (f) || fclose (f) != 0;
5943
5944  ;
5945  return 0;
5946}
5947_ACEOF
5948ac_clean_files="$ac_clean_files conftest.out"
5949# Check that the compiler produces executables we can run.  If not, either
5950# the compiler is broken, or we cross compile.
5951{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5952printf %s "checking whether we are cross compiling... " >&6; }
5953if test "$cross_compiling" != yes; then
5954  { { ac_try="$ac_link"
5955case "(($ac_try" in
5956  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5957  *) ac_try_echo=$ac_try;;
5958esac
5959eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5960printf "%s\n" "$ac_try_echo"; } >&5
5961  (eval "$ac_link") 2>&5
5962  ac_status=$?
5963  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5964  test $ac_status = 0; }
5965  if { ac_try='./conftest$ac_cv_exeext'
5966  { { case "(($ac_try" in
5967  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5968  *) ac_try_echo=$ac_try;;
5969esac
5970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5971printf "%s\n" "$ac_try_echo"; } >&5
5972  (eval "$ac_try") 2>&5
5973  ac_status=$?
5974  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5975  test $ac_status = 0; }; }; then
5976    cross_compiling=no
5977  else
5978    if test "$cross_compiling" = maybe; then
5979	cross_compiling=yes
5980    else
5981	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5982printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5983as_fn_error 77 "cannot run C compiled programs.
5984If you meant to cross compile, use \`--host'.
5985See \`config.log' for more details" "$LINENO" 5; }
5986    fi
5987  fi
5988fi
5989{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5990printf "%s\n" "$cross_compiling" >&6; }
5991
5992rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5993ac_clean_files=$ac_clean_files_save
5994{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5995printf %s "checking for suffix of object files... " >&6; }
5996if test ${ac_cv_objext+y}
5997then :
5998  printf %s "(cached) " >&6
5999else $as_nop
6000  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6001/* end confdefs.h.  */
6002
6003int
6004main (void)
6005{
6006
6007  ;
6008  return 0;
6009}
6010_ACEOF
6011rm -f conftest.o conftest.obj
6012if { { ac_try="$ac_compile"
6013case "(($ac_try" in
6014  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6015  *) ac_try_echo=$ac_try;;
6016esac
6017eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6018printf "%s\n" "$ac_try_echo"; } >&5
6019  (eval "$ac_compile") 2>&5
6020  ac_status=$?
6021  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6022  test $ac_status = 0; }
6023then :
6024  for ac_file in conftest.o conftest.obj conftest.*; do
6025  test -f "$ac_file" || continue;
6026  case $ac_file in
6027    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
6028    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
6029       break;;
6030  esac
6031done
6032else $as_nop
6033  printf "%s\n" "$as_me: failed program was:" >&5
6034sed 's/^/| /' conftest.$ac_ext >&5
6035
6036{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6037printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
6038as_fn_error $? "cannot compute suffix of object files: cannot compile
6039See \`config.log' for more details" "$LINENO" 5; }
6040fi
6041rm -f conftest.$ac_cv_objext conftest.$ac_ext
6042fi
6043{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
6044printf "%s\n" "$ac_cv_objext" >&6; }
6045OBJEXT=$ac_cv_objext
6046ac_objext=$OBJEXT
6047{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
6048printf %s "checking whether the compiler supports GNU C... " >&6; }
6049if test ${ac_cv_c_compiler_gnu+y}
6050then :
6051  printf %s "(cached) " >&6
6052else $as_nop
6053  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6054/* end confdefs.h.  */
6055
6056int
6057main (void)
6058{
6059#ifndef __GNUC__
6060       choke me
6061#endif
6062
6063  ;
6064  return 0;
6065}
6066_ACEOF
6067if ac_fn_c_try_compile "$LINENO"
6068then :
6069  ac_compiler_gnu=yes
6070else $as_nop
6071  ac_compiler_gnu=no
6072fi
6073rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6074ac_cv_c_compiler_gnu=$ac_compiler_gnu
6075
6076fi
6077{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6078printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
6079ac_compiler_gnu=$ac_cv_c_compiler_gnu
6080
6081if test $ac_compiler_gnu = yes; then
6082  GCC=yes
6083else
6084  GCC=
6085fi
6086ac_test_CFLAGS=${CFLAGS+y}
6087ac_save_CFLAGS=$CFLAGS
6088{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6089printf %s "checking whether $CC accepts -g... " >&6; }
6090if test ${ac_cv_prog_cc_g+y}
6091then :
6092  printf %s "(cached) " >&6
6093else $as_nop
6094  ac_save_c_werror_flag=$ac_c_werror_flag
6095   ac_c_werror_flag=yes
6096   ac_cv_prog_cc_g=no
6097   CFLAGS="-g"
6098   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6099/* end confdefs.h.  */
6100
6101int
6102main (void)
6103{
6104
6105  ;
6106  return 0;
6107}
6108_ACEOF
6109if ac_fn_c_try_compile "$LINENO"
6110then :
6111  ac_cv_prog_cc_g=yes
6112else $as_nop
6113  CFLAGS=""
6114      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6115/* end confdefs.h.  */
6116
6117int
6118main (void)
6119{
6120
6121  ;
6122  return 0;
6123}
6124_ACEOF
6125if ac_fn_c_try_compile "$LINENO"
6126then :
6127
6128else $as_nop
6129  ac_c_werror_flag=$ac_save_c_werror_flag
6130	 CFLAGS="-g"
6131	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6132/* end confdefs.h.  */
6133
6134int
6135main (void)
6136{
6137
6138  ;
6139  return 0;
6140}
6141_ACEOF
6142if ac_fn_c_try_compile "$LINENO"
6143then :
6144  ac_cv_prog_cc_g=yes
6145fi
6146rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6147fi
6148rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6149fi
6150rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6151   ac_c_werror_flag=$ac_save_c_werror_flag
6152fi
6153{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6154printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
6155if test $ac_test_CFLAGS; then
6156  CFLAGS=$ac_save_CFLAGS
6157elif test $ac_cv_prog_cc_g = yes; then
6158  if test "$GCC" = yes; then
6159    CFLAGS="-g -O2"
6160  else
6161    CFLAGS="-g"
6162  fi
6163else
6164  if test "$GCC" = yes; then
6165    CFLAGS="-O2"
6166  else
6167    CFLAGS=
6168  fi
6169fi
6170ac_prog_cc_stdc=no
6171if test x$ac_prog_cc_stdc = xno
6172then :
6173  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
6174printf %s "checking for $CC option to enable C11 features... " >&6; }
6175if test ${ac_cv_prog_cc_c11+y}
6176then :
6177  printf %s "(cached) " >&6
6178else $as_nop
6179  ac_cv_prog_cc_c11=no
6180ac_save_CC=$CC
6181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6182/* end confdefs.h.  */
6183$ac_c_conftest_c11_program
6184_ACEOF
6185for ac_arg in '' -std=gnu11
6186do
6187  CC="$ac_save_CC $ac_arg"
6188  if ac_fn_c_try_compile "$LINENO"
6189then :
6190  ac_cv_prog_cc_c11=$ac_arg
6191fi
6192rm -f core conftest.err conftest.$ac_objext conftest.beam
6193  test "x$ac_cv_prog_cc_c11" != "xno" && break
6194done
6195rm -f conftest.$ac_ext
6196CC=$ac_save_CC
6197fi
6198
6199if test "x$ac_cv_prog_cc_c11" = xno
6200then :
6201  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6202printf "%s\n" "unsupported" >&6; }
6203else $as_nop
6204  if test "x$ac_cv_prog_cc_c11" = x
6205then :
6206  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6207printf "%s\n" "none needed" >&6; }
6208else $as_nop
6209  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
6210printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
6211     CC="$CC $ac_cv_prog_cc_c11"
6212fi
6213  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
6214  ac_prog_cc_stdc=c11
6215fi
6216fi
6217if test x$ac_prog_cc_stdc = xno
6218then :
6219  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
6220printf %s "checking for $CC option to enable C99 features... " >&6; }
6221if test ${ac_cv_prog_cc_c99+y}
6222then :
6223  printf %s "(cached) " >&6
6224else $as_nop
6225  ac_cv_prog_cc_c99=no
6226ac_save_CC=$CC
6227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6228/* end confdefs.h.  */
6229$ac_c_conftest_c99_program
6230_ACEOF
6231for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
6232do
6233  CC="$ac_save_CC $ac_arg"
6234  if ac_fn_c_try_compile "$LINENO"
6235then :
6236  ac_cv_prog_cc_c99=$ac_arg
6237fi
6238rm -f core conftest.err conftest.$ac_objext conftest.beam
6239  test "x$ac_cv_prog_cc_c99" != "xno" && break
6240done
6241rm -f conftest.$ac_ext
6242CC=$ac_save_CC
6243fi
6244
6245if test "x$ac_cv_prog_cc_c99" = xno
6246then :
6247  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6248printf "%s\n" "unsupported" >&6; }
6249else $as_nop
6250  if test "x$ac_cv_prog_cc_c99" = x
6251then :
6252  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6253printf "%s\n" "none needed" >&6; }
6254else $as_nop
6255  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6256printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
6257     CC="$CC $ac_cv_prog_cc_c99"
6258fi
6259  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6260  ac_prog_cc_stdc=c99
6261fi
6262fi
6263if test x$ac_prog_cc_stdc = xno
6264then :
6265  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
6266printf %s "checking for $CC option to enable C89 features... " >&6; }
6267if test ${ac_cv_prog_cc_c89+y}
6268then :
6269  printf %s "(cached) " >&6
6270else $as_nop
6271  ac_cv_prog_cc_c89=no
6272ac_save_CC=$CC
6273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6274/* end confdefs.h.  */
6275$ac_c_conftest_c89_program
6276_ACEOF
6277for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6278do
6279  CC="$ac_save_CC $ac_arg"
6280  if ac_fn_c_try_compile "$LINENO"
6281then :
6282  ac_cv_prog_cc_c89=$ac_arg
6283fi
6284rm -f core conftest.err conftest.$ac_objext conftest.beam
6285  test "x$ac_cv_prog_cc_c89" != "xno" && break
6286done
6287rm -f conftest.$ac_ext
6288CC=$ac_save_CC
6289fi
6290
6291if test "x$ac_cv_prog_cc_c89" = xno
6292then :
6293  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6294printf "%s\n" "unsupported" >&6; }
6295else $as_nop
6296  if test "x$ac_cv_prog_cc_c89" = x
6297then :
6298  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6299printf "%s\n" "none needed" >&6; }
6300else $as_nop
6301  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6302printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
6303     CC="$CC $ac_cv_prog_cc_c89"
6304fi
6305  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6306  ac_prog_cc_stdc=c89
6307fi
6308fi
6309
6310ac_ext=c
6311ac_cpp='$CPP $CPPFLAGS'
6312ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6313ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6314ac_compiler_gnu=$ac_cv_c_compiler_gnu
6315
6316
6317  ac_ext=c
6318ac_cpp='$CPP $CPPFLAGS'
6319ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6320ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6321ac_compiler_gnu=$ac_cv_c_compiler_gnu
6322{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6323printf %s "checking whether $CC understands -c and -o together... " >&6; }
6324if test ${am_cv_prog_cc_c_o+y}
6325then :
6326  printf %s "(cached) " >&6
6327else $as_nop
6328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6329/* end confdefs.h.  */
6330
6331int
6332main (void)
6333{
6334
6335  ;
6336  return 0;
6337}
6338_ACEOF
6339  # Make sure it works both with $CC and with simple cc.
6340  # Following AC_PROG_CC_C_O, we do the test twice because some
6341  # compilers refuse to overwrite an existing .o file with -o,
6342  # though they will create one.
6343  am_cv_prog_cc_c_o=yes
6344  for am_i in 1 2; do
6345    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6346   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6347   ac_status=$?
6348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6349   (exit $ac_status); } \
6350         && test -f conftest2.$ac_objext; then
6351      : OK
6352    else
6353      am_cv_prog_cc_c_o=no
6354      break
6355    fi
6356  done
6357  rm -f core conftest*
6358  unset am_i
6359fi
6360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6361printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
6362if test "$am_cv_prog_cc_c_o" != yes; then
6363   # Losing compiler, so override with the script.
6364   # FIXME: It is wrong to rewrite CC.
6365   # But if we don't then we get into trouble of one sort or another.
6366   # A longer-term fix would be to have automake use am__CC in this case,
6367   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6368   CC="$am_aux_dir/compile $CC"
6369fi
6370ac_ext=c
6371ac_cpp='$CPP $CPPFLAGS'
6372ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6373ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6374ac_compiler_gnu=$ac_cv_c_compiler_gnu
6375
6376
6377
6378  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
6379printf %s "checking whether the compiler is clang... " >&6; }
6380if test ${gl_cv_compiler_clang+y}
6381then :
6382  printf %s "(cached) " >&6
6383else $as_nop
6384                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6385/* end confdefs.h.  */
6386
6387           #ifdef __clang__
6388           barfbarf
6389           #endif
6390
6391int
6392main (void)
6393{
6394
6395  ;
6396  return 0;
6397}
6398
6399_ACEOF
6400if ac_fn_c_try_compile "$LINENO"
6401then :
6402  gl_cv_compiler_clang=no
6403else $as_nop
6404  gl_cv_compiler_clang=yes
6405fi
6406rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6407
6408fi
6409{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
6410printf "%s\n" "$gl_cv_compiler_clang" >&6; }
6411
6412
6413  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
6414printf %s "checking for compiler option needed when checking for declarations... " >&6; }
6415if test ${gl_cv_compiler_check_decl_option+y}
6416then :
6417  printf %s "(cached) " >&6
6418else $as_nop
6419  if test $gl_cv_compiler_clang = yes; then
6420                     save_ac_compile="$ac_compile"
6421       ac_compile="$ac_compile -Werror=implicit-function-declaration"
6422                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6423/* end confdefs.h.  */
6424
6425int
6426main (void)
6427{
6428
6429  ;
6430  return 0;
6431}
6432_ACEOF
6433if ac_fn_c_try_compile "$LINENO"
6434then :
6435  gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
6436else $as_nop
6437  gl_cv_compiler_check_decl_option=none
6438fi
6439rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6440       ac_compile="$save_ac_compile"
6441     else
6442       gl_cv_compiler_check_decl_option=none
6443     fi
6444
6445fi
6446{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
6447printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; }
6448  if test "x$gl_cv_compiler_check_decl_option" != xnone; then
6449    ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
6450  else
6451    ac_compile_for_check_decl="$ac_compile"
6452  fi
6453
6454
6455depcc="$CC"   am_compiler_list=
6456
6457{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6458printf %s "checking dependency style of $depcc... " >&6; }
6459if test ${am_cv_CC_dependencies_compiler_type+y}
6460then :
6461  printf %s "(cached) " >&6
6462else $as_nop
6463  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6464  # We make a subdir and do the tests there.  Otherwise we can end up
6465  # making bogus files that we don't know about and never remove.  For
6466  # instance it was reported that on HP-UX the gcc test will end up
6467  # making a dummy file named 'D' -- because '-MD' means "put the output
6468  # in D".
6469  rm -rf conftest.dir
6470  mkdir conftest.dir
6471  # Copy depcomp to subdir because otherwise we won't find it if we're
6472  # using a relative directory.
6473  cp "$am_depcomp" conftest.dir
6474  cd conftest.dir
6475  # We will build objects and dependencies in a subdirectory because
6476  # it helps to detect inapplicable dependency modes.  For instance
6477  # both Tru64's cc and ICC support -MD to output dependencies as a
6478  # side effect of compilation, but ICC will put the dependencies in
6479  # the current directory while Tru64 will put them in the object
6480  # directory.
6481  mkdir sub
6482
6483  am_cv_CC_dependencies_compiler_type=none
6484  if test "$am_compiler_list" = ""; then
6485     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6486  fi
6487  am__universal=false
6488  case " $depcc " in #(
6489     *\ -arch\ *\ -arch\ *) am__universal=true ;;
6490     esac
6491
6492  for depmode in $am_compiler_list; do
6493    # Setup a source with many dependencies, because some compilers
6494    # like to wrap large dependency lists on column 80 (with \), and
6495    # we should not choose a depcomp mode which is confused by this.
6496    #
6497    # We need to recreate these files for each test, as the compiler may
6498    # overwrite some of them when testing with obscure command lines.
6499    # This happens at least with the AIX C compiler.
6500    : > sub/conftest.c
6501    for i in 1 2 3 4 5 6; do
6502      echo '#include "conftst'$i'.h"' >> sub/conftest.c
6503      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6504      # Solaris 10 /bin/sh.
6505      echo '/* dummy */' > sub/conftst$i.h
6506    done
6507    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6508
6509    # We check with '-c' and '-o' for the sake of the "dashmstdout"
6510    # mode.  It turns out that the SunPro C++ compiler does not properly
6511    # handle '-M -o', and we need to detect this.  Also, some Intel
6512    # versions had trouble with output in subdirs.
6513    am__obj=sub/conftest.${OBJEXT-o}
6514    am__minus_obj="-o $am__obj"
6515    case $depmode in
6516    gcc)
6517      # This depmode causes a compiler race in universal mode.
6518      test "$am__universal" = false || continue
6519      ;;
6520    nosideeffect)
6521      # After this tag, mechanisms are not by side-effect, so they'll
6522      # only be used when explicitly requested.
6523      if test "x$enable_dependency_tracking" = xyes; then
6524	continue
6525      else
6526	break
6527      fi
6528      ;;
6529    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6530      # This compiler won't grok '-c -o', but also, the minuso test has
6531      # not run yet.  These depmodes are late enough in the game, and
6532      # so weak that their functioning should not be impacted.
6533      am__obj=conftest.${OBJEXT-o}
6534      am__minus_obj=
6535      ;;
6536    none) break ;;
6537    esac
6538    if depmode=$depmode \
6539       source=sub/conftest.c object=$am__obj \
6540       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6541       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6542         >/dev/null 2>conftest.err &&
6543       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6544       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6545       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6546       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6547      # icc doesn't choke on unknown options, it will just issue warnings
6548      # or remarks (even with -Werror).  So we grep stderr for any message
6549      # that says an option was ignored or not supported.
6550      # When given -MP, icc 7.0 and 7.1 complain thusly:
6551      #   icc: Command line warning: ignoring option '-M'; no argument required
6552      # The diagnosis changed in icc 8.0:
6553      #   icc: Command line remark: option '-MP' not supported
6554      if (grep 'ignoring option' conftest.err ||
6555          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6556        am_cv_CC_dependencies_compiler_type=$depmode
6557        break
6558      fi
6559    fi
6560  done
6561
6562  cd ..
6563  rm -rf conftest.dir
6564else
6565  am_cv_CC_dependencies_compiler_type=none
6566fi
6567
6568fi
6569{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6570printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
6571CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6572
6573 if
6574  test "x$enable_dependency_tracking" != xno \
6575  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6576  am__fastdepCC_TRUE=
6577  am__fastdepCC_FALSE='#'
6578else
6579  am__fastdepCC_TRUE='#'
6580  am__fastdepCC_FALSE=
6581fi
6582
6583
6584
6585ac_header= ac_cache=
6586for ac_item in $ac_header_c_list
6587do
6588  if test $ac_cache; then
6589    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
6590    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
6591      printf "%s\n" "#define $ac_item 1" >> confdefs.h
6592    fi
6593    ac_header= ac_cache=
6594  elif test $ac_header; then
6595    ac_cache=$ac_item
6596  else
6597    ac_header=$ac_item
6598  fi
6599done
6600
6601
6602
6603
6604
6605
6606
6607
6608if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
6609then :
6610
6611printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
6612
6613fi
6614
6615
6616
6617
6618
6619
6620  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6621printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6622if test ${ac_cv_safe_to_define___extensions__+y}
6623then :
6624  printf %s "(cached) " >&6
6625else $as_nop
6626  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6627/* end confdefs.h.  */
6628
6629#         define __EXTENSIONS__ 1
6630          $ac_includes_default
6631int
6632main (void)
6633{
6634
6635  ;
6636  return 0;
6637}
6638_ACEOF
6639if ac_fn_c_try_compile "$LINENO"
6640then :
6641  ac_cv_safe_to_define___extensions__=yes
6642else $as_nop
6643  ac_cv_safe_to_define___extensions__=no
6644fi
6645rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6646fi
6647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6648printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6649
6650  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6651printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6652if test ${ac_cv_should_define__xopen_source+y}
6653then :
6654  printf %s "(cached) " >&6
6655else $as_nop
6656  ac_cv_should_define__xopen_source=no
6657    if test $ac_cv_header_wchar_h = yes
6658then :
6659  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6660/* end confdefs.h.  */
6661
6662          #include <wchar.h>
6663          mbstate_t x;
6664int
6665main (void)
6666{
6667
6668  ;
6669  return 0;
6670}
6671_ACEOF
6672if ac_fn_c_try_compile "$LINENO"
6673then :
6674
6675else $as_nop
6676  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6677/* end confdefs.h.  */
6678
6679            #define _XOPEN_SOURCE 500
6680            #include <wchar.h>
6681            mbstate_t x;
6682int
6683main (void)
6684{
6685
6686  ;
6687  return 0;
6688}
6689_ACEOF
6690if ac_fn_c_try_compile "$LINENO"
6691then :
6692  ac_cv_should_define__xopen_source=yes
6693fi
6694rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6695fi
6696rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6697fi
6698fi
6699{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6700printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6701
6702  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6703
6704  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6705
6706  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6707
6708  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6709
6710  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6711
6712  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6713
6714  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6715
6716  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6717
6718  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6719
6720  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6721
6722  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6723
6724  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6725
6726  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6727
6728  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6729
6730  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6731
6732  if test $ac_cv_header_minix_config_h = yes
6733then :
6734  MINIX=yes
6735    printf "%s\n" "#define _MINIX 1" >>confdefs.h
6736
6737    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6738
6739    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6740
6741else $as_nop
6742  MINIX=
6743fi
6744  if test $ac_cv_safe_to_define___extensions__ = yes
6745then :
6746  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6747
6748fi
6749  if test $ac_cv_should_define__xopen_source = yes
6750then :
6751  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6752
6753fi
6754
6755ac_ext=c
6756ac_cpp='$CPP $CPPFLAGS'
6757ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6758ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6759ac_compiler_gnu=$ac_cv_c_compiler_gnu
6760if test -n "$ac_tool_prefix"; then
6761  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
6762set dummy ${ac_tool_prefix}gcc; 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}gcc"
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
6803fi
6804if test -z "$ac_cv_prog_CC"; then
6805  ac_ct_CC=$CC
6806  # Extract the first word of "gcc", so it can be a program name with args.
6807set dummy gcc; ac_word=$2
6808{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6809printf %s "checking for $ac_word... " >&6; }
6810if test ${ac_cv_prog_ac_ct_CC+y}
6811then :
6812  printf %s "(cached) " >&6
6813else $as_nop
6814  if test -n "$ac_ct_CC"; then
6815  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6816else
6817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6818for as_dir in $PATH
6819do
6820  IFS=$as_save_IFS
6821  case $as_dir in #(((
6822    '') as_dir=./ ;;
6823    */) ;;
6824    *) as_dir=$as_dir/ ;;
6825  esac
6826    for ac_exec_ext in '' $ac_executable_extensions; do
6827  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6828    ac_cv_prog_ac_ct_CC="gcc"
6829    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6830    break 2
6831  fi
6832done
6833  done
6834IFS=$as_save_IFS
6835
6836fi
6837fi
6838ac_ct_CC=$ac_cv_prog_ac_ct_CC
6839if test -n "$ac_ct_CC"; then
6840  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6841printf "%s\n" "$ac_ct_CC" >&6; }
6842else
6843  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6844printf "%s\n" "no" >&6; }
6845fi
6846
6847  if test "x$ac_ct_CC" = x; then
6848    CC=""
6849  else
6850    case $cross_compiling:$ac_tool_warned in
6851yes:)
6852{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6853printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6854ac_tool_warned=yes ;;
6855esac
6856    CC=$ac_ct_CC
6857  fi
6858else
6859  CC="$ac_cv_prog_CC"
6860fi
6861
6862if test -z "$CC"; then
6863          if test -n "$ac_tool_prefix"; then
6864    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
6865set dummy ${ac_tool_prefix}cc; ac_word=$2
6866{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6867printf %s "checking for $ac_word... " >&6; }
6868if test ${ac_cv_prog_CC+y}
6869then :
6870  printf %s "(cached) " >&6
6871else $as_nop
6872  if test -n "$CC"; then
6873  ac_cv_prog_CC="$CC" # Let the user override the test.
6874else
6875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6876for as_dir in $PATH
6877do
6878  IFS=$as_save_IFS
6879  case $as_dir in #(((
6880    '') as_dir=./ ;;
6881    */) ;;
6882    *) as_dir=$as_dir/ ;;
6883  esac
6884    for ac_exec_ext in '' $ac_executable_extensions; do
6885  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6886    ac_cv_prog_CC="${ac_tool_prefix}cc"
6887    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6888    break 2
6889  fi
6890done
6891  done
6892IFS=$as_save_IFS
6893
6894fi
6895fi
6896CC=$ac_cv_prog_CC
6897if test -n "$CC"; then
6898  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6899printf "%s\n" "$CC" >&6; }
6900else
6901  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6902printf "%s\n" "no" >&6; }
6903fi
6904
6905
6906  fi
6907fi
6908if test -z "$CC"; then
6909  # Extract the first word of "cc", so it can be a program name with args.
6910set dummy cc; ac_word=$2
6911{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6912printf %s "checking for $ac_word... " >&6; }
6913if test ${ac_cv_prog_CC+y}
6914then :
6915  printf %s "(cached) " >&6
6916else $as_nop
6917  if test -n "$CC"; then
6918  ac_cv_prog_CC="$CC" # Let the user override the test.
6919else
6920  ac_prog_rejected=no
6921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6922for as_dir in $PATH
6923do
6924  IFS=$as_save_IFS
6925  case $as_dir in #(((
6926    '') as_dir=./ ;;
6927    */) ;;
6928    *) as_dir=$as_dir/ ;;
6929  esac
6930    for ac_exec_ext in '' $ac_executable_extensions; do
6931  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6932    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
6933       ac_prog_rejected=yes
6934       continue
6935     fi
6936    ac_cv_prog_CC="cc"
6937    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6938    break 2
6939  fi
6940done
6941  done
6942IFS=$as_save_IFS
6943
6944if test $ac_prog_rejected = yes; then
6945  # We found a bogon in the path, so make sure we never use it.
6946  set dummy $ac_cv_prog_CC
6947  shift
6948  if test $# != 0; then
6949    # We chose a different compiler from the bogus one.
6950    # However, it has the same basename, so the bogon will be chosen
6951    # first if we set CC to just the basename; use the full file name.
6952    shift
6953    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
6954  fi
6955fi
6956fi
6957fi
6958CC=$ac_cv_prog_CC
6959if test -n "$CC"; then
6960  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6961printf "%s\n" "$CC" >&6; }
6962else
6963  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6964printf "%s\n" "no" >&6; }
6965fi
6966
6967
6968fi
6969if test -z "$CC"; then
6970  if test -n "$ac_tool_prefix"; then
6971  for ac_prog in cl.exe
6972  do
6973    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6974set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6975{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6976printf %s "checking for $ac_word... " >&6; }
6977if test ${ac_cv_prog_CC+y}
6978then :
6979  printf %s "(cached) " >&6
6980else $as_nop
6981  if test -n "$CC"; then
6982  ac_cv_prog_CC="$CC" # Let the user override the test.
6983else
6984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6985for as_dir in $PATH
6986do
6987  IFS=$as_save_IFS
6988  case $as_dir in #(((
6989    '') as_dir=./ ;;
6990    */) ;;
6991    *) as_dir=$as_dir/ ;;
6992  esac
6993    for ac_exec_ext in '' $ac_executable_extensions; do
6994  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6995    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6996    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6997    break 2
6998  fi
6999done
7000  done
7001IFS=$as_save_IFS
7002
7003fi
7004fi
7005CC=$ac_cv_prog_CC
7006if test -n "$CC"; then
7007  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
7008printf "%s\n" "$CC" >&6; }
7009else
7010  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7011printf "%s\n" "no" >&6; }
7012fi
7013
7014
7015    test -n "$CC" && break
7016  done
7017fi
7018if test -z "$CC"; then
7019  ac_ct_CC=$CC
7020  for ac_prog in cl.exe
7021do
7022  # Extract the first word of "$ac_prog", so it can be a program name with args.
7023set dummy $ac_prog; ac_word=$2
7024{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7025printf %s "checking for $ac_word... " >&6; }
7026if test ${ac_cv_prog_ac_ct_CC+y}
7027then :
7028  printf %s "(cached) " >&6
7029else $as_nop
7030  if test -n "$ac_ct_CC"; then
7031  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7032else
7033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7034for as_dir in $PATH
7035do
7036  IFS=$as_save_IFS
7037  case $as_dir in #(((
7038    '') as_dir=./ ;;
7039    */) ;;
7040    *) as_dir=$as_dir/ ;;
7041  esac
7042    for ac_exec_ext in '' $ac_executable_extensions; do
7043  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7044    ac_cv_prog_ac_ct_CC="$ac_prog"
7045    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7046    break 2
7047  fi
7048done
7049  done
7050IFS=$as_save_IFS
7051
7052fi
7053fi
7054ac_ct_CC=$ac_cv_prog_ac_ct_CC
7055if test -n "$ac_ct_CC"; then
7056  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
7057printf "%s\n" "$ac_ct_CC" >&6; }
7058else
7059  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7060printf "%s\n" "no" >&6; }
7061fi
7062
7063
7064  test -n "$ac_ct_CC" && break
7065done
7066
7067  if test "x$ac_ct_CC" = x; then
7068    CC=""
7069  else
7070    case $cross_compiling:$ac_tool_warned in
7071yes:)
7072{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7073printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7074ac_tool_warned=yes ;;
7075esac
7076    CC=$ac_ct_CC
7077  fi
7078fi
7079
7080fi
7081if test -z "$CC"; then
7082  if test -n "$ac_tool_prefix"; then
7083  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
7084set dummy ${ac_tool_prefix}clang; ac_word=$2
7085{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7086printf %s "checking for $ac_word... " >&6; }
7087if test ${ac_cv_prog_CC+y}
7088then :
7089  printf %s "(cached) " >&6
7090else $as_nop
7091  if test -n "$CC"; then
7092  ac_cv_prog_CC="$CC" # Let the user override the test.
7093else
7094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7095for as_dir in $PATH
7096do
7097  IFS=$as_save_IFS
7098  case $as_dir in #(((
7099    '') as_dir=./ ;;
7100    */) ;;
7101    *) as_dir=$as_dir/ ;;
7102  esac
7103    for ac_exec_ext in '' $ac_executable_extensions; do
7104  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7105    ac_cv_prog_CC="${ac_tool_prefix}clang"
7106    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7107    break 2
7108  fi
7109done
7110  done
7111IFS=$as_save_IFS
7112
7113fi
7114fi
7115CC=$ac_cv_prog_CC
7116if test -n "$CC"; then
7117  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
7118printf "%s\n" "$CC" >&6; }
7119else
7120  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7121printf "%s\n" "no" >&6; }
7122fi
7123
7124
7125fi
7126if test -z "$ac_cv_prog_CC"; then
7127  ac_ct_CC=$CC
7128  # Extract the first word of "clang", so it can be a program name with args.
7129set dummy clang; ac_word=$2
7130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7131printf %s "checking for $ac_word... " >&6; }
7132if test ${ac_cv_prog_ac_ct_CC+y}
7133then :
7134  printf %s "(cached) " >&6
7135else $as_nop
7136  if test -n "$ac_ct_CC"; then
7137  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
7138else
7139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7140for as_dir in $PATH
7141do
7142  IFS=$as_save_IFS
7143  case $as_dir in #(((
7144    '') as_dir=./ ;;
7145    */) ;;
7146    *) as_dir=$as_dir/ ;;
7147  esac
7148    for ac_exec_ext in '' $ac_executable_extensions; do
7149  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7150    ac_cv_prog_ac_ct_CC="clang"
7151    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7152    break 2
7153  fi
7154done
7155  done
7156IFS=$as_save_IFS
7157
7158fi
7159fi
7160ac_ct_CC=$ac_cv_prog_ac_ct_CC
7161if test -n "$ac_ct_CC"; then
7162  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
7163printf "%s\n" "$ac_ct_CC" >&6; }
7164else
7165  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7166printf "%s\n" "no" >&6; }
7167fi
7168
7169  if test "x$ac_ct_CC" = x; then
7170    CC=""
7171  else
7172    case $cross_compiling:$ac_tool_warned in
7173yes:)
7174{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7175printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7176ac_tool_warned=yes ;;
7177esac
7178    CC=$ac_ct_CC
7179  fi
7180else
7181  CC="$ac_cv_prog_CC"
7182fi
7183
7184fi
7185
7186
7187test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7188printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
7189as_fn_error $? "no acceptable C compiler found in \$PATH
7190See \`config.log' for more details" "$LINENO" 5; }
7191
7192# Provide some information about the compiler.
7193printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
7194set X $ac_compile
7195ac_compiler=$2
7196for ac_option in --version -v -V -qversion -version; do
7197  { { ac_try="$ac_compiler $ac_option >&5"
7198case "(($ac_try" in
7199  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7200  *) ac_try_echo=$ac_try;;
7201esac
7202eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7203printf "%s\n" "$ac_try_echo"; } >&5
7204  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
7205  ac_status=$?
7206  if test -s conftest.err; then
7207    sed '10a\
7208... rest of stderr output deleted ...
7209         10q' conftest.err >conftest.er1
7210    cat conftest.er1 >&5
7211  fi
7212  rm -f conftest.er1 conftest.err
7213  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7214  test $ac_status = 0; }
7215done
7216
7217{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
7218printf %s "checking whether the compiler supports GNU C... " >&6; }
7219if test ${ac_cv_c_compiler_gnu+y}
7220then :
7221  printf %s "(cached) " >&6
7222else $as_nop
7223  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7224/* end confdefs.h.  */
7225
7226int
7227main (void)
7228{
7229#ifndef __GNUC__
7230       choke me
7231#endif
7232
7233  ;
7234  return 0;
7235}
7236_ACEOF
7237if ac_fn_c_try_compile "$LINENO"
7238then :
7239  ac_compiler_gnu=yes
7240else $as_nop
7241  ac_compiler_gnu=no
7242fi
7243rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7244ac_cv_c_compiler_gnu=$ac_compiler_gnu
7245
7246fi
7247{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
7248printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
7249ac_compiler_gnu=$ac_cv_c_compiler_gnu
7250
7251if test $ac_compiler_gnu = yes; then
7252  GCC=yes
7253else
7254  GCC=
7255fi
7256ac_test_CFLAGS=${CFLAGS+y}
7257ac_save_CFLAGS=$CFLAGS
7258{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
7259printf %s "checking whether $CC accepts -g... " >&6; }
7260if test ${ac_cv_prog_cc_g+y}
7261then :
7262  printf %s "(cached) " >&6
7263else $as_nop
7264  ac_save_c_werror_flag=$ac_c_werror_flag
7265   ac_c_werror_flag=yes
7266   ac_cv_prog_cc_g=no
7267   CFLAGS="-g"
7268   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7269/* end confdefs.h.  */
7270
7271int
7272main (void)
7273{
7274
7275  ;
7276  return 0;
7277}
7278_ACEOF
7279if ac_fn_c_try_compile "$LINENO"
7280then :
7281  ac_cv_prog_cc_g=yes
7282else $as_nop
7283  CFLAGS=""
7284      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7285/* end confdefs.h.  */
7286
7287int
7288main (void)
7289{
7290
7291  ;
7292  return 0;
7293}
7294_ACEOF
7295if ac_fn_c_try_compile "$LINENO"
7296then :
7297
7298else $as_nop
7299  ac_c_werror_flag=$ac_save_c_werror_flag
7300	 CFLAGS="-g"
7301	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7302/* end confdefs.h.  */
7303
7304int
7305main (void)
7306{
7307
7308  ;
7309  return 0;
7310}
7311_ACEOF
7312if ac_fn_c_try_compile "$LINENO"
7313then :
7314  ac_cv_prog_cc_g=yes
7315fi
7316rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7317fi
7318rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7319fi
7320rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7321   ac_c_werror_flag=$ac_save_c_werror_flag
7322fi
7323{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
7324printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
7325if test $ac_test_CFLAGS; then
7326  CFLAGS=$ac_save_CFLAGS
7327elif test $ac_cv_prog_cc_g = yes; then
7328  if test "$GCC" = yes; then
7329    CFLAGS="-g -O2"
7330  else
7331    CFLAGS="-g"
7332  fi
7333else
7334  if test "$GCC" = yes; then
7335    CFLAGS="-O2"
7336  else
7337    CFLAGS=
7338  fi
7339fi
7340ac_prog_cc_stdc=no
7341if test x$ac_prog_cc_stdc = xno
7342then :
7343  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
7344printf %s "checking for $CC option to enable C11 features... " >&6; }
7345if test ${ac_cv_prog_cc_c11+y}
7346then :
7347  printf %s "(cached) " >&6
7348else $as_nop
7349  ac_cv_prog_cc_c11=no
7350ac_save_CC=$CC
7351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7352/* end confdefs.h.  */
7353$ac_c_conftest_c11_program
7354_ACEOF
7355for ac_arg in '' -std=gnu11
7356do
7357  CC="$ac_save_CC $ac_arg"
7358  if ac_fn_c_try_compile "$LINENO"
7359then :
7360  ac_cv_prog_cc_c11=$ac_arg
7361fi
7362rm -f core conftest.err conftest.$ac_objext conftest.beam
7363  test "x$ac_cv_prog_cc_c11" != "xno" && break
7364done
7365rm -f conftest.$ac_ext
7366CC=$ac_save_CC
7367fi
7368
7369if test "x$ac_cv_prog_cc_c11" = xno
7370then :
7371  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7372printf "%s\n" "unsupported" >&6; }
7373else $as_nop
7374  if test "x$ac_cv_prog_cc_c11" = x
7375then :
7376  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7377printf "%s\n" "none needed" >&6; }
7378else $as_nop
7379  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
7380printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
7381     CC="$CC $ac_cv_prog_cc_c11"
7382fi
7383  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
7384  ac_prog_cc_stdc=c11
7385fi
7386fi
7387if test x$ac_prog_cc_stdc = xno
7388then :
7389  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
7390printf %s "checking for $CC option to enable C99 features... " >&6; }
7391if test ${ac_cv_prog_cc_c99+y}
7392then :
7393  printf %s "(cached) " >&6
7394else $as_nop
7395  ac_cv_prog_cc_c99=no
7396ac_save_CC=$CC
7397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7398/* end confdefs.h.  */
7399$ac_c_conftest_c99_program
7400_ACEOF
7401for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
7402do
7403  CC="$ac_save_CC $ac_arg"
7404  if ac_fn_c_try_compile "$LINENO"
7405then :
7406  ac_cv_prog_cc_c99=$ac_arg
7407fi
7408rm -f core conftest.err conftest.$ac_objext conftest.beam
7409  test "x$ac_cv_prog_cc_c99" != "xno" && break
7410done
7411rm -f conftest.$ac_ext
7412CC=$ac_save_CC
7413fi
7414
7415if test "x$ac_cv_prog_cc_c99" = xno
7416then :
7417  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7418printf "%s\n" "unsupported" >&6; }
7419else $as_nop
7420  if test "x$ac_cv_prog_cc_c99" = x
7421then :
7422  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7423printf "%s\n" "none needed" >&6; }
7424else $as_nop
7425  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
7426printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
7427     CC="$CC $ac_cv_prog_cc_c99"
7428fi
7429  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
7430  ac_prog_cc_stdc=c99
7431fi
7432fi
7433if test x$ac_prog_cc_stdc = xno
7434then :
7435  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
7436printf %s "checking for $CC option to enable C89 features... " >&6; }
7437if test ${ac_cv_prog_cc_c89+y}
7438then :
7439  printf %s "(cached) " >&6
7440else $as_nop
7441  ac_cv_prog_cc_c89=no
7442ac_save_CC=$CC
7443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7444/* end confdefs.h.  */
7445$ac_c_conftest_c89_program
7446_ACEOF
7447for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7448do
7449  CC="$ac_save_CC $ac_arg"
7450  if ac_fn_c_try_compile "$LINENO"
7451then :
7452  ac_cv_prog_cc_c89=$ac_arg
7453fi
7454rm -f core conftest.err conftest.$ac_objext conftest.beam
7455  test "x$ac_cv_prog_cc_c89" != "xno" && break
7456done
7457rm -f conftest.$ac_ext
7458CC=$ac_save_CC
7459fi
7460
7461if test "x$ac_cv_prog_cc_c89" = xno
7462then :
7463  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7464printf "%s\n" "unsupported" >&6; }
7465else $as_nop
7466  if test "x$ac_cv_prog_cc_c89" = x
7467then :
7468  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7469printf "%s\n" "none needed" >&6; }
7470else $as_nop
7471  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7472printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
7473     CC="$CC $ac_cv_prog_cc_c89"
7474fi
7475  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7476  ac_prog_cc_stdc=c89
7477fi
7478fi
7479
7480ac_ext=c
7481ac_cpp='$CPP $CPPFLAGS'
7482ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7483ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7484ac_compiler_gnu=$ac_cv_c_compiler_gnu
7485
7486
7487  ac_ext=c
7488ac_cpp='$CPP $CPPFLAGS'
7489ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7490ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7491ac_compiler_gnu=$ac_cv_c_compiler_gnu
7492{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
7493printf %s "checking whether $CC understands -c and -o together... " >&6; }
7494if test ${am_cv_prog_cc_c_o+y}
7495then :
7496  printf %s "(cached) " >&6
7497else $as_nop
7498  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7499/* end confdefs.h.  */
7500
7501int
7502main (void)
7503{
7504
7505  ;
7506  return 0;
7507}
7508_ACEOF
7509  # Make sure it works both with $CC and with simple cc.
7510  # Following AC_PROG_CC_C_O, we do the test twice because some
7511  # compilers refuse to overwrite an existing .o file with -o,
7512  # though they will create one.
7513  am_cv_prog_cc_c_o=yes
7514  for am_i in 1 2; do
7515    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
7516   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
7517   ac_status=$?
7518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7519   (exit $ac_status); } \
7520         && test -f conftest2.$ac_objext; then
7521      : OK
7522    else
7523      am_cv_prog_cc_c_o=no
7524      break
7525    fi
7526  done
7527  rm -f core conftest*
7528  unset am_i
7529fi
7530{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
7531printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
7532if test "$am_cv_prog_cc_c_o" != yes; then
7533   # Losing compiler, so override with the script.
7534   # FIXME: It is wrong to rewrite CC.
7535   # But if we don't then we get into trouble of one sort or another.
7536   # A longer-term fix would be to have automake use am__CC in this case,
7537   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
7538   CC="$am_aux_dir/compile $CC"
7539fi
7540ac_ext=c
7541ac_cpp='$CPP $CPPFLAGS'
7542ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7543ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7544ac_compiler_gnu=$ac_cv_c_compiler_gnu
7545
7546
7547
7548  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
7549printf %s "checking whether the compiler is clang... " >&6; }
7550if test ${gl_cv_compiler_clang+y}
7551then :
7552  printf %s "(cached) " >&6
7553else $as_nop
7554                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7555/* end confdefs.h.  */
7556
7557           #ifdef __clang__
7558           barfbarf
7559           #endif
7560
7561int
7562main (void)
7563{
7564
7565  ;
7566  return 0;
7567}
7568
7569_ACEOF
7570if ac_fn_c_try_compile "$LINENO"
7571then :
7572  gl_cv_compiler_clang=no
7573else $as_nop
7574  gl_cv_compiler_clang=yes
7575fi
7576rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7577
7578fi
7579{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
7580printf "%s\n" "$gl_cv_compiler_clang" >&6; }
7581
7582
7583  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
7584printf %s "checking for compiler option needed when checking for declarations... " >&6; }
7585if test ${gl_cv_compiler_check_decl_option+y}
7586then :
7587  printf %s "(cached) " >&6
7588else $as_nop
7589  if test $gl_cv_compiler_clang = yes; then
7590                     save_ac_compile="$ac_compile"
7591       ac_compile="$ac_compile -Werror=implicit-function-declaration"
7592                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7593/* end confdefs.h.  */
7594
7595int
7596main (void)
7597{
7598
7599  ;
7600  return 0;
7601}
7602_ACEOF
7603if ac_fn_c_try_compile "$LINENO"
7604then :
7605  gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
7606else $as_nop
7607  gl_cv_compiler_check_decl_option=none
7608fi
7609rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7610       ac_compile="$save_ac_compile"
7611     else
7612       gl_cv_compiler_check_decl_option=none
7613     fi
7614
7615fi
7616{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
7617printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; }
7618  if test "x$gl_cv_compiler_check_decl_option" != xnone; then
7619    ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
7620  else
7621    ac_compile_for_check_decl="$ac_compile"
7622  fi
7623
7624
7625depcc="$CC"   am_compiler_list=
7626
7627{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
7628printf %s "checking dependency style of $depcc... " >&6; }
7629if test ${am_cv_CC_dependencies_compiler_type+y}
7630then :
7631  printf %s "(cached) " >&6
7632else $as_nop
7633  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7634  # We make a subdir and do the tests there.  Otherwise we can end up
7635  # making bogus files that we don't know about and never remove.  For
7636  # instance it was reported that on HP-UX the gcc test will end up
7637  # making a dummy file named 'D' -- because '-MD' means "put the output
7638  # in D".
7639  rm -rf conftest.dir
7640  mkdir conftest.dir
7641  # Copy depcomp to subdir because otherwise we won't find it if we're
7642  # using a relative directory.
7643  cp "$am_depcomp" conftest.dir
7644  cd conftest.dir
7645  # We will build objects and dependencies in a subdirectory because
7646  # it helps to detect inapplicable dependency modes.  For instance
7647  # both Tru64's cc and ICC support -MD to output dependencies as a
7648  # side effect of compilation, but ICC will put the dependencies in
7649  # the current directory while Tru64 will put them in the object
7650  # directory.
7651  mkdir sub
7652
7653  am_cv_CC_dependencies_compiler_type=none
7654  if test "$am_compiler_list" = ""; then
7655     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
7656  fi
7657  am__universal=false
7658  case " $depcc " in #(
7659     *\ -arch\ *\ -arch\ *) am__universal=true ;;
7660     esac
7661
7662  for depmode in $am_compiler_list; do
7663    # Setup a source with many dependencies, because some compilers
7664    # like to wrap large dependency lists on column 80 (with \), and
7665    # we should not choose a depcomp mode which is confused by this.
7666    #
7667    # We need to recreate these files for each test, as the compiler may
7668    # overwrite some of them when testing with obscure command lines.
7669    # This happens at least with the AIX C compiler.
7670    : > sub/conftest.c
7671    for i in 1 2 3 4 5 6; do
7672      echo '#include "conftst'$i'.h"' >> sub/conftest.c
7673      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
7674      # Solaris 10 /bin/sh.
7675      echo '/* dummy */' > sub/conftst$i.h
7676    done
7677    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7678
7679    # We check with '-c' and '-o' for the sake of the "dashmstdout"
7680    # mode.  It turns out that the SunPro C++ compiler does not properly
7681    # handle '-M -o', and we need to detect this.  Also, some Intel
7682    # versions had trouble with output in subdirs.
7683    am__obj=sub/conftest.${OBJEXT-o}
7684    am__minus_obj="-o $am__obj"
7685    case $depmode in
7686    gcc)
7687      # This depmode causes a compiler race in universal mode.
7688      test "$am__universal" = false || continue
7689      ;;
7690    nosideeffect)
7691      # After this tag, mechanisms are not by side-effect, so they'll
7692      # only be used when explicitly requested.
7693      if test "x$enable_dependency_tracking" = xyes; then
7694	continue
7695      else
7696	break
7697      fi
7698      ;;
7699    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
7700      # This compiler won't grok '-c -o', but also, the minuso test has
7701      # not run yet.  These depmodes are late enough in the game, and
7702      # so weak that their functioning should not be impacted.
7703      am__obj=conftest.${OBJEXT-o}
7704      am__minus_obj=
7705      ;;
7706    none) break ;;
7707    esac
7708    if depmode=$depmode \
7709       source=sub/conftest.c object=$am__obj \
7710       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7711       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
7712         >/dev/null 2>conftest.err &&
7713       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
7714       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7715       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
7716       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7717      # icc doesn't choke on unknown options, it will just issue warnings
7718      # or remarks (even with -Werror).  So we grep stderr for any message
7719      # that says an option was ignored or not supported.
7720      # When given -MP, icc 7.0 and 7.1 complain thusly:
7721      #   icc: Command line warning: ignoring option '-M'; no argument required
7722      # The diagnosis changed in icc 8.0:
7723      #   icc: Command line remark: option '-MP' not supported
7724      if (grep 'ignoring option' conftest.err ||
7725          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7726        am_cv_CC_dependencies_compiler_type=$depmode
7727        break
7728      fi
7729    fi
7730  done
7731
7732  cd ..
7733  rm -rf conftest.dir
7734else
7735  am_cv_CC_dependencies_compiler_type=none
7736fi
7737
7738fi
7739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
7740printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
7741CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
7742
7743 if
7744  test "x$enable_dependency_tracking" != xno \
7745  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
7746  am__fastdepCC_TRUE=
7747  am__fastdepCC_FALSE='#'
7748else
7749  am__fastdepCC_TRUE='#'
7750  am__fastdepCC_FALSE=
7751fi
7752
7753
7754if test "$ac_cv_prog_cc_c99" = "no"; then
7755  as_fn_error $? "Compiler does not support C99. Aborting." "$LINENO" 5
7756fi
7757
7758
7759
7760
7761
7762  case "$host_os" in
7763    openbsd*)
7764
7765printf "%s\n" "#define _ISOC11_SOURCE 1" >>confdefs.h
7766
7767      ;;
7768  esac
7769
7770ac_ext=c
7771ac_cpp='$CPP $CPPFLAGS'
7772ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7773ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7774ac_compiler_gnu=$ac_cv_c_compiler_gnu
7775{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7776printf %s "checking how to run the C preprocessor... " >&6; }
7777# On Suns, sometimes $CPP names a directory.
7778if test -n "$CPP" && test -d "$CPP"; then
7779  CPP=
7780fi
7781if test -z "$CPP"; then
7782  if test ${ac_cv_prog_CPP+y}
7783then :
7784  printf %s "(cached) " >&6
7785else $as_nop
7786      # Double quotes because $CC needs to be expanded
7787    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
7788    do
7789      ac_preproc_ok=false
7790for ac_c_preproc_warn_flag in '' yes
7791do
7792  # Use a header file that comes with gcc, so configuring glibc
7793  # with a fresh cross-compiler works.
7794  # On the NeXT, cc -E runs the code through the compiler's parser,
7795  # not just through cpp. "Syntax error" is here to catch this case.
7796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7797/* end confdefs.h.  */
7798#include <limits.h>
7799		     Syntax error
7800_ACEOF
7801if ac_fn_c_try_cpp "$LINENO"
7802then :
7803
7804else $as_nop
7805  # Broken: fails on valid input.
7806continue
7807fi
7808rm -f conftest.err conftest.i conftest.$ac_ext
7809
7810  # OK, works on sane cases.  Now check whether nonexistent headers
7811  # can be detected and how.
7812  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7813/* end confdefs.h.  */
7814#include <ac_nonexistent.h>
7815_ACEOF
7816if ac_fn_c_try_cpp "$LINENO"
7817then :
7818  # Broken: success on invalid input.
7819continue
7820else $as_nop
7821  # Passes both tests.
7822ac_preproc_ok=:
7823break
7824fi
7825rm -f conftest.err conftest.i conftest.$ac_ext
7826
7827done
7828# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7829rm -f conftest.i conftest.err conftest.$ac_ext
7830if $ac_preproc_ok
7831then :
7832  break
7833fi
7834
7835    done
7836    ac_cv_prog_CPP=$CPP
7837
7838fi
7839  CPP=$ac_cv_prog_CPP
7840else
7841  ac_cv_prog_CPP=$CPP
7842fi
7843{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7844printf "%s\n" "$CPP" >&6; }
7845ac_preproc_ok=false
7846for ac_c_preproc_warn_flag in '' yes
7847do
7848  # Use a header file that comes with gcc, so configuring glibc
7849  # with a fresh cross-compiler works.
7850  # On the NeXT, cc -E runs the code through the compiler's parser,
7851  # not just through cpp. "Syntax error" is here to catch this case.
7852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7853/* end confdefs.h.  */
7854#include <limits.h>
7855		     Syntax error
7856_ACEOF
7857if ac_fn_c_try_cpp "$LINENO"
7858then :
7859
7860else $as_nop
7861  # Broken: fails on valid input.
7862continue
7863fi
7864rm -f conftest.err conftest.i conftest.$ac_ext
7865
7866  # OK, works on sane cases.  Now check whether nonexistent headers
7867  # can be detected and how.
7868  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7869/* end confdefs.h.  */
7870#include <ac_nonexistent.h>
7871_ACEOF
7872if ac_fn_c_try_cpp "$LINENO"
7873then :
7874  # Broken: success on invalid input.
7875continue
7876else $as_nop
7877  # Passes both tests.
7878ac_preproc_ok=:
7879break
7880fi
7881rm -f conftest.err conftest.i conftest.$ac_ext
7882
7883done
7884# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7885rm -f conftest.i conftest.err conftest.$ac_ext
7886if $ac_preproc_ok
7887then :
7888
7889else $as_nop
7890  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7891printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
7892as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7893See \`config.log' for more details" "$LINENO" 5; }
7894fi
7895
7896ac_ext=c
7897ac_cpp='$CPP $CPPFLAGS'
7898ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7899ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7900ac_compiler_gnu=$ac_cv_c_compiler_gnu
7901
7902
7903{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
7904printf %s "checking for grep that handles long lines and -e... " >&6; }
7905if test ${ac_cv_path_GREP+y}
7906then :
7907  printf %s "(cached) " >&6
7908else $as_nop
7909  if test -z "$GREP"; then
7910  ac_path_GREP_found=false
7911  # Loop through the user's path and test for each of PROGNAME-LIST
7912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7913for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7914do
7915  IFS=$as_save_IFS
7916  case $as_dir in #(((
7917    '') as_dir=./ ;;
7918    */) ;;
7919    *) as_dir=$as_dir/ ;;
7920  esac
7921    for ac_prog in grep ggrep
7922   do
7923    for ac_exec_ext in '' $ac_executable_extensions; do
7924      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
7925      as_fn_executable_p "$ac_path_GREP" || continue
7926# Check for GNU ac_path_GREP and select it if it is found.
7927  # Check for GNU $ac_path_GREP
7928case `"$ac_path_GREP" --version 2>&1` in
7929*GNU*)
7930  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
7931*)
7932  ac_count=0
7933  printf %s 0123456789 >"conftest.in"
7934  while :
7935  do
7936    cat "conftest.in" "conftest.in" >"conftest.tmp"
7937    mv "conftest.tmp" "conftest.in"
7938    cp "conftest.in" "conftest.nl"
7939    printf "%s\n" 'GREP' >> "conftest.nl"
7940    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7941    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7942    as_fn_arith $ac_count + 1 && ac_count=$as_val
7943    if test $ac_count -gt ${ac_path_GREP_max-0}; then
7944      # Best one so far, save it but keep looking for a better one
7945      ac_cv_path_GREP="$ac_path_GREP"
7946      ac_path_GREP_max=$ac_count
7947    fi
7948    # 10*(2^10) chars as input seems more than enough
7949    test $ac_count -gt 10 && break
7950  done
7951  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7952esac
7953
7954      $ac_path_GREP_found && break 3
7955    done
7956  done
7957  done
7958IFS=$as_save_IFS
7959  if test -z "$ac_cv_path_GREP"; then
7960    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7961  fi
7962else
7963  ac_cv_path_GREP=$GREP
7964fi
7965
7966fi
7967{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
7968printf "%s\n" "$ac_cv_path_GREP" >&6; }
7969 GREP="$ac_cv_path_GREP"
7970
7971
7972{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
7973printf %s "checking for egrep... " >&6; }
7974if test ${ac_cv_path_EGREP+y}
7975then :
7976  printf %s "(cached) " >&6
7977else $as_nop
7978  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
7979   then ac_cv_path_EGREP="$GREP -E"
7980   else
7981     if test -z "$EGREP"; then
7982  ac_path_EGREP_found=false
7983  # Loop through the user's path and test for each of PROGNAME-LIST
7984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7985for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7986do
7987  IFS=$as_save_IFS
7988  case $as_dir in #(((
7989    '') as_dir=./ ;;
7990    */) ;;
7991    *) as_dir=$as_dir/ ;;
7992  esac
7993    for ac_prog in egrep
7994   do
7995    for ac_exec_ext in '' $ac_executable_extensions; do
7996      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
7997      as_fn_executable_p "$ac_path_EGREP" || continue
7998# Check for GNU ac_path_EGREP and select it if it is found.
7999  # Check for GNU $ac_path_EGREP
8000case `"$ac_path_EGREP" --version 2>&1` in
8001*GNU*)
8002  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8003*)
8004  ac_count=0
8005  printf %s 0123456789 >"conftest.in"
8006  while :
8007  do
8008    cat "conftest.in" "conftest.in" >"conftest.tmp"
8009    mv "conftest.tmp" "conftest.in"
8010    cp "conftest.in" "conftest.nl"
8011    printf "%s\n" 'EGREP' >> "conftest.nl"
8012    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8013    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8014    as_fn_arith $ac_count + 1 && ac_count=$as_val
8015    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8016      # Best one so far, save it but keep looking for a better one
8017      ac_cv_path_EGREP="$ac_path_EGREP"
8018      ac_path_EGREP_max=$ac_count
8019    fi
8020    # 10*(2^10) chars as input seems more than enough
8021    test $ac_count -gt 10 && break
8022  done
8023  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8024esac
8025
8026      $ac_path_EGREP_found && break 3
8027    done
8028  done
8029  done
8030IFS=$as_save_IFS
8031  if test -z "$ac_cv_path_EGREP"; then
8032    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8033  fi
8034else
8035  ac_cv_path_EGREP=$EGREP
8036fi
8037
8038   fi
8039fi
8040{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8041printf "%s\n" "$ac_cv_path_EGREP" >&6; }
8042 EGREP="$ac_cv_path_EGREP"
8043
8044
8045
8046
8047
8048  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
8049printf %s "checking for Minix Amsterdam compiler... " >&6; }
8050if test ${gl_cv_c_amsterdam_compiler+y}
8051then :
8052  printf %s "(cached) " >&6
8053else $as_nop
8054
8055      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8056/* end confdefs.h.  */
8057
8058#ifdef __ACK__
8059Amsterdam
8060#endif
8061
8062_ACEOF
8063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8064  $EGREP "Amsterdam" >/dev/null 2>&1
8065then :
8066  gl_cv_c_amsterdam_compiler=yes
8067else $as_nop
8068  gl_cv_c_amsterdam_compiler=no
8069fi
8070rm -rf conftest*
8071
8072
8073fi
8074{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
8075printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
8076
8077      if test $gl_cv_c_amsterdam_compiler = yes; then
8078    if test -z "$AR"; then
8079      AR='cc -c.a'
8080    fi
8081    if test -z "$ARFLAGS"; then
8082      ARFLAGS='-o'
8083    fi
8084  else
8085                                                :
8086  fi
8087
8088        if test -n "$ac_tool_prefix"; then
8089  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8090set dummy ${ac_tool_prefix}ar; ac_word=$2
8091{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8092printf %s "checking for $ac_word... " >&6; }
8093if test ${ac_cv_prog_AR+y}
8094then :
8095  printf %s "(cached) " >&6
8096else $as_nop
8097  if test -n "$AR"; then
8098  ac_cv_prog_AR="$AR" # Let the user override the test.
8099else
8100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8101for as_dir in $PATH
8102do
8103  IFS=$as_save_IFS
8104  case $as_dir in #(((
8105    '') as_dir=./ ;;
8106    */) ;;
8107    *) as_dir=$as_dir/ ;;
8108  esac
8109    for ac_exec_ext in '' $ac_executable_extensions; do
8110  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8111    ac_cv_prog_AR="${ac_tool_prefix}ar"
8112    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8113    break 2
8114  fi
8115done
8116  done
8117IFS=$as_save_IFS
8118
8119fi
8120fi
8121AR=$ac_cv_prog_AR
8122if test -n "$AR"; then
8123  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8124printf "%s\n" "$AR" >&6; }
8125else
8126  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8127printf "%s\n" "no" >&6; }
8128fi
8129
8130
8131fi
8132if test -z "$ac_cv_prog_AR"; then
8133  ac_ct_AR=$AR
8134  # Extract the first word of "ar", so it can be a program name with args.
8135set dummy ar; ac_word=$2
8136{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8137printf %s "checking for $ac_word... " >&6; }
8138if test ${ac_cv_prog_ac_ct_AR+y}
8139then :
8140  printf %s "(cached) " >&6
8141else $as_nop
8142  if test -n "$ac_ct_AR"; then
8143  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8144else
8145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8146for as_dir in $PATH
8147do
8148  IFS=$as_save_IFS
8149  case $as_dir in #(((
8150    '') as_dir=./ ;;
8151    */) ;;
8152    *) as_dir=$as_dir/ ;;
8153  esac
8154    for ac_exec_ext in '' $ac_executable_extensions; do
8155  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8156    ac_cv_prog_ac_ct_AR="ar"
8157    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8158    break 2
8159  fi
8160done
8161  done
8162IFS=$as_save_IFS
8163
8164fi
8165fi
8166ac_ct_AR=$ac_cv_prog_ac_ct_AR
8167if test -n "$ac_ct_AR"; then
8168  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8169printf "%s\n" "$ac_ct_AR" >&6; }
8170else
8171  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8172printf "%s\n" "no" >&6; }
8173fi
8174
8175  if test "x$ac_ct_AR" = x; then
8176    AR="ar"
8177  else
8178    case $cross_compiling:$ac_tool_warned in
8179yes:)
8180{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8181printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8182ac_tool_warned=yes ;;
8183esac
8184    AR=$ac_ct_AR
8185  fi
8186else
8187  AR="$ac_cv_prog_AR"
8188fi
8189
8190  if test -z "$ARFLAGS"; then
8191    ARFLAGS='cr'
8192  fi
8193
8194
8195
8196  if test -z "$RANLIB"; then
8197    if test $gl_cv_c_amsterdam_compiler = yes; then
8198      RANLIB=':'
8199    else
8200            if test -n "$ac_tool_prefix"; then
8201  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8202set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8203{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8204printf %s "checking for $ac_word... " >&6; }
8205if test ${ac_cv_prog_RANLIB+y}
8206then :
8207  printf %s "(cached) " >&6
8208else $as_nop
8209  if test -n "$RANLIB"; then
8210  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8211else
8212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8213for as_dir in $PATH
8214do
8215  IFS=$as_save_IFS
8216  case $as_dir in #(((
8217    '') as_dir=./ ;;
8218    */) ;;
8219    *) as_dir=$as_dir/ ;;
8220  esac
8221    for ac_exec_ext in '' $ac_executable_extensions; do
8222  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8223    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8224    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8225    break 2
8226  fi
8227done
8228  done
8229IFS=$as_save_IFS
8230
8231fi
8232fi
8233RANLIB=$ac_cv_prog_RANLIB
8234if test -n "$RANLIB"; then
8235  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8236printf "%s\n" "$RANLIB" >&6; }
8237else
8238  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8239printf "%s\n" "no" >&6; }
8240fi
8241
8242
8243fi
8244if test -z "$ac_cv_prog_RANLIB"; then
8245  ac_ct_RANLIB=$RANLIB
8246  # Extract the first word of "ranlib", so it can be a program name with args.
8247set dummy ranlib; ac_word=$2
8248{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8249printf %s "checking for $ac_word... " >&6; }
8250if test ${ac_cv_prog_ac_ct_RANLIB+y}
8251then :
8252  printf %s "(cached) " >&6
8253else $as_nop
8254  if test -n "$ac_ct_RANLIB"; then
8255  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8256else
8257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8258for as_dir in $PATH
8259do
8260  IFS=$as_save_IFS
8261  case $as_dir in #(((
8262    '') as_dir=./ ;;
8263    */) ;;
8264    *) as_dir=$as_dir/ ;;
8265  esac
8266    for ac_exec_ext in '' $ac_executable_extensions; do
8267  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8268    ac_cv_prog_ac_ct_RANLIB="ranlib"
8269    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8270    break 2
8271  fi
8272done
8273  done
8274IFS=$as_save_IFS
8275
8276fi
8277fi
8278ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8279if test -n "$ac_ct_RANLIB"; then
8280  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8281printf "%s\n" "$ac_ct_RANLIB" >&6; }
8282else
8283  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8284printf "%s\n" "no" >&6; }
8285fi
8286
8287  if test "x$ac_ct_RANLIB" = x; then
8288    RANLIB=":"
8289  else
8290    case $cross_compiling:$ac_tool_warned in
8291yes:)
8292{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8293printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8294ac_tool_warned=yes ;;
8295esac
8296    RANLIB=$ac_ct_RANLIB
8297  fi
8298else
8299  RANLIB="$ac_cv_prog_RANLIB"
8300fi
8301
8302    fi
8303  fi
8304
8305
8306
8307
8308
8309  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8310printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
8311if test ${ac_cv_sys_largefile_source+y}
8312then :
8313  printf %s "(cached) " >&6
8314else $as_nop
8315  while :; do
8316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8317/* end confdefs.h.  */
8318#include <sys/types.h> /* for off_t */
8319     #include <stdio.h>
8320int
8321main (void)
8322{
8323int (*fp) (FILE *, off_t, int) = fseeko;
8324     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
8325  ;
8326  return 0;
8327}
8328_ACEOF
8329if ac_fn_c_try_link "$LINENO"
8330then :
8331  ac_cv_sys_largefile_source=no; break
8332fi
8333rm -f core conftest.err conftest.$ac_objext conftest.beam \
8334    conftest$ac_exeext conftest.$ac_ext
8335  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8336/* end confdefs.h.  */
8337#define _LARGEFILE_SOURCE 1
8338#include <sys/types.h> /* for off_t */
8339     #include <stdio.h>
8340int
8341main (void)
8342{
8343int (*fp) (FILE *, off_t, int) = fseeko;
8344     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
8345  ;
8346  return 0;
8347}
8348_ACEOF
8349if ac_fn_c_try_link "$LINENO"
8350then :
8351  ac_cv_sys_largefile_source=1; break
8352fi
8353rm -f core conftest.err conftest.$ac_objext conftest.beam \
8354    conftest$ac_exeext conftest.$ac_ext
8355  ac_cv_sys_largefile_source=unknown
8356  break
8357done
8358fi
8359{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
8360printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
8361case $ac_cv_sys_largefile_source in #(
8362  no | unknown) ;;
8363  *)
8364printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
8365;;
8366esac
8367rm -rf conftest*
8368
8369# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8370# in glibc 2.1.3, but that breaks too many other things.
8371# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8372if test $ac_cv_sys_largefile_source != unknown; then
8373
8374printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
8375
8376fi
8377
8378  case "$host_os" in
8379    hpux*)
8380
8381printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h
8382
8383      ;;
8384  esac
8385
8386# Check whether --enable-largefile was given.
8387if test ${enable_largefile+y}
8388then :
8389  enableval=$enable_largefile;
8390fi
8391
8392if test "$enable_largefile" != no; then
8393
8394  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
8395printf %s "checking for special C compiler options needed for large files... " >&6; }
8396if test ${ac_cv_sys_largefile_CC+y}
8397then :
8398  printf %s "(cached) " >&6
8399else $as_nop
8400  ac_cv_sys_largefile_CC=no
8401     if test "$GCC" != yes; then
8402       ac_save_CC=$CC
8403       while :; do
8404	 # IRIX 6.2 and later do not support large files by default,
8405	 # so use the C compiler's -n32 option if that helps.
8406	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8407/* end confdefs.h.  */
8408#include <sys/types.h>
8409 /* Check that off_t can represent 2**63 - 1 correctly.
8410    We can't simply define LARGE_OFF_T to be 9223372036854775807,
8411    since some C++ compilers masquerading as C compilers
8412    incorrectly reject 9223372036854775807.  */
8413#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
8414  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8415		       && LARGE_OFF_T % 2147483647 == 1)
8416		      ? 1 : -1];
8417int
8418main (void)
8419{
8420
8421  ;
8422  return 0;
8423}
8424_ACEOF
8425	 if ac_fn_c_try_compile "$LINENO"
8426then :
8427  break
8428fi
8429rm -f core conftest.err conftest.$ac_objext conftest.beam
8430	 CC="$CC -n32"
8431	 if ac_fn_c_try_compile "$LINENO"
8432then :
8433  ac_cv_sys_largefile_CC=' -n32'; break
8434fi
8435rm -f core conftest.err conftest.$ac_objext conftest.beam
8436	 break
8437       done
8438       CC=$ac_save_CC
8439       rm -f conftest.$ac_ext
8440    fi
8441fi
8442{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
8443printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
8444  if test "$ac_cv_sys_largefile_CC" != no; then
8445    CC=$CC$ac_cv_sys_largefile_CC
8446  fi
8447
8448  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8449printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
8450if test ${ac_cv_sys_file_offset_bits+y}
8451then :
8452  printf %s "(cached) " >&6
8453else $as_nop
8454  while :; do
8455  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8456/* end confdefs.h.  */
8457#include <sys/types.h>
8458 /* Check that off_t can represent 2**63 - 1 correctly.
8459    We can't simply define LARGE_OFF_T to be 9223372036854775807,
8460    since some C++ compilers masquerading as C compilers
8461    incorrectly reject 9223372036854775807.  */
8462#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
8463  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8464		       && LARGE_OFF_T % 2147483647 == 1)
8465		      ? 1 : -1];
8466int
8467main (void)
8468{
8469
8470  ;
8471  return 0;
8472}
8473_ACEOF
8474if ac_fn_c_try_compile "$LINENO"
8475then :
8476  ac_cv_sys_file_offset_bits=no; break
8477fi
8478rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8479  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8480/* end confdefs.h.  */
8481#define _FILE_OFFSET_BITS 64
8482#include <sys/types.h>
8483 /* Check that off_t can represent 2**63 - 1 correctly.
8484    We can't simply define LARGE_OFF_T to be 9223372036854775807,
8485    since some C++ compilers masquerading as C compilers
8486    incorrectly reject 9223372036854775807.  */
8487#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
8488  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8489		       && LARGE_OFF_T % 2147483647 == 1)
8490		      ? 1 : -1];
8491int
8492main (void)
8493{
8494
8495  ;
8496  return 0;
8497}
8498_ACEOF
8499if ac_fn_c_try_compile "$LINENO"
8500then :
8501  ac_cv_sys_file_offset_bits=64; break
8502fi
8503rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8504  ac_cv_sys_file_offset_bits=unknown
8505  break
8506done
8507fi
8508{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
8509printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
8510case $ac_cv_sys_file_offset_bits in #(
8511  no | unknown) ;;
8512  *)
8513printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
8514;;
8515esac
8516rm -rf conftest*
8517  if test $ac_cv_sys_file_offset_bits = unknown; then
8518    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
8519printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
8520if test ${ac_cv_sys_large_files+y}
8521then :
8522  printf %s "(cached) " >&6
8523else $as_nop
8524  while :; do
8525  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8526/* end confdefs.h.  */
8527#include <sys/types.h>
8528 /* Check that off_t can represent 2**63 - 1 correctly.
8529    We can't simply define LARGE_OFF_T to be 9223372036854775807,
8530    since some C++ compilers masquerading as C compilers
8531    incorrectly reject 9223372036854775807.  */
8532#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
8533  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8534		       && LARGE_OFF_T % 2147483647 == 1)
8535		      ? 1 : -1];
8536int
8537main (void)
8538{
8539
8540  ;
8541  return 0;
8542}
8543_ACEOF
8544if ac_fn_c_try_compile "$LINENO"
8545then :
8546  ac_cv_sys_large_files=no; break
8547fi
8548rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8549  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8550/* end confdefs.h.  */
8551#define _LARGE_FILES 1
8552#include <sys/types.h>
8553 /* Check that off_t can represent 2**63 - 1 correctly.
8554    We can't simply define LARGE_OFF_T to be 9223372036854775807,
8555    since some C++ compilers masquerading as C compilers
8556    incorrectly reject 9223372036854775807.  */
8557#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
8558  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8559		       && LARGE_OFF_T % 2147483647 == 1)
8560		      ? 1 : -1];
8561int
8562main (void)
8563{
8564
8565  ;
8566  return 0;
8567}
8568_ACEOF
8569if ac_fn_c_try_compile "$LINENO"
8570then :
8571  ac_cv_sys_large_files=1; break
8572fi
8573rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8574  ac_cv_sys_large_files=unknown
8575  break
8576done
8577fi
8578{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
8579printf "%s\n" "$ac_cv_sys_large_files" >&6; }
8580case $ac_cv_sys_large_files in #(
8581  no | unknown) ;;
8582  *)
8583printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
8584;;
8585esac
8586rm -rf conftest*
8587  fi
8588fi
8589
8590
8591
8592
8593
8594
8595
8596  # Check whether --enable-threads was given.
8597if test ${enable_threads+y}
8598then :
8599  enableval=$enable_threads; gl_use_threads=$enableval
8600else $as_nop
8601  if test -n "$gl_use_threads_default"; then
8602       gl_use_threads="$gl_use_threads_default"
8603     else
8604       case "$host_os" in
8605                                    osf*) gl_use_threads=no ;;
8606                                    cygwin*)
8607               case `uname -r` in
8608                 1.[0-5].*) gl_use_threads=no ;;
8609                 *)         gl_use_threads=yes ;;
8610               esac
8611               ;;
8612                  mingw*)
8613               case "$gl_use_winpthreads_default" in
8614                 yes) gl_use_threads=posix ;;
8615                 no)  gl_use_threads=windows ;;
8616                 *)   gl_use_threads=yes ;;
8617               esac
8618               ;;
8619         *)    gl_use_threads=yes ;;
8620       esac
8621     fi
8622
8623fi
8624
8625  if test "$gl_use_threads" = yes \
8626     || test "$gl_use_threads" = isoc \
8627     || test "$gl_use_threads" = posix \
8628     || test "$gl_use_threads" = isoc+posix; then
8629    # For using <threads.h> or <pthread.h>:
8630
8631
8632  if test -z "$gl_anythreadlib_early_done"; then
8633    case "$host_os" in
8634      osf*)
8635        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
8636        # groks <pthread.h>. cc also understands the flag -pthread, but
8637        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
8638        # 2. putting a flag into CPPFLAGS that has an effect on the linker
8639        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
8640        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
8641        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
8642        ;;
8643    esac
8644    # Some systems optimize for single-threaded programs by default, and
8645    # need special flags to disable these optimizations. For example, the
8646    # definition of 'errno' in <errno.h>.
8647    case "$host_os" in
8648      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
8649      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
8650    esac
8651    gl_anythreadlib_early_done=done
8652  fi
8653
8654  fi
8655
8656
8657
8658  # Pre-early section.
8659
8660
8661
8662
8663  # Code from module absolute-header:
8664  # Code from module accept:
8665  # Code from module access:
8666  # Code from module alloca:
8667  # Code from module alloca-opt:
8668  # Code from module arpa_inet:
8669  # Code from module assure:
8670  # Code from module at-internal:
8671  # Code from module atoll:
8672  # Code from module attribute:
8673  # Code from module basename-lgpl:
8674  # Code from module binary-io:
8675  # Code from module bind:
8676  # Code from module bitrotate:
8677  # Code from module btowc:
8678  # Code from module builtin-expect:
8679  # Code from module byteswap:
8680  # Code from module c-ctype:
8681  # Code from module c-strcase:
8682  # Code from module c-strcasestr:
8683  # Code from module c99:
8684  # Code from module calloc-posix:
8685  # Code from module canonicalize:
8686  # Code from module canonicalize-lgpl:
8687  # Code from module chdir:
8688  # Code from module chdir-long:
8689  # Code from module clock-time:
8690  # Code from module cloexec:
8691  # Code from module close:
8692  # Code from module closedir:
8693  # Code from module concat-filename:
8694  # Code from module cond:
8695  # Code from module connect:
8696  # Code from module crypto/af_alg:
8697  # Code from module crypto/md2:
8698  # Code from module crypto/md5:
8699  # Code from module crypto/md5-buffer:
8700  # Code from module crypto/sha1:
8701  # Code from module crypto/sha1-buffer:
8702  # Code from module crypto/sha256:
8703  # Code from module crypto/sha256-buffer:
8704  # Code from module crypto/sha512:
8705  # Code from module crypto/sha512-buffer:
8706  # Code from module ctype:
8707  # Code from module d-ino:
8708  # Code from module d-type:
8709  # Code from module dirent:
8710  # Code from module dirfd:
8711  # Code from module dirname:
8712  # Code from module dirname-lgpl:
8713  # Code from module double-slash-root:
8714  # Code from module dup:
8715  # Code from module dup2:
8716  # Code from module dynarray:
8717  # Code from module eloop-threshold:
8718  # Code from module environ:
8719  # Code from module errno:
8720  # Code from module error:
8721  # Code from module exitfail:
8722  # Code from module extensions:
8723  # Code from module extern-inline:
8724  # Code from module fatal-signal:
8725  # Code from module fchdir:
8726  # Code from module fclose:
8727  # Code from module fcntl:
8728  # Code from module fcntl-h:
8729  # Code from module fd-hook:
8730  # Code from module fd-safer-flag:
8731  # Code from module fdopen:
8732  # Code from module fdopendir:
8733  # Code from module fflush:
8734
8735  # Code from module file-set:
8736  # Code from module filename:
8737  # Code from module filenamecat-lgpl:
8738  # Code from module findprog-in:
8739  # Code from module flexmember:
8740  # Code from module float:
8741  # Code from module flock:
8742  # Code from module fnmatch:
8743  # Code from module fnmatch-gnu:
8744  # Code from module fnmatch-h:
8745  # Code from module fopen:
8746  # Code from module fopen-gnu:
8747  # Code from module fpurge:
8748  # Code from module freading:
8749  # Code from module free-posix:
8750  # Code from module freopen:
8751  # Code from module fseek:
8752  # Code from module fseeko:
8753
8754  # Code from module fstat:
8755  # Code from module fstatat:
8756  # Code from module fsync:
8757  # Code from module ftell:
8758  # Code from module ftello:
8759
8760  # Code from module ftruncate:
8761  # Code from module futimens:
8762  # Code from module getaddrinfo:
8763  # Code from module getcwd:
8764  # Code from module getcwd-lgpl:
8765  # Code from module getdelim:
8766  # Code from module getdtablesize:
8767  # Code from module gethostname:
8768  # Code from module getline:
8769  # Code from module getlogin_r:
8770  # Code from module getpass:
8771  # Code from module getpeername:
8772  # Code from module getprogname:
8773  # Code from module getrandom:
8774  # Code from module getsockname:
8775  # Code from module gettext-h:
8776  # Code from module gettime:
8777  # Code from module gettimeofday:
8778  # Code from module gitlog-to-changelog:
8779  # Code from module glob:
8780  # Code from module glob-h:
8781  # Code from module gnumakefile:
8782  # Code from module hard-locale:
8783  # Code from module hash:
8784  # Code from module hash-pjw:
8785  # Code from module hash-triple-simple:
8786  # Code from module havelib:
8787  # Code from module hostent:
8788  # Code from module iconv:
8789  # Code from module idx:
8790  # Code from module include_next:
8791  # Code from module inet_ntop:
8792  # Code from module inet_pton:
8793  # Code from module inline:
8794  # Code from module intprops:
8795  # Code from module inttypes:
8796  # Code from module inttypes-incomplete:
8797  # Code from module ioctl:
8798  # Code from module isatty:
8799  # Code from module isblank:
8800  # Code from module langinfo:
8801  # Code from module largefile:
8802
8803  # Code from module lib-symbol-visibility:
8804  # Code from module libc-config:
8805  # Code from module limits-h:
8806  # Code from module link:
8807  # Code from module listen:
8808  # Code from module localcharset:
8809  # Code from module locale:
8810  # Code from module localeconv:
8811  # Code from module localename:
8812  # Code from module lock:
8813  # Code from module lseek:
8814  # Code from module lstat:
8815  # Code from module maintainer-makefile:
8816  # Code from module malloc-posix:
8817  # Code from module malloca:
8818  # Code from module mbrtowc:
8819  # Code from module mbsinit:
8820  # Code from module mbsrtowcs:
8821  # Code from module mbtowc:
8822  # Code from module memchr:
8823  # Code from module mempcpy:
8824  # Code from module memrchr:
8825  # Code from module minmax:
8826  # Code from module mkdir:
8827  # Code from module mkstemp:
8828  # Code from module msvc-inval:
8829  # Code from module msvc-nothrow:
8830  # Code from module multiarch:
8831  # Code from module nanosleep:
8832  # Code from module netdb:
8833  # Code from module netinet_in:
8834  # Code from module nl_langinfo:
8835  # Code from module nocrash:
8836  # Code from module open:
8837  # Code from module openat:
8838  # Code from module openat-die:
8839  # Code from module openat-h:
8840  # Code from module opendir:
8841  # Code from module pathmax:
8842  # Code from module pclose:
8843  # Code from module pipe-posix:
8844  # Code from module pipe2:
8845  # Code from module pipe2-safer:
8846  # Code from module poll:
8847  # Code from module poll-h:
8848  # Code from module popen:
8849  # Code from module posix_spawn:
8850  # Code from module posix_spawn-internal:
8851  # Code from module posix_spawn_file_actions_addchdir:
8852  # Code from module posix_spawn_file_actions_addclose:
8853  # Code from module posix_spawn_file_actions_adddup2:
8854  # Code from module posix_spawn_file_actions_addopen:
8855  # Code from module posix_spawn_file_actions_destroy:
8856  # Code from module posix_spawn_file_actions_init:
8857  # Code from module posix_spawnattr_destroy:
8858  # Code from module posix_spawnattr_init:
8859  # Code from module posix_spawnattr_setflags:
8860  # Code from module posix_spawnattr_setpgroup:
8861  # Code from module posix_spawnattr_setsigmask:
8862  # Code from module posix_spawnp:
8863  # Code from module progname:
8864  # Code from module pthread_sigmask:
8865  # Code from module pwrite:
8866  # Code from module qsort_r:
8867  # Code from module raise:
8868  # Code from module random_r:
8869  # Code from module rawmemchr:
8870  # Code from module read:
8871  # Code from module readdir:
8872  # Code from module readlink:
8873  # Code from module realloc-posix:
8874  # Code from module recv:
8875  # Code from module recvfrom:
8876  # Code from module regex:
8877  # Code from module rename:
8878  # Code from module rewinddir:
8879  # Code from module rmdir:
8880  # Code from module safe-read:
8881  # Code from module safe-write:
8882  # Code from module same-inode:
8883  # Code from module save-cwd:
8884  # Code from module sched:
8885  # Code from module scratch_buffer:
8886  # Code from module select:
8887  # Code from module send:
8888  # Code from module sendto:
8889  # Code from module servent:
8890  # Code from module setlocale:
8891  # Code from module setlocale-null:
8892  # Code from module setsockopt:
8893  # Code from module sh-filename:
8894  # Code from module sigaction:
8895  # Code from module signal-h:
8896  # Code from module sigprocmask:
8897  # Code from module size_max:
8898  # Code from module snippet/_Noreturn:
8899  # Code from module snippet/arg-nonnull:
8900  # Code from module snippet/c++defs:
8901  # Code from module snippet/unused-parameter:
8902  # Code from module snippet/warn-on-use:
8903  # Code from module snprintf:
8904  # Code from module socket:
8905  # Code from module socketlib:
8906  # Code from module sockets:
8907  # Code from module socklen:
8908  # Code from module spawn:
8909  # Code from module spawn-pipe:
8910  # Code from module ssize_t:
8911  # Code from module stat:
8912  # Code from module stat-time:
8913  # Code from module std-gnu11:
8914  # Code from module stdalign:
8915  # Code from module stdarg:
8916
8917
8918
8919  # Code from module stdbool:
8920  # Code from module stddef:
8921  # Code from module stdint:
8922  # Code from module stdio:
8923  # Code from module stdlib:
8924  # Code from module stpcpy:
8925  # Code from module strcase:
8926  # Code from module strchrnul:
8927  # Code from module strdup-posix:
8928  # Code from module streq:
8929  # Code from module strerror:
8930  # Code from module strerror-override:
8931  # Code from module string:
8932  # Code from module strings:
8933  # Code from module strndup:
8934  # Code from module strnlen:
8935  # Code from module strnlen1:
8936  # Code from module strpbrk:
8937  # Code from module strstr:
8938  # Code from module strstr-simple:
8939  # Code from module strtoll:
8940  # Code from module sys_file:
8941  # Code from module sys_ioctl:
8942  # Code from module sys_random:
8943  # Code from module sys_select:
8944  # Code from module sys_socket:
8945  # Code from module sys_stat:
8946  # Code from module sys_time:
8947  # Code from module sys_types:
8948  # Code from module sys_uio:
8949  # Code from module sys_wait:
8950  # Code from module tempname:
8951  # Code from module thread:
8952  # Code from module thread-optim:
8953  # Code from module threadlib:
8954
8955
8956
8957  # Code from module time:
8958  # Code from module time_r:
8959  # Code from module timespec:
8960  # Code from module u64:
8961  # Code from module unistd:
8962  # Code from module unistd-safer:
8963  # Code from module unitypes:
8964  # Code from module uniwidth/base:
8965  # Code from module uniwidth/width:
8966  # Code from module unlink:
8967  # Code from module update-copyright:
8968  # Code from module useless-if-before-free:
8969  # Code from module utime:
8970  # Code from module utime-h:
8971  # Code from module utimens:
8972  # Code from module vasnprintf:
8973  # Code from module vc-list-files:
8974  # Code from module verify:
8975  # Code from module wait-process:
8976  # Code from module waitpid:
8977  # Code from module warnings:
8978  # Code from module wchar:
8979  # Code from module wcrtomb:
8980  # Code from module wctype-h:
8981  # Code from module wcwidth:
8982  # Code from module windows-cond:
8983  # Code from module windows-mutex:
8984  # Code from module windows-once:
8985  # Code from module windows-recmutex:
8986  # Code from module windows-rwlock:
8987  # Code from module windows-spawn:
8988  # Code from module windows-thread:
8989  # Code from module windows-tls:
8990  # Code from module wmemchr:
8991  # Code from module wmempcpy:
8992  # Code from module write:
8993  # Code from module xalloc:
8994  # Code from module xalloc-die:
8995  # Code from module xalloc-oversized:
8996  # Code from module xgethostname:
8997  # Code from module xsize:
8998  # Code from module xstrndup:
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008                        # Check whether --enable-cross-guesses was given.
9009if test ${enable_cross_guesses+y}
9010then :
9011  enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
9012       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
9013printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
9014       enableval=conservative
9015     fi
9016     gl_cross_guesses="$enableval"
9017else $as_nop
9018  gl_cross_guesses=conservative
9019fi
9020
9021  if test $gl_cross_guesses = risky; then
9022    gl_cross_guess_normal="guessing yes"
9023    gl_cross_guess_inverted="guessing no"
9024  else
9025    gl_cross_guess_normal="guessing no"
9026    gl_cross_guess_inverted="guessing yes"
9027  fi
9028          LIBC_FATAL_STDERR_=1
9029  export LIBC_FATAL_STDERR_
9030
9031
9032
9033  GNULIB_SOCKET=0;
9034  GNULIB_CONNECT=0;
9035  GNULIB_ACCEPT=0;
9036  GNULIB_BIND=0;
9037  GNULIB_GETPEERNAME=0;
9038  GNULIB_GETSOCKNAME=0;
9039  GNULIB_GETSOCKOPT=0;
9040  GNULIB_LISTEN=0;
9041  GNULIB_RECV=0;
9042  GNULIB_SEND=0;
9043  GNULIB_RECVFROM=0;
9044  GNULIB_SENDTO=0;
9045  GNULIB_SETSOCKOPT=0;
9046  GNULIB_SHUTDOWN=0;
9047  GNULIB_ACCEPT4=0;
9048  HAVE_STRUCT_SOCKADDR_STORAGE=1;
9049  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
9050
9051  HAVE_SA_FAMILY_T=1;
9052  HAVE_ACCEPT4=1;
9053
9054
9055
9056   if test $ac_cv_header_sys_socket_h = no; then
9057                         ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
9058if test "x$ac_cv_header_ws2tcpip_h" = xyes
9059then :
9060  printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
9061
9062fi
9063
9064   fi
9065
9066
9067
9068  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9069printf %s "checking whether the preprocessor supports include_next... " >&6; }
9070if test ${gl_cv_have_include_next+y}
9071then :
9072  printf %s "(cached) " >&6
9073else $as_nop
9074  rm -rf conftestd1a conftestd1b conftestd2
9075     mkdir conftestd1a conftestd1b conftestd2
9076                                                  cat <<EOF > conftestd1a/conftest.h
9077#define DEFINED_IN_CONFTESTD1
9078#include_next <conftest.h>
9079#ifdef DEFINED_IN_CONFTESTD2
9080int foo;
9081#else
9082#error "include_next doesn't work"
9083#endif
9084EOF
9085     cat <<EOF > conftestd1b/conftest.h
9086#define DEFINED_IN_CONFTESTD1
9087#include <stdio.h>
9088#include_next <conftest.h>
9089#ifdef DEFINED_IN_CONFTESTD2
9090int foo;
9091#else
9092#error "include_next doesn't work"
9093#endif
9094EOF
9095     cat <<EOF > conftestd2/conftest.h
9096#ifndef DEFINED_IN_CONFTESTD1
9097#error "include_next test doesn't work"
9098#endif
9099#define DEFINED_IN_CONFTESTD2
9100EOF
9101     gl_save_CPPFLAGS="$CPPFLAGS"
9102     CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9103     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9104/* end confdefs.h.  */
9105#include <conftest.h>
9106_ACEOF
9107if ac_fn_c_try_compile "$LINENO"
9108then :
9109  gl_cv_have_include_next=yes
9110else $as_nop
9111  CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9112        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9113/* end confdefs.h.  */
9114#include <conftest.h>
9115_ACEOF
9116if ac_fn_c_try_compile "$LINENO"
9117then :
9118  gl_cv_have_include_next=buggy
9119else $as_nop
9120  gl_cv_have_include_next=no
9121fi
9122rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9123
9124fi
9125rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9126     CPPFLAGS="$gl_save_CPPFLAGS"
9127     rm -rf conftestd1a conftestd1b conftestd2
9128
9129fi
9130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9131printf "%s\n" "$gl_cv_have_include_next" >&6; }
9132  PRAGMA_SYSTEM_HEADER=
9133  if test $gl_cv_have_include_next = yes; then
9134    INCLUDE_NEXT=include_next
9135    INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9136    if test -n "$GCC"; then
9137      PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9138    fi
9139  else
9140    if test $gl_cv_have_include_next = buggy; then
9141      INCLUDE_NEXT=include
9142      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9143    else
9144      INCLUDE_NEXT=include
9145      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9146    fi
9147  fi
9148
9149
9150
9151
9152      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
9153printf %s "checking whether source code line length is unlimited... " >&6; }
9154if test ${gl_cv_source_line_length_unlimited+y}
9155then :
9156  printf %s "(cached) " >&6
9157else $as_nop
9158  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9159/* end confdefs.h.  */
9160
9161#ifdef __TANDEM
9162choke me
9163#endif
9164
9165_ACEOF
9166if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9167  $EGREP "choke me" >/dev/null 2>&1
9168then :
9169  gl_cv_source_line_length_unlimited=no
9170else $as_nop
9171  gl_cv_source_line_length_unlimited=yes
9172fi
9173rm -rf conftest*
9174
9175
9176fi
9177{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
9178printf "%s\n" "$gl_cv_source_line_length_unlimited" >&6; }
9179  if test $gl_cv_source_line_length_unlimited = no; then
9180    PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9181  else
9182    PRAGMA_COLUMNS=
9183  fi
9184
9185
9186
9187  GNULIB_ACCESS=0;
9188  GNULIB_CHDIR=0;
9189  GNULIB_CHOWN=0;
9190  GNULIB_CLOSE=0;
9191  GNULIB_COPY_FILE_RANGE=0;
9192  GNULIB_DUP=0;
9193  GNULIB_DUP2=0;
9194  GNULIB_DUP3=0;
9195  GNULIB_ENVIRON=0;
9196  GNULIB_EUIDACCESS=0;
9197  GNULIB_EXECL=0;
9198  GNULIB_EXECLE=0;
9199  GNULIB_EXECLP=0;
9200  GNULIB_EXECV=0;
9201  GNULIB_EXECVE=0;
9202  GNULIB_EXECVP=0;
9203  GNULIB_EXECVPE=0;
9204  GNULIB_FACCESSAT=0;
9205  GNULIB_FCHDIR=0;
9206  GNULIB_FCHOWNAT=0;
9207  GNULIB_FDATASYNC=0;
9208  GNULIB_FSYNC=0;
9209  GNULIB_FTRUNCATE=0;
9210  GNULIB_GETCWD=0;
9211  GNULIB_GETDOMAINNAME=0;
9212  GNULIB_GETDTABLESIZE=0;
9213  GNULIB_GETENTROPY=0;
9214  GNULIB_GETGROUPS=0;
9215  GNULIB_GETHOSTNAME=0;
9216  GNULIB_GETLOGIN=0;
9217  GNULIB_GETLOGIN_R=0;
9218  GNULIB_GETOPT_POSIX=0;
9219  GNULIB_GETPAGESIZE=0;
9220  GNULIB_GETPASS=0;
9221  GNULIB_GETUSERSHELL=0;
9222  GNULIB_GROUP_MEMBER=0;
9223  GNULIB_ISATTY=0;
9224  GNULIB_LCHOWN=0;
9225  GNULIB_LINK=0;
9226  GNULIB_LINKAT=0;
9227  GNULIB_LSEEK=0;
9228  GNULIB_PIPE=0;
9229  GNULIB_PIPE2=0;
9230  GNULIB_PREAD=0;
9231  GNULIB_PWRITE=0;
9232  GNULIB_READ=0;
9233  GNULIB_READLINK=0;
9234  GNULIB_READLINKAT=0;
9235  GNULIB_RMDIR=0;
9236  GNULIB_SETHOSTNAME=0;
9237  GNULIB_SLEEP=0;
9238  GNULIB_SYMLINK=0;
9239  GNULIB_SYMLINKAT=0;
9240  GNULIB_TRUNCATE=0;
9241  GNULIB_TTYNAME_R=0;
9242  GNULIB_UNISTD_H_NONBLOCKING=0;
9243  GNULIB_UNISTD_H_SIGPIPE=0;
9244  GNULIB_UNLINK=0;
9245  GNULIB_UNLINKAT=0;
9246  GNULIB_USLEEP=0;
9247  GNULIB_WRITE=0;
9248    GNULIB_MDA_ACCESS=1;
9249  GNULIB_MDA_CHDIR=1;
9250  GNULIB_MDA_CLOSE=1;
9251  GNULIB_MDA_DUP=1;
9252  GNULIB_MDA_DUP2=1;
9253  GNULIB_MDA_EXECL=1;
9254  GNULIB_MDA_EXECLE=1;
9255  GNULIB_MDA_EXECLP=1;
9256  GNULIB_MDA_EXECV=1;
9257  GNULIB_MDA_EXECVE=1;
9258  GNULIB_MDA_EXECVP=1;
9259  GNULIB_MDA_EXECVPE=1;
9260  GNULIB_MDA_GETCWD=1;
9261  GNULIB_MDA_GETPID=1;
9262  GNULIB_MDA_ISATTY=1;
9263  GNULIB_MDA_LSEEK=1;
9264  GNULIB_MDA_READ=1;
9265  GNULIB_MDA_RMDIR=1;
9266  GNULIB_MDA_SWAB=1;
9267  GNULIB_MDA_UNLINK=1;
9268  GNULIB_MDA_WRITE=1;
9269    HAVE_CHOWN=1;
9270  HAVE_COPY_FILE_RANGE=1;
9271  HAVE_DUP3=1;
9272  HAVE_EUIDACCESS=1;
9273  HAVE_EXECVPE=1;
9274  HAVE_FACCESSAT=1;
9275  HAVE_FCHDIR=1;
9276  HAVE_FCHOWNAT=1;
9277  HAVE_FDATASYNC=1;
9278  HAVE_FSYNC=1;
9279  HAVE_FTRUNCATE=1;
9280  HAVE_GETDTABLESIZE=1;
9281  HAVE_GETENTROPY=1;
9282  HAVE_GETGROUPS=1;
9283  HAVE_GETHOSTNAME=1;
9284  HAVE_GETLOGIN=1;
9285  HAVE_GETPAGESIZE=1;
9286  HAVE_GETPASS=1;
9287  HAVE_GROUP_MEMBER=1;
9288  HAVE_LCHOWN=1;
9289  HAVE_LINK=1;
9290  HAVE_LINKAT=1;
9291  HAVE_PIPE=1;
9292  HAVE_PIPE2=1;
9293  HAVE_PREAD=1;
9294  HAVE_PWRITE=1;
9295  HAVE_READLINK=1;
9296  HAVE_READLINKAT=1;
9297  HAVE_SETHOSTNAME=1;
9298  HAVE_SLEEP=1;
9299  HAVE_SYMLINK=1;
9300  HAVE_SYMLINKAT=1;
9301  HAVE_UNLINKAT=1;
9302  HAVE_USLEEP=1;
9303  HAVE_DECL_ENVIRON=1;
9304  HAVE_DECL_EXECVPE=1;
9305  HAVE_DECL_FCHDIR=1;
9306  HAVE_DECL_FDATASYNC=1;
9307  HAVE_DECL_GETDOMAINNAME=1;
9308  HAVE_DECL_GETLOGIN=1;
9309  HAVE_DECL_GETLOGIN_R=1;
9310  HAVE_DECL_GETPAGESIZE=1;
9311  HAVE_DECL_GETUSERSHELL=1;
9312  HAVE_DECL_SETHOSTNAME=1;
9313  HAVE_DECL_TRUNCATE=1;
9314  HAVE_DECL_TTYNAME_R=1;
9315  HAVE_OS_H=0;
9316  HAVE_SYS_PARAM_H=0;
9317  REPLACE_ACCESS=0;
9318  REPLACE_CHOWN=0;
9319  REPLACE_CLOSE=0;
9320  REPLACE_DUP=0;
9321  REPLACE_DUP2=0;
9322  REPLACE_EXECL=0;
9323  REPLACE_EXECLE=0;
9324  REPLACE_EXECLP=0;
9325  REPLACE_EXECV=0;
9326  REPLACE_EXECVE=0;
9327  REPLACE_EXECVP=0;
9328  REPLACE_EXECVPE=0;
9329  REPLACE_FACCESSAT=0;
9330  REPLACE_FCHOWNAT=0;
9331  REPLACE_FTRUNCATE=0;
9332  REPLACE_GETCWD=0;
9333  REPLACE_GETDOMAINNAME=0;
9334  REPLACE_GETDTABLESIZE=0;
9335  REPLACE_GETLOGIN_R=0;
9336  REPLACE_GETGROUPS=0;
9337  REPLACE_GETPAGESIZE=0;
9338  REPLACE_GETPASS=0;
9339  REPLACE_ISATTY=0;
9340  REPLACE_LCHOWN=0;
9341  REPLACE_LINK=0;
9342  REPLACE_LINKAT=0;
9343  REPLACE_LSEEK=0;
9344  REPLACE_PREAD=0;
9345  REPLACE_PWRITE=0;
9346  REPLACE_READ=0;
9347  REPLACE_READLINK=0;
9348  REPLACE_READLINKAT=0;
9349  REPLACE_RMDIR=0;
9350  REPLACE_SLEEP=0;
9351  REPLACE_SYMLINK=0;
9352  REPLACE_SYMLINKAT=0;
9353  REPLACE_TRUNCATE=0;
9354  REPLACE_TTYNAME_R=0;
9355  REPLACE_UNLINK=0;
9356  REPLACE_UNLINKAT=0;
9357  REPLACE_USLEEP=0;
9358  REPLACE_WRITE=0;
9359  UNISTD_H_HAVE_SYS_RANDOM_H=0;
9360  UNISTD_H_HAVE_WINSOCK2_H=0;
9361  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9362
9363
9364
9365  GNULIB_IOCTL=0;
9366    SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
9367  SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9368
9369  REPLACE_IOCTL=0;
9370
9371{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
9372printf %s "checking for C/C++ restrict keyword... " >&6; }
9373if test ${ac_cv_c_restrict+y}
9374then :
9375  printf %s "(cached) " >&6
9376else $as_nop
9377  ac_cv_c_restrict=no
9378   # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
9379   # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
9380   # Put 'restrict' last, because C++ lacks it.
9381   for ac_kw in __restrict__ __restrict _Restrict restrict; do
9382     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9383/* end confdefs.h.  */
9384typedef int *int_ptr;
9385	   int foo (int_ptr $ac_kw ip) { return ip[0]; }
9386	   int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
9387	   int bar (int ip[$ac_kw]) { return ip[0]; }
9388
9389int
9390main (void)
9391{
9392int s[1];
9393	   int *$ac_kw t = s;
9394	   t[0] = 0;
9395	   return foo (t) + bar (t);
9396
9397  ;
9398  return 0;
9399}
9400_ACEOF
9401if ac_fn_c_try_compile "$LINENO"
9402then :
9403  ac_cv_c_restrict=$ac_kw
9404fi
9405rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9406     test "$ac_cv_c_restrict" != no && break
9407   done
9408
9409fi
9410{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
9411printf "%s\n" "$ac_cv_c_restrict" >&6; }
9412
9413 case $ac_cv_c_restrict in
9414   restrict) ;;
9415   no) printf "%s\n" "#define restrict /**/" >>confdefs.h
9416 ;;
9417   *)  printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
9418 ;;
9419 esac
9420
9421
9422
9423
9424
9425        case "$host_os" in
9426    osf*)
9427
9428printf "%s\n" "#define _POSIX_PII_SOCKET 1" >>confdefs.h
9429
9430      ;;
9431  esac
9432
9433  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
9434printf %s "checking whether <sys/socket.h> is self-contained... " >&6; }
9435if test ${gl_cv_header_sys_socket_h_selfcontained+y}
9436then :
9437  printf %s "(cached) " >&6
9438else $as_nop
9439
9440      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9441/* end confdefs.h.  */
9442#include <sys/socket.h>
9443int
9444main (void)
9445{
9446
9447  ;
9448  return 0;
9449}
9450_ACEOF
9451if ac_fn_c_try_compile "$LINENO"
9452then :
9453  gl_cv_header_sys_socket_h_selfcontained=yes
9454else $as_nop
9455  gl_cv_header_sys_socket_h_selfcontained=no
9456fi
9457rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9458
9459fi
9460{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
9461printf "%s\n" "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
9462  if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
9463            ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
9464if test "x$ac_cv_func_shutdown" = xyes
9465then :
9466  printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h
9467
9468fi
9469
9470    if test $ac_cv_func_shutdown = yes; then
9471      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
9472printf %s "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
9473if test ${gl_cv_header_sys_socket_h_shut+y}
9474then :
9475  printf %s "(cached) " >&6
9476else $as_nop
9477
9478          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9479/* end confdefs.h.  */
9480#include <sys/socket.h>
9481int
9482main (void)
9483{
9484int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
9485  ;
9486  return 0;
9487}
9488_ACEOF
9489if ac_fn_c_try_compile "$LINENO"
9490then :
9491  gl_cv_header_sys_socket_h_shut=yes
9492else $as_nop
9493  gl_cv_header_sys_socket_h_shut=no
9494fi
9495rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9496
9497fi
9498{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
9499printf "%s\n" "$gl_cv_header_sys_socket_h_shut" >&6; }
9500      if test $gl_cv_header_sys_socket_h_shut = no; then
9501        SYS_SOCKET_H='sys/socket.h'
9502      fi
9503    fi
9504  fi
9505  # We need to check for ws2tcpip.h now.
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517     if test $gl_cv_have_include_next = yes; then
9518       gl_cv_next_sys_socket_h='<'sys/socket.h'>'
9519     else
9520       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
9521printf %s "checking absolute name of <sys/socket.h>... " >&6; }
9522if test ${gl_cv_next_sys_socket_h+y}
9523then :
9524  printf %s "(cached) " >&6
9525else $as_nop
9526
9527             if test $ac_cv_header_sys_socket_h = yes; then
9528
9529
9530
9531
9532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9533/* end confdefs.h.  */
9534#include <sys/socket.h>
9535_ACEOF
9536                case "$host_os" in
9537    aix*) gl_absname_cpp="$ac_cpp -C" ;;
9538    *)    gl_absname_cpp="$ac_cpp" ;;
9539  esac
9540
9541  case "$host_os" in
9542    mingw*)
9543                                          gl_dirsep_regex='[/\\]'
9544      ;;
9545    *)
9546      gl_dirsep_regex='\/'
9547      ;;
9548  esac
9549      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9550  gl_header_literal_regex=`echo 'sys/socket.h' \
9551                           | sed -e "$gl_make_literal_regex_sed"`
9552  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9553      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9554      s|^/[^/]|//&|
9555      p
9556      q
9557    }'
9558
9559        gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9560  sed -n "$gl_absolute_header_sed"`
9561
9562           gl_header=$gl_cv_absolute_sys_socket_h
9563           gl_cv_next_sys_socket_h='"'$gl_header'"'
9564          else
9565               gl_cv_next_sys_socket_h='<'sys/socket.h'>'
9566             fi
9567
9568
9569fi
9570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
9571printf "%s\n" "$gl_cv_next_sys_socket_h" >&6; }
9572     fi
9573     NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
9574
9575     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9576       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9577       gl_next_as_first_directive='<'sys/socket.h'>'
9578     else
9579       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9580       gl_next_as_first_directive=$gl_cv_next_sys_socket_h
9581     fi
9582     NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
9583
9584
9585
9586
9587  if test $ac_cv_header_sys_socket_h = yes; then
9588    HAVE_SYS_SOCKET_H=1
9589  else
9590    HAVE_SYS_SOCKET_H=0
9591  fi
9592
9593
9594
9595  if test $ac_cv_header_sys_socket_h = yes; then
9596    HAVE_WS2TCPIP_H=0
9597  else
9598    if test $ac_cv_header_ws2tcpip_h = yes; then
9599      HAVE_WS2TCPIP_H=1
9600    else
9601      HAVE_WS2TCPIP_H=0
9602    fi
9603  fi
9604
9605
9606
9607  ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
9608  /* sys/types.h is not needed according to POSIX, but the
9609     sys/socket.h in i386-unknown-freebsd4.10 and
9610     powerpc-apple-darwin5.5 required it. */
9611#include <sys/types.h>
9612#ifdef HAVE_SYS_SOCKET_H
9613#include <sys/socket.h>
9614#endif
9615#ifdef HAVE_WS2TCPIP_H
9616#include <ws2tcpip.h>
9617#endif
9618
9619"
9620if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
9621then :
9622
9623printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
9624
9625
9626fi
9627ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
9628  /* sys/types.h is not needed according to POSIX, but the
9629     sys/socket.h in i386-unknown-freebsd4.10 and
9630     powerpc-apple-darwin5.5 required it. */
9631#include <sys/types.h>
9632#ifdef HAVE_SYS_SOCKET_H
9633#include <sys/socket.h>
9634#endif
9635#ifdef HAVE_WS2TCPIP_H
9636#include <ws2tcpip.h>
9637#endif
9638
9639"
9640if test "x$ac_cv_type_sa_family_t" = xyes
9641then :
9642
9643printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
9644
9645
9646fi
9647
9648  if test $ac_cv_type_struct_sockaddr_storage = no; then
9649    HAVE_STRUCT_SOCKADDR_STORAGE=0
9650  fi
9651  if test $ac_cv_type_sa_family_t = no; then
9652    HAVE_SA_FAMILY_T=0
9653  fi
9654  if test $ac_cv_type_struct_sockaddr_storage != no; then
9655    ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
9656       #ifdef HAVE_SYS_SOCKET_H
9657       #include <sys/socket.h>
9658       #endif
9659       #ifdef HAVE_WS2TCPIP_H
9660       #include <ws2tcpip.h>
9661       #endif
9662
9663"
9664if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
9665then :
9666
9667printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
9668
9669
9670else $as_nop
9671  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
9672fi
9673
9674  fi
9675  if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
9676     || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
9677    SYS_SOCKET_H='sys/socket.h'
9678  fi
9679
9680
9681
9682
9683  if test $ac_cv_header_sys_socket_h != yes; then
9684                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
9685if test "x$ac_cv_header_winsock2_h" = xyes
9686then :
9687  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
9688
9689fi
9690
9691  fi
9692  if test "$ac_cv_header_winsock2_h" = yes; then
9693    HAVE_WINSOCK2_H=1
9694    UNISTD_H_HAVE_WINSOCK2_H=1
9695    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9696  else
9697    HAVE_WINSOCK2_H=0
9698  fi
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
9709if test "x$ac_cv_type_size_t" = xyes
9710then :
9711
9712else $as_nop
9713
9714printf "%s\n" "#define size_t unsigned int" >>confdefs.h
9715
9716fi
9717
9718# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9719# for constant arguments.  Useless!
9720{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
9721printf %s "checking for working alloca.h... " >&6; }
9722if test ${ac_cv_working_alloca_h+y}
9723then :
9724  printf %s "(cached) " >&6
9725else $as_nop
9726  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9727/* end confdefs.h.  */
9728#include <alloca.h>
9729int
9730main (void)
9731{
9732char *p = (char *) alloca (2 * sizeof (int));
9733			  if (p) return 0;
9734  ;
9735  return 0;
9736}
9737_ACEOF
9738if ac_fn_c_try_link "$LINENO"
9739then :
9740  ac_cv_working_alloca_h=yes
9741else $as_nop
9742  ac_cv_working_alloca_h=no
9743fi
9744rm -f core conftest.err conftest.$ac_objext conftest.beam \
9745    conftest$ac_exeext conftest.$ac_ext
9746fi
9747{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
9748printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
9749if test $ac_cv_working_alloca_h = yes; then
9750
9751printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
9752
9753fi
9754
9755{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
9756printf %s "checking for alloca... " >&6; }
9757if test ${ac_cv_func_alloca_works+y}
9758then :
9759  printf %s "(cached) " >&6
9760else $as_nop
9761  if test $ac_cv_working_alloca_h = yes; then
9762  ac_cv_func_alloca_works=yes
9763else
9764  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9765/* end confdefs.h.  */
9766#include <stdlib.h>
9767#include <stddef.h>
9768#ifndef alloca
9769# ifdef __GNUC__
9770#  define alloca __builtin_alloca
9771# elif defined _MSC_VER
9772#  include <malloc.h>
9773#  define alloca _alloca
9774# else
9775#  ifdef  __cplusplus
9776extern "C"
9777#  endif
9778void *alloca (size_t);
9779# endif
9780#endif
9781
9782int
9783main (void)
9784{
9785char *p = (char *) alloca (1);
9786				    if (p) return 0;
9787  ;
9788  return 0;
9789}
9790_ACEOF
9791if ac_fn_c_try_link "$LINENO"
9792then :
9793  ac_cv_func_alloca_works=yes
9794else $as_nop
9795  ac_cv_func_alloca_works=no
9796fi
9797rm -f core conftest.err conftest.$ac_objext conftest.beam \
9798    conftest$ac_exeext conftest.$ac_ext
9799fi
9800{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
9801printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
9802fi
9803
9804if test $ac_cv_func_alloca_works = yes; then
9805
9806printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
9807
9808else
9809  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9810# that cause trouble.  Some versions do not even contain alloca or
9811# contain a buggy version.  If you still want to use their alloca,
9812# use ar to extract alloca.o from them instead of compiling alloca.c.
9813
9814
9815
9816
9817
9818ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
9819
9820printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
9821
9822
9823{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
9824printf %s "checking stack direction for C alloca... " >&6; }
9825if test ${ac_cv_c_stack_direction+y}
9826then :
9827  printf %s "(cached) " >&6
9828else $as_nop
9829  if test "$cross_compiling" = yes
9830then :
9831  ac_cv_c_stack_direction=0
9832else $as_nop
9833  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9834/* end confdefs.h.  */
9835$ac_includes_default
9836int
9837find_stack_direction (int *addr, int depth)
9838{
9839  int dir, dummy = 0;
9840  if (! addr)
9841    addr = &dummy;
9842  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
9843  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
9844  return dir + dummy;
9845}
9846
9847int
9848main (int argc, char **argv)
9849{
9850  return find_stack_direction (0, argc + !argv + 20) < 0;
9851}
9852_ACEOF
9853if ac_fn_c_try_run "$LINENO"
9854then :
9855  ac_cv_c_stack_direction=1
9856else $as_nop
9857  ac_cv_c_stack_direction=-1
9858fi
9859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9860  conftest.$ac_objext conftest.beam conftest.$ac_ext
9861fi
9862
9863fi
9864{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
9865printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
9866printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
9867
9868
9869fi
9870
9871
9872  GNULIB_INET_NTOP=0;
9873  GNULIB_INET_PTON=0;
9874    HAVE_DECL_INET_NTOP=1;
9875  HAVE_DECL_INET_PTON=1;
9876  REPLACE_INET_NTOP=0;
9877  REPLACE_INET_PTON=0;
9878
9879
9880
9881
9882
9883  if test $ac_cv_header_features_h = yes; then
9884    HAVE_FEATURES_H=1
9885  else
9886    HAVE_FEATURES_H=0
9887  fi
9888
9889
9890
9891  GNULIB__EXIT=0;
9892  GNULIB_ALIGNED_ALLOC=0;
9893  GNULIB_ATOLL=0;
9894  GNULIB_CALLOC_POSIX=0;
9895  GNULIB_CANONICALIZE_FILE_NAME=0;
9896  GNULIB_FREE_POSIX=0;
9897  GNULIB_GETLOADAVG=0;
9898  GNULIB_GETSUBOPT=0;
9899  GNULIB_GRANTPT=0;
9900  GNULIB_MALLOC_POSIX=0;
9901  GNULIB_MBTOWC=0;
9902  GNULIB_MKDTEMP=0;
9903  GNULIB_MKOSTEMP=0;
9904  GNULIB_MKOSTEMPS=0;
9905  GNULIB_MKSTEMP=0;
9906  GNULIB_MKSTEMPS=0;
9907  GNULIB_POSIX_MEMALIGN=0;
9908  GNULIB_POSIX_OPENPT=0;
9909  GNULIB_PTSNAME=0;
9910  GNULIB_PTSNAME_R=0;
9911  GNULIB_PUTENV=0;
9912  GNULIB_QSORT_R=0;
9913  GNULIB_RANDOM=0;
9914  GNULIB_RANDOM_R=0;
9915  GNULIB_REALLOCARRAY=0;
9916  GNULIB_REALLOC_POSIX=0;
9917  GNULIB_REALPATH=0;
9918  GNULIB_RPMATCH=0;
9919  GNULIB_SECURE_GETENV=0;
9920  GNULIB_SETENV=0;
9921  GNULIB_STRTOD=0;
9922  GNULIB_STRTOLD=0;
9923  GNULIB_STRTOLL=0;
9924  GNULIB_STRTOULL=0;
9925  GNULIB_SYSTEM_POSIX=0;
9926  GNULIB_UNLOCKPT=0;
9927  GNULIB_UNSETENV=0;
9928  GNULIB_WCTOMB=0;
9929    GNULIB_MDA_ECVT=1;
9930  GNULIB_MDA_FCVT=1;
9931  GNULIB_MDA_GCVT=1;
9932  GNULIB_MDA_MKTEMP=1;
9933  GNULIB_MDA_PUTENV=1;
9934    HAVE__EXIT=1;
9935  HAVE_ALIGNED_ALLOC=1;
9936  HAVE_ATOLL=1;
9937  HAVE_CANONICALIZE_FILE_NAME=1;
9938  HAVE_DECL_ECVT=1;
9939  HAVE_DECL_FCVT=1;
9940  HAVE_DECL_GCVT=1;
9941  HAVE_DECL_GETLOADAVG=1;
9942  HAVE_GETSUBOPT=1;
9943  HAVE_GRANTPT=1;
9944  HAVE_INITSTATE=1;
9945  HAVE_DECL_INITSTATE=1;
9946  HAVE_MBTOWC=1;
9947  HAVE_MKDTEMP=1;
9948  HAVE_MKOSTEMP=1;
9949  HAVE_MKOSTEMPS=1;
9950  HAVE_MKSTEMP=1;
9951  HAVE_MKSTEMPS=1;
9952  HAVE_POSIX_MEMALIGN=1;
9953  HAVE_POSIX_OPENPT=1;
9954  HAVE_PTSNAME=1;
9955  HAVE_PTSNAME_R=1;
9956  HAVE_QSORT_R=1;
9957  HAVE_RANDOM=1;
9958  HAVE_RANDOM_H=1;
9959  HAVE_RANDOM_R=1;
9960  HAVE_REALLOCARRAY=1;
9961  HAVE_REALPATH=1;
9962  HAVE_RPMATCH=1;
9963  HAVE_SECURE_GETENV=1;
9964  HAVE_SETENV=1;
9965  HAVE_DECL_SETENV=1;
9966  HAVE_SETSTATE=1;
9967  HAVE_DECL_SETSTATE=1;
9968  HAVE_STRTOD=1;
9969  HAVE_STRTOLD=1;
9970  HAVE_STRTOLL=1;
9971  HAVE_STRTOULL=1;
9972  HAVE_STRUCT_RANDOM_DATA=1;
9973  HAVE_SYS_LOADAVG_H=0;
9974  HAVE_UNLOCKPT=1;
9975  HAVE_DECL_UNSETENV=1;
9976  REPLACE_ALIGNED_ALLOC=0;
9977  REPLACE_CALLOC=0;
9978  REPLACE_CANONICALIZE_FILE_NAME=0;
9979  REPLACE_FREE=0;
9980  REPLACE_INITSTATE=0;
9981  REPLACE_MALLOC=0;
9982  REPLACE_MBTOWC=0;
9983  REPLACE_MKSTEMP=0;
9984  REPLACE_POSIX_MEMALIGN=0;
9985  REPLACE_PTSNAME=0;
9986  REPLACE_PTSNAME_R=0;
9987  REPLACE_PUTENV=0;
9988  REPLACE_QSORT_R=0;
9989  REPLACE_RANDOM=0;
9990  REPLACE_RANDOM_R=0;
9991  REPLACE_REALLOC=0;
9992  REPLACE_REALPATH=0;
9993  REPLACE_SETENV=0;
9994  REPLACE_SETSTATE=0;
9995  REPLACE_STRTOD=0;
9996  REPLACE_STRTOLD=0;
9997  REPLACE_UNSETENV=0;
9998  REPLACE_WCTOMB=0;
9999
10000
10001  GNULIB_BTOWC=0;
10002  GNULIB_WCTOB=0;
10003  GNULIB_MBSINIT=0;
10004  GNULIB_MBRTOWC=0;
10005  GNULIB_MBRLEN=0;
10006  GNULIB_MBSRTOWCS=0;
10007  GNULIB_MBSNRTOWCS=0;
10008  GNULIB_WCRTOMB=0;
10009  GNULIB_WCSRTOMBS=0;
10010  GNULIB_WCSNRTOMBS=0;
10011  GNULIB_WCWIDTH=0;
10012  GNULIB_WMEMCHR=0;
10013  GNULIB_WMEMCMP=0;
10014  GNULIB_WMEMCPY=0;
10015  GNULIB_WMEMMOVE=0;
10016  GNULIB_WMEMPCPY=0;
10017  GNULIB_WMEMSET=0;
10018  GNULIB_WCSLEN=0;
10019  GNULIB_WCSNLEN=0;
10020  GNULIB_WCSCPY=0;
10021  GNULIB_WCPCPY=0;
10022  GNULIB_WCSNCPY=0;
10023  GNULIB_WCPNCPY=0;
10024  GNULIB_WCSCAT=0;
10025  GNULIB_WCSNCAT=0;
10026  GNULIB_WCSCMP=0;
10027  GNULIB_WCSNCMP=0;
10028  GNULIB_WCSCASECMP=0;
10029  GNULIB_WCSNCASECMP=0;
10030  GNULIB_WCSCOLL=0;
10031  GNULIB_WCSXFRM=0;
10032  GNULIB_WCSDUP=0;
10033  GNULIB_WCSCHR=0;
10034  GNULIB_WCSRCHR=0;
10035  GNULIB_WCSCSPN=0;
10036  GNULIB_WCSSPN=0;
10037  GNULIB_WCSPBRK=0;
10038  GNULIB_WCSSTR=0;
10039  GNULIB_WCSTOK=0;
10040  GNULIB_WCSWIDTH=0;
10041  GNULIB_WCSFTIME=0;
10042    GNULIB_MDA_WCSDUP=1;
10043    HAVE_BTOWC=1;
10044  HAVE_MBSINIT=1;
10045  HAVE_MBRTOWC=1;
10046  HAVE_MBRLEN=1;
10047  HAVE_MBSRTOWCS=1;
10048  HAVE_MBSNRTOWCS=1;
10049  HAVE_WCRTOMB=1;
10050  HAVE_WCSRTOMBS=1;
10051  HAVE_WCSNRTOMBS=1;
10052  HAVE_WMEMCHR=1;
10053  HAVE_WMEMCMP=1;
10054  HAVE_WMEMCPY=1;
10055  HAVE_WMEMMOVE=1;
10056  HAVE_WMEMPCPY=1;
10057  HAVE_WMEMSET=1;
10058  HAVE_WCSLEN=1;
10059  HAVE_WCSNLEN=1;
10060  HAVE_WCSCPY=1;
10061  HAVE_WCPCPY=1;
10062  HAVE_WCSNCPY=1;
10063  HAVE_WCPNCPY=1;
10064  HAVE_WCSCAT=1;
10065  HAVE_WCSNCAT=1;
10066  HAVE_WCSCMP=1;
10067  HAVE_WCSNCMP=1;
10068  HAVE_WCSCASECMP=1;
10069  HAVE_WCSNCASECMP=1;
10070  HAVE_WCSCOLL=1;
10071  HAVE_WCSXFRM=1;
10072  HAVE_WCSDUP=1;
10073  HAVE_WCSCHR=1;
10074  HAVE_WCSRCHR=1;
10075  HAVE_WCSCSPN=1;
10076  HAVE_WCSSPN=1;
10077  HAVE_WCSPBRK=1;
10078  HAVE_WCSSTR=1;
10079  HAVE_WCSTOK=1;
10080  HAVE_WCSWIDTH=1;
10081  HAVE_WCSFTIME=1;
10082  HAVE_DECL_WCTOB=1;
10083  HAVE_DECL_WCSDUP=1;
10084  HAVE_DECL_WCWIDTH=1;
10085  REPLACE_MBSTATE_T=0;
10086  REPLACE_BTOWC=0;
10087  REPLACE_WCTOB=0;
10088  REPLACE_MBSINIT=0;
10089  REPLACE_MBRTOWC=0;
10090  REPLACE_MBRLEN=0;
10091  REPLACE_MBSRTOWCS=0;
10092  REPLACE_MBSNRTOWCS=0;
10093  REPLACE_WCRTOMB=0;
10094  REPLACE_WCSRTOMBS=0;
10095  REPLACE_WCSNRTOMBS=0;
10096  REPLACE_WCWIDTH=0;
10097  REPLACE_WCSWIDTH=0;
10098  REPLACE_WCSFTIME=0;
10099  REPLACE_WCSTOK=0;
10100
10101
10102
10103  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
10104printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
10105if test ${gl_cv_header_wchar_h_correct_inline+y}
10106then :
10107  printf %s "(cached) " >&6
10108else $as_nop
10109  gl_cv_header_wchar_h_correct_inline=yes
10110     case "$host_os" in
10111       *-gnu* | gnu*)
10112         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10113/* end confdefs.h.  */
10114
10115
10116             #define wcstod renamed_wcstod
10117             #include <wchar.h>
10118             extern int zero (void);
10119             int main () { return zero(); }
10120
10121_ACEOF
10122                                                      save_ac_compile="$ac_compile"
10123         ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
10124         if echo '#include "conftest.c"' >conftest1.c \
10125            && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10126  (eval $ac_compile) 2>&5
10127  ac_status=$?
10128  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10129  test $ac_status = 0; }; then
10130           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10131/* end confdefs.h.  */
10132
10133
10134               #define wcstod renamed_wcstod
10135               #include <wchar.h>
10136               int zero (void) { return 0; }
10137
10138_ACEOF
10139                      ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
10140           if echo '#include "conftest.c"' >conftest2.c \
10141              && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10142  (eval $ac_compile) 2>&5
10143  ac_status=$?
10144  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10145  test $ac_status = 0; }; then
10146             if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
10147               :
10148             else
10149               gl_cv_header_wchar_h_correct_inline=no
10150             fi
10151           fi
10152         fi
10153         ac_compile="$save_ac_compile"
10154         rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
10155         ;;
10156     esac
10157
10158fi
10159{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
10160printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
10161  if test $gl_cv_header_wchar_h_correct_inline = no; then
10162    as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
10163This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
10164C99 mode. You have four options:
10165  - Add the flag -fgnu89-inline to CC and reconfigure, or
10166  - Fix your include files, using parts of
10167    <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
10168  - Use a gcc version older than 4.3, or
10169  - Don't use the flags -std=c99 or -std=gnu99.
10170Configuration aborted." "$LINENO" 5
10171  fi
10172
10173ac_func=
10174for ac_item in $ac_func_c_list
10175do
10176  if test $ac_func; then
10177    ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
10178    if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
10179      echo "#define $ac_item 1" >> confdefs.h
10180    fi
10181    ac_func=
10182  else
10183    ac_func=$ac_item
10184  fi
10185done
10186
10187  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10188printf %s "checking for nl_langinfo and CODESET... " >&6; }
10189if test ${am_cv_langinfo_codeset+y}
10190then :
10191  printf %s "(cached) " >&6
10192else $as_nop
10193  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10194/* end confdefs.h.  */
10195#include <langinfo.h>
10196int
10197main (void)
10198{
10199char* cs = nl_langinfo(CODESET); return !cs;
10200  ;
10201  return 0;
10202}
10203_ACEOF
10204if ac_fn_c_try_link "$LINENO"
10205then :
10206  am_cv_langinfo_codeset=yes
10207else $as_nop
10208  am_cv_langinfo_codeset=no
10209fi
10210rm -f core conftest.err conftest.$ac_objext conftest.beam \
10211    conftest$ac_exeext conftest.$ac_ext
10212
10213fi
10214{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10215printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
10216  if test $am_cv_langinfo_codeset = yes; then
10217
10218printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10219
10220  fi
10221
10222
10223
10224
10225  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
10226printf %s "checking for a traditional french locale... " >&6; }
10227if test ${gt_cv_locale_fr+y}
10228then :
10229  printf %s "(cached) " >&6
10230else $as_nop
10231
10232    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10233/* end confdefs.h.  */
10234
10235#include <locale.h>
10236#include <time.h>
10237#if HAVE_LANGINFO_CODESET
10238# include <langinfo.h>
10239#endif
10240#include <stdlib.h>
10241#include <string.h>
10242struct tm t;
10243char buf[16];
10244int main () {
10245  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
10246     imitates locale dependent behaviour by looking at the environment
10247     variables, and all locales use the UTF-8 encoding.  */
10248#if defined __BEOS__ || defined __HAIKU__
10249  return 1;
10250#else
10251  /* Check whether the given locale name is recognized by the system.  */
10252# if defined _WIN32 && !defined __CYGWIN__
10253  /* On native Windows, setlocale(category, "") looks at the system settings,
10254     not at the environment variables.  Also, when an encoding suffix such
10255     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
10256     category of the locale to "C".  */
10257  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
10258      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
10259    return 1;
10260# else
10261  if (setlocale (LC_ALL, "") == NULL) return 1;
10262# endif
10263  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10264     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10265     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10266     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10267     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10268     some unit tests fail.
10269     On MirBSD 10, when an unsupported locale is specified, setlocale()
10270     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
10271# if HAVE_LANGINFO_CODESET
10272  {
10273    const char *cs = nl_langinfo (CODESET);
10274    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
10275        || strcmp (cs, "UTF-8") == 0)
10276      return 1;
10277  }
10278# endif
10279# ifdef __CYGWIN__
10280  /* On Cygwin, avoid locale names without encoding suffix, because the
10281     locale_charset() function relies on the encoding suffix.  Note that
10282     LC_ALL is set on the command line.  */
10283  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10284# endif
10285  /* Check whether in the abbreviation of the second month, the second
10286     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
10287     one byte long. This excludes the UTF-8 encoding.  */
10288  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10289  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
10290# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
10291  /* Check whether the decimal separator is a comma.
10292     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
10293     are nl_langinfo(RADIXCHAR) are both ".".  */
10294  if (localeconv () ->decimal_point[0] != ',') return 1;
10295# endif
10296  return 0;
10297#endif
10298}
10299
10300_ACEOF
10301    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10302  (eval $ac_link) 2>&5
10303  ac_status=$?
10304  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10305  test $ac_status = 0; } && test -s conftest$ac_exeext; then
10306      case "$host_os" in
10307        # Handle native Windows specially, because there setlocale() interprets
10308        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
10309        # "fr" or "fra" as "French" or "French_France.1252",
10310        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
10311        # "ja" as "Japanese" or "Japanese_Japan.932",
10312        # and similar.
10313        mingw*)
10314          # Test for the native Windows locale name.
10315          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10316            gt_cv_locale_fr=French_France.1252
10317          else
10318            # None found.
10319            gt_cv_locale_fr=none
10320          fi
10321          ;;
10322        *)
10323          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10324          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
10325          # configure script would override the LC_ALL setting. Likewise for
10326          # LC_CTYPE, which is also set at the beginning of the configure script.
10327          # Test for the usual locale name.
10328          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10329            gt_cv_locale_fr=fr_FR
10330          else
10331            # Test for the locale name with explicit encoding suffix.
10332            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10333              gt_cv_locale_fr=fr_FR.ISO-8859-1
10334            else
10335              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
10336              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10337                gt_cv_locale_fr=fr_FR.ISO8859-1
10338              else
10339                # Test for the HP-UX locale name.
10340                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10341                  gt_cv_locale_fr=fr_FR.iso88591
10342                else
10343                  # Test for the Solaris 7 locale name.
10344                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10345                    gt_cv_locale_fr=fr
10346                  else
10347                    # None found.
10348                    gt_cv_locale_fr=none
10349                  fi
10350                fi
10351              fi
10352            fi
10353          fi
10354          ;;
10355      esac
10356    fi
10357    rm -fr conftest*
10358
10359fi
10360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
10361printf "%s\n" "$gt_cv_locale_fr" >&6; }
10362  LOCALE_FR=$gt_cv_locale_fr
10363
10364
10365
10366  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
10367printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
10368if test ${gl_cv_func_malloc_posix+y}
10369then :
10370  printf %s "(cached) " >&6
10371else $as_nop
10372
10373                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10374/* end confdefs.h.  */
10375
10376int
10377main (void)
10378{
10379#if defined _WIN32 && ! defined __CYGWIN__
10380             choke me
10381             #endif
10382
10383  ;
10384  return 0;
10385}
10386_ACEOF
10387if ac_fn_c_try_compile "$LINENO"
10388then :
10389  gl_cv_func_malloc_posix=yes
10390else $as_nop
10391  gl_cv_func_malloc_posix=no
10392fi
10393rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10394
10395fi
10396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
10397printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
10398
10399
10400         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
10401printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
10402if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
10403then :
10404  printf %s "(cached) " >&6
10405else $as_nop
10406  rm -f conftest.sym conftest.file
10407     echo >conftest.file
10408     if test "$cross_compiling" = yes
10409then :
10410  case "$host_os" in
10411          linux-* | linux)
10412            # Guess yes on Linux systems.
10413            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
10414          *-gnu* | gnu*)
10415            # Guess yes on glibc systems.
10416            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
10417          mingw*)
10418            # Guess no on native Windows.
10419            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
10420          *)
10421            # If we don't know, obey --enable-cross-guesses.
10422            gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
10423        esac
10424
10425else $as_nop
10426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10427/* end confdefs.h.  */
10428$ac_includes_default
10429int
10430main (void)
10431{
10432struct stat sbuf;
10433            if (symlink ("conftest.file", "conftest.sym") != 0)
10434              return 1;
10435            /* Linux will dereference the symlink and fail, as required by
10436               POSIX.  That is better in the sense that it means we will not
10437               have to compile and use the lstat wrapper.  */
10438            return lstat ("conftest.sym/", &sbuf) == 0;
10439
10440  ;
10441  return 0;
10442}
10443_ACEOF
10444if ac_fn_c_try_run "$LINENO"
10445then :
10446  gl_cv_func_lstat_dereferences_slashed_symlink=yes
10447else $as_nop
10448  gl_cv_func_lstat_dereferences_slashed_symlink=no
10449fi
10450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10451  conftest.$ac_objext conftest.beam conftest.$ac_ext
10452fi
10453
10454     rm -f conftest.sym conftest.file
10455
10456fi
10457{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
10458printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
10459  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
10460    *yes)
10461
10462printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
10463
10464      ;;
10465  esac
10466
10467
10468
10469
10470
10471  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
10472printf %s "checking whether // is distinct from /... " >&6; }
10473if test ${gl_cv_double_slash_root+y}
10474then :
10475  printf %s "(cached) " >&6
10476else $as_nop
10477   if test x"$cross_compiling" = xyes ; then
10478        # When cross-compiling, there is no way to tell whether // is special
10479        # short of a list of hosts.  However, the only known hosts to date
10480        # that have a distinct // are Apollo DomainOS (too old to port to),
10481        # Cygwin, and z/OS.  If anyone knows of another system for which // has
10482        # special semantics and is distinct from /, please report it to
10483        # <bug-gnulib@gnu.org>.
10484        case $host in
10485          *-cygwin | i370-ibm-openedition)
10486            gl_cv_double_slash_root=yes ;;
10487          *)
10488            # Be optimistic and assume that / and // are the same when we
10489            # don't know.
10490            gl_cv_double_slash_root='unknown, assuming no' ;;
10491        esac
10492      else
10493        set x `ls -di / // 2>/dev/null`
10494        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
10495          gl_cv_double_slash_root=no
10496        else
10497          gl_cv_double_slash_root=yes
10498        fi
10499      fi
10500fi
10501{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
10502printf "%s\n" "$gl_cv_double_slash_root" >&6; }
10503  if test "$gl_cv_double_slash_root" = yes; then
10504
10505printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
10506
10507  fi
10508
10509
10510
10511
10512
10513     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
10514printf %s "checking whether realpath works... " >&6; }
10515if test ${gl_cv_func_realpath_works+y}
10516then :
10517  printf %s "(cached) " >&6
10518else $as_nop
10519
10520    rm -rf conftest.a conftest.d
10521    touch conftest.a
10522    # Assume that if we have lstat, we can also check symlinks.
10523    if test $ac_cv_func_lstat = yes; then
10524      ln -s conftest.a conftest.l
10525    fi
10526    mkdir conftest.d
10527    if test "$cross_compiling" = yes
10528then :
10529  case "$host_os" in
10530                       # Guess yes on glibc systems.
10531        *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
10532                       # Guess 'nearly' on musl systems.
10533        *-musl*)       gl_cv_func_realpath_works="guessing nearly" ;;
10534                       # Guess no on Cygwin.
10535        cygwin*)       gl_cv_func_realpath_works="guessing no" ;;
10536                       # Guess no on native Windows.
10537        mingw*)        gl_cv_func_realpath_works="guessing no" ;;
10538                       # If we don't know, obey --enable-cross-guesses.
10539        *)             gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
10540      esac
10541
10542else $as_nop
10543  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10544/* end confdefs.h.  */
10545
10546
10547
10548#include <stdlib.h>
10549#if defined __MACH__ && defined __APPLE__
10550/* Avoid a crash on Mac OS X.  */
10551#include <mach/mach.h>
10552#include <mach/mach_error.h>
10553#include <mach/thread_status.h>
10554#include <mach/exception.h>
10555#include <mach/task.h>
10556#include <pthread.h>
10557/* The exception port on which our thread listens.  */
10558static mach_port_t our_exception_port;
10559/* The main function of the thread listening for exceptions of type
10560   EXC_BAD_ACCESS.  */
10561static void *
10562mach_exception_thread (void *arg)
10563{
10564  /* Buffer for a message to be received.  */
10565  struct {
10566    mach_msg_header_t head;
10567    mach_msg_body_t msgh_body;
10568    char data[1024];
10569  } msg;
10570  mach_msg_return_t retval;
10571  /* Wait for a message on the exception port.  */
10572  retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
10573                     our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
10574  if (retval != MACH_MSG_SUCCESS)
10575    abort ();
10576  exit (1);
10577}
10578static void
10579nocrash_init (void)
10580{
10581  mach_port_t self = mach_task_self ();
10582  /* Allocate a port on which the thread shall listen for exceptions.  */
10583  if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
10584      == KERN_SUCCESS) {
10585    /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
10586    if (mach_port_insert_right (self, our_exception_port, our_exception_port,
10587                                MACH_MSG_TYPE_MAKE_SEND)
10588        == KERN_SUCCESS) {
10589      /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
10590         for us.  */
10591      exception_mask_t mask = EXC_MASK_BAD_ACCESS;
10592      /* Create the thread listening on the exception port.  */
10593      pthread_attr_t attr;
10594      pthread_t thread;
10595      if (pthread_attr_init (&attr) == 0
10596          && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
10597          && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
10598        pthread_attr_destroy (&attr);
10599        /* Replace the exception port info for these exceptions with our own.
10600           Note that we replace the exception port for the entire task, not only
10601           for a particular thread.  This has the effect that when our exception
10602           port gets the message, the thread specific exception port has already
10603           been asked, and we don't need to bother about it.
10604           See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
10605        task_set_exception_ports (self, mask, our_exception_port,
10606                                  EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
10607      }
10608    }
10609  }
10610}
10611#elif defined _WIN32 && ! defined __CYGWIN__
10612/* Avoid a crash on native Windows.  */
10613#define WIN32_LEAN_AND_MEAN
10614#include <windows.h>
10615#include <winerror.h>
10616static LONG WINAPI
10617exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
10618{
10619  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
10620    {
10621    case EXCEPTION_ACCESS_VIOLATION:
10622    case EXCEPTION_IN_PAGE_ERROR:
10623    case EXCEPTION_STACK_OVERFLOW:
10624    case EXCEPTION_GUARD_PAGE:
10625    case EXCEPTION_PRIV_INSTRUCTION:
10626    case EXCEPTION_ILLEGAL_INSTRUCTION:
10627    case EXCEPTION_DATATYPE_MISALIGNMENT:
10628    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
10629    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
10630      exit (1);
10631    }
10632  return EXCEPTION_CONTINUE_SEARCH;
10633}
10634static void
10635nocrash_init (void)
10636{
10637  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
10638}
10639#else
10640/* Avoid a crash on POSIX systems.  */
10641#include <signal.h>
10642#include <unistd.h>
10643/* A POSIX signal handler.  */
10644static void
10645exception_handler (int sig)
10646{
10647  _exit (1);
10648}
10649static void
10650nocrash_init (void)
10651{
10652#ifdef SIGSEGV
10653  signal (SIGSEGV, exception_handler);
10654#endif
10655#ifdef SIGBUS
10656  signal (SIGBUS, exception_handler);
10657#endif
10658}
10659#endif
10660
10661        #include <errno.h>
10662        #include <stdlib.h>
10663        #include <string.h>
10664
10665int
10666main (void)
10667{
10668
10669        int result = 0;
10670        /* This test fails on Solaris 10.  */
10671        {
10672          char *name = realpath ("conftest.a", NULL);
10673          if (!(name && *name == '/'))
10674            result |= 1;
10675          free (name);
10676        }
10677        /* This test fails on older versions of Cygwin.  */
10678        {
10679          char *name = realpath ("conftest.b/../conftest.a", NULL);
10680          if (name != NULL)
10681            result |= 2;
10682          free (name);
10683        }
10684        /* This test fails on Cygwin 2.9.  */
10685        #if HAVE_LSTAT
10686        {
10687          char *name = realpath ("conftest.l/../conftest.a", NULL);
10688          if (name != NULL || errno != ENOTDIR)
10689            result |= 4;
10690          free (name);
10691        }
10692        #endif
10693        /* This test fails on Mac OS X 10.13, OpenBSD 6.0.  */
10694        {
10695          char *name = realpath ("conftest.a/", NULL);
10696          if (name != NULL)
10697            result |= 8;
10698          free (name);
10699        }
10700        /* This test fails on AIX 7, Solaris 10.  */
10701        {
10702          char *name1 = realpath (".", NULL);
10703          char *name2 = realpath ("conftest.d//./..", NULL);
10704          if (! name1 || ! name2 || strcmp (name1, name2))
10705            result |= 16;
10706          free (name1);
10707          free (name2);
10708        }
10709        #ifdef __linux__
10710        /* On Linux, // is the same as /. See also double-slash-root.m4.
10711           realpath() should respect this.
10712           This test fails on musl libc 1.2.2.  */
10713        {
10714          char *name = realpath ("//", NULL);
10715          if (! name || strcmp (name, "/"))
10716            result |= 32;
10717          free (name);
10718        }
10719        #endif
10720        return result;
10721
10722  ;
10723  return 0;
10724}
10725
10726_ACEOF
10727if ac_fn_c_try_run "$LINENO"
10728then :
10729  gl_cv_func_realpath_works=yes
10730else $as_nop
10731  case $? in
10732        32) gl_cv_func_realpath_works=nearly ;;
10733        *)  gl_cv_func_realpath_works=no ;;
10734      esac
10735
10736fi
10737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10738  conftest.$ac_objext conftest.beam conftest.$ac_ext
10739fi
10740
10741    rm -rf conftest.a conftest.l conftest.d
10742
10743fi
10744{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
10745printf "%s\n" "$gl_cv_func_realpath_works" >&6; }
10746  case "$gl_cv_func_realpath_works" in
10747    *yes)
10748
10749printf "%s\n" "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
10750
10751      ;;
10752    *nearly)
10753
10754printf "%s\n" "#define FUNC_REALPATH_NEARLY_WORKS 1" >>confdefs.h
10755
10756      ;;
10757  esac
10758
10759
10760
10761
10762
10763
10764
10765
10766  case "$host_os" in
10767    mingw*) ;;
10768    *)      ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10769if test "x$ac_cv_func_getcwd" = xyes
10770then :
10771  printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
10772
10773fi
10774 ;;
10775  esac
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787  if test $ac_cv_func__set_invalid_parameter_handler = yes; then
10788    HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
10789
10790printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
10791
10792  else
10793    HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
10794  fi
10795
10796
10797
10798
10799     GNULIB_OPENDIR=0;
10800  GNULIB_READDIR=0;
10801  GNULIB_REWINDDIR=0;
10802  GNULIB_CLOSEDIR=0;
10803  GNULIB_DIRFD=0;
10804  GNULIB_FDOPENDIR=0;
10805  GNULIB_SCANDIR=0;
10806  GNULIB_ALPHASORT=0;
10807    HAVE_OPENDIR=1;
10808  HAVE_READDIR=1;
10809  HAVE_REWINDDIR=1;
10810  HAVE_CLOSEDIR=1;
10811  HAVE_DECL_DIRFD=1;
10812  HAVE_DECL_FDOPENDIR=1;
10813  HAVE_FDOPENDIR=1;
10814  HAVE_SCANDIR=1;
10815  HAVE_ALPHASORT=1;
10816  REPLACE_OPENDIR=0;
10817  REPLACE_CLOSEDIR=0;
10818  REPLACE_DIRFD=0;
10819  REPLACE_FDOPENDIR=0;
10820
10821
10822
10823
10824  gl_threads_api=none
10825  LIBTHREAD=
10826  LTLIBTHREAD=
10827  LIBMULTITHREAD=
10828  LTLIBMULTITHREAD=
10829  if test "$gl_use_threads" != no; then
10830
10831
10832  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
10833printf %s "checking whether imported symbols can be declared weak... " >&6; }
10834if test ${gl_cv_have_weak+y}
10835then :
10836  printf %s "(cached) " >&6
10837else $as_nop
10838  gl_cv_have_weak=no
10839          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10840/* end confdefs.h.  */
10841extern void xyzzy ();
10842#pragma weak xyzzy
10843int
10844main (void)
10845{
10846xyzzy();
10847  ;
10848  return 0;
10849}
10850_ACEOF
10851if ac_fn_c_try_link "$LINENO"
10852then :
10853  gl_cv_have_weak=maybe
10854fi
10855rm -f core conftest.err conftest.$ac_objext conftest.beam \
10856    conftest$ac_exeext conftest.$ac_ext
10857     if test $gl_cv_have_weak = maybe; then
10858                     if test "$cross_compiling" = yes
10859then :
10860                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10861/* end confdefs.h.  */
10862#ifdef __ELF__
10863             Extensible Linking Format
10864             #endif
10865
10866_ACEOF
10867if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10868  $EGREP "Extensible Linking Format" >/dev/null 2>&1
10869then :
10870  gl_cv_have_weak="guessing yes"
10871else $as_nop
10872  gl_cv_have_weak="guessing no"
10873fi
10874rm -rf conftest*
10875
10876
10877else $as_nop
10878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10879/* end confdefs.h.  */
10880
10881#include <stdio.h>
10882#pragma weak fputs
10883int main ()
10884{
10885  return (fputs == NULL);
10886}
10887_ACEOF
10888if ac_fn_c_try_run "$LINENO"
10889then :
10890  gl_cv_have_weak=yes
10891else $as_nop
10892  gl_cv_have_weak=no
10893fi
10894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10895  conftest.$ac_objext conftest.beam conftest.$ac_ext
10896fi
10897
10898     fi
10899          case " $LDFLAGS " in
10900       *" -static "*) gl_cv_have_weak=no ;;
10901     esac
10902                    case "$gl_cv_have_weak" in
10903       *yes)
10904         case "$host_os" in
10905           freebsd* | dragonfly*)
10906             : > conftest1.c
10907             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
10908             cat <<EOF > conftest2.c
10909#include <pthread.h>
10910#pragma weak pthread_mutexattr_gettype
10911int main ()
10912{
10913  return (pthread_mutexattr_gettype != NULL);
10914}
10915EOF
10916             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
10917               || gl_cv_have_weak=no
10918             rm -f conftest1.c libempty.so conftest2.c conftest
10919             ;;
10920         esac
10921         ;;
10922     esac
10923
10924fi
10925{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
10926printf "%s\n" "$gl_cv_have_weak" >&6; }
10927  case "$gl_cv_have_weak" in
10928    *yes)
10929
10930printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
10931
10932      ;;
10933  esac
10934
10935    if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
10936
10937      :
10938    fi
10939    if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
10940
10941      gl_have_isoc_threads="$ac_cv_header_threads_h"
10942    fi
10943    if test "$gl_use_threads" = yes \
10944       || test "$gl_use_threads" = posix \
10945       || test "$gl_use_threads" = isoc+posix; then
10946
10947
10948  if test -z "$gl_pthreadlib_body_done"; then
10949    gl_pthread_api=no
10950    LIBPTHREAD=
10951    LIBPMULTITHREAD=
10952    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
10953    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
10954    ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10955if test "x$ac_cv_header_pthread_h" = xyes
10956then :
10957  gl_have_pthread_h=yes
10958else $as_nop
10959  gl_have_pthread_h=no
10960fi
10961
10962    if test "$gl_have_pthread_h" = yes; then
10963      # Other possible tests:
10964      #   -lpthreads (FSU threads, PCthreads)
10965      #   -lgthreads
10966      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
10967      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
10968      # the second one only in libpthread, and lock.c needs it.
10969      #
10970      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
10971      # needs -pthread for some reason.  See:
10972      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
10973      save_LIBS=$LIBS
10974      for gl_pthread in '' '-pthread'; do
10975        LIBS="$LIBS $gl_pthread"
10976        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10977/* end confdefs.h.  */
10978#include <pthread.h>
10979               pthread_mutex_t m;
10980               pthread_mutexattr_t ma;
10981
10982int
10983main (void)
10984{
10985pthread_mutex_lock (&m);
10986               pthread_mutexattr_init (&ma);
10987  ;
10988  return 0;
10989}
10990_ACEOF
10991if ac_fn_c_try_link "$LINENO"
10992then :
10993  gl_pthread_api=yes
10994           LIBPTHREAD=$gl_pthread
10995           LIBPMULTITHREAD=$gl_pthread
10996fi
10997rm -f core conftest.err conftest.$ac_objext conftest.beam \
10998    conftest$ac_exeext conftest.$ac_ext
10999        LIBS=$save_LIBS
11000        test $gl_pthread_api = yes && break
11001      done
11002
11003      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
11004      # since it is defined as a macro on OSF/1.)
11005      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
11006        # The program links fine without libpthread. But it may actually
11007        # need to link with libpthread in order to create multiple threads.
11008        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11009printf %s "checking for pthread_kill in -lpthread... " >&6; }
11010if test ${ac_cv_lib_pthread_pthread_kill+y}
11011then :
11012  printf %s "(cached) " >&6
11013else $as_nop
11014  ac_check_lib_save_LIBS=$LIBS
11015LIBS="-lpthread  $LIBS"
11016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11017/* end confdefs.h.  */
11018
11019/* Override any GCC internal prototype to avoid an error.
11020   Use char because int might match the return type of a GCC
11021   builtin and then its argument prototype would still apply.  */
11022char pthread_kill ();
11023int
11024main (void)
11025{
11026return pthread_kill ();
11027  ;
11028  return 0;
11029}
11030_ACEOF
11031if ac_fn_c_try_link "$LINENO"
11032then :
11033  ac_cv_lib_pthread_pthread_kill=yes
11034else $as_nop
11035  ac_cv_lib_pthread_pthread_kill=no
11036fi
11037rm -f core conftest.err conftest.$ac_objext conftest.beam \
11038    conftest$ac_exeext conftest.$ac_ext
11039LIBS=$ac_check_lib_save_LIBS
11040fi
11041{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11042printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
11043if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
11044then :
11045  LIBPMULTITHREAD=-lpthread
11046           # On Solaris and HP-UX, most pthread functions exist also in libc.
11047           # Therefore pthread_in_use() needs to actually try to create a
11048           # thread: pthread_create from libc will fail, whereas
11049           # pthread_create will actually create a thread.
11050           # On Solaris 10 or newer, this test is no longer needed, because
11051           # libc contains the fully functional pthread functions.
11052           case "$host_os" in
11053             solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
11054
11055printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
11056
11057           esac
11058
11059fi
11060
11061      elif test $gl_pthread_api != yes; then
11062        # Some library is needed. Try libpthread and libc_r.
11063        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11064printf %s "checking for pthread_kill in -lpthread... " >&6; }
11065if test ${ac_cv_lib_pthread_pthread_kill+y}
11066then :
11067  printf %s "(cached) " >&6
11068else $as_nop
11069  ac_check_lib_save_LIBS=$LIBS
11070LIBS="-lpthread  $LIBS"
11071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11072/* end confdefs.h.  */
11073
11074/* Override any GCC internal prototype to avoid an error.
11075   Use char because int might match the return type of a GCC
11076   builtin and then its argument prototype would still apply.  */
11077char pthread_kill ();
11078int
11079main (void)
11080{
11081return pthread_kill ();
11082  ;
11083  return 0;
11084}
11085_ACEOF
11086if ac_fn_c_try_link "$LINENO"
11087then :
11088  ac_cv_lib_pthread_pthread_kill=yes
11089else $as_nop
11090  ac_cv_lib_pthread_pthread_kill=no
11091fi
11092rm -f core conftest.err conftest.$ac_objext conftest.beam \
11093    conftest$ac_exeext conftest.$ac_ext
11094LIBS=$ac_check_lib_save_LIBS
11095fi
11096{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11097printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
11098if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
11099then :
11100  gl_pthread_api=yes
11101           LIBPTHREAD=-lpthread
11102           LIBPMULTITHREAD=-lpthread
11103fi
11104
11105        if test $gl_pthread_api != yes; then
11106          # For FreeBSD 4.
11107          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
11108printf %s "checking for pthread_kill in -lc_r... " >&6; }
11109if test ${ac_cv_lib_c_r_pthread_kill+y}
11110then :
11111  printf %s "(cached) " >&6
11112else $as_nop
11113  ac_check_lib_save_LIBS=$LIBS
11114LIBS="-lc_r  $LIBS"
11115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11116/* end confdefs.h.  */
11117
11118/* Override any GCC internal prototype to avoid an error.
11119   Use char because int might match the return type of a GCC
11120   builtin and then its argument prototype would still apply.  */
11121char pthread_kill ();
11122int
11123main (void)
11124{
11125return pthread_kill ();
11126  ;
11127  return 0;
11128}
11129_ACEOF
11130if ac_fn_c_try_link "$LINENO"
11131then :
11132  ac_cv_lib_c_r_pthread_kill=yes
11133else $as_nop
11134  ac_cv_lib_c_r_pthread_kill=no
11135fi
11136rm -f core conftest.err conftest.$ac_objext conftest.beam \
11137    conftest$ac_exeext conftest.$ac_ext
11138LIBS=$ac_check_lib_save_LIBS
11139fi
11140{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
11141printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
11142if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
11143then :
11144  gl_pthread_api=yes
11145             LIBPTHREAD=-lc_r
11146             LIBPMULTITHREAD=-lc_r
11147fi
11148
11149        fi
11150      fi
11151    fi
11152    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
11153printf %s "checking whether POSIX threads API is available... " >&6; }
11154    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
11155printf "%s\n" "$gl_pthread_api" >&6; }
11156
11157
11158    if test $gl_pthread_api = yes; then
11159
11160printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
11161
11162    fi
11163
11164        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11165/* end confdefs.h.  */
11166#include <sched.h>
11167int
11168main (void)
11169{
11170sched_yield ();
11171  ;
11172  return 0;
11173}
11174_ACEOF
11175if ac_fn_c_try_link "$LINENO"
11176then :
11177  LIB_SCHED_YIELD=
11178
11179else $as_nop
11180         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
11181printf %s "checking for sched_yield in -lrt... " >&6; }
11182if test ${ac_cv_lib_rt_sched_yield+y}
11183then :
11184  printf %s "(cached) " >&6
11185else $as_nop
11186  ac_check_lib_save_LIBS=$LIBS
11187LIBS="-lrt  $LIBS"
11188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11189/* end confdefs.h.  */
11190
11191/* Override any GCC internal prototype to avoid an error.
11192   Use char because int might match the return type of a GCC
11193   builtin and then its argument prototype would still apply.  */
11194char sched_yield ();
11195int
11196main (void)
11197{
11198return sched_yield ();
11199  ;
11200  return 0;
11201}
11202_ACEOF
11203if ac_fn_c_try_link "$LINENO"
11204then :
11205  ac_cv_lib_rt_sched_yield=yes
11206else $as_nop
11207  ac_cv_lib_rt_sched_yield=no
11208fi
11209rm -f core conftest.err conftest.$ac_objext conftest.beam \
11210    conftest$ac_exeext conftest.$ac_ext
11211LIBS=$ac_check_lib_save_LIBS
11212fi
11213{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
11214printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
11215if test "x$ac_cv_lib_rt_sched_yield" = xyes
11216then :
11217  LIB_SCHED_YIELD=-lrt
11218else $as_nop
11219            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
11220printf %s "checking for sched_yield in -lposix4... " >&6; }
11221if test ${ac_cv_lib_posix4_sched_yield+y}
11222then :
11223  printf %s "(cached) " >&6
11224else $as_nop
11225  ac_check_lib_save_LIBS=$LIBS
11226LIBS="-lposix4  $LIBS"
11227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11228/* end confdefs.h.  */
11229
11230/* Override any GCC internal prototype to avoid an error.
11231   Use char because int might match the return type of a GCC
11232   builtin and then its argument prototype would still apply.  */
11233char sched_yield ();
11234int
11235main (void)
11236{
11237return sched_yield ();
11238  ;
11239  return 0;
11240}
11241_ACEOF
11242if ac_fn_c_try_link "$LINENO"
11243then :
11244  ac_cv_lib_posix4_sched_yield=yes
11245else $as_nop
11246  ac_cv_lib_posix4_sched_yield=no
11247fi
11248rm -f core conftest.err conftest.$ac_objext conftest.beam \
11249    conftest$ac_exeext conftest.$ac_ext
11250LIBS=$ac_check_lib_save_LIBS
11251fi
11252{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
11253printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
11254if test "x$ac_cv_lib_posix4_sched_yield" = xyes
11255then :
11256  LIB_SCHED_YIELD=-lposix4
11257fi
11258
11259fi
11260
11261
11262fi
11263rm -f core conftest.err conftest.$ac_objext conftest.beam \
11264    conftest$ac_exeext conftest.$ac_ext
11265
11266
11267    gl_pthreadlib_body_done=done
11268  fi
11269
11270      LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
11271      LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
11272      if test $gl_pthread_api = yes; then
11273        if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
11274          gl_threads_api='isoc+posix'
11275
11276printf "%s\n" "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
11277
11278          LIBTHREAD= LTLIBTHREAD=
11279        else
11280          gl_threads_api=posix
11281
11282printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
11283
11284          if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
11285            if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
11286
11287printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
11288
11289              LIBTHREAD= LTLIBTHREAD=
11290            else
11291              case "$host_os" in
11292                freebsd* | dragonfly*)
11293                  if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
11294
11295printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
11296
11297                  fi
11298                  ;;
11299              esac
11300            fi
11301          fi
11302        fi
11303      fi
11304    fi
11305    if test $gl_threads_api = none; then
11306      if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
11307
11308
11309
11310  if test -z "$gl_stdthreadlib_body_done"; then
11311
11312
11313    case "$host_os" in
11314      mingw*)
11315        LIBSTDTHREAD=
11316        ;;
11317      *)
11318
11319
11320  if test -z "$gl_pthreadlib_body_done"; then
11321    gl_pthread_api=no
11322    LIBPTHREAD=
11323    LIBPMULTITHREAD=
11324    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
11325    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
11326    ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11327if test "x$ac_cv_header_pthread_h" = xyes
11328then :
11329  gl_have_pthread_h=yes
11330else $as_nop
11331  gl_have_pthread_h=no
11332fi
11333
11334    if test "$gl_have_pthread_h" = yes; then
11335      # Other possible tests:
11336      #   -lpthreads (FSU threads, PCthreads)
11337      #   -lgthreads
11338      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
11339      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
11340      # the second one only in libpthread, and lock.c needs it.
11341      #
11342      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
11343      # needs -pthread for some reason.  See:
11344      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
11345      save_LIBS=$LIBS
11346      for gl_pthread in '' '-pthread'; do
11347        LIBS="$LIBS $gl_pthread"
11348        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11349/* end confdefs.h.  */
11350#include <pthread.h>
11351               pthread_mutex_t m;
11352               pthread_mutexattr_t ma;
11353
11354int
11355main (void)
11356{
11357pthread_mutex_lock (&m);
11358               pthread_mutexattr_init (&ma);
11359  ;
11360  return 0;
11361}
11362_ACEOF
11363if ac_fn_c_try_link "$LINENO"
11364then :
11365  gl_pthread_api=yes
11366           LIBPTHREAD=$gl_pthread
11367           LIBPMULTITHREAD=$gl_pthread
11368fi
11369rm -f core conftest.err conftest.$ac_objext conftest.beam \
11370    conftest$ac_exeext conftest.$ac_ext
11371        LIBS=$save_LIBS
11372        test $gl_pthread_api = yes && break
11373      done
11374
11375      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
11376      # since it is defined as a macro on OSF/1.)
11377      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
11378        # The program links fine without libpthread. But it may actually
11379        # need to link with libpthread in order to create multiple threads.
11380        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11381printf %s "checking for pthread_kill in -lpthread... " >&6; }
11382if test ${ac_cv_lib_pthread_pthread_kill+y}
11383then :
11384  printf %s "(cached) " >&6
11385else $as_nop
11386  ac_check_lib_save_LIBS=$LIBS
11387LIBS="-lpthread  $LIBS"
11388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11389/* end confdefs.h.  */
11390
11391/* Override any GCC internal prototype to avoid an error.
11392   Use char because int might match the return type of a GCC
11393   builtin and then its argument prototype would still apply.  */
11394char pthread_kill ();
11395int
11396main (void)
11397{
11398return pthread_kill ();
11399  ;
11400  return 0;
11401}
11402_ACEOF
11403if ac_fn_c_try_link "$LINENO"
11404then :
11405  ac_cv_lib_pthread_pthread_kill=yes
11406else $as_nop
11407  ac_cv_lib_pthread_pthread_kill=no
11408fi
11409rm -f core conftest.err conftest.$ac_objext conftest.beam \
11410    conftest$ac_exeext conftest.$ac_ext
11411LIBS=$ac_check_lib_save_LIBS
11412fi
11413{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11414printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
11415if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
11416then :
11417  LIBPMULTITHREAD=-lpthread
11418           # On Solaris and HP-UX, most pthread functions exist also in libc.
11419           # Therefore pthread_in_use() needs to actually try to create a
11420           # thread: pthread_create from libc will fail, whereas
11421           # pthread_create will actually create a thread.
11422           # On Solaris 10 or newer, this test is no longer needed, because
11423           # libc contains the fully functional pthread functions.
11424           case "$host_os" in
11425             solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
11426
11427printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
11428
11429           esac
11430
11431fi
11432
11433      elif test $gl_pthread_api != yes; then
11434        # Some library is needed. Try libpthread and libc_r.
11435        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11436printf %s "checking for pthread_kill in -lpthread... " >&6; }
11437if test ${ac_cv_lib_pthread_pthread_kill+y}
11438then :
11439  printf %s "(cached) " >&6
11440else $as_nop
11441  ac_check_lib_save_LIBS=$LIBS
11442LIBS="-lpthread  $LIBS"
11443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11444/* end confdefs.h.  */
11445
11446/* Override any GCC internal prototype to avoid an error.
11447   Use char because int might match the return type of a GCC
11448   builtin and then its argument prototype would still apply.  */
11449char pthread_kill ();
11450int
11451main (void)
11452{
11453return pthread_kill ();
11454  ;
11455  return 0;
11456}
11457_ACEOF
11458if ac_fn_c_try_link "$LINENO"
11459then :
11460  ac_cv_lib_pthread_pthread_kill=yes
11461else $as_nop
11462  ac_cv_lib_pthread_pthread_kill=no
11463fi
11464rm -f core conftest.err conftest.$ac_objext conftest.beam \
11465    conftest$ac_exeext conftest.$ac_ext
11466LIBS=$ac_check_lib_save_LIBS
11467fi
11468{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11469printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
11470if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
11471then :
11472  gl_pthread_api=yes
11473           LIBPTHREAD=-lpthread
11474           LIBPMULTITHREAD=-lpthread
11475fi
11476
11477        if test $gl_pthread_api != yes; then
11478          # For FreeBSD 4.
11479          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
11480printf %s "checking for pthread_kill in -lc_r... " >&6; }
11481if test ${ac_cv_lib_c_r_pthread_kill+y}
11482then :
11483  printf %s "(cached) " >&6
11484else $as_nop
11485  ac_check_lib_save_LIBS=$LIBS
11486LIBS="-lc_r  $LIBS"
11487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11488/* end confdefs.h.  */
11489
11490/* Override any GCC internal prototype to avoid an error.
11491   Use char because int might match the return type of a GCC
11492   builtin and then its argument prototype would still apply.  */
11493char pthread_kill ();
11494int
11495main (void)
11496{
11497return pthread_kill ();
11498  ;
11499  return 0;
11500}
11501_ACEOF
11502if ac_fn_c_try_link "$LINENO"
11503then :
11504  ac_cv_lib_c_r_pthread_kill=yes
11505else $as_nop
11506  ac_cv_lib_c_r_pthread_kill=no
11507fi
11508rm -f core conftest.err conftest.$ac_objext conftest.beam \
11509    conftest$ac_exeext conftest.$ac_ext
11510LIBS=$ac_check_lib_save_LIBS
11511fi
11512{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
11513printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
11514if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
11515then :
11516  gl_pthread_api=yes
11517             LIBPTHREAD=-lc_r
11518             LIBPMULTITHREAD=-lc_r
11519fi
11520
11521        fi
11522      fi
11523    fi
11524    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
11525printf %s "checking whether POSIX threads API is available... " >&6; }
11526    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
11527printf "%s\n" "$gl_pthread_api" >&6; }
11528
11529
11530    if test $gl_pthread_api = yes; then
11531
11532printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
11533
11534    fi
11535
11536        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11537/* end confdefs.h.  */
11538#include <sched.h>
11539int
11540main (void)
11541{
11542sched_yield ();
11543  ;
11544  return 0;
11545}
11546_ACEOF
11547if ac_fn_c_try_link "$LINENO"
11548then :
11549  LIB_SCHED_YIELD=
11550
11551else $as_nop
11552         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
11553printf %s "checking for sched_yield in -lrt... " >&6; }
11554if test ${ac_cv_lib_rt_sched_yield+y}
11555then :
11556  printf %s "(cached) " >&6
11557else $as_nop
11558  ac_check_lib_save_LIBS=$LIBS
11559LIBS="-lrt  $LIBS"
11560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11561/* end confdefs.h.  */
11562
11563/* Override any GCC internal prototype to avoid an error.
11564   Use char because int might match the return type of a GCC
11565   builtin and then its argument prototype would still apply.  */
11566char sched_yield ();
11567int
11568main (void)
11569{
11570return sched_yield ();
11571  ;
11572  return 0;
11573}
11574_ACEOF
11575if ac_fn_c_try_link "$LINENO"
11576then :
11577  ac_cv_lib_rt_sched_yield=yes
11578else $as_nop
11579  ac_cv_lib_rt_sched_yield=no
11580fi
11581rm -f core conftest.err conftest.$ac_objext conftest.beam \
11582    conftest$ac_exeext conftest.$ac_ext
11583LIBS=$ac_check_lib_save_LIBS
11584fi
11585{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
11586printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
11587if test "x$ac_cv_lib_rt_sched_yield" = xyes
11588then :
11589  LIB_SCHED_YIELD=-lrt
11590else $as_nop
11591            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
11592printf %s "checking for sched_yield in -lposix4... " >&6; }
11593if test ${ac_cv_lib_posix4_sched_yield+y}
11594then :
11595  printf %s "(cached) " >&6
11596else $as_nop
11597  ac_check_lib_save_LIBS=$LIBS
11598LIBS="-lposix4  $LIBS"
11599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11600/* end confdefs.h.  */
11601
11602/* Override any GCC internal prototype to avoid an error.
11603   Use char because int might match the return type of a GCC
11604   builtin and then its argument prototype would still apply.  */
11605char sched_yield ();
11606int
11607main (void)
11608{
11609return sched_yield ();
11610  ;
11611  return 0;
11612}
11613_ACEOF
11614if ac_fn_c_try_link "$LINENO"
11615then :
11616  ac_cv_lib_posix4_sched_yield=yes
11617else $as_nop
11618  ac_cv_lib_posix4_sched_yield=no
11619fi
11620rm -f core conftest.err conftest.$ac_objext conftest.beam \
11621    conftest$ac_exeext conftest.$ac_ext
11622LIBS=$ac_check_lib_save_LIBS
11623fi
11624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
11625printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
11626if test "x$ac_cv_lib_posix4_sched_yield" = xyes
11627then :
11628  LIB_SCHED_YIELD=-lposix4
11629fi
11630
11631fi
11632
11633
11634fi
11635rm -f core conftest.err conftest.$ac_objext conftest.beam \
11636    conftest$ac_exeext conftest.$ac_ext
11637
11638
11639    gl_pthreadlib_body_done=done
11640  fi
11641
11642        if test $ac_cv_header_threads_h = yes; then
11643                                                  ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
11644if test "x$ac_cv_func_thrd_create" = xyes
11645then :
11646  printf "%s\n" "#define HAVE_THRD_CREATE 1" >>confdefs.h
11647
11648fi
11649
11650          if test $ac_cv_func_thrd_create = yes; then
11651            LIBSTDTHREAD=
11652          else
11653            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
11654printf %s "checking for thrd_create in -lstdthreads... " >&6; }
11655if test ${ac_cv_lib_stdthreads_thrd_create+y}
11656then :
11657  printf %s "(cached) " >&6
11658else $as_nop
11659  ac_check_lib_save_LIBS=$LIBS
11660LIBS="-lstdthreads  $LIBS"
11661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11662/* end confdefs.h.  */
11663
11664/* Override any GCC internal prototype to avoid an error.
11665   Use char because int might match the return type of a GCC
11666   builtin and then its argument prototype would still apply.  */
11667char thrd_create ();
11668int
11669main (void)
11670{
11671return thrd_create ();
11672  ;
11673  return 0;
11674}
11675_ACEOF
11676if ac_fn_c_try_link "$LINENO"
11677then :
11678  ac_cv_lib_stdthreads_thrd_create=yes
11679else $as_nop
11680  ac_cv_lib_stdthreads_thrd_create=no
11681fi
11682rm -f core conftest.err conftest.$ac_objext conftest.beam \
11683    conftest$ac_exeext conftest.$ac_ext
11684LIBS=$ac_check_lib_save_LIBS
11685fi
11686{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
11687printf "%s\n" "$ac_cv_lib_stdthreads_thrd_create" >&6; }
11688if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes
11689then :
11690
11691              LIBSTDTHREAD='-lstdthreads -lpthread'
11692
11693else $as_nop
11694
11695                            LIBSTDTHREAD="$LIBPMULTITHREAD"
11696
11697fi
11698
11699          fi
11700        else
11701                    LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
11702        fi
11703        ;;
11704    esac
11705
11706
11707    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
11708printf %s "checking whether ISO C threads API is available... " >&6; }
11709    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
11710printf "%s\n" "$ac_cv_header_threads_h" >&6; }
11711    gl_stdthreadlib_body_done=done
11712  fi
11713
11714        LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
11715        LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
11716        gl_threads_api=isoc
11717
11718printf "%s\n" "#define USE_ISOC_THREADS 1" >>confdefs.h
11719
11720      fi
11721    fi
11722    if test $gl_threads_api = none; then
11723      case "$gl_use_threads" in
11724        yes | windows | win32) # The 'win32' is for backward compatibility.
11725          if { case "$host_os" in
11726                 mingw*) true;;
11727                 *) false;;
11728               esac
11729             }; then
11730            gl_threads_api=windows
11731
11732printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
11733
11734          fi
11735          ;;
11736      esac
11737    fi
11738  fi
11739  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
11740printf %s "checking for multithread API to use... " >&6; }
11741  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
11742printf "%s\n" "$gl_threads_api" >&6; }
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11753printf %s "checking for inline... " >&6; }
11754if test ${ac_cv_c_inline+y}
11755then :
11756  printf %s "(cached) " >&6
11757else $as_nop
11758  ac_cv_c_inline=no
11759for ac_kw in inline __inline__ __inline; do
11760  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11761/* end confdefs.h.  */
11762#ifndef __cplusplus
11763typedef int foo_t;
11764static $ac_kw foo_t static_foo (void) {return 0; }
11765$ac_kw foo_t foo (void) {return 0; }
11766#endif
11767
11768_ACEOF
11769if ac_fn_c_try_compile "$LINENO"
11770then :
11771  ac_cv_c_inline=$ac_kw
11772fi
11773rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11774  test "$ac_cv_c_inline" != no && break
11775done
11776
11777fi
11778{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11779printf "%s\n" "$ac_cv_c_inline" >&6; }
11780
11781case $ac_cv_c_inline in
11782  inline | yes) ;;
11783  *)
11784    case $ac_cv_c_inline in
11785      no) ac_val=;;
11786      *) ac_val=$ac_cv_c_inline;;
11787    esac
11788    cat >>confdefs.h <<_ACEOF
11789#ifndef __cplusplus
11790#define inline $ac_val
11791#endif
11792_ACEOF
11793    ;;
11794esac
11795
11796
11797
11798
11799
11800    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether linux/if_alg.h has struct sockaddr_alg." >&5
11801printf %s "checking whether linux/if_alg.h has struct sockaddr_alg.... " >&6; }
11802if test ${gl_cv_header_linux_if_alg_salg+y}
11803then :
11804  printf %s "(cached) " >&6
11805else $as_nop
11806  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11807/* end confdefs.h.  */
11808#include <sys/socket.h>
11809                          #include <linux/if_alg.h>
11810                          struct sockaddr_alg salg = {
11811                            .salg_family = AF_ALG,
11812                            .salg_type = "hash",
11813                            .salg_name = "sha1",
11814                          };
11815int
11816main (void)
11817{
11818
11819  ;
11820  return 0;
11821}
11822_ACEOF
11823if ac_fn_c_try_compile "$LINENO"
11824then :
11825  gl_cv_header_linux_if_alg_salg=yes
11826else $as_nop
11827  gl_cv_header_linux_if_alg_salg=no
11828fi
11829rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11830fi
11831{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_linux_if_alg_salg" >&5
11832printf "%s\n" "$gl_cv_header_linux_if_alg_salg" >&6; }
11833  if test "$gl_cv_header_linux_if_alg_salg" = yes; then
11834
11835printf "%s\n" "#define HAVE_LINUX_IF_ALG_H 1" >>confdefs.h
11836
11837  fi
11838
11839        use_af_alg=no
11840
11841# Check whether --with-linux-crypto was given.
11842if test ${with_linux_crypto+y}
11843then :
11844  withval=$with_linux_crypto; use_af_alg=$withval
11845else $as_nop
11846  use_af_alg=no
11847fi
11848
11849    if test "$gl_cv_header_linux_if_alg_salg" != yes; then
11850    if test "$use_af_alg" != no; then
11851      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Linux kernel cryptographic API not found" >&5
11852printf "%s\n" "$as_me: WARNING: Linux kernel cryptographic API not found" >&2;}
11853    fi
11854    use_af_alg=no
11855  fi
11856
11857  if test "$use_af_alg" != no; then
11858    USE_AF_ALG=1
11859  else
11860    USE_AF_ALG=0
11861  fi
11862
11863printf "%s\n" "#define USE_LINUX_CRYPTO_API $USE_AF_ALG" >>confdefs.h
11864
11865
11866
11867   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11868printf %s "checking whether byte ordering is bigendian... " >&6; }
11869if test ${ac_cv_c_bigendian+y}
11870then :
11871  printf %s "(cached) " >&6
11872else $as_nop
11873  ac_cv_c_bigendian=unknown
11874    # See if we're dealing with a universal compiler.
11875    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11876/* end confdefs.h.  */
11877#ifndef __APPLE_CC__
11878	       not a universal capable compiler
11879	     #endif
11880	     typedef int dummy;
11881
11882_ACEOF
11883if ac_fn_c_try_compile "$LINENO"
11884then :
11885
11886	# Check for potential -arch flags.  It is not universal unless
11887	# there are at least two -arch flags with different values.
11888	ac_arch=
11889	ac_prev=
11890	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11891	 if test -n "$ac_prev"; then
11892	   case $ac_word in
11893	     i?86 | x86_64 | ppc | ppc64)
11894	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11895		 ac_arch=$ac_word
11896	       else
11897		 ac_cv_c_bigendian=universal
11898		 break
11899	       fi
11900	       ;;
11901	   esac
11902	   ac_prev=
11903	 elif test "x$ac_word" = "x-arch"; then
11904	   ac_prev=arch
11905	 fi
11906       done
11907fi
11908rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11909    if test $ac_cv_c_bigendian = unknown; then
11910      # See if sys/param.h defines the BYTE_ORDER macro.
11911      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11912/* end confdefs.h.  */
11913#include <sys/types.h>
11914	     #include <sys/param.h>
11915
11916int
11917main (void)
11918{
11919#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11920		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11921		     && LITTLE_ENDIAN)
11922	      bogus endian macros
11923	     #endif
11924
11925  ;
11926  return 0;
11927}
11928_ACEOF
11929if ac_fn_c_try_compile "$LINENO"
11930then :
11931  # It does; now see whether it defined to BIG_ENDIAN or not.
11932	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11933/* end confdefs.h.  */
11934#include <sys/types.h>
11935		#include <sys/param.h>
11936
11937int
11938main (void)
11939{
11940#if BYTE_ORDER != BIG_ENDIAN
11941		 not big endian
11942		#endif
11943
11944  ;
11945  return 0;
11946}
11947_ACEOF
11948if ac_fn_c_try_compile "$LINENO"
11949then :
11950  ac_cv_c_bigendian=yes
11951else $as_nop
11952  ac_cv_c_bigendian=no
11953fi
11954rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11955fi
11956rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
11957    fi
11958    if test $ac_cv_c_bigendian = unknown; then
11959      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11960      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11961/* end confdefs.h.  */
11962#include <limits.h>
11963
11964int
11965main (void)
11966{
11967#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11968	      bogus endian macros
11969	     #endif
11970
11971  ;
11972  return 0;
11973}
11974_ACEOF
11975if ac_fn_c_try_compile "$LINENO"
11976then :
11977  # It does; now see whether it defined to _BIG_ENDIAN or not.
11978	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11979/* end confdefs.h.  */
11980#include <limits.h>
11981
11982int
11983main (void)
11984{
11985#ifndef _BIG_ENDIAN
11986		 not big endian
11987		#endif
11988
11989  ;
11990  return 0;
11991}
11992_ACEOF
11993if ac_fn_c_try_compile "$LINENO"
11994then :
11995  ac_cv_c_bigendian=yes
11996else $as_nop
11997  ac_cv_c_bigendian=no
11998fi
11999rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12000fi
12001rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12002    fi
12003    if test $ac_cv_c_bigendian = unknown; then
12004      # Compile a test program.
12005      if test "$cross_compiling" = yes
12006then :
12007  # Try to guess by grepping values from an object file.
12008	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12009/* end confdefs.h.  */
12010unsigned short int ascii_mm[] =
12011		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12012		unsigned short int ascii_ii[] =
12013		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12014		int use_ascii (int i) {
12015		  return ascii_mm[i] + ascii_ii[i];
12016		}
12017		unsigned short int ebcdic_ii[] =
12018		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12019		unsigned short int ebcdic_mm[] =
12020		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12021		int use_ebcdic (int i) {
12022		  return ebcdic_mm[i] + ebcdic_ii[i];
12023		}
12024		extern int foo;
12025
12026int
12027main (void)
12028{
12029return use_ascii (foo) == use_ebcdic (foo);
12030  ;
12031  return 0;
12032}
12033_ACEOF
12034if ac_fn_c_try_compile "$LINENO"
12035then :
12036  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12037	      ac_cv_c_bigendian=yes
12038	    fi
12039	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12040	      if test "$ac_cv_c_bigendian" = unknown; then
12041		ac_cv_c_bigendian=no
12042	      else
12043		# finding both strings is unlikely to happen, but who knows?
12044		ac_cv_c_bigendian=unknown
12045	      fi
12046	    fi
12047fi
12048rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12049else $as_nop
12050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12051/* end confdefs.h.  */
12052$ac_includes_default
12053int
12054main (void)
12055{
12056
12057	     /* Are we little or big endian?  From Harbison&Steele.  */
12058	     union
12059	     {
12060	       long int l;
12061	       char c[sizeof (long int)];
12062	     } u;
12063	     u.l = 1;
12064	     return u.c[sizeof (long int) - 1] == 1;
12065
12066  ;
12067  return 0;
12068}
12069_ACEOF
12070if ac_fn_c_try_run "$LINENO"
12071then :
12072  ac_cv_c_bigendian=no
12073else $as_nop
12074  ac_cv_c_bigendian=yes
12075fi
12076rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12077  conftest.$ac_objext conftest.beam conftest.$ac_ext
12078fi
12079
12080    fi
12081fi
12082{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12083printf "%s\n" "$ac_cv_c_bigendian" >&6; }
12084 case $ac_cv_c_bigendian in #(
12085   yes)
12086     printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
12087;; #(
12088   no)
12089      ;; #(
12090   universal)
12091
12092printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12093
12094     ;; #(
12095   *)
12096     as_fn_error $? "unknown endianness
12097 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12098 esac
12099
12100
12101
12102  GNULIB_ISBLANK=0;
12103    HAVE_ISBLANK=1;
12104
12105
12106{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
12107printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
12108if test ${ac_cv_c_undeclared_builtin_options+y}
12109then :
12110  printf %s "(cached) " >&6
12111else $as_nop
12112  ac_save_CFLAGS=$CFLAGS
12113   ac_cv_c_undeclared_builtin_options='cannot detect'
12114   for ac_arg in '' -fno-builtin; do
12115     CFLAGS="$ac_save_CFLAGS $ac_arg"
12116     # This test program should *not* compile successfully.
12117     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12118/* end confdefs.h.  */
12119
12120int
12121main (void)
12122{
12123(void) strchr;
12124  ;
12125  return 0;
12126}
12127_ACEOF
12128if ac_fn_c_try_compile "$LINENO"
12129then :
12130
12131else $as_nop
12132  # This test program should compile successfully.
12133        # No library function is consistently available on
12134        # freestanding implementations, so test against a dummy
12135        # declaration.  Include always-available headers on the
12136        # off chance that they somehow elicit warnings.
12137        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12138/* end confdefs.h.  */
12139#include <float.h>
12140#include <limits.h>
12141#include <stdarg.h>
12142#include <stddef.h>
12143extern void ac_decl (int, char *);
12144
12145int
12146main (void)
12147{
12148(void) ac_decl (0, (char *) 0);
12149  (void) ac_decl;
12150
12151  ;
12152  return 0;
12153}
12154_ACEOF
12155if ac_fn_c_try_compile "$LINENO"
12156then :
12157  if test x"$ac_arg" = x
12158then :
12159  ac_cv_c_undeclared_builtin_options='none needed'
12160else $as_nop
12161  ac_cv_c_undeclared_builtin_options=$ac_arg
12162fi
12163          break
12164fi
12165rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12166fi
12167rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12168    done
12169    CFLAGS=$ac_save_CFLAGS
12170
12171fi
12172{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
12173printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
12174  case $ac_cv_c_undeclared_builtin_options in #(
12175  'cannot detect') :
12176    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12177printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
12178as_fn_error $? "cannot make $CC report undeclared builtins
12179See \`config.log' for more details" "$LINENO" 5; } ;; #(
12180  'none needed') :
12181    ac_c_undeclared_builtin_options='' ;; #(
12182  *) :
12183    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
12184esac
12185
12186gl_mda_defines='
12187#if defined _WIN32 && !defined __CYGWIN__
12188#define access    _access
12189#define chdir     _chdir
12190#define chmod     _chmod
12191#define close     _close
12192#define creat     _creat
12193#define dup       _dup
12194#define dup2      _dup2
12195#define ecvt      _ecvt
12196#define execl     _execl
12197#define execle    _execle
12198#define execlp    _execlp
12199#define execv     _execv
12200#define execve    _execve
12201#define execvp    _execvp
12202#define execvpe   _execvpe
12203#define fcloseall _fcloseall
12204#define fcvt      _fcvt
12205#define fdopen    _fdopen
12206#define fileno    _fileno
12207#define gcvt      _gcvt
12208#define getcwd    _getcwd
12209#define getpid    _getpid
12210#define getw      _getw
12211#define isatty    _isatty
12212#define j0        _j0
12213#define j1        _j1
12214#define jn        _jn
12215#define lfind     _lfind
12216#define lsearch   _lsearch
12217#define lseek     _lseek
12218#define memccpy   _memccpy
12219#define mkdir     _mkdir
12220#define mktemp    _mktemp
12221#define open      _open
12222#define putenv    _putenv
12223#define putw      _putw
12224#define read      _read
12225#define rmdir     _rmdir
12226#define strdup    _strdup
12227#define swab      _swab
12228#define tempnam   _tempnam
12229#define tzset     _tzset
12230#define umask     _umask
12231#define unlink    _unlink
12232#define utime     _utime
12233#define wcsdup    _wcsdup
12234#define write     _write
12235#define y0        _y0
12236#define y1        _y1
12237#define yn        _yn
12238#endif
12239'
12240
12241
12242
12243
12244
12245
12246
12247
12248  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
12249printf %s "checking if environ is properly declared... " >&6; }
12250if test ${gt_cv_var_environ_declaration+y}
12251then :
12252  printf %s "(cached) " >&6
12253else $as_nop
12254  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12255/* end confdefs.h.  */
12256#if HAVE_UNISTD_H
12257     #include <unistd.h>
12258     #endif
12259     /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
12260     #include <stdlib.h>
12261
12262            extern struct { int foo; } environ;
12263int
12264main (void)
12265{
12266environ.foo = 1;
12267  ;
12268  return 0;
12269}
12270_ACEOF
12271if ac_fn_c_try_compile "$LINENO"
12272then :
12273  gt_cv_var_environ_declaration=no
12274else $as_nop
12275  gt_cv_var_environ_declaration=yes
12276fi
12277rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12278fi
12279{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
12280printf "%s\n" "$gt_cv_var_environ_declaration" >&6; }
12281  if test $gt_cv_var_environ_declaration = yes; then
12282
12283printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
12284
12285  fi
12286
12287
12288  if test $gt_cv_var_environ_declaration != yes; then
12289    HAVE_DECL_ENVIRON=0
12290  fi
12291
12292
12293
12294  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
12295printf %s "checking for complete errno.h... " >&6; }
12296if test ${gl_cv_header_errno_h_complete+y}
12297then :
12298  printf %s "(cached) " >&6
12299else $as_nop
12300
12301    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12302/* end confdefs.h.  */
12303
12304#include <errno.h>
12305#if !defined ETXTBSY
12306booboo
12307#endif
12308#if !defined ENOMSG
12309booboo
12310#endif
12311#if !defined EIDRM
12312booboo
12313#endif
12314#if !defined ENOLINK
12315booboo
12316#endif
12317#if !defined EPROTO
12318booboo
12319#endif
12320#if !defined EMULTIHOP
12321booboo
12322#endif
12323#if !defined EBADMSG
12324booboo
12325#endif
12326#if !defined EOVERFLOW
12327booboo
12328#endif
12329#if !defined ENOTSUP
12330booboo
12331#endif
12332#if !defined ENETRESET
12333booboo
12334#endif
12335#if !defined ECONNABORTED
12336booboo
12337#endif
12338#if !defined ESTALE
12339booboo
12340#endif
12341#if !defined EDQUOT
12342booboo
12343#endif
12344#if !defined ECANCELED
12345booboo
12346#endif
12347#if !defined EOWNERDEAD
12348booboo
12349#endif
12350#if !defined ENOTRECOVERABLE
12351booboo
12352#endif
12353#if !defined EILSEQ
12354booboo
12355#endif
12356
12357_ACEOF
12358if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12359  $EGREP "booboo" >/dev/null 2>&1
12360then :
12361  gl_cv_header_errno_h_complete=no
12362else $as_nop
12363  gl_cv_header_errno_h_complete=yes
12364fi
12365rm -rf conftest*
12366
12367
12368fi
12369{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
12370printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
12371  if test $gl_cv_header_errno_h_complete = yes; then
12372    ERRNO_H=''
12373  else
12374
12375
12376
12377
12378
12379
12380
12381
12382     if test $gl_cv_have_include_next = yes; then
12383       gl_cv_next_errno_h='<'errno.h'>'
12384     else
12385       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
12386printf %s "checking absolute name of <errno.h>... " >&6; }
12387if test ${gl_cv_next_errno_h+y}
12388then :
12389  printf %s "(cached) " >&6
12390else $as_nop
12391
12392
12393
12394  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12395/* end confdefs.h.  */
12396#include <errno.h>
12397_ACEOF
12398                case "$host_os" in
12399    aix*) gl_absname_cpp="$ac_cpp -C" ;;
12400    *)    gl_absname_cpp="$ac_cpp" ;;
12401  esac
12402
12403  case "$host_os" in
12404    mingw*)
12405                                          gl_dirsep_regex='[/\\]'
12406      ;;
12407    *)
12408      gl_dirsep_regex='\/'
12409      ;;
12410  esac
12411      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12412  gl_header_literal_regex=`echo 'errno.h' \
12413                           | sed -e "$gl_make_literal_regex_sed"`
12414  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12415      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12416      s|^/[^/]|//&|
12417      p
12418      q
12419    }'
12420
12421        gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12422  sed -n "$gl_absolute_header_sed"`
12423
12424           gl_header=$gl_cv_absolute_errno_h
12425           gl_cv_next_errno_h='"'$gl_header'"'
12426
12427
12428fi
12429{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
12430printf "%s\n" "$gl_cv_next_errno_h" >&6; }
12431     fi
12432     NEXT_ERRNO_H=$gl_cv_next_errno_h
12433
12434     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12435       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12436       gl_next_as_first_directive='<'errno.h'>'
12437     else
12438       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12439       gl_next_as_first_directive=$gl_cv_next_errno_h
12440     fi
12441     NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
12442
12443
12444
12445
12446    ERRNO_H='errno.h'
12447  fi
12448
12449   if test -n "$ERRNO_H"; then
12450  GL_GENERATE_ERRNO_H_TRUE=
12451  GL_GENERATE_ERRNO_H_FALSE='#'
12452else
12453  GL_GENERATE_ERRNO_H_TRUE='#'
12454  GL_GENERATE_ERRNO_H_FALSE=
12455fi
12456
12457
12458  if test -n "$ERRNO_H"; then
12459    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
12460printf %s "checking for EMULTIHOP value... " >&6; }
12461if test ${gl_cv_header_errno_h_EMULTIHOP+y}
12462then :
12463  printf %s "(cached) " >&6
12464else $as_nop
12465
12466      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12467/* end confdefs.h.  */
12468
12469#include <errno.h>
12470#ifdef EMULTIHOP
12471yes
12472#endif
12473
12474_ACEOF
12475if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12476  $EGREP "yes" >/dev/null 2>&1
12477then :
12478  gl_cv_header_errno_h_EMULTIHOP=yes
12479else $as_nop
12480  gl_cv_header_errno_h_EMULTIHOP=no
12481fi
12482rm -rf conftest*
12483
12484      if test $gl_cv_header_errno_h_EMULTIHOP = no; then
12485        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12486/* end confdefs.h.  */
12487
12488#define _XOPEN_SOURCE_EXTENDED 1
12489#include <errno.h>
12490#ifdef EMULTIHOP
12491yes
12492#endif
12493
12494_ACEOF
12495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12496  $EGREP "yes" >/dev/null 2>&1
12497then :
12498  gl_cv_header_errno_h_EMULTIHOP=hidden
12499fi
12500rm -rf conftest*
12501
12502        if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
12503                              if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
12504#define _XOPEN_SOURCE_EXTENDED 1
12505#include <errno.h>
12506/* The following two lines are a workaround against an autoconf-2.52 bug.  */
12507#include <stdio.h>
12508#include <stdlib.h>
12509"
12510then :
12511
12512fi
12513
12514        fi
12515      fi
12516
12517fi
12518{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
12519printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
12520    case $gl_cv_header_errno_h_EMULTIHOP in
12521      yes | no)
12522        EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
12523        ;;
12524      *)
12525        EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
12526        ;;
12527    esac
12528
12529
12530  fi
12531
12532
12533  if test -n "$ERRNO_H"; then
12534    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
12535printf %s "checking for ENOLINK value... " >&6; }
12536if test ${gl_cv_header_errno_h_ENOLINK+y}
12537then :
12538  printf %s "(cached) " >&6
12539else $as_nop
12540
12541      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12542/* end confdefs.h.  */
12543
12544#include <errno.h>
12545#ifdef ENOLINK
12546yes
12547#endif
12548
12549_ACEOF
12550if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12551  $EGREP "yes" >/dev/null 2>&1
12552then :
12553  gl_cv_header_errno_h_ENOLINK=yes
12554else $as_nop
12555  gl_cv_header_errno_h_ENOLINK=no
12556fi
12557rm -rf conftest*
12558
12559      if test $gl_cv_header_errno_h_ENOLINK = no; then
12560        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12561/* end confdefs.h.  */
12562
12563#define _XOPEN_SOURCE_EXTENDED 1
12564#include <errno.h>
12565#ifdef ENOLINK
12566yes
12567#endif
12568
12569_ACEOF
12570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12571  $EGREP "yes" >/dev/null 2>&1
12572then :
12573  gl_cv_header_errno_h_ENOLINK=hidden
12574fi
12575rm -rf conftest*
12576
12577        if test $gl_cv_header_errno_h_ENOLINK = hidden; then
12578                              if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
12579#define _XOPEN_SOURCE_EXTENDED 1
12580#include <errno.h>
12581/* The following two lines are a workaround against an autoconf-2.52 bug.  */
12582#include <stdio.h>
12583#include <stdlib.h>
12584"
12585then :
12586
12587fi
12588
12589        fi
12590      fi
12591
12592fi
12593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
12594printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
12595    case $gl_cv_header_errno_h_ENOLINK in
12596      yes | no)
12597        ENOLINK_HIDDEN=0; ENOLINK_VALUE=
12598        ;;
12599      *)
12600        ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
12601        ;;
12602    esac
12603
12604
12605  fi
12606
12607
12608  if test -n "$ERRNO_H"; then
12609    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
12610printf %s "checking for EOVERFLOW value... " >&6; }
12611if test ${gl_cv_header_errno_h_EOVERFLOW+y}
12612then :
12613  printf %s "(cached) " >&6
12614else $as_nop
12615
12616      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12617/* end confdefs.h.  */
12618
12619#include <errno.h>
12620#ifdef EOVERFLOW
12621yes
12622#endif
12623
12624_ACEOF
12625if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12626  $EGREP "yes" >/dev/null 2>&1
12627then :
12628  gl_cv_header_errno_h_EOVERFLOW=yes
12629else $as_nop
12630  gl_cv_header_errno_h_EOVERFLOW=no
12631fi
12632rm -rf conftest*
12633
12634      if test $gl_cv_header_errno_h_EOVERFLOW = no; then
12635        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12636/* end confdefs.h.  */
12637
12638#define _XOPEN_SOURCE_EXTENDED 1
12639#include <errno.h>
12640#ifdef EOVERFLOW
12641yes
12642#endif
12643
12644_ACEOF
12645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12646  $EGREP "yes" >/dev/null 2>&1
12647then :
12648  gl_cv_header_errno_h_EOVERFLOW=hidden
12649fi
12650rm -rf conftest*
12651
12652        if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
12653                              if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
12654#define _XOPEN_SOURCE_EXTENDED 1
12655#include <errno.h>
12656/* The following two lines are a workaround against an autoconf-2.52 bug.  */
12657#include <stdio.h>
12658#include <stdlib.h>
12659"
12660then :
12661
12662fi
12663
12664        fi
12665      fi
12666
12667fi
12668{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
12669printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
12670    case $gl_cv_header_errno_h_EOVERFLOW in
12671      yes | no)
12672        EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
12673        ;;
12674      *)
12675        EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
12676        ;;
12677    esac
12678
12679
12680  fi
12681
12682
12683ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
12684if test "x$ac_cv_have_decl_strerror_r" = xyes
12685then :
12686  ac_have_decl=1
12687else $as_nop
12688  ac_have_decl=0
12689fi
12690printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
12691
12692
12693if test $ac_cv_have_decl_strerror_r = yes; then
12694  # For backward compatibility's sake, define HAVE_STRERROR_R.
12695  # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
12696  # as AC_CHECK_DECLS_ONCE.)
12697
12698printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
12699
12700fi
12701
12702{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
12703printf %s "checking whether strerror_r returns char *... " >&6; }
12704if test ${ac_cv_func_strerror_r_char_p+y}
12705then :
12706  printf %s "(cached) " >&6
12707else $as_nop
12708
12709    ac_cv_func_strerror_r_char_p=no
12710    if test $ac_cv_have_decl_strerror_r = yes; then
12711      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12712/* end confdefs.h.  */
12713#include <string.h>
12714int
12715main (void)
12716{
12717
12718	  char buf[100];
12719	  char x = *strerror_r (0, buf, sizeof buf);
12720	  char *p = strerror_r (0, buf, sizeof buf);
12721	  return !p || x;
12722
12723  ;
12724  return 0;
12725}
12726_ACEOF
12727if ac_fn_c_try_compile "$LINENO"
12728then :
12729  ac_cv_func_strerror_r_char_p=yes
12730fi
12731rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12732
12733    fi
12734
12735fi
12736{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
12737printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
12738if test $ac_cv_func_strerror_r_char_p = yes; then
12739
12740printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
12741
12742fi
12743
12744
12745  XGETTEXT_EXTRA_OPTIONS=
12746
12747
12748
12749
12750
12751  ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
12752"
12753if test "x$ac_cv_type_sig_atomic_t" = xyes
12754then :
12755
12756printf "%s\n" "#define HAVE_SIG_ATOMIC_T 1" >>confdefs.h
12757
12758
12759else $as_nop
12760
12761printf "%s\n" "#define sig_atomic_t int" >>confdefs.h
12762
12763fi
12764
12765
12766ac_fn_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
12767if test "x$ac_cv_have_decl_fchdir" = xyes
12768then :
12769  ac_have_decl=1
12770else $as_nop
12771  ac_have_decl=0
12772fi
12773printf "%s\n" "#define HAVE_DECL_FCHDIR $ac_have_decl" >>confdefs.h
12774
12775
12776  GNULIB_DPRINTF=0;
12777  GNULIB_FCLOSE=0;
12778  GNULIB_FDOPEN=0;
12779  GNULIB_FFLUSH=0;
12780  GNULIB_FGETC=0;
12781  GNULIB_FGETS=0;
12782  GNULIB_FOPEN=0;
12783  GNULIB_FPRINTF=0;
12784  GNULIB_FPRINTF_POSIX=0;
12785  GNULIB_FPURGE=0;
12786  GNULIB_FPUTC=0;
12787  GNULIB_FPUTS=0;
12788  GNULIB_FREAD=0;
12789  GNULIB_FREOPEN=0;
12790  GNULIB_FSCANF=0;
12791  GNULIB_FSEEK=0;
12792  GNULIB_FSEEKO=0;
12793  GNULIB_FTELL=0;
12794  GNULIB_FTELLO=0;
12795  GNULIB_FWRITE=0;
12796  GNULIB_GETC=0;
12797  GNULIB_GETCHAR=0;
12798  GNULIB_GETDELIM=0;
12799  GNULIB_GETLINE=0;
12800  GNULIB_OBSTACK_PRINTF=0;
12801  GNULIB_OBSTACK_PRINTF_POSIX=0;
12802  GNULIB_PCLOSE=0;
12803  GNULIB_PERROR=0;
12804  GNULIB_POPEN=0;
12805  GNULIB_PRINTF=0;
12806  GNULIB_PRINTF_POSIX=0;
12807  GNULIB_PUTC=0;
12808  GNULIB_PUTCHAR=0;
12809  GNULIB_PUTS=0;
12810  GNULIB_REMOVE=0;
12811  GNULIB_RENAME=0;
12812  GNULIB_RENAMEAT=0;
12813  GNULIB_SCANF=0;
12814  GNULIB_SNPRINTF=0;
12815  GNULIB_SPRINTF_POSIX=0;
12816  GNULIB_STDIO_H_NONBLOCKING=0;
12817  GNULIB_STDIO_H_SIGPIPE=0;
12818  GNULIB_TMPFILE=0;
12819  GNULIB_VASPRINTF=0;
12820  GNULIB_VFSCANF=0;
12821  GNULIB_VSCANF=0;
12822  GNULIB_VDPRINTF=0;
12823  GNULIB_VFPRINTF=0;
12824  GNULIB_VFPRINTF_POSIX=0;
12825  GNULIB_VPRINTF=0;
12826  GNULIB_VPRINTF_POSIX=0;
12827  GNULIB_VSNPRINTF=0;
12828  GNULIB_VSPRINTF_POSIX=0;
12829    GNULIB_MDA_FCLOSEALL=1;
12830  GNULIB_MDA_FDOPEN=1;
12831  GNULIB_MDA_FILENO=1;
12832  GNULIB_MDA_GETW=1;
12833  GNULIB_MDA_PUTW=1;
12834  GNULIB_MDA_TEMPNAM=1;
12835    HAVE_DECL_FCLOSEALL=1;
12836  HAVE_DECL_FPURGE=1;
12837  HAVE_DECL_FSEEKO=1;
12838  HAVE_DECL_FTELLO=1;
12839  HAVE_DECL_GETDELIM=1;
12840  HAVE_DECL_GETLINE=1;
12841  HAVE_DECL_OBSTACK_PRINTF=1;
12842  HAVE_DECL_SNPRINTF=1;
12843  HAVE_DECL_VSNPRINTF=1;
12844  HAVE_DPRINTF=1;
12845  HAVE_FSEEKO=1;
12846  HAVE_FTELLO=1;
12847  HAVE_PCLOSE=1;
12848  HAVE_POPEN=1;
12849  HAVE_RENAMEAT=1;
12850  HAVE_VASPRINTF=1;
12851  HAVE_VDPRINTF=1;
12852  REPLACE_DPRINTF=0;
12853  REPLACE_FCLOSE=0;
12854  REPLACE_FDOPEN=0;
12855  REPLACE_FFLUSH=0;
12856  REPLACE_FOPEN=0;
12857  REPLACE_FPRINTF=0;
12858  REPLACE_FPURGE=0;
12859  REPLACE_FREOPEN=0;
12860  REPLACE_FSEEK=0;
12861  REPLACE_FSEEKO=0;
12862  REPLACE_FTELL=0;
12863  REPLACE_FTELLO=0;
12864  REPLACE_GETDELIM=0;
12865  REPLACE_GETLINE=0;
12866  REPLACE_OBSTACK_PRINTF=0;
12867  REPLACE_PERROR=0;
12868  REPLACE_POPEN=0;
12869  REPLACE_PRINTF=0;
12870  REPLACE_REMOVE=0;
12871  REPLACE_RENAME=0;
12872  REPLACE_RENAMEAT=0;
12873  REPLACE_SNPRINTF=0;
12874  REPLACE_SPRINTF=0;
12875  REPLACE_STDIO_READ_FUNCS=0;
12876  REPLACE_STDIO_WRITE_FUNCS=0;
12877  REPLACE_TMPFILE=0;
12878  REPLACE_VASPRINTF=0;
12879  REPLACE_VDPRINTF=0;
12880  REPLACE_VFPRINTF=0;
12881  REPLACE_VPRINTF=0;
12882  REPLACE_VSNPRINTF=0;
12883  REPLACE_VSPRINTF=0;
12884
12885
12886  GNULIB_CREAT=0;
12887  GNULIB_FCNTL=0;
12888  GNULIB_NONBLOCKING=0;
12889  GNULIB_OPEN=0;
12890  GNULIB_OPENAT=0;
12891    GNULIB_MDA_CREAT=1;
12892  GNULIB_MDA_OPEN=1;
12893    HAVE_FCNTL=1;
12894  HAVE_OPENAT=1;
12895  REPLACE_CREAT=0;
12896  REPLACE_FCNTL=0;
12897  REPLACE_OPEN=0;
12898  REPLACE_OPENAT=0;
12899
12900
12901
12902
12903
12904
12905
12906
12907  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
12908printf %s "checking for working fcntl.h... " >&6; }
12909if test ${gl_cv_header_working_fcntl_h+y}
12910then :
12911  printf %s "(cached) " >&6
12912else $as_nop
12913  if test "$cross_compiling" = yes
12914then :
12915  case "$host_os" in
12916                  # Guess 'no' on native Windows.
12917          mingw*) gl_cv_header_working_fcntl_h='no' ;;
12918          *)      gl_cv_header_working_fcntl_h=cross-compiling ;;
12919        esac
12920
12921else $as_nop
12922  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12923/* end confdefs.h.  */
12924#include <sys/types.h>
12925           #include <sys/stat.h>
12926           #if HAVE_UNISTD_H
12927           # include <unistd.h>
12928           #else /* on Windows with MSVC */
12929           # include <io.h>
12930           # include <stdlib.h>
12931           # defined sleep(n) _sleep ((n) * 1000)
12932           #endif
12933           #include <fcntl.h>
12934
12935
12936$gl_mda_defines
12937
12938           #ifndef O_NOATIME
12939            #define O_NOATIME 0
12940           #endif
12941           #ifndef O_NOFOLLOW
12942            #define O_NOFOLLOW 0
12943           #endif
12944           static int const constants[] =
12945            {
12946              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
12947              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
12948            };
12949
12950int
12951main (void)
12952{
12953
12954            int result = !constants;
12955            #if HAVE_SYMLINK
12956            {
12957              static char const sym[] = "conftest.sym";
12958              if (symlink ("/dev/null", sym) != 0)
12959                result |= 2;
12960              else
12961                {
12962                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
12963                  if (fd >= 0)
12964                    {
12965                      close (fd);
12966                      result |= 4;
12967                    }
12968                }
12969              if (unlink (sym) != 0 || symlink (".", sym) != 0)
12970                result |= 2;
12971              else
12972                {
12973                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
12974                  if (fd >= 0)
12975                    {
12976                      close (fd);
12977                      result |= 4;
12978                    }
12979                }
12980              unlink (sym);
12981            }
12982            #endif
12983            {
12984              static char const file[] = "confdefs.h";
12985              int fd = open (file, O_RDONLY | O_NOATIME);
12986              if (fd < 0)
12987                result |= 8;
12988              else
12989                {
12990                  struct stat st0;
12991                  if (fstat (fd, &st0) != 0)
12992                    result |= 16;
12993                  else
12994                    {
12995                      char c;
12996                      sleep (1);
12997                      if (read (fd, &c, 1) != 1)
12998                        result |= 24;
12999                      else
13000                        {
13001                          if (close (fd) != 0)
13002                            result |= 32;
13003                          else
13004                            {
13005                              struct stat st1;
13006                              if (stat (file, &st1) != 0)
13007                                result |= 40;
13008                              else
13009                                if (st0.st_atime != st1.st_atime)
13010                                  result |= 64;
13011                            }
13012                        }
13013                    }
13014                }
13015            }
13016            return result;
13017  ;
13018  return 0;
13019}
13020_ACEOF
13021if ac_fn_c_try_run "$LINENO"
13022then :
13023  gl_cv_header_working_fcntl_h=yes
13024else $as_nop
13025  case $? in #(
13026        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
13027        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
13028        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
13029         *) gl_cv_header_working_fcntl_h='no';;
13030        esac
13031fi
13032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13033  conftest.$ac_objext conftest.beam conftest.$ac_ext
13034fi
13035
13036
13037fi
13038{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
13039printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
13040
13041  case $gl_cv_header_working_fcntl_h in #(
13042  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
13043  *) ac_val=1;;
13044  esac
13045
13046printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
13047
13048
13049  case $gl_cv_header_working_fcntl_h in #(
13050  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
13051  *) ac_val=1;;
13052  esac
13053
13054printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
13055
13056
13057
13058  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
13059"
13060if test "x$ac_cv_type_pid_t" = xyes
13061then :
13062
13063else $as_nop
13064                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13065/* end confdefs.h.  */
13066
13067          #if defined _WIN64 && !defined __CYGWIN__
13068          LLP64
13069          #endif
13070
13071int
13072main (void)
13073{
13074
13075  ;
13076  return 0;
13077}
13078
13079_ACEOF
13080if ac_fn_c_try_compile "$LINENO"
13081then :
13082  ac_pid_type='int'
13083else $as_nop
13084  ac_pid_type='__int64'
13085fi
13086rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13087
13088printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
13089
13090
13091fi
13092
13093
13094ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
13095if test "x$ac_cv_type_mode_t" = xyes
13096then :
13097
13098else $as_nop
13099
13100printf "%s\n" "#define mode_t int" >>confdefs.h
13101
13102fi
13103
13104
13105
13106
13107  ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
13108if test "x$ac_cv_func_eaccess" = xyes
13109then :
13110
13111else $as_nop
13112
13113printf "%s\n" "#define eaccess access" >>confdefs.h
13114
13115fi
13116
13117
13118
13119  GNULIB_FLOCK=0;
13120  HAVE_FLOCK=1;
13121
13122
13123
13124  GNULIB_FNMATCH=0;
13125    HAVE_FNMATCH=1;
13126  REPLACE_FNMATCH=0;
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142     if test $gl_cv_have_include_next = yes; then
13143       gl_cv_next_fnmatch_h='<'fnmatch.h'>'
13144     else
13145       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
13146printf %s "checking absolute name of <fnmatch.h>... " >&6; }
13147if test ${gl_cv_next_fnmatch_h+y}
13148then :
13149  printf %s "(cached) " >&6
13150else $as_nop
13151
13152             if test $ac_cv_header_fnmatch_h = yes; then
13153
13154
13155
13156
13157  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13158/* end confdefs.h.  */
13159#include <fnmatch.h>
13160_ACEOF
13161                case "$host_os" in
13162    aix*) gl_absname_cpp="$ac_cpp -C" ;;
13163    *)    gl_absname_cpp="$ac_cpp" ;;
13164  esac
13165
13166  case "$host_os" in
13167    mingw*)
13168                                          gl_dirsep_regex='[/\\]'
13169      ;;
13170    *)
13171      gl_dirsep_regex='\/'
13172      ;;
13173  esac
13174      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13175  gl_header_literal_regex=`echo 'fnmatch.h' \
13176                           | sed -e "$gl_make_literal_regex_sed"`
13177  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13178      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13179      s|^/[^/]|//&|
13180      p
13181      q
13182    }'
13183
13184        gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13185  sed -n "$gl_absolute_header_sed"`
13186
13187           gl_header=$gl_cv_absolute_fnmatch_h
13188           gl_cv_next_fnmatch_h='"'$gl_header'"'
13189          else
13190               gl_cv_next_fnmatch_h='<'fnmatch.h'>'
13191             fi
13192
13193
13194fi
13195{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
13196printf "%s\n" "$gl_cv_next_fnmatch_h" >&6; }
13197     fi
13198     NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
13199
13200     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13201       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13202       gl_next_as_first_directive='<'fnmatch.h'>'
13203     else
13204       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13205       gl_next_as_first_directive=$gl_cv_next_fnmatch_h
13206     fi
13207     NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
13208
13209
13210
13211
13212
13213
13214
13215  if test $ac_cv_header_fnmatch_h = yes; then
13216    HAVE_FNMATCH_H=1
13217  else
13218    HAVE_FNMATCH_H=0
13219  fi
13220
13221
13222  FNMATCH_H=''
13223     if false; then
13224              FNMATCH_H=fnmatch.h
13225     else
13226       if test $ac_cv_header_fnmatch_h != yes; then
13227                  FNMATCH_H=fnmatch.h
13228       fi
13229     fi
13230
13231
13232   if test -n "$FNMATCH_H"; then
13233  GL_GENERATE_FNMATCH_H_TRUE=
13234  GL_GENERATE_FNMATCH_H_FALSE='#'
13235else
13236  GL_GENERATE_FNMATCH_H_TRUE='#'
13237  GL_GENERATE_FNMATCH_H_FALSE=
13238fi
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
13249printf %s "checking for mbstate_t... " >&6; }
13250if test ${ac_cv_type_mbstate_t+y}
13251then :
13252  printf %s "(cached) " >&6
13253else $as_nop
13254  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13255/* end confdefs.h.  */
13256$ac_includes_default
13257             #include <wchar.h>
13258int
13259main (void)
13260{
13261mbstate_t x; return sizeof x;
13262  ;
13263  return 0;
13264}
13265_ACEOF
13266if ac_fn_c_try_compile "$LINENO"
13267then :
13268  ac_cv_type_mbstate_t=yes
13269else $as_nop
13270  ac_cv_type_mbstate_t=no
13271fi
13272rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13273fi
13274{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
13275printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
13276   if test $ac_cv_type_mbstate_t = yes; then
13277
13278printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
13279
13280   else
13281
13282printf "%s\n" "#define mbstate_t int" >>confdefs.h
13283
13284   fi
13285
13286
13287
13288
13289
13290
13291
13292    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
13293printf %s "checking whether stdin defaults to large file offsets... " >&6; }
13294if test ${gl_cv_var_stdin_large_offset+y}
13295then :
13296  printf %s "(cached) " >&6
13297else $as_nop
13298  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13299/* end confdefs.h.  */
13300#include <stdio.h>
13301int
13302main (void)
13303{
13304#if defined __SL64 && defined __SCLE /* cygwin */
13305  /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
13306     fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
13307     it is easier to do a version check than building a runtime test.  */
13308# include <cygwin/version.h>
13309# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
13310  choke me
13311# endif
13312#endif
13313  ;
13314  return 0;
13315}
13316_ACEOF
13317if ac_fn_c_try_link "$LINENO"
13318then :
13319  gl_cv_var_stdin_large_offset=yes
13320else $as_nop
13321  gl_cv_var_stdin_large_offset=no
13322fi
13323rm -f core conftest.err conftest.$ac_objext conftest.beam \
13324    conftest$ac_exeext conftest.$ac_ext
13325fi
13326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
13327printf "%s\n" "$gl_cv_var_stdin_large_offset" >&6; }
13328
13329
13330
13331
13332
13333  case "$host_os" in
13334    mingw*)
13335                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
13336printf %s "checking for 64-bit off_t... " >&6; }
13337if test ${gl_cv_type_off_t_64+y}
13338then :
13339  printf %s "(cached) " >&6
13340else $as_nop
13341  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13342/* end confdefs.h.  */
13343#include <sys/types.h>
13344                int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
13345
13346int
13347main (void)
13348{
13349
13350  ;
13351  return 0;
13352}
13353_ACEOF
13354if ac_fn_c_try_compile "$LINENO"
13355then :
13356  gl_cv_type_off_t_64=yes
13357else $as_nop
13358  gl_cv_type_off_t_64=no
13359fi
13360rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13361
13362fi
13363{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
13364printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
13365      if test $gl_cv_type_off_t_64 = no; then
13366        WINDOWS_64_BIT_OFF_T=1
13367      else
13368        WINDOWS_64_BIT_OFF_T=0
13369      fi
13370                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
13371printf %s "checking for 64-bit st_size... " >&6; }
13372if test ${gl_cv_member_st_size_64+y}
13373then :
13374  printf %s "(cached) " >&6
13375else $as_nop
13376  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13377/* end confdefs.h.  */
13378#include <sys/types.h>
13379                struct stat buf;
13380                int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
13381
13382int
13383main (void)
13384{
13385
13386  ;
13387  return 0;
13388}
13389_ACEOF
13390if ac_fn_c_try_compile "$LINENO"
13391then :
13392  gl_cv_member_st_size_64=yes
13393else $as_nop
13394  gl_cv_member_st_size_64=no
13395fi
13396rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13397
13398fi
13399{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
13400printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
13401      if test $gl_cv_member_st_size_64 = no; then
13402        WINDOWS_64_BIT_ST_SIZE=1
13403      else
13404        WINDOWS_64_BIT_ST_SIZE=0
13405      fi
13406      ;;
13407    *)
13408                                                      WINDOWS_64_BIT_OFF_T=0
13409      WINDOWS_64_BIT_ST_SIZE=0
13410      ;;
13411  esac
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433     if test $gl_cv_have_include_next = yes; then
13434       gl_cv_next_sys_types_h='<'sys/types.h'>'
13435     else
13436       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
13437printf %s "checking absolute name of <sys/types.h>... " >&6; }
13438if test ${gl_cv_next_sys_types_h+y}
13439then :
13440  printf %s "(cached) " >&6
13441else $as_nop
13442
13443
13444
13445  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13446/* end confdefs.h.  */
13447#include <sys/types.h>
13448_ACEOF
13449                case "$host_os" in
13450    aix*) gl_absname_cpp="$ac_cpp -C" ;;
13451    *)    gl_absname_cpp="$ac_cpp" ;;
13452  esac
13453
13454  case "$host_os" in
13455    mingw*)
13456                                          gl_dirsep_regex='[/\\]'
13457      ;;
13458    *)
13459      gl_dirsep_regex='\/'
13460      ;;
13461  esac
13462      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13463  gl_header_literal_regex=`echo 'sys/types.h' \
13464                           | sed -e "$gl_make_literal_regex_sed"`
13465  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13466      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13467      s|^/[^/]|//&|
13468      p
13469      q
13470    }'
13471
13472        gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13473  sed -n "$gl_absolute_header_sed"`
13474
13475           gl_header=$gl_cv_absolute_sys_types_h
13476           gl_cv_next_sys_types_h='"'$gl_header'"'
13477
13478
13479fi
13480{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
13481printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
13482     fi
13483     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
13484
13485     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13486       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13487       gl_next_as_first_directive='<'sys/types.h'>'
13488     else
13489       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13490       gl_next_as_first_directive=$gl_cv_next_sys_types_h
13491     fi
13492     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505    WINDOWS_STAT_INODES=0
13506
13507
13508
13509ac_fn_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
13510if test "x$ac_cv_have_decl_fseeko" = xyes
13511then :
13512  ac_have_decl=1
13513else $as_nop
13514  ac_have_decl=0
13515fi
13516printf "%s\n" "#define HAVE_DECL_FSEEKO $ac_have_decl" >>confdefs.h
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
13527printf %s "checking for fseeko... " >&6; }
13528if test ${gl_cv_func_fseeko+y}
13529then :
13530  printf %s "(cached) " >&6
13531else $as_nop
13532
13533      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13534/* end confdefs.h.  */
13535#include <stdio.h>
13536
13537int
13538main (void)
13539{
13540fseeko (stdin, 0, 0);
13541  ;
13542  return 0;
13543}
13544_ACEOF
13545if ac_fn_c_try_link "$LINENO"
13546then :
13547  gl_cv_func_fseeko=yes
13548else $as_nop
13549  gl_cv_func_fseeko=no
13550fi
13551rm -f core conftest.err conftest.$ac_objext conftest.beam \
13552    conftest$ac_exeext conftest.$ac_ext
13553
13554fi
13555{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
13556printf "%s\n" "$gl_cv_func_fseeko" >&6; }
13557
13558
13559  if test $ac_cv_have_decl_fseeko = no; then
13560    HAVE_DECL_FSEEKO=0
13561  fi
13562
13563  if test $gl_cv_func_fseeko = no; then
13564    HAVE_FSEEKO=0
13565  else
13566    if test $WINDOWS_64_BIT_OFF_T = 1; then
13567      REPLACE_FSEEKO=1
13568    fi
13569    if test $gl_cv_var_stdin_large_offset = no; then
13570      REPLACE_FSEEKO=1
13571    fi
13572
13573
13574
13575  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
13576printf %s "checking whether fflush works on input streams... " >&6; }
13577if test ${gl_cv_func_fflush_stdin+y}
13578then :
13579  printf %s "(cached) " >&6
13580else $as_nop
13581  echo hello world > conftest.txt
13582     if test "$cross_compiling" = yes
13583then :
13584  case "$host_os" in
13585                  # Guess no on native Windows.
13586          mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
13587          *)      gl_cv_func_fflush_stdin=cross ;;
13588        esac
13589
13590else $as_nop
13591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13592/* end confdefs.h.  */
13593
13594#include <stdio.h>
13595#if HAVE_UNISTD_H
13596# include <unistd.h>
13597#else /* on Windows with MSVC */
13598# include <io.h>
13599#endif
13600
13601
13602$gl_mda_defines
13603
13604int
13605main (void)
13606{
13607FILE *f = fopen ("conftest.txt", "r");
13608         char buffer[10];
13609         int fd;
13610         int c;
13611         if (f == NULL)
13612           return 1;
13613         fd = fileno (f);
13614         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
13615           { fclose (f); return 2; }
13616         /* For deterministic results, ensure f read a bigger buffer.  */
13617         if (lseek (fd, 0, SEEK_CUR) == 5)
13618           { fclose (f); return 3; }
13619         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
13620            on BSD systems and on mingw.  */
13621         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
13622           { fclose (f); return 4; }
13623         if (lseek (fd, 0, SEEK_CUR) != 5)
13624           { fclose (f); return 5; }
13625         /* Verify behaviour of fflush after ungetc. See
13626            <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
13627         /* Verify behaviour of fflush after a backup ungetc.  This fails on
13628            mingw.  */
13629         c = fgetc (f);
13630         ungetc (c, f);
13631         fflush (f);
13632         if (fgetc (f) != c)
13633           { fclose (f); return 6; }
13634         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
13635            on glibc 2.8 and on BSD systems.  */
13636         c = fgetc (f);
13637         ungetc ('@', f);
13638         fflush (f);
13639         if (fgetc (f) != c)
13640           { fclose (f); return 7; }
13641         fclose (f);
13642         return 0;
13643
13644  ;
13645  return 0;
13646}
13647_ACEOF
13648if ac_fn_c_try_run "$LINENO"
13649then :
13650  gl_cv_func_fflush_stdin=yes
13651else $as_nop
13652  gl_cv_func_fflush_stdin=no
13653fi
13654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13655  conftest.$ac_objext conftest.beam conftest.$ac_ext
13656fi
13657
13658     rm conftest.txt
13659
13660fi
13661{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
13662printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
13663  case "$gl_cv_func_fflush_stdin" in
13664    *yes) gl_func_fflush_stdin=1 ;;
13665    *no)  gl_func_fflush_stdin=0 ;;
13666    *)    gl_func_fflush_stdin='(-1)' ;;
13667  esac
13668
13669printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
13670
13671
13672      case "$gl_cv_func_fflush_stdin" in
13673        *yes) ;;
13674        *) REPLACE_FSEEKO=1 ;;
13675      esac
13676
13677  fi
13678
13679
13680     GNULIB_FCHMODAT=0;
13681  GNULIB_FSTAT=0;
13682  GNULIB_FSTATAT=0;
13683  GNULIB_FUTIMENS=0;
13684  GNULIB_GETUMASK=0;
13685  GNULIB_LCHMOD=0;
13686  GNULIB_LSTAT=0;
13687  GNULIB_MKDIR=0;
13688  GNULIB_MKDIRAT=0;
13689  GNULIB_MKFIFO=0;
13690  GNULIB_MKFIFOAT=0;
13691  GNULIB_MKNOD=0;
13692  GNULIB_MKNODAT=0;
13693  GNULIB_STAT=0;
13694  GNULIB_UTIMENSAT=0;
13695  GNULIB_OVERRIDES_STRUCT_STAT=0;
13696    GNULIB_MDA_CHMOD=1;
13697  GNULIB_MDA_MKDIR=1;
13698  GNULIB_MDA_UMASK=1;
13699    HAVE_FCHMODAT=1;
13700  HAVE_FSTATAT=1;
13701  HAVE_FUTIMENS=1;
13702  HAVE_GETUMASK=1;
13703  HAVE_LCHMOD=1;
13704  HAVE_LSTAT=1;
13705  HAVE_MKDIRAT=1;
13706  HAVE_MKFIFO=1;
13707  HAVE_MKFIFOAT=1;
13708  HAVE_MKNOD=1;
13709  HAVE_MKNODAT=1;
13710  HAVE_UTIMENSAT=1;
13711  REPLACE_FCHMODAT=0;
13712  REPLACE_FSTAT=0;
13713  REPLACE_FSTATAT=0;
13714  REPLACE_FUTIMENS=0;
13715  REPLACE_LSTAT=0;
13716  REPLACE_MKDIR=0;
13717  REPLACE_MKFIFO=0;
13718  REPLACE_MKFIFOAT=0;
13719  REPLACE_MKNOD=0;
13720  REPLACE_MKNODAT=0;
13721  REPLACE_STAT=0;
13722  REPLACE_UTIMENSAT=0;
13723
13724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
13725printf %s "checking whether stat file-mode macros are broken... " >&6; }
13726if test ${ac_cv_header_stat_broken+y}
13727then :
13728  printf %s "(cached) " >&6
13729else $as_nop
13730  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13731/* end confdefs.h.  */
13732#include <sys/types.h>
13733#include <sys/stat.h>
13734
13735#if defined S_ISBLK && defined S_IFDIR
13736extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
13737#endif
13738
13739#if defined S_ISBLK && defined S_IFCHR
13740extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
13741#endif
13742
13743#if defined S_ISLNK && defined S_IFREG
13744extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
13745#endif
13746
13747#if defined S_ISSOCK && defined S_IFREG
13748extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
13749#endif
13750
13751_ACEOF
13752if ac_fn_c_try_compile "$LINENO"
13753then :
13754  ac_cv_header_stat_broken=no
13755else $as_nop
13756  ac_cv_header_stat_broken=yes
13757fi
13758rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13759fi
13760{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
13761printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
13762if test $ac_cv_header_stat_broken = yes; then
13763
13764printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
13765
13766fi
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782     if test $gl_cv_have_include_next = yes; then
13783       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
13784     else
13785       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
13786printf %s "checking absolute name of <sys/stat.h>... " >&6; }
13787if test ${gl_cv_next_sys_stat_h+y}
13788then :
13789  printf %s "(cached) " >&6
13790else $as_nop
13791
13792             if test $ac_cv_header_sys_stat_h = yes; then
13793
13794
13795
13796
13797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13798/* end confdefs.h.  */
13799#include <sys/stat.h>
13800_ACEOF
13801                case "$host_os" in
13802    aix*) gl_absname_cpp="$ac_cpp -C" ;;
13803    *)    gl_absname_cpp="$ac_cpp" ;;
13804  esac
13805
13806  case "$host_os" in
13807    mingw*)
13808                                          gl_dirsep_regex='[/\\]'
13809      ;;
13810    *)
13811      gl_dirsep_regex='\/'
13812      ;;
13813  esac
13814      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13815  gl_header_literal_regex=`echo 'sys/stat.h' \
13816                           | sed -e "$gl_make_literal_regex_sed"`
13817  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13818      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13819      s|^/[^/]|//&|
13820      p
13821      q
13822    }'
13823
13824        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13825  sed -n "$gl_absolute_header_sed"`
13826
13827           gl_header=$gl_cv_absolute_sys_stat_h
13828           gl_cv_next_sys_stat_h='"'$gl_header'"'
13829          else
13830               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
13831             fi
13832
13833
13834fi
13835{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
13836printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
13837     fi
13838     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
13839
13840     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13841       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13842       gl_next_as_first_directive='<'sys/stat.h'>'
13843     else
13844       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13845       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
13846     fi
13847     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
13848
13849
13850
13851
13852
13853
13854
13855
13856    WINDOWS_STAT_TIMESPEC=0
13857
13858
13859
13860
13861
13862
13863
13864
13865      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
13866     #include <sys/stat.h>
13867"
13868if test "x$ac_cv_type_nlink_t" = xyes
13869then :
13870
13871else $as_nop
13872
13873printf "%s\n" "#define nlink_t int" >>confdefs.h
13874
13875fi
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886  case "$host_os" in
13887    mingw*)
13888      ac_fn_c_check_header_compile "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
13889if test "x$ac_cv_header_sdkddkver_h" = xyes
13890then :
13891  printf "%s\n" "#define HAVE_SDKDDKVER_H 1" >>confdefs.h
13892
13893fi
13894
13895      ;;
13896  esac
13897
13898
13899
13900ac_fn_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
13901if test "x$ac_cv_have_decl_ftello" = xyes
13902then :
13903  ac_have_decl=1
13904else $as_nop
13905  ac_have_decl=0
13906fi
13907printf "%s\n" "#define HAVE_DECL_FTELLO $ac_have_decl" >>confdefs.h
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918  if test $ac_cv_have_decl_ftello = no; then
13919    HAVE_DECL_FTELLO=0
13920  fi
13921
13922  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
13923printf %s "checking for ftello... " >&6; }
13924if test ${gl_cv_func_ftello+y}
13925then :
13926  printf %s "(cached) " >&6
13927else $as_nop
13928
13929      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13930/* end confdefs.h.  */
13931#include <stdio.h>
13932int
13933main (void)
13934{
13935ftello (stdin);
13936  ;
13937  return 0;
13938}
13939_ACEOF
13940if ac_fn_c_try_link "$LINENO"
13941then :
13942  gl_cv_func_ftello=yes
13943else $as_nop
13944  gl_cv_func_ftello=no
13945fi
13946rm -f core conftest.err conftest.$ac_objext conftest.beam \
13947    conftest$ac_exeext conftest.$ac_ext
13948
13949fi
13950{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
13951printf "%s\n" "$gl_cv_func_ftello" >&6; }
13952  if test $gl_cv_func_ftello = no; then
13953    HAVE_FTELLO=0
13954  else
13955    if test $WINDOWS_64_BIT_OFF_T = 1; then
13956      REPLACE_FTELLO=1
13957    fi
13958    if test $gl_cv_var_stdin_large_offset = no; then
13959      REPLACE_FTELLO=1
13960    fi
13961    if test $REPLACE_FTELLO = 0; then
13962
13963      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
13964printf %s "checking whether ftello works... " >&6; }
13965if test ${gl_cv_func_ftello_works+y}
13966then :
13967  printf %s "(cached) " >&6
13968else $as_nop
13969
13970                              case "$host_os" in
13971                      # Guess no on Solaris.
13972            solaris*) gl_cv_func_ftello_works="guessing no" ;;
13973                      # Guess yes on native Windows.
13974            mingw*)   gl_cv_func_ftello_works="guessing yes" ;;
13975                      # Guess yes otherwise.
13976            *)        gl_cv_func_ftello_works="guessing yes" ;;
13977          esac
13978          if test "$cross_compiling" = yes
13979then :
13980  :
13981else $as_nop
13982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13983/* end confdefs.h.  */
13984
13985#include <stdio.h>
13986#include <stdlib.h>
13987#include <string.h>
13988#define TESTFILE "conftest.tmp"
13989int
13990main (void)
13991{
13992  FILE *fp;
13993
13994  /* Create a file with some contents.  */
13995  fp = fopen (TESTFILE, "w");
13996  if (fp == NULL)
13997    return 70;
13998  if (fwrite ("foogarsh", 1, 8, fp) < 8)
13999    { fclose (fp); return 71; }
14000  if (fclose (fp))
14001    return 72;
14002
14003  /* The file's contents is now "foogarsh".  */
14004
14005  /* Try writing after reading to EOF.  */
14006  fp = fopen (TESTFILE, "r+");
14007  if (fp == NULL)
14008    return 73;
14009  if (fseek (fp, -1, SEEK_END))
14010    { fclose (fp); return 74; }
14011  if (!(getc (fp) == 'h'))
14012    { fclose (fp); return 1; }
14013  if (!(getc (fp) == EOF))
14014    { fclose (fp); return 2; }
14015  if (!(ftell (fp) == 8))
14016    { fclose (fp); return 3; }
14017  if (!(ftell (fp) == 8))
14018    { fclose (fp); return 4; }
14019  if (!(putc ('!', fp) == '!'))
14020    { fclose (fp); return 5; }
14021  if (!(ftell (fp) == 9))
14022    { fclose (fp); return 6; }
14023  if (!(fclose (fp) == 0))
14024    return 7;
14025  fp = fopen (TESTFILE, "r");
14026  if (fp == NULL)
14027    return 75;
14028  {
14029    char buf[10];
14030    if (!(fread (buf, 1, 10, fp) == 9))
14031      { fclose (fp); return 10; }
14032    if (!(memcmp (buf, "foogarsh!", 9) == 0))
14033      { fclose (fp); return 11; }
14034  }
14035  if (!(fclose (fp) == 0))
14036    return 12;
14037
14038  /* The file's contents is now "foogarsh!".  */
14039
14040  return 0;
14041}
14042_ACEOF
14043if ac_fn_c_try_run "$LINENO"
14044then :
14045  gl_cv_func_ftello_works=yes
14046else $as_nop
14047  gl_cv_func_ftello_works=no
14048fi
14049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14050  conftest.$ac_objext conftest.beam conftest.$ac_ext
14051fi
14052
14053
14054fi
14055{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
14056printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
14057      case "$gl_cv_func_ftello_works" in
14058        *yes) ;;
14059        *)
14060          REPLACE_FTELLO=1
14061
14062printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
14063
14064          ;;
14065      esac
14066    fi
14067  fi
14068
14069
14070
14071
14072  GNULIB_GETADDRINFO=0;
14073    HAVE_STRUCT_ADDRINFO=1;
14074  HAVE_DECL_FREEADDRINFO=1;
14075  HAVE_DECL_GAI_STRERROR=1;
14076  HAVE_DECL_GETADDRINFO=1;
14077  HAVE_DECL_GETNAMEINFO=1;
14078  REPLACE_GAI_STRERROR=0;
14079  REPLACE_GETADDRINFO=0;
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093     if test $gl_cv_have_include_next = yes; then
14094       gl_cv_next_netdb_h='<'netdb.h'>'
14095     else
14096       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
14097printf %s "checking absolute name of <netdb.h>... " >&6; }
14098if test ${gl_cv_next_netdb_h+y}
14099then :
14100  printf %s "(cached) " >&6
14101else $as_nop
14102
14103             if test $ac_cv_header_netdb_h = yes; then
14104
14105
14106
14107
14108  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14109/* end confdefs.h.  */
14110#include <netdb.h>
14111_ACEOF
14112                case "$host_os" in
14113    aix*) gl_absname_cpp="$ac_cpp -C" ;;
14114    *)    gl_absname_cpp="$ac_cpp" ;;
14115  esac
14116
14117  case "$host_os" in
14118    mingw*)
14119                                          gl_dirsep_regex='[/\\]'
14120      ;;
14121    *)
14122      gl_dirsep_regex='\/'
14123      ;;
14124  esac
14125      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14126  gl_header_literal_regex=`echo 'netdb.h' \
14127                           | sed -e "$gl_make_literal_regex_sed"`
14128  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14129      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14130      s|^/[^/]|//&|
14131      p
14132      q
14133    }'
14134
14135        gl_cv_absolute_netdb_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14136  sed -n "$gl_absolute_header_sed"`
14137
14138           gl_header=$gl_cv_absolute_netdb_h
14139           gl_cv_next_netdb_h='"'$gl_header'"'
14140          else
14141               gl_cv_next_netdb_h='<'netdb.h'>'
14142             fi
14143
14144
14145fi
14146{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
14147printf "%s\n" "$gl_cv_next_netdb_h" >&6; }
14148     fi
14149     NEXT_NETDB_H=$gl_cv_next_netdb_h
14150
14151     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14152       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14153       gl_next_as_first_directive='<'netdb.h'>'
14154     else
14155       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14156       gl_next_as_first_directive=$gl_cv_next_netdb_h
14157     fi
14158     NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
14159
14160
14161
14162
14163  if test $ac_cv_header_netdb_h = yes; then
14164    HAVE_NETDB_H=1
14165  else
14166    HAVE_NETDB_H=0
14167  fi
14168
14169
14170
14171
14172
14173
14174
14175                  HOSTENT_LIB=
14176  gl_saved_libs="$LIBS"
14177  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
14178printf %s "checking for library containing gethostbyname... " >&6; }
14179if test ${ac_cv_search_gethostbyname+y}
14180then :
14181  printf %s "(cached) " >&6
14182else $as_nop
14183  ac_func_search_save_LIBS=$LIBS
14184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14185/* end confdefs.h.  */
14186
14187/* Override any GCC internal prototype to avoid an error.
14188   Use char because int might match the return type of a GCC
14189   builtin and then its argument prototype would still apply.  */
14190char gethostbyname ();
14191int
14192main (void)
14193{
14194return gethostbyname ();
14195  ;
14196  return 0;
14197}
14198_ACEOF
14199for ac_lib in '' nsl network net
14200do
14201  if test -z "$ac_lib"; then
14202    ac_res="none required"
14203  else
14204    ac_res=-l$ac_lib
14205    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14206  fi
14207  if ac_fn_c_try_link "$LINENO"
14208then :
14209  ac_cv_search_gethostbyname=$ac_res
14210fi
14211rm -f core conftest.err conftest.$ac_objext conftest.beam \
14212    conftest$ac_exeext
14213  if test ${ac_cv_search_gethostbyname+y}
14214then :
14215  break
14216fi
14217done
14218if test ${ac_cv_search_gethostbyname+y}
14219then :
14220
14221else $as_nop
14222  ac_cv_search_gethostbyname=no
14223fi
14224rm conftest.$ac_ext
14225LIBS=$ac_func_search_save_LIBS
14226fi
14227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
14228printf "%s\n" "$ac_cv_search_gethostbyname" >&6; }
14229ac_res=$ac_cv_search_gethostbyname
14230if test "$ac_res" != no
14231then :
14232  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14233  if test "$ac_cv_search_gethostbyname" != "none required"; then
14234       HOSTENT_LIB="$ac_cv_search_gethostbyname"
14235     fi
14236fi
14237
14238  LIBS="$gl_saved_libs"
14239  if test -z "$HOSTENT_LIB"; then
14240
14241  for ac_func in gethostbyname
14242do :
14243  ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
14244if test "x$ac_cv_func_gethostbyname" = xyes
14245then :
14246  printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
14247
14248else $as_nop
14249
14250      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in winsock2.h and -lws2_32" >&5
14251printf %s "checking for gethostbyname in winsock2.h and -lws2_32... " >&6; }
14252if test ${gl_cv_w32_gethostbyname+y}
14253then :
14254  printf %s "(cached) " >&6
14255else $as_nop
14256  gl_cv_w32_gethostbyname=no
14257         gl_save_LIBS="$LIBS"
14258         LIBS="$LIBS -lws2_32"
14259         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14260/* end confdefs.h.  */
14261
14262#ifdef HAVE_WINSOCK2_H
14263#include <winsock2.h>
14264#endif
14265#include <stddef.h>
14266
14267int
14268main (void)
14269{
14270gethostbyname(NULL);
14271  ;
14272  return 0;
14273}
14274_ACEOF
14275if ac_fn_c_try_link "$LINENO"
14276then :
14277  gl_cv_w32_gethostbyname=yes
14278fi
14279rm -f core conftest.err conftest.$ac_objext conftest.beam \
14280    conftest$ac_exeext conftest.$ac_ext
14281         LIBS="$gl_save_LIBS"
14282
14283fi
14284{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_gethostbyname" >&5
14285printf "%s\n" "$gl_cv_w32_gethostbyname" >&6; }
14286      if test "$gl_cv_w32_gethostbyname" = "yes"; then
14287        HOSTENT_LIB="-lws2_32"
14288      fi
14289
14290fi
14291
14292done
14293  fi
14294
14295
14296
14297                      SERVENT_LIB=
14298  gl_saved_libs="$LIBS"
14299  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getservbyname" >&5
14300printf %s "checking for library containing getservbyname... " >&6; }
14301if test ${ac_cv_search_getservbyname+y}
14302then :
14303  printf %s "(cached) " >&6
14304else $as_nop
14305  ac_func_search_save_LIBS=$LIBS
14306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14307/* end confdefs.h.  */
14308
14309/* Override any GCC internal prototype to avoid an error.
14310   Use char because int might match the return type of a GCC
14311   builtin and then its argument prototype would still apply.  */
14312char getservbyname ();
14313int
14314main (void)
14315{
14316return getservbyname ();
14317  ;
14318  return 0;
14319}
14320_ACEOF
14321for ac_lib in '' socket network net
14322do
14323  if test -z "$ac_lib"; then
14324    ac_res="none required"
14325  else
14326    ac_res=-l$ac_lib
14327    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14328  fi
14329  if ac_fn_c_try_link "$LINENO"
14330then :
14331  ac_cv_search_getservbyname=$ac_res
14332fi
14333rm -f core conftest.err conftest.$ac_objext conftest.beam \
14334    conftest$ac_exeext
14335  if test ${ac_cv_search_getservbyname+y}
14336then :
14337  break
14338fi
14339done
14340if test ${ac_cv_search_getservbyname+y}
14341then :
14342
14343else $as_nop
14344  ac_cv_search_getservbyname=no
14345fi
14346rm conftest.$ac_ext
14347LIBS=$ac_func_search_save_LIBS
14348fi
14349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getservbyname" >&5
14350printf "%s\n" "$ac_cv_search_getservbyname" >&6; }
14351ac_res=$ac_cv_search_getservbyname
14352if test "$ac_res" != no
14353then :
14354  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14355  if test "$ac_cv_search_getservbyname" != "none required"; then
14356       SERVENT_LIB="$ac_cv_search_getservbyname"
14357     fi
14358fi
14359
14360  LIBS="$gl_saved_libs"
14361  if test -z "$SERVENT_LIB"; then
14362
14363  for ac_func in getservbyname
14364do :
14365  ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname"
14366if test "x$ac_cv_func_getservbyname" = xyes
14367then :
14368  printf "%s\n" "#define HAVE_GETSERVBYNAME 1" >>confdefs.h
14369
14370else $as_nop
14371
14372      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getservbyname in winsock2.h and -lws2_32" >&5
14373printf %s "checking for getservbyname in winsock2.h and -lws2_32... " >&6; }
14374if test ${gl_cv_w32_getservbyname+y}
14375then :
14376  printf %s "(cached) " >&6
14377else $as_nop
14378  gl_cv_w32_getservbyname=no
14379         gl_save_LIBS="$LIBS"
14380         LIBS="$LIBS -lws2_32"
14381         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14382/* end confdefs.h.  */
14383
14384#ifdef HAVE_WINSOCK2_H
14385#include <winsock2.h>
14386#endif
14387#include <stddef.h>
14388
14389int
14390main (void)
14391{
14392getservbyname(NULL,NULL);
14393  ;
14394  return 0;
14395}
14396_ACEOF
14397if ac_fn_c_try_link "$LINENO"
14398then :
14399  gl_cv_w32_getservbyname=yes
14400fi
14401rm -f core conftest.err conftest.$ac_objext conftest.beam \
14402    conftest$ac_exeext conftest.$ac_ext
14403         LIBS="$gl_save_LIBS"
14404
14405fi
14406{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_getservbyname" >&5
14407printf "%s\n" "$gl_cv_w32_getservbyname" >&6; }
14408      if test "$gl_cv_w32_getservbyname" = "yes"; then
14409        SERVENT_LIB="-lws2_32"
14410      fi
14411
14412fi
14413
14414done
14415  fi
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425                HAVE_INET_NTOP=1
14426  INET_NTOP_LIB=
14427
14428
14429
14430
14431  if test $ac_cv_header_sys_socket_h != yes; then
14432                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
14433if test "x$ac_cv_header_winsock2_h" = xyes
14434then :
14435  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
14436
14437fi
14438
14439  fi
14440  if test "$ac_cv_header_winsock2_h" = yes; then
14441    HAVE_WINSOCK2_H=1
14442    UNISTD_H_HAVE_WINSOCK2_H=1
14443    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
14444  else
14445    HAVE_WINSOCK2_H=0
14446  fi
14447
14448
14449  if test $HAVE_WINSOCK2_H = 1; then
14450                    REPLACE_INET_NTOP=1
14451    ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
14452" "$ac_c_undeclared_builtin_options" "CFLAGS"
14453if test "x$ac_cv_have_decl_inet_ntop" = xyes
14454then :
14455  ac_have_decl=1
14456else $as_nop
14457  ac_have_decl=0
14458fi
14459printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
14460
14461    if test $ac_cv_have_decl_inet_ntop = yes; then
14462      INET_NTOP_LIB="-lws2_32"
14463    else
14464      HAVE_DECL_INET_NTOP=0
14465    fi
14466  else
14467    gl_save_LIBS=$LIBS
14468    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
14469printf %s "checking for library containing inet_ntop... " >&6; }
14470if test ${ac_cv_search_inet_ntop+y}
14471then :
14472  printf %s "(cached) " >&6
14473else $as_nop
14474  ac_func_search_save_LIBS=$LIBS
14475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14476/* end confdefs.h.  */
14477
14478/* Override any GCC internal prototype to avoid an error.
14479   Use char because int might match the return type of a GCC
14480   builtin and then its argument prototype would still apply.  */
14481char inet_ntop ();
14482int
14483main (void)
14484{
14485return inet_ntop ();
14486  ;
14487  return 0;
14488}
14489_ACEOF
14490for ac_lib in '' nsl resolv network
14491do
14492  if test -z "$ac_lib"; then
14493    ac_res="none required"
14494  else
14495    ac_res=-l$ac_lib
14496    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14497  fi
14498  if ac_fn_c_try_link "$LINENO"
14499then :
14500  ac_cv_search_inet_ntop=$ac_res
14501fi
14502rm -f core conftest.err conftest.$ac_objext conftest.beam \
14503    conftest$ac_exeext
14504  if test ${ac_cv_search_inet_ntop+y}
14505then :
14506  break
14507fi
14508done
14509if test ${ac_cv_search_inet_ntop+y}
14510then :
14511
14512else $as_nop
14513  ac_cv_search_inet_ntop=no
14514fi
14515rm conftest.$ac_ext
14516LIBS=$ac_func_search_save_LIBS
14517fi
14518{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
14519printf "%s\n" "$ac_cv_search_inet_ntop" >&6; }
14520ac_res=$ac_cv_search_inet_ntop
14521if test "$ac_res" != no
14522then :
14523  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14524
14525else $as_nop
14526  ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
14527if test "x$ac_cv_func_inet_ntop" = xyes
14528then :
14529  printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
14530
14531fi
14532
14533       if test $ac_cv_func_inet_ntop = no; then
14534         HAVE_INET_NTOP=0
14535       fi
14536
14537fi
14538
14539    LIBS=$gl_save_LIBS
14540
14541    if test "$ac_cv_search_inet_ntop" != "no" \
14542       && test "$ac_cv_search_inet_ntop" != "none required"; then
14543      INET_NTOP_LIB="$ac_cv_search_inet_ntop"
14544    fi
14545
14546
14547    ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
14548        #if HAVE_NETDB_H
14549        # include <netdb.h>
14550        #endif
14551
14552" "$ac_c_undeclared_builtin_options" "CFLAGS"
14553if test "x$ac_cv_have_decl_inet_ntop" = xyes
14554then :
14555  ac_have_decl=1
14556else $as_nop
14557  ac_have_decl=0
14558fi
14559printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
14560
14561    if test $ac_cv_have_decl_inet_ntop = no; then
14562      HAVE_DECL_INET_NTOP=0
14563    fi
14564  fi
14565
14566
14567
14568
14569
14570
14571
14572  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
14573printf %s "checking for IPv4 sockets... " >&6; }
14574if test ${gl_cv_socket_ipv4+y}
14575then :
14576  printf %s "(cached) " >&6
14577else $as_nop
14578  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14579/* end confdefs.h.  */
14580#include <sys/types.h>
14581#ifdef HAVE_SYS_SOCKET_H
14582#include <sys/socket.h>
14583#endif
14584#ifdef HAVE_NETINET_IN_H
14585#include <netinet/in.h>
14586#endif
14587#ifdef HAVE_WINSOCK2_H
14588#include <winsock2.h>
14589#endif
14590int
14591main (void)
14592{
14593int x = AF_INET; struct in_addr y; struct sockaddr_in z;
14594 if (&x && &y && &z) return 0;
14595  ;
14596  return 0;
14597}
14598_ACEOF
14599if ac_fn_c_try_compile "$LINENO"
14600then :
14601  gl_cv_socket_ipv4=yes
14602else $as_nop
14603  gl_cv_socket_ipv4=no
14604fi
14605rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14606fi
14607{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
14608printf "%s\n" "$gl_cv_socket_ipv4" >&6; }
14609  if test $gl_cv_socket_ipv4 = yes; then
14610
14611printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h
14612
14613  fi
14614
14615  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
14616printf %s "checking for IPv6 sockets... " >&6; }
14617if test ${gl_cv_socket_ipv6+y}
14618then :
14619  printf %s "(cached) " >&6
14620else $as_nop
14621  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14622/* end confdefs.h.  */
14623#include <sys/types.h>
14624#ifdef HAVE_SYS_SOCKET_H
14625#include <sys/socket.h>
14626#endif
14627#ifdef HAVE_NETINET_IN_H
14628#include <netinet/in.h>
14629#endif
14630#ifdef HAVE_WINSOCK2_H
14631#include <winsock2.h>
14632#endif
14633#ifdef HAVE_WS2TCPIP_H
14634#include <ws2tcpip.h>
14635#endif
14636int
14637main (void)
14638{
14639int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
14640 if (&x && &y && &z) return 0;
14641  ;
14642  return 0;
14643}
14644_ACEOF
14645if ac_fn_c_try_compile "$LINENO"
14646then :
14647  gl_cv_socket_ipv6=yes
14648else $as_nop
14649  gl_cv_socket_ipv6=no
14650fi
14651rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14652fi
14653{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
14654printf "%s\n" "$gl_cv_socket_ipv6" >&6; }
14655  if test $gl_cv_socket_ipv6 = yes; then
14656
14657printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h
14658
14659  fi
14660
14661
14662
14663   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
14664printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
14665if test ${gl_cv_func_getcwd_null+y}
14666then :
14667  printf %s "(cached) " >&6
14668else $as_nop
14669  if test "$cross_compiling" = yes
14670then :
14671  case "$host_os" in
14672                           # Guess yes on glibc systems.
14673            *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
14674                           # Guess yes on musl systems.
14675            *-musl*)       gl_cv_func_getcwd_null="guessing yes";;
14676                           # Guess yes on Cygwin.
14677            cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
14678                           # If we don't know, obey --enable-cross-guesses.
14679            *)             gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
14680          esac
14681
14682else $as_nop
14683  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14684/* end confdefs.h.  */
14685
14686#	 include <stdlib.h>
14687#        if HAVE_UNISTD_H
14688#         include <unistd.h>
14689#        else /* on Windows with MSVC */
14690#         include <direct.h>
14691#        endif
14692
14693
14694$gl_mda_defines
14695
14696#        ifndef getcwd
14697         char *getcwd ();
14698#        endif
14699
14700int
14701main (void)
14702{
14703
14704#if defined _WIN32 && ! defined __CYGWIN__
14705/* mingw cwd does not start with '/', but _getcwd does allocate.
14706   However, mingw fails to honor non-zero size.  */
14707#else
14708           if (chdir ("/") != 0)
14709             return 1;
14710           else
14711             {
14712               char *f = getcwd (NULL, 0);
14713               if (! f)
14714                 return 2;
14715               if (f[0] != '/')
14716                 { free (f); return 3; }
14717               if (f[1] != '\0')
14718                 { free (f); return 4; }
14719               free (f);
14720               return 0;
14721             }
14722#endif
14723
14724  ;
14725  return 0;
14726}
14727_ACEOF
14728if ac_fn_c_try_run "$LINENO"
14729then :
14730  gl_cv_func_getcwd_null=yes
14731else $as_nop
14732  gl_cv_func_getcwd_null=no
14733fi
14734rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14735  conftest.$ac_objext conftest.beam conftest.$ac_ext
14736fi
14737
14738fi
14739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
14740printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
14741
14742
14743  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
14744printf %s "checking for getcwd with POSIX signature... " >&6; }
14745if test ${gl_cv_func_getcwd_posix_signature+y}
14746then :
14747  printf %s "(cached) " >&6
14748else $as_nop
14749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14750/* end confdefs.h.  */
14751#include <unistd.h>
14752
14753
14754$gl_mda_defines
14755
14756int
14757main (void)
14758{
14759extern
14760           #ifdef __cplusplus
14761           "C"
14762           #endif
14763           char *getcwd (char *, size_t);
14764
14765  ;
14766  return 0;
14767}
14768
14769_ACEOF
14770if ac_fn_c_try_compile "$LINENO"
14771then :
14772  gl_cv_func_getcwd_posix_signature=yes
14773else $as_nop
14774  gl_cv_func_getcwd_posix_signature=no
14775fi
14776rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14777
14778fi
14779{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
14780printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
14781
14782ac_fn_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14783if test "x$ac_cv_have_decl_getcwd" = xyes
14784then :
14785  ac_have_decl=1
14786else $as_nop
14787  ac_have_decl=0
14788fi
14789printf "%s\n" "#define HAVE_DECL_GETCWD $ac_have_decl" >>confdefs.h
14790
14791ac_fn_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14792if test "x$ac_cv_have_decl_getdelim" = xyes
14793then :
14794  ac_have_decl=1
14795else $as_nop
14796  ac_have_decl=0
14797fi
14798printf "%s\n" "#define HAVE_DECL_GETDELIM $ac_have_decl" >>confdefs.h
14799
14800
14801
14802ac_fn_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14803if test "x$ac_cv_have_decl_getdtablesize" = xyes
14804then :
14805  ac_have_decl=1
14806else $as_nop
14807  ac_have_decl=0
14808fi
14809printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
14810
14811ac_fn_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14812if test "x$ac_cv_have_decl_getline" = xyes
14813then :
14814  ac_have_decl=1
14815else $as_nop
14816  ac_have_decl=0
14817fi
14818printf "%s\n" "#define HAVE_DECL_GETLINE $ac_have_decl" >>confdefs.h
14819
14820ac_fn_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14821if test "x$ac_cv_have_decl_getlogin_r" = xyes
14822then :
14823  ac_have_decl=1
14824else $as_nop
14825  ac_have_decl=0
14826fi
14827printf "%s\n" "#define HAVE_DECL_GETLOGIN_R $ac_have_decl" >>confdefs.h
14828
14829
14830ac_fn_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14831if test "x$ac_cv_have_decl_getlogin" = xyes
14832then :
14833  ac_have_decl=1
14834else $as_nop
14835  ac_have_decl=0
14836fi
14837printf "%s\n" "#define HAVE_DECL_GETLOGIN $ac_have_decl" >>confdefs.h
14838
14839
14840
14841  case $host_os in
14842    mingw*)
14843      LIB_GETLOGIN='-ladvapi32' ;;
14844    *)
14845      LIB_GETLOGIN= ;;
14846  esac
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856  if test $ac_cv_func_getpass = no; then
14857    HAVE_GETPASS=0
14858  fi
14859
14860
14861
14862ac_fn_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14863if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
14864then :
14865  ac_have_decl=1
14866else $as_nop
14867  ac_have_decl=0
14868fi
14869printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h
14870
14871ac_fn_check_decl "$LINENO" "flockfile" "ac_cv_have_decl_flockfile" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14872if test "x$ac_cv_have_decl_flockfile" = xyes
14873then :
14874  ac_have_decl=1
14875else $as_nop
14876  ac_have_decl=0
14877fi
14878printf "%s\n" "#define HAVE_DECL_FLOCKFILE $ac_have_decl" >>confdefs.h
14879
14880ac_fn_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14881if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
14882then :
14883  ac_have_decl=1
14884else $as_nop
14885  ac_have_decl=0
14886fi
14887printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h
14888
14889ac_fn_check_decl "$LINENO" "funlockfile" "ac_cv_have_decl_funlockfile" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14890if test "x$ac_cv_have_decl_funlockfile" = xyes
14891then :
14892  ac_have_decl=1
14893else $as_nop
14894  ac_have_decl=0
14895fi
14896printf "%s\n" "#define HAVE_DECL_FUNLOCKFILE $ac_have_decl" >>confdefs.h
14897
14898ac_fn_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14899if test "x$ac_cv_have_decl_putc_unlocked" = xyes
14900then :
14901  ac_have_decl=1
14902else $as_nop
14903  ac_have_decl=0
14904fi
14905printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h
14906
14907
14908
14909
14910  GNULIB_GETRANDOM=0;
14911    HAVE_GETRANDOM=1;
14912  REPLACE_GETRANDOM=0;
14913
14914
14915:
14916
14917
14918  GNULIB_GETTIMEOFDAY=0;
14919    HAVE_GETTIMEOFDAY=1;
14920  HAVE_STRUCT_TIMEVAL=1;
14921  HAVE_SYS_TIME_H=1;
14922  REPLACE_GETTIMEOFDAY=0;
14923  REPLACE_STRUCT_TIMEVAL=0;
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939     if test $gl_cv_have_include_next = yes; then
14940       gl_cv_next_sys_time_h='<'sys/time.h'>'
14941     else
14942       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
14943printf %s "checking absolute name of <sys/time.h>... " >&6; }
14944if test ${gl_cv_next_sys_time_h+y}
14945then :
14946  printf %s "(cached) " >&6
14947else $as_nop
14948
14949             if test $ac_cv_header_sys_time_h = yes; then
14950
14951
14952
14953
14954  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14955/* end confdefs.h.  */
14956#include <sys/time.h>
14957_ACEOF
14958                case "$host_os" in
14959    aix*) gl_absname_cpp="$ac_cpp -C" ;;
14960    *)    gl_absname_cpp="$ac_cpp" ;;
14961  esac
14962
14963  case "$host_os" in
14964    mingw*)
14965                                          gl_dirsep_regex='[/\\]'
14966      ;;
14967    *)
14968      gl_dirsep_regex='\/'
14969      ;;
14970  esac
14971      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14972  gl_header_literal_regex=`echo 'sys/time.h' \
14973                           | sed -e "$gl_make_literal_regex_sed"`
14974  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14975      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14976      s|^/[^/]|//&|
14977      p
14978      q
14979    }'
14980
14981        gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14982  sed -n "$gl_absolute_header_sed"`
14983
14984           gl_header=$gl_cv_absolute_sys_time_h
14985           gl_cv_next_sys_time_h='"'$gl_header'"'
14986          else
14987               gl_cv_next_sys_time_h='<'sys/time.h'>'
14988             fi
14989
14990
14991fi
14992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
14993printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
14994     fi
14995     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
14996
14997     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14998       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14999       gl_next_as_first_directive='<'sys/time.h'>'
15000     else
15001       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15002       gl_next_as_first_directive=$gl_cv_next_sys_time_h
15003     fi
15004     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
15005
15006
15007
15008
15009
15010  if test $ac_cv_header_sys_time_h != yes; then
15011    HAVE_SYS_TIME_H=0
15012  fi
15013
15014
15015
15016
15017
15018  if test $ac_cv_header_sys_socket_h != yes; then
15019                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
15020if test "x$ac_cv_header_winsock2_h" = xyes
15021then :
15022  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
15023
15024fi
15025
15026  fi
15027  if test "$ac_cv_header_winsock2_h" = yes; then
15028    HAVE_WINSOCK2_H=1
15029    UNISTD_H_HAVE_WINSOCK2_H=1
15030    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
15031  else
15032    HAVE_WINSOCK2_H=0
15033  fi
15034
15035
15036  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
15037printf %s "checking for struct timeval... " >&6; }
15038if test ${gl_cv_sys_struct_timeval+y}
15039then :
15040  printf %s "(cached) " >&6
15041else $as_nop
15042  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15043/* end confdefs.h.  */
15044#if HAVE_SYS_TIME_H
15045             #include <sys/time.h>
15046            #endif
15047            #include <time.h>
15048            #if HAVE_WINSOCK2_H
15049            # include <winsock2.h>
15050            #endif
15051
15052int
15053main (void)
15054{
15055static struct timeval x; x.tv_sec = x.tv_usec;
15056  ;
15057  return 0;
15058}
15059_ACEOF
15060if ac_fn_c_try_compile "$LINENO"
15061then :
15062  gl_cv_sys_struct_timeval=yes
15063else $as_nop
15064  gl_cv_sys_struct_timeval=no
15065fi
15066rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15067
15068fi
15069{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
15070printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
15071  if test $gl_cv_sys_struct_timeval != yes; then
15072    HAVE_STRUCT_TIMEVAL=0
15073  else
15074                            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
15075printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
15076if test ${gl_cv_sys_struct_timeval_tv_sec+y}
15077then :
15078  printf %s "(cached) " >&6
15079else $as_nop
15080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15081/* end confdefs.h.  */
15082#if HAVE_SYS_TIME_H
15083               #include <sys/time.h>
15084              #endif
15085              #include <time.h>
15086              #if HAVE_WINSOCK2_H
15087              # include <winsock2.h>
15088              #endif
15089
15090int
15091main (void)
15092{
15093static struct timeval x;
15094              typedef int verify_tv_sec_type[
15095                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
15096              ];
15097
15098  ;
15099  return 0;
15100}
15101_ACEOF
15102if ac_fn_c_try_compile "$LINENO"
15103then :
15104  gl_cv_sys_struct_timeval_tv_sec=yes
15105else $as_nop
15106  gl_cv_sys_struct_timeval_tv_sec=no
15107fi
15108rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15109
15110fi
15111{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
15112printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
15113    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
15114      REPLACE_STRUCT_TIMEVAL=1
15115    fi
15116  fi
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126  GNULIB_GLOB=0;
15127    HAVE_GLOB=1;
15128  HAVE_GLOB_PATTERN_P=1;
15129  REPLACE_GLOB=0;
15130  REPLACE_GLOB_PATTERN_P=0;
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147     if test $gl_cv_have_include_next = yes; then
15148       gl_cv_next_glob_h='<'glob.h'>'
15149     else
15150       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5
15151printf %s "checking absolute name of <glob.h>... " >&6; }
15152if test ${gl_cv_next_glob_h+y}
15153then :
15154  printf %s "(cached) " >&6
15155else $as_nop
15156
15157             if test $ac_cv_header_glob_h = yes; then
15158
15159
15160
15161
15162  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15163/* end confdefs.h.  */
15164#include <glob.h>
15165_ACEOF
15166                case "$host_os" in
15167    aix*) gl_absname_cpp="$ac_cpp -C" ;;
15168    *)    gl_absname_cpp="$ac_cpp" ;;
15169  esac
15170
15171  case "$host_os" in
15172    mingw*)
15173                                          gl_dirsep_regex='[/\\]'
15174      ;;
15175    *)
15176      gl_dirsep_regex='\/'
15177      ;;
15178  esac
15179      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15180  gl_header_literal_regex=`echo 'glob.h' \
15181                           | sed -e "$gl_make_literal_regex_sed"`
15182  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15183      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15184      s|^/[^/]|//&|
15185      p
15186      q
15187    }'
15188
15189        gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15190  sed -n "$gl_absolute_header_sed"`
15191
15192           gl_header=$gl_cv_absolute_glob_h
15193           gl_cv_next_glob_h='"'$gl_header'"'
15194          else
15195               gl_cv_next_glob_h='<'glob.h'>'
15196             fi
15197
15198
15199fi
15200{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5
15201printf "%s\n" "$gl_cv_next_glob_h" >&6; }
15202     fi
15203     NEXT_GLOB_H=$gl_cv_next_glob_h
15204
15205     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15206       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15207       gl_next_as_first_directive='<'glob.h'>'
15208     else
15209       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15210       gl_next_as_first_directive=$gl_cv_next_glob_h
15211     fi
15212     NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive
15213
15214
15215
15216
15217
15218  if test $ac_cv_header_glob_h = yes; then
15219    HAVE_GLOB_H=1
15220  else
15221    HAVE_GLOB_H=0
15222  fi
15223
15224
15225  GLOB_H=''
15226     if false; then
15227              GLOB_H=glob.h
15228     else
15229       if test $ac_cv_header_glob_h != yes; then
15230                  GLOB_H=glob.h
15231       fi
15232     fi
15233
15234
15235   if test -n "$GLOB_H"; then
15236  GL_GENERATE_GLOB_H_TRUE=
15237  GL_GENERATE_GLOB_H_FALSE='#'
15238else
15239  GL_GENERATE_GLOB_H_TRUE='#'
15240  GL_GENERATE_GLOB_H_FALSE=
15241fi
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255  if test -z "$gl_pthreadlib_body_done"; then
15256    gl_pthread_api=no
15257    LIBPTHREAD=
15258    LIBPMULTITHREAD=
15259    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
15260    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
15261    ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15262if test "x$ac_cv_header_pthread_h" = xyes
15263then :
15264  gl_have_pthread_h=yes
15265else $as_nop
15266  gl_have_pthread_h=no
15267fi
15268
15269    if test "$gl_have_pthread_h" = yes; then
15270      # Other possible tests:
15271      #   -lpthreads (FSU threads, PCthreads)
15272      #   -lgthreads
15273      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
15274      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
15275      # the second one only in libpthread, and lock.c needs it.
15276      #
15277      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
15278      # needs -pthread for some reason.  See:
15279      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
15280      save_LIBS=$LIBS
15281      for gl_pthread in '' '-pthread'; do
15282        LIBS="$LIBS $gl_pthread"
15283        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15284/* end confdefs.h.  */
15285#include <pthread.h>
15286               pthread_mutex_t m;
15287               pthread_mutexattr_t ma;
15288
15289int
15290main (void)
15291{
15292pthread_mutex_lock (&m);
15293               pthread_mutexattr_init (&ma);
15294  ;
15295  return 0;
15296}
15297_ACEOF
15298if ac_fn_c_try_link "$LINENO"
15299then :
15300  gl_pthread_api=yes
15301           LIBPTHREAD=$gl_pthread
15302           LIBPMULTITHREAD=$gl_pthread
15303fi
15304rm -f core conftest.err conftest.$ac_objext conftest.beam \
15305    conftest$ac_exeext conftest.$ac_ext
15306        LIBS=$save_LIBS
15307        test $gl_pthread_api = yes && break
15308      done
15309
15310      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
15311      # since it is defined as a macro on OSF/1.)
15312      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
15313        # The program links fine without libpthread. But it may actually
15314        # need to link with libpthread in order to create multiple threads.
15315        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15316printf %s "checking for pthread_kill in -lpthread... " >&6; }
15317if test ${ac_cv_lib_pthread_pthread_kill+y}
15318then :
15319  printf %s "(cached) " >&6
15320else $as_nop
15321  ac_check_lib_save_LIBS=$LIBS
15322LIBS="-lpthread  $LIBS"
15323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15324/* end confdefs.h.  */
15325
15326/* Override any GCC internal prototype to avoid an error.
15327   Use char because int might match the return type of a GCC
15328   builtin and then its argument prototype would still apply.  */
15329char pthread_kill ();
15330int
15331main (void)
15332{
15333return pthread_kill ();
15334  ;
15335  return 0;
15336}
15337_ACEOF
15338if ac_fn_c_try_link "$LINENO"
15339then :
15340  ac_cv_lib_pthread_pthread_kill=yes
15341else $as_nop
15342  ac_cv_lib_pthread_pthread_kill=no
15343fi
15344rm -f core conftest.err conftest.$ac_objext conftest.beam \
15345    conftest$ac_exeext conftest.$ac_ext
15346LIBS=$ac_check_lib_save_LIBS
15347fi
15348{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15349printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15350if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15351then :
15352  LIBPMULTITHREAD=-lpthread
15353           # On Solaris and HP-UX, most pthread functions exist also in libc.
15354           # Therefore pthread_in_use() needs to actually try to create a
15355           # thread: pthread_create from libc will fail, whereas
15356           # pthread_create will actually create a thread.
15357           # On Solaris 10 or newer, this test is no longer needed, because
15358           # libc contains the fully functional pthread functions.
15359           case "$host_os" in
15360             solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
15361
15362printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15363
15364           esac
15365
15366fi
15367
15368      elif test $gl_pthread_api != yes; then
15369        # Some library is needed. Try libpthread and libc_r.
15370        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15371printf %s "checking for pthread_kill in -lpthread... " >&6; }
15372if test ${ac_cv_lib_pthread_pthread_kill+y}
15373then :
15374  printf %s "(cached) " >&6
15375else $as_nop
15376  ac_check_lib_save_LIBS=$LIBS
15377LIBS="-lpthread  $LIBS"
15378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15379/* end confdefs.h.  */
15380
15381/* Override any GCC internal prototype to avoid an error.
15382   Use char because int might match the return type of a GCC
15383   builtin and then its argument prototype would still apply.  */
15384char pthread_kill ();
15385int
15386main (void)
15387{
15388return pthread_kill ();
15389  ;
15390  return 0;
15391}
15392_ACEOF
15393if ac_fn_c_try_link "$LINENO"
15394then :
15395  ac_cv_lib_pthread_pthread_kill=yes
15396else $as_nop
15397  ac_cv_lib_pthread_pthread_kill=no
15398fi
15399rm -f core conftest.err conftest.$ac_objext conftest.beam \
15400    conftest$ac_exeext conftest.$ac_ext
15401LIBS=$ac_check_lib_save_LIBS
15402fi
15403{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15404printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
15405if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
15406then :
15407  gl_pthread_api=yes
15408           LIBPTHREAD=-lpthread
15409           LIBPMULTITHREAD=-lpthread
15410fi
15411
15412        if test $gl_pthread_api != yes; then
15413          # For FreeBSD 4.
15414          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15415printf %s "checking for pthread_kill in -lc_r... " >&6; }
15416if test ${ac_cv_lib_c_r_pthread_kill+y}
15417then :
15418  printf %s "(cached) " >&6
15419else $as_nop
15420  ac_check_lib_save_LIBS=$LIBS
15421LIBS="-lc_r  $LIBS"
15422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15423/* end confdefs.h.  */
15424
15425/* Override any GCC internal prototype to avoid an error.
15426   Use char because int might match the return type of a GCC
15427   builtin and then its argument prototype would still apply.  */
15428char pthread_kill ();
15429int
15430main (void)
15431{
15432return pthread_kill ();
15433  ;
15434  return 0;
15435}
15436_ACEOF
15437if ac_fn_c_try_link "$LINENO"
15438then :
15439  ac_cv_lib_c_r_pthread_kill=yes
15440else $as_nop
15441  ac_cv_lib_c_r_pthread_kill=no
15442fi
15443rm -f core conftest.err conftest.$ac_objext conftest.beam \
15444    conftest$ac_exeext conftest.$ac_ext
15445LIBS=$ac_check_lib_save_LIBS
15446fi
15447{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15448printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
15449if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
15450then :
15451  gl_pthread_api=yes
15452             LIBPTHREAD=-lc_r
15453             LIBPMULTITHREAD=-lc_r
15454fi
15455
15456        fi
15457      fi
15458    fi
15459    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
15460printf %s "checking whether POSIX threads API is available... " >&6; }
15461    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
15462printf "%s\n" "$gl_pthread_api" >&6; }
15463
15464
15465    if test $gl_pthread_api = yes; then
15466
15467printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
15468
15469    fi
15470
15471        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15472/* end confdefs.h.  */
15473#include <sched.h>
15474int
15475main (void)
15476{
15477sched_yield ();
15478  ;
15479  return 0;
15480}
15481_ACEOF
15482if ac_fn_c_try_link "$LINENO"
15483then :
15484  LIB_SCHED_YIELD=
15485
15486else $as_nop
15487         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
15488printf %s "checking for sched_yield in -lrt... " >&6; }
15489if test ${ac_cv_lib_rt_sched_yield+y}
15490then :
15491  printf %s "(cached) " >&6
15492else $as_nop
15493  ac_check_lib_save_LIBS=$LIBS
15494LIBS="-lrt  $LIBS"
15495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15496/* end confdefs.h.  */
15497
15498/* Override any GCC internal prototype to avoid an error.
15499   Use char because int might match the return type of a GCC
15500   builtin and then its argument prototype would still apply.  */
15501char sched_yield ();
15502int
15503main (void)
15504{
15505return sched_yield ();
15506  ;
15507  return 0;
15508}
15509_ACEOF
15510if ac_fn_c_try_link "$LINENO"
15511then :
15512  ac_cv_lib_rt_sched_yield=yes
15513else $as_nop
15514  ac_cv_lib_rt_sched_yield=no
15515fi
15516rm -f core conftest.err conftest.$ac_objext conftest.beam \
15517    conftest$ac_exeext conftest.$ac_ext
15518LIBS=$ac_check_lib_save_LIBS
15519fi
15520{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
15521printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
15522if test "x$ac_cv_lib_rt_sched_yield" = xyes
15523then :
15524  LIB_SCHED_YIELD=-lrt
15525else $as_nop
15526            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
15527printf %s "checking for sched_yield in -lposix4... " >&6; }
15528if test ${ac_cv_lib_posix4_sched_yield+y}
15529then :
15530  printf %s "(cached) " >&6
15531else $as_nop
15532  ac_check_lib_save_LIBS=$LIBS
15533LIBS="-lposix4  $LIBS"
15534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15535/* end confdefs.h.  */
15536
15537/* Override any GCC internal prototype to avoid an error.
15538   Use char because int might match the return type of a GCC
15539   builtin and then its argument prototype would still apply.  */
15540char sched_yield ();
15541int
15542main (void)
15543{
15544return sched_yield ();
15545  ;
15546  return 0;
15547}
15548_ACEOF
15549if ac_fn_c_try_link "$LINENO"
15550then :
15551  ac_cv_lib_posix4_sched_yield=yes
15552else $as_nop
15553  ac_cv_lib_posix4_sched_yield=no
15554fi
15555rm -f core conftest.err conftest.$ac_objext conftest.beam \
15556    conftest$ac_exeext conftest.$ac_ext
15557LIBS=$ac_check_lib_save_LIBS
15558fi
15559{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
15560printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
15561if test "x$ac_cv_lib_posix4_sched_yield" = xyes
15562then :
15563  LIB_SCHED_YIELD=-lposix4
15564fi
15565
15566fi
15567
15568
15569fi
15570rm -f core conftest.err conftest.$ac_objext conftest.beam \
15571    conftest$ac_exeext conftest.$ac_ext
15572
15573
15574    gl_pthreadlib_body_done=done
15575  fi
15576
15577
15578
15579
15580
15581
15582
15583  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
15584printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
15585if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
15586then :
15587  printf %s "(cached) " >&6
15588else $as_nop
15589  case "$host_os" in
15590       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
15591       *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
15592         gl_cv_func_setlocale_null_all_mtsafe=no ;;
15593       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
15594       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
15595         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
15596       # If we don't know, obey --enable-cross-guesses.
15597       *)
15598         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
15599     esac
15600
15601fi
15602{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
15603printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
15604    case "$host_os" in
15605    mingw*) ;;
15606    *)
15607      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
15608        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
15609      fi
15610      ;;
15611  esac
15612  case "$gl_cv_func_setlocale_null_all_mtsafe" in
15613    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
15614    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
15615  esac
15616
15617printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
15618
15619
15620    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
15621printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
15622if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
15623then :
15624  printf %s "(cached) " >&6
15625else $as_nop
15626  case "$host_os" in
15627       # Guess no on OpenBSD, AIX.
15628       openbsd* | aix*)
15629         gl_cv_func_setlocale_null_one_mtsafe=no ;;
15630       # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
15631       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
15632         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
15633       # If we don't know, obey --enable-cross-guesses.
15634       *)
15635         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
15636     esac
15637
15638fi
15639{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
15640printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
15641    case "$host_os" in
15642    mingw*) ;;
15643    *)
15644      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
15645        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
15646      fi
15647      ;;
15648  esac
15649  case "$gl_cv_func_setlocale_null_one_mtsafe" in
15650    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
15651    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
15652  esac
15653
15654printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
15655
15656
15657    if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
15658    case "$host_os" in
15659      mingw*) LIB_SETLOCALE_NULL= ;;
15660      *)
15661
15662
15663  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
15664printf %s "checking whether imported symbols can be declared weak... " >&6; }
15665if test ${gl_cv_have_weak+y}
15666then :
15667  printf %s "(cached) " >&6
15668else $as_nop
15669  gl_cv_have_weak=no
15670          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15671/* end confdefs.h.  */
15672extern void xyzzy ();
15673#pragma weak xyzzy
15674int
15675main (void)
15676{
15677xyzzy();
15678  ;
15679  return 0;
15680}
15681_ACEOF
15682if ac_fn_c_try_link "$LINENO"
15683then :
15684  gl_cv_have_weak=maybe
15685fi
15686rm -f core conftest.err conftest.$ac_objext conftest.beam \
15687    conftest$ac_exeext conftest.$ac_ext
15688     if test $gl_cv_have_weak = maybe; then
15689                     if test "$cross_compiling" = yes
15690then :
15691                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15692/* end confdefs.h.  */
15693#ifdef __ELF__
15694             Extensible Linking Format
15695             #endif
15696
15697_ACEOF
15698if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15699  $EGREP "Extensible Linking Format" >/dev/null 2>&1
15700then :
15701  gl_cv_have_weak="guessing yes"
15702else $as_nop
15703  gl_cv_have_weak="guessing no"
15704fi
15705rm -rf conftest*
15706
15707
15708else $as_nop
15709  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15710/* end confdefs.h.  */
15711
15712#include <stdio.h>
15713#pragma weak fputs
15714int main ()
15715{
15716  return (fputs == NULL);
15717}
15718_ACEOF
15719if ac_fn_c_try_run "$LINENO"
15720then :
15721  gl_cv_have_weak=yes
15722else $as_nop
15723  gl_cv_have_weak=no
15724fi
15725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15726  conftest.$ac_objext conftest.beam conftest.$ac_ext
15727fi
15728
15729     fi
15730          case " $LDFLAGS " in
15731       *" -static "*) gl_cv_have_weak=no ;;
15732     esac
15733                    case "$gl_cv_have_weak" in
15734       *yes)
15735         case "$host_os" in
15736           freebsd* | dragonfly*)
15737             : > conftest1.c
15738             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
15739             cat <<EOF > conftest2.c
15740#include <pthread.h>
15741#pragma weak pthread_mutexattr_gettype
15742int main ()
15743{
15744  return (pthread_mutexattr_gettype != NULL);
15745}
15746EOF
15747             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
15748               || gl_cv_have_weak=no
15749             rm -f conftest1.c libempty.so conftest2.c conftest
15750             ;;
15751         esac
15752         ;;
15753     esac
15754
15755fi
15756{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
15757printf "%s\n" "$gl_cv_have_weak" >&6; }
15758  case "$gl_cv_have_weak" in
15759    *yes)
15760
15761printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
15762
15763      ;;
15764  esac
15765
15766        case "$gl_cv_have_weak" in
15767          *yes) LIB_SETLOCALE_NULL= ;;
15768          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
15769        esac
15770        ;;
15771    esac
15772  else
15773    LIB_SETLOCALE_NULL=
15774  fi
15775
15776
15777
15778      if test "X$prefix" = "XNONE"; then
15779    acl_final_prefix="$ac_default_prefix"
15780  else
15781    acl_final_prefix="$prefix"
15782  fi
15783  if test "X$exec_prefix" = "XNONE"; then
15784    acl_final_exec_prefix='${prefix}'
15785  else
15786    acl_final_exec_prefix="$exec_prefix"
15787  fi
15788  acl_save_prefix="$prefix"
15789  prefix="$acl_final_prefix"
15790  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
15791  prefix="$acl_save_prefix"
15792
15793
15794
15795# Check whether --with-gnu-ld was given.
15796if test ${with_gnu_ld+y}
15797then :
15798  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
15799else $as_nop
15800  with_gnu_ld=no
15801fi
15802
15803# Prepare PATH_SEPARATOR.
15804# The user is always right.
15805if test "${PATH_SEPARATOR+set}" != set; then
15806  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
15807  # contains only /bin. Note that ksh looks also at the FPATH variable,
15808  # so we have to set that as well for the test.
15809  PATH_SEPARATOR=:
15810  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
15811    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
15812           || PATH_SEPARATOR=';'
15813       }
15814fi
15815
15816if test -n "$LD"; then
15817  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
15818printf %s "checking for ld... " >&6; }
15819elif test "$GCC" = yes; then
15820  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
15821printf %s "checking for ld used by $CC... " >&6; }
15822elif test "$with_gnu_ld" = yes; then
15823  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
15824printf %s "checking for GNU ld... " >&6; }
15825else
15826  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
15827printf %s "checking for non-GNU ld... " >&6; }
15828fi
15829if test -n "$LD"; then
15830  # Let the user override the test with a path.
15831  :
15832else
15833  if test ${acl_cv_path_LD+y}
15834then :
15835  printf %s "(cached) " >&6
15836else $as_nop
15837
15838    acl_cv_path_LD= # Final result of this test
15839    ac_prog=ld # Program to search in $PATH
15840    if test "$GCC" = yes; then
15841      # Check if gcc -print-prog-name=ld gives a path.
15842      case $host in
15843        *-*-mingw*)
15844          # gcc leaves a trailing carriage return which upsets mingw
15845          acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
15846        *)
15847          acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
15848      esac
15849      case $acl_output in
15850        # Accept absolute paths.
15851        [\\/]* | ?:[\\/]*)
15852          re_direlt='/[^/][^/]*/\.\./'
15853          # Canonicalize the pathname of ld
15854          acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
15855          while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
15856            acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
15857          done
15858          # Got the pathname. No search in PATH is needed.
15859          acl_cv_path_LD="$acl_output"
15860          ac_prog=
15861          ;;
15862        "")
15863          # If it fails, then pretend we aren't using GCC.
15864          ;;
15865        *)
15866          # If it is relative, then search for the first ld in PATH.
15867          with_gnu_ld=unknown
15868          ;;
15869      esac
15870    fi
15871    if test -n "$ac_prog"; then
15872      # Search for $ac_prog in $PATH.
15873      acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
15874      for ac_dir in $PATH; do
15875        IFS="$acl_save_ifs"
15876        test -z "$ac_dir" && ac_dir=.
15877        if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
15878          acl_cv_path_LD="$ac_dir/$ac_prog"
15879          # Check to see if the program is GNU ld.  I'd rather use --version,
15880          # but apparently some variants of GNU ld only accept -v.
15881          # Break only if it was the GNU/non-GNU ld that we prefer.
15882          case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
15883            *GNU* | *'with BFD'*)
15884              test "$with_gnu_ld" != no && break
15885              ;;
15886            *)
15887              test "$with_gnu_ld" != yes && break
15888              ;;
15889          esac
15890        fi
15891      done
15892      IFS="$acl_save_ifs"
15893    fi
15894    case $host in
15895      *-*-aix*)
15896        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15897/* end confdefs.h.  */
15898#if defined __powerpc64__ || defined _ARCH_PPC64
15899                int ok;
15900               #else
15901                error fail
15902               #endif
15903
15904_ACEOF
15905if ac_fn_c_try_compile "$LINENO"
15906then :
15907  # The compiler produces 64-bit code. Add option '-b64' so that the
15908           # linker groks 64-bit object files.
15909           case "$acl_cv_path_LD " in
15910             *" -b64 "*) ;;
15911             *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
15912           esac
15913
15914fi
15915rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15916        ;;
15917      sparc64-*-netbsd*)
15918        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15919/* end confdefs.h.  */
15920#if defined __sparcv9 || defined __arch64__
15921                int ok;
15922               #else
15923                error fail
15924               #endif
15925
15926_ACEOF
15927if ac_fn_c_try_compile "$LINENO"
15928then :
15929
15930else $as_nop
15931  # The compiler produces 32-bit code. Add option '-m elf32_sparc'
15932           # so that the linker groks 32-bit object files.
15933           case "$acl_cv_path_LD " in
15934             *" -m elf32_sparc "*) ;;
15935             *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
15936           esac
15937
15938fi
15939rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15940        ;;
15941    esac
15942
15943fi
15944
15945  LD="$acl_cv_path_LD"
15946fi
15947if test -n "$LD"; then
15948  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
15949printf "%s\n" "$LD" >&6; }
15950else
15951  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15952printf "%s\n" "no" >&6; }
15953  as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
15954fi
15955{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
15956printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
15957if test ${acl_cv_prog_gnu_ld+y}
15958then :
15959  printf %s "(cached) " >&6
15960else $as_nop
15961  # I'd rather use --version here, but apparently some GNU lds only accept -v.
15962case `$LD -v 2>&1 </dev/null` in
15963*GNU* | *'with BFD'*)
15964  acl_cv_prog_gnu_ld=yes
15965  ;;
15966*)
15967  acl_cv_prog_gnu_ld=no
15968  ;;
15969esac
15970fi
15971{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
15972printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
15973with_gnu_ld=$acl_cv_prog_gnu_ld
15974
15975
15976
15977
15978
15979                                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
15980printf %s "checking for shared library run path origin... " >&6; }
15981if test ${acl_cv_rpath+y}
15982then :
15983  printf %s "(cached) " >&6
15984else $as_nop
15985
15986    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
15987    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
15988    . ./conftest.sh
15989    rm -f ./conftest.sh
15990    acl_cv_rpath=done
15991
15992fi
15993{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
15994printf "%s\n" "$acl_cv_rpath" >&6; }
15995  wl="$acl_cv_wl"
15996  acl_libext="$acl_cv_libext"
15997  acl_shlibext="$acl_cv_shlibext"
15998  acl_libname_spec="$acl_cv_libname_spec"
15999  acl_library_names_spec="$acl_cv_library_names_spec"
16000  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
16001  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
16002  acl_hardcode_direct="$acl_cv_hardcode_direct"
16003  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
16004    # Check whether --enable-rpath was given.
16005if test ${enable_rpath+y}
16006then :
16007  enableval=$enable_rpath; :
16008else $as_nop
16009  enable_rpath=yes
16010fi
16011
16012
16013
16014
16015  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
16016printf %s "checking 32-bit host C ABI... " >&6; }
16017if test ${gl_cv_host_cpu_c_abi_32bit+y}
16018then :
16019  printf %s "(cached) " >&6
16020else $as_nop
16021  if test -n "$gl_cv_host_cpu_c_abi"; then
16022       case "$gl_cv_host_cpu_c_abi" in
16023         i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
16024           gl_cv_host_cpu_c_abi_32bit=yes ;;
16025         x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
16026           gl_cv_host_cpu_c_abi_32bit=no ;;
16027         *)
16028           gl_cv_host_cpu_c_abi_32bit=unknown ;;
16029       esac
16030     else
16031       case "$host_cpu" in
16032
16033         # CPUs that only support a 32-bit ABI.
16034         arc \
16035         | bfin \
16036         | cris* \
16037         | csky \
16038         | epiphany \
16039         | ft32 \
16040         | h8300 \
16041         | m68k \
16042         | microblaze | microblazeel \
16043         | nds32 | nds32le | nds32be \
16044         | nios2 | nios2eb | nios2el \
16045         | or1k* \
16046         | or32 \
16047         | sh | sh1234 | sh1234elb \
16048         | tic6x \
16049         | xtensa* )
16050           gl_cv_host_cpu_c_abi_32bit=yes
16051           ;;
16052
16053         # CPUs that only support a 64-bit ABI.
16054         alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
16055         | mmix )
16056           gl_cv_host_cpu_c_abi_32bit=no
16057           ;;
16058
16059         i[34567]86 )
16060           gl_cv_host_cpu_c_abi_32bit=yes
16061           ;;
16062
16063         x86_64 )
16064           # On x86_64 systems, the C compiler may be generating code in one of
16065           # these ABIs:
16066           # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
16067           # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
16068           #   with native Windows (mingw, MSVC).
16069           # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
16070           # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
16071           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16072/* end confdefs.h.  */
16073#if (defined __x86_64__ || defined __amd64__ \
16074                       || defined _M_X64 || defined _M_AMD64) \
16075                      && !(defined __ILP32__ || defined _ILP32)
16076                   int ok;
16077                  #else
16078                   error fail
16079                  #endif
16080
16081_ACEOF
16082if ac_fn_c_try_compile "$LINENO"
16083then :
16084  gl_cv_host_cpu_c_abi_32bit=no
16085else $as_nop
16086  gl_cv_host_cpu_c_abi_32bit=yes
16087fi
16088rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16089           ;;
16090
16091         arm* | aarch64 )
16092           # Assume arm with EABI.
16093           # On arm64 systems, the C compiler may be generating code in one of
16094           # these ABIs:
16095           # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
16096           # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
16097           # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
16098           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16099/* end confdefs.h.  */
16100#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
16101                   int ok;
16102                  #else
16103                   error fail
16104                  #endif
16105
16106_ACEOF
16107if ac_fn_c_try_compile "$LINENO"
16108then :
16109  gl_cv_host_cpu_c_abi_32bit=no
16110else $as_nop
16111  gl_cv_host_cpu_c_abi_32bit=yes
16112fi
16113rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16114           ;;
16115
16116         hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
16117           # On hppa, the C compiler may be generating 32-bit code or 64-bit
16118           # code. In the latter case, it defines _LP64 and __LP64__.
16119           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16120/* end confdefs.h.  */
16121#ifdef __LP64__
16122                   int ok;
16123                  #else
16124                   error fail
16125                  #endif
16126
16127_ACEOF
16128if ac_fn_c_try_compile "$LINENO"
16129then :
16130  gl_cv_host_cpu_c_abi_32bit=no
16131else $as_nop
16132  gl_cv_host_cpu_c_abi_32bit=yes
16133fi
16134rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16135           ;;
16136
16137         ia64* )
16138           # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
16139           # 32-bit code. In the latter case, it defines _ILP32.
16140           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16141/* end confdefs.h.  */
16142#ifdef _ILP32
16143                   int ok;
16144                  #else
16145                   error fail
16146                  #endif
16147
16148_ACEOF
16149if ac_fn_c_try_compile "$LINENO"
16150then :
16151  gl_cv_host_cpu_c_abi_32bit=yes
16152else $as_nop
16153  gl_cv_host_cpu_c_abi_32bit=no
16154fi
16155rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16156           ;;
16157
16158         mips* )
16159           # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
16160           # at 32.
16161           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16162/* end confdefs.h.  */
16163#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
16164                   int ok;
16165                  #else
16166                   error fail
16167                  #endif
16168
16169_ACEOF
16170if ac_fn_c_try_compile "$LINENO"
16171then :
16172  gl_cv_host_cpu_c_abi_32bit=no
16173else $as_nop
16174  gl_cv_host_cpu_c_abi_32bit=yes
16175fi
16176rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16177           ;;
16178
16179         powerpc* )
16180           # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
16181           # No need to distinguish them here; the caller may distinguish
16182           # them based on the OS.
16183           # On powerpc64 systems, the C compiler may still be generating
16184           # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
16185           # be generating 64-bit code.
16186           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16187/* end confdefs.h.  */
16188#if defined __powerpc64__ || defined _ARCH_PPC64
16189                   int ok;
16190                  #else
16191                   error fail
16192                  #endif
16193
16194_ACEOF
16195if ac_fn_c_try_compile "$LINENO"
16196then :
16197  gl_cv_host_cpu_c_abi_32bit=no
16198else $as_nop
16199  gl_cv_host_cpu_c_abi_32bit=yes
16200fi
16201rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16202           ;;
16203
16204         rs6000 )
16205           gl_cv_host_cpu_c_abi_32bit=yes
16206           ;;
16207
16208         riscv32 | riscv64 )
16209           # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
16210           # Size of 'long' and 'void *':
16211           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16212/* end confdefs.h.  */
16213#if defined __LP64__
16214                    int ok;
16215                  #else
16216                    error fail
16217                  #endif
16218
16219_ACEOF
16220if ac_fn_c_try_compile "$LINENO"
16221then :
16222  gl_cv_host_cpu_c_abi_32bit=no
16223else $as_nop
16224  gl_cv_host_cpu_c_abi_32bit=yes
16225fi
16226rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16227           ;;
16228
16229         s390* )
16230           # On s390x, the C compiler may be generating 64-bit (= s390x) code
16231           # or 31-bit (= s390) code.
16232           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16233/* end confdefs.h.  */
16234#if defined __LP64__ || defined __s390x__
16235                    int ok;
16236                  #else
16237                    error fail
16238                  #endif
16239
16240_ACEOF
16241if ac_fn_c_try_compile "$LINENO"
16242then :
16243  gl_cv_host_cpu_c_abi_32bit=no
16244else $as_nop
16245  gl_cv_host_cpu_c_abi_32bit=yes
16246fi
16247rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16248           ;;
16249
16250         sparc | sparc64 )
16251           # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
16252           # C compiler still generates 32-bit code.
16253           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16254/* end confdefs.h.  */
16255#if defined __sparcv9 || defined __arch64__
16256                   int ok;
16257                  #else
16258                   error fail
16259                  #endif
16260
16261_ACEOF
16262if ac_fn_c_try_compile "$LINENO"
16263then :
16264  gl_cv_host_cpu_c_abi_32bit=no
16265else $as_nop
16266  gl_cv_host_cpu_c_abi_32bit=yes
16267fi
16268rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16269           ;;
16270
16271         *)
16272           gl_cv_host_cpu_c_abi_32bit=unknown
16273           ;;
16274       esac
16275     fi
16276
16277fi
16278{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
16279printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
16280
16281  HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
16282
16283
16284
16285
16286
16287  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5
16288printf %s "checking for ELF binary format... " >&6; }
16289if test ${gl_cv_elf+y}
16290then :
16291  printf %s "(cached) " >&6
16292else $as_nop
16293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16294/* end confdefs.h.  */
16295#ifdef __ELF__
16296        Extensible Linking Format
16297        #endif
16298
16299_ACEOF
16300if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16301  $EGREP "Extensible Linking Format" >/dev/null 2>&1
16302then :
16303  gl_cv_elf=yes
16304else $as_nop
16305  gl_cv_elf=no
16306fi
16307rm -rf conftest*
16308
16309
16310fi
16311{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5
16312printf "%s\n" "$gl_cv_elf" >&6; }
16313  if test $gl_cv_elf = yes; then
16314    # Extract the ELF class of a file (5th byte) in decimal.
16315    # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
16316    if od -A x < /dev/null >/dev/null 2>/dev/null; then
16317      # Use POSIX od.
16318      func_elfclass ()
16319      {
16320        od -A n -t d1 -j 4 -N 1
16321      }
16322    else
16323      # Use BSD hexdump.
16324      func_elfclass ()
16325      {
16326        dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
16327        echo
16328      }
16329    fi
16330    # Use 'expr', not 'test', to compare the values of func_elfclass, because on
16331    # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002,
16332    # not 1 or 2.
16333    case $HOST_CPU_C_ABI_32BIT in
16334      yes)
16335        # 32-bit ABI.
16336        acl_is_expected_elfclass ()
16337        {
16338          expr "`func_elfclass | sed -e 's/[ 	]//g'`" = 1 > /dev/null
16339        }
16340        ;;
16341      no)
16342        # 64-bit ABI.
16343        acl_is_expected_elfclass ()
16344        {
16345          expr "`func_elfclass | sed -e 's/[ 	]//g'`" = 2 > /dev/null
16346        }
16347        ;;
16348      *)
16349        # Unknown.
16350        acl_is_expected_elfclass ()
16351        {
16352          :
16353        }
16354        ;;
16355    esac
16356  else
16357    acl_is_expected_elfclass ()
16358    {
16359      :
16360    }
16361  fi
16362
16363    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
16364printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
16365if test ${acl_cv_libdirstems+y}
16366then :
16367  printf %s "(cached) " >&6
16368else $as_nop
16369            acl_libdirstem=lib
16370     acl_libdirstem2=
16371     acl_libdirstem3=
16372     case "$host_os" in
16373       solaris*)
16374                                                      if test $HOST_CPU_C_ABI_32BIT = no; then
16375           acl_libdirstem2=lib/64
16376           case "$host_cpu" in
16377             sparc*)        acl_libdirstem3=lib/sparcv9 ;;
16378             i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
16379           esac
16380         fi
16381         ;;
16382       *)
16383                                                                                 searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
16384                     | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
16385         if test $HOST_CPU_C_ABI_32BIT != no; then
16386           # 32-bit or unknown ABI.
16387           if test -d /usr/lib32; then
16388             acl_libdirstem2=lib32
16389           fi
16390         fi
16391         if test $HOST_CPU_C_ABI_32BIT != yes; then
16392           # 64-bit or unknown ABI.
16393           if test -d /usr/lib64; then
16394             acl_libdirstem3=lib64
16395           fi
16396         fi
16397         if test -n "$searchpath"; then
16398           acl_save_IFS="${IFS= 	}"; IFS=":"
16399           for searchdir in $searchpath; do
16400             if test -d "$searchdir"; then
16401               case "$searchdir" in
16402                 */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
16403                 */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
16404                 */../ | */.. )
16405                   # Better ignore directories of this form. They are misleading.
16406                   ;;
16407                 *) searchdir=`cd "$searchdir" && pwd`
16408                    case "$searchdir" in
16409                      */lib32 ) acl_libdirstem2=lib32 ;;
16410                      */lib64 ) acl_libdirstem3=lib64 ;;
16411                    esac ;;
16412               esac
16413             fi
16414           done
16415           IFS="$acl_save_IFS"
16416           if test $HOST_CPU_C_ABI_32BIT = yes; then
16417             # 32-bit ABI.
16418             acl_libdirstem3=
16419           fi
16420           if test $HOST_CPU_C_ABI_32BIT = no; then
16421             # 64-bit ABI.
16422             acl_libdirstem2=
16423           fi
16424         fi
16425         ;;
16426     esac
16427     test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
16428     test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
16429     acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
16430
16431fi
16432{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
16433printf "%s\n" "$acl_cv_libdirstems" >&6; }
16434      acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
16435  acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
16436  acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448    use_additional=yes
16449
16450  acl_save_prefix="$prefix"
16451  prefix="$acl_final_prefix"
16452  acl_save_exec_prefix="$exec_prefix"
16453  exec_prefix="$acl_final_exec_prefix"
16454
16455    eval additional_includedir=\"$includedir\"
16456    eval additional_libdir=\"$libdir\"
16457    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
16458    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
16459
16460  exec_prefix="$acl_save_exec_prefix"
16461  prefix="$acl_save_prefix"
16462
16463
16464# Check whether --with-libiconv-prefix was given.
16465if test ${with_libiconv_prefix+y}
16466then :
16467  withval=$with_libiconv_prefix;
16468    if test "X$withval" = "Xno"; then
16469      use_additional=no
16470    else
16471      if test "X$withval" = "X"; then
16472
16473  acl_save_prefix="$prefix"
16474  prefix="$acl_final_prefix"
16475  acl_save_exec_prefix="$exec_prefix"
16476  exec_prefix="$acl_final_exec_prefix"
16477
16478          eval additional_includedir=\"$includedir\"
16479          eval additional_libdir=\"$libdir\"
16480          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
16481          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
16482
16483  exec_prefix="$acl_save_exec_prefix"
16484  prefix="$acl_save_prefix"
16485
16486      else
16487        additional_includedir="$withval/include"
16488        additional_libdir="$withval/$acl_libdirstem"
16489        additional_libdir2="$withval/$acl_libdirstem2"
16490        additional_libdir3="$withval/$acl_libdirstem3"
16491      fi
16492    fi
16493
16494fi
16495
16496  if test "X$additional_libdir2" = "X$additional_libdir"; then
16497    additional_libdir2=
16498  fi
16499  if test "X$additional_libdir3" = "X$additional_libdir"; then
16500    additional_libdir3=
16501  fi
16502      LIBICONV=
16503  LTLIBICONV=
16504  INCICONV=
16505  LIBICONV_PREFIX=
16506      HAVE_LIBICONV=
16507  rpathdirs=
16508  ltrpathdirs=
16509  names_already_handled=
16510  names_next_round='iconv '
16511  while test -n "$names_next_round"; do
16512    names_this_round="$names_next_round"
16513    names_next_round=
16514    for name in $names_this_round; do
16515      already_handled=
16516      for n in $names_already_handled; do
16517        if test "$n" = "$name"; then
16518          already_handled=yes
16519          break
16520        fi
16521      done
16522      if test -z "$already_handled"; then
16523        names_already_handled="$names_already_handled $name"
16524                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
16525        eval value=\"\$HAVE_LIB$uppername\"
16526        if test -n "$value"; then
16527          if test "$value" = yes; then
16528            eval value=\"\$LIB$uppername\"
16529            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
16530            eval value=\"\$LTLIB$uppername\"
16531            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
16532          else
16533                                    :
16534          fi
16535        else
16536                              found_dir=
16537          found_la=
16538          found_so=
16539          found_a=
16540          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
16541          if test -n "$acl_shlibext"; then
16542            shrext=".$acl_shlibext"             # typically: shrext=.so
16543          else
16544            shrext=
16545          fi
16546          if test $use_additional = yes; then
16547            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
16548              if test "X$found_dir" = "X"; then
16549                eval dir=\$$additional_libdir_variable
16550                if test -n "$dir"; then
16551                                                      if test -n "$acl_shlibext"; then
16552                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
16553                      found_dir="$dir"
16554                      found_so="$dir/$libname$shrext"
16555                    else
16556                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
16557                        ver=`(cd "$dir" && \
16558                              for f in "$libname$shrext".*; do echo "$f"; done \
16559                              | sed -e "s,^$libname$shrext\\\\.,," \
16560                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
16561                              | sed 1q ) 2>/dev/null`
16562                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
16563                          found_dir="$dir"
16564                          found_so="$dir/$libname$shrext.$ver"
16565                        fi
16566                      else
16567                        eval library_names=\"$acl_library_names_spec\"
16568                        for f in $library_names; do
16569                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
16570                            found_dir="$dir"
16571                            found_so="$dir/$f"
16572                            break
16573                          fi
16574                        done
16575                      fi
16576                    fi
16577                  fi
16578                                    if test "X$found_dir" = "X"; then
16579                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
16580                      found_dir="$dir"
16581                      found_a="$dir/$libname.$acl_libext"
16582                    fi
16583                  fi
16584                  if test "X$found_dir" != "X"; then
16585                    if test -f "$dir/$libname.la"; then
16586                      found_la="$dir/$libname.la"
16587                    fi
16588                  fi
16589                fi
16590              fi
16591            done
16592          fi
16593          if test "X$found_dir" = "X"; then
16594            for x in $LDFLAGS $LTLIBICONV; do
16595
16596  acl_save_prefix="$prefix"
16597  prefix="$acl_final_prefix"
16598  acl_save_exec_prefix="$exec_prefix"
16599  exec_prefix="$acl_final_exec_prefix"
16600  eval x=\"$x\"
16601  exec_prefix="$acl_save_exec_prefix"
16602  prefix="$acl_save_prefix"
16603
16604              case "$x" in
16605                -L*)
16606                  dir=`echo "X$x" | sed -e 's/^X-L//'`
16607                                    if test -n "$acl_shlibext"; then
16608                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
16609                      found_dir="$dir"
16610                      found_so="$dir/$libname$shrext"
16611                    else
16612                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
16613                        ver=`(cd "$dir" && \
16614                              for f in "$libname$shrext".*; do echo "$f"; done \
16615                              | sed -e "s,^$libname$shrext\\\\.,," \
16616                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
16617                              | sed 1q ) 2>/dev/null`
16618                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
16619                          found_dir="$dir"
16620                          found_so="$dir/$libname$shrext.$ver"
16621                        fi
16622                      else
16623                        eval library_names=\"$acl_library_names_spec\"
16624                        for f in $library_names; do
16625                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
16626                            found_dir="$dir"
16627                            found_so="$dir/$f"
16628                            break
16629                          fi
16630                        done
16631                      fi
16632                    fi
16633                  fi
16634                                    if test "X$found_dir" = "X"; then
16635                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
16636                      found_dir="$dir"
16637                      found_a="$dir/$libname.$acl_libext"
16638                    fi
16639                  fi
16640                  if test "X$found_dir" != "X"; then
16641                    if test -f "$dir/$libname.la"; then
16642                      found_la="$dir/$libname.la"
16643                    fi
16644                  fi
16645                  ;;
16646              esac
16647              if test "X$found_dir" != "X"; then
16648                break
16649              fi
16650            done
16651          fi
16652          if test "X$found_dir" != "X"; then
16653                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
16654            if test "X$found_so" != "X"; then
16655                                                        if test "$enable_rpath" = no \
16656                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
16657                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
16658                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
16659                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
16660              else
16661                                                                                haveit=
16662                for x in $ltrpathdirs; do
16663                  if test "X$x" = "X$found_dir"; then
16664                    haveit=yes
16665                    break
16666                  fi
16667                done
16668                if test -z "$haveit"; then
16669                  ltrpathdirs="$ltrpathdirs $found_dir"
16670                fi
16671                                if test "$acl_hardcode_direct" = yes; then
16672                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
16673                else
16674                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
16675                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
16676                                                            haveit=
16677                    for x in $rpathdirs; do
16678                      if test "X$x" = "X$found_dir"; then
16679                        haveit=yes
16680                        break
16681                      fi
16682                    done
16683                    if test -z "$haveit"; then
16684                      rpathdirs="$rpathdirs $found_dir"
16685                    fi
16686                  else
16687                                                                                haveit=
16688                    for x in $LDFLAGS $LIBICONV; do
16689
16690  acl_save_prefix="$prefix"
16691  prefix="$acl_final_prefix"
16692  acl_save_exec_prefix="$exec_prefix"
16693  exec_prefix="$acl_final_exec_prefix"
16694  eval x=\"$x\"
16695  exec_prefix="$acl_save_exec_prefix"
16696  prefix="$acl_save_prefix"
16697
16698                      if test "X$x" = "X-L$found_dir"; then
16699                        haveit=yes
16700                        break
16701                      fi
16702                    done
16703                    if test -z "$haveit"; then
16704                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
16705                    fi
16706                    if test "$acl_hardcode_minus_L" != no; then
16707                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
16708                    else
16709                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
16710                    fi
16711                  fi
16712                fi
16713              fi
16714            else
16715              if test "X$found_a" != "X"; then
16716                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
16717              else
16718                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
16719              fi
16720            fi
16721                        additional_includedir=
16722            case "$found_dir" in
16723              */$acl_libdirstem | */$acl_libdirstem/)
16724                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
16725                if test "$name" = 'iconv'; then
16726                  LIBICONV_PREFIX="$basedir"
16727                fi
16728                additional_includedir="$basedir/include"
16729                ;;
16730              */$acl_libdirstem2 | */$acl_libdirstem2/)
16731                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
16732                if test "$name" = 'iconv'; then
16733                  LIBICONV_PREFIX="$basedir"
16734                fi
16735                additional_includedir="$basedir/include"
16736                ;;
16737              */$acl_libdirstem3 | */$acl_libdirstem3/)
16738                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
16739                if test "$name" = 'iconv'; then
16740                  LIBICONV_PREFIX="$basedir"
16741                fi
16742                additional_includedir="$basedir/include"
16743                ;;
16744            esac
16745            if test "X$additional_includedir" != "X"; then
16746                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
16747                haveit=
16748                if test "X$additional_includedir" = "X/usr/local/include"; then
16749                  if test -n "$GCC"; then
16750                    case $host_os in
16751                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
16752                    esac
16753                  fi
16754                fi
16755                if test -z "$haveit"; then
16756                  for x in $CPPFLAGS $INCICONV; do
16757
16758  acl_save_prefix="$prefix"
16759  prefix="$acl_final_prefix"
16760  acl_save_exec_prefix="$exec_prefix"
16761  exec_prefix="$acl_final_exec_prefix"
16762  eval x=\"$x\"
16763  exec_prefix="$acl_save_exec_prefix"
16764  prefix="$acl_save_prefix"
16765
16766                    if test "X$x" = "X-I$additional_includedir"; then
16767                      haveit=yes
16768                      break
16769                    fi
16770                  done
16771                  if test -z "$haveit"; then
16772                    if test -d "$additional_includedir"; then
16773                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
16774                    fi
16775                  fi
16776                fi
16777              fi
16778            fi
16779                        if test -n "$found_la"; then
16780                                                        save_libdir="$libdir"
16781              case "$found_la" in
16782                */* | *\\*) . "$found_la" ;;
16783                *) . "./$found_la" ;;
16784              esac
16785              libdir="$save_libdir"
16786                            for dep in $dependency_libs; do
16787                case "$dep" in
16788                  -L*)
16789                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16790                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
16791                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
16792                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
16793                      haveit=
16794                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
16795                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
16796                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
16797                        if test -n "$GCC"; then
16798                          case $host_os in
16799                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
16800                          esac
16801                        fi
16802                      fi
16803                      if test -z "$haveit"; then
16804                        haveit=
16805                        for x in $LDFLAGS $LIBICONV; do
16806
16807  acl_save_prefix="$prefix"
16808  prefix="$acl_final_prefix"
16809  acl_save_exec_prefix="$exec_prefix"
16810  exec_prefix="$acl_final_exec_prefix"
16811  eval x=\"$x\"
16812  exec_prefix="$acl_save_exec_prefix"
16813  prefix="$acl_save_prefix"
16814
16815                          if test "X$x" = "X-L$dependency_libdir"; then
16816                            haveit=yes
16817                            break
16818                          fi
16819                        done
16820                        if test -z "$haveit"; then
16821                          if test -d "$dependency_libdir"; then
16822                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir"
16823                          fi
16824                        fi
16825                        haveit=
16826                        for x in $LDFLAGS $LTLIBICONV; do
16827
16828  acl_save_prefix="$prefix"
16829  prefix="$acl_final_prefix"
16830  acl_save_exec_prefix="$exec_prefix"
16831  exec_prefix="$acl_final_exec_prefix"
16832  eval x=\"$x\"
16833  exec_prefix="$acl_save_exec_prefix"
16834  prefix="$acl_save_prefix"
16835
16836                          if test "X$x" = "X-L$dependency_libdir"; then
16837                            haveit=yes
16838                            break
16839                          fi
16840                        done
16841                        if test -z "$haveit"; then
16842                          if test -d "$dependency_libdir"; then
16843                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir"
16844                          fi
16845                        fi
16846                      fi
16847                    fi
16848                    ;;
16849                  -R*)
16850                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
16851                    if test "$enable_rpath" != no; then
16852                                                                  haveit=
16853                      for x in $rpathdirs; do
16854                        if test "X$x" = "X$dir"; then
16855                          haveit=yes
16856                          break
16857                        fi
16858                      done
16859                      if test -z "$haveit"; then
16860                        rpathdirs="$rpathdirs $dir"
16861                      fi
16862                                                                  haveit=
16863                      for x in $ltrpathdirs; do
16864                        if test "X$x" = "X$dir"; then
16865                          haveit=yes
16866                          break
16867                        fi
16868                      done
16869                      if test -z "$haveit"; then
16870                        ltrpathdirs="$ltrpathdirs $dir"
16871                      fi
16872                    fi
16873                    ;;
16874                  -l*)
16875                                                                                                                                                                dep=`echo "X$dep" | sed -e 's/^X-l//'`
16876                    if test "X$dep" != Xc \
16877                       || case $host_os in
16878                            linux* | gnu* | k*bsd*-gnu) false ;;
16879                            *)                          true ;;
16880                          esac; then
16881                      names_next_round="$names_next_round $dep"
16882                    fi
16883                    ;;
16884                  *.la)
16885                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16886                    ;;
16887                  *)
16888                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
16889                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
16890                    ;;
16891                esac
16892              done
16893            fi
16894          else
16895                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
16896            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
16897          fi
16898        fi
16899      fi
16900    done
16901  done
16902  if test "X$rpathdirs" != "X"; then
16903    if test -n "$acl_hardcode_libdir_separator"; then
16904                        alldirs=
16905      for found_dir in $rpathdirs; do
16906        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
16907      done
16908            acl_save_libdir="$libdir"
16909      libdir="$alldirs"
16910      eval flag=\"$acl_hardcode_libdir_flag_spec\"
16911      libdir="$acl_save_libdir"
16912      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
16913    else
16914            for found_dir in $rpathdirs; do
16915        acl_save_libdir="$libdir"
16916        libdir="$found_dir"
16917        eval flag=\"$acl_hardcode_libdir_flag_spec\"
16918        libdir="$acl_save_libdir"
16919        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
16920      done
16921    fi
16922  fi
16923  if test "X$ltrpathdirs" != "X"; then
16924            for found_dir in $ltrpathdirs; do
16925      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
16926    done
16927  fi
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939          am_save_CPPFLAGS="$CPPFLAGS"
16940
16941  for element in $INCICONV; do
16942    haveit=
16943    for x in $CPPFLAGS; do
16944
16945  acl_save_prefix="$prefix"
16946  prefix="$acl_final_prefix"
16947  acl_save_exec_prefix="$exec_prefix"
16948  exec_prefix="$acl_final_exec_prefix"
16949  eval x=\"$x\"
16950  exec_prefix="$acl_save_exec_prefix"
16951  prefix="$acl_save_prefix"
16952
16953      if test "X$x" = "X$element"; then
16954        haveit=yes
16955        break
16956      fi
16957    done
16958    if test -z "$haveit"; then
16959      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16960    fi
16961  done
16962
16963
16964  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
16965printf %s "checking for iconv... " >&6; }
16966if test ${am_cv_func_iconv+y}
16967then :
16968  printf %s "(cached) " >&6
16969else $as_nop
16970
16971    am_cv_func_iconv="no, consider installing GNU libiconv"
16972    am_cv_lib_iconv=no
16973    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16974/* end confdefs.h.  */
16975
16976#include <stdlib.h>
16977#include <iconv.h>
16978
16979int
16980main (void)
16981{
16982iconv_t cd = iconv_open("","");
16983           iconv(cd,NULL,NULL,NULL,NULL);
16984           iconv_close(cd);
16985  ;
16986  return 0;
16987}
16988_ACEOF
16989if ac_fn_c_try_link "$LINENO"
16990then :
16991  am_cv_func_iconv=yes
16992fi
16993rm -f core conftest.err conftest.$ac_objext conftest.beam \
16994    conftest$ac_exeext conftest.$ac_ext
16995    if test "$am_cv_func_iconv" != yes; then
16996      am_save_LIBS="$LIBS"
16997      LIBS="$LIBS $LIBICONV"
16998      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16999/* end confdefs.h.  */
17000
17001#include <stdlib.h>
17002#include <iconv.h>
17003
17004int
17005main (void)
17006{
17007iconv_t cd = iconv_open("","");
17008             iconv(cd,NULL,NULL,NULL,NULL);
17009             iconv_close(cd);
17010  ;
17011  return 0;
17012}
17013_ACEOF
17014if ac_fn_c_try_link "$LINENO"
17015then :
17016  am_cv_lib_iconv=yes
17017        am_cv_func_iconv=yes
17018fi
17019rm -f core conftest.err conftest.$ac_objext conftest.beam \
17020    conftest$ac_exeext conftest.$ac_ext
17021      LIBS="$am_save_LIBS"
17022    fi
17023
17024fi
17025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
17026printf "%s\n" "$am_cv_func_iconv" >&6; }
17027  if test "$am_cv_func_iconv" = yes; then
17028    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
17029printf %s "checking for working iconv... " >&6; }
17030if test ${am_cv_func_iconv_works+y}
17031then :
17032  printf %s "(cached) " >&6
17033else $as_nop
17034
17035                  am_save_LIBS="$LIBS"
17036      if test $am_cv_lib_iconv = yes; then
17037        LIBS="$LIBS $LIBICONV"
17038      fi
17039      am_cv_func_iconv_works=no
17040      for ac_iconv_const in '' 'const'; do
17041        if test "$cross_compiling" = yes
17042then :
17043  case "$host_os" in
17044             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
17045             *)            am_cv_func_iconv_works="guessing yes" ;;
17046           esac
17047else $as_nop
17048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17049/* end confdefs.h.  */
17050
17051#include <iconv.h>
17052#include <string.h>
17053
17054#ifndef ICONV_CONST
17055# define ICONV_CONST $ac_iconv_const
17056#endif
17057
17058int
17059main (void)
17060{
17061int result = 0;
17062  /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
17063     successful returns.  This is even documented in
17064     <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
17065  {
17066    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
17067    if (cd_utf8_to_88591 != (iconv_t)(-1))
17068      {
17069        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
17070        char buf[10];
17071        ICONV_CONST char *inptr = input;
17072        size_t inbytesleft = strlen (input);
17073        char *outptr = buf;
17074        size_t outbytesleft = sizeof (buf);
17075        size_t res = iconv (cd_utf8_to_88591,
17076                            &inptr, &inbytesleft,
17077                            &outptr, &outbytesleft);
17078        if (res == 0)
17079          result |= 1;
17080        iconv_close (cd_utf8_to_88591);
17081      }
17082  }
17083  /* Test against Solaris 10 bug: Failures are not distinguishable from
17084     successful returns.  */
17085  {
17086    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
17087    if (cd_ascii_to_88591 != (iconv_t)(-1))
17088      {
17089        static ICONV_CONST char input[] = "\263";
17090        char buf[10];
17091        ICONV_CONST char *inptr = input;
17092        size_t inbytesleft = strlen (input);
17093        char *outptr = buf;
17094        size_t outbytesleft = sizeof (buf);
17095        size_t res = iconv (cd_ascii_to_88591,
17096                            &inptr, &inbytesleft,
17097                            &outptr, &outbytesleft);
17098        if (res == 0)
17099          result |= 2;
17100        iconv_close (cd_ascii_to_88591);
17101      }
17102  }
17103  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
17104  {
17105    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
17106    if (cd_88591_to_utf8 != (iconv_t)(-1))
17107      {
17108        static ICONV_CONST char input[] = "\304";
17109        static char buf[2] = { (char)0xDE, (char)0xAD };
17110        ICONV_CONST char *inptr = input;
17111        size_t inbytesleft = 1;
17112        char *outptr = buf;
17113        size_t outbytesleft = 1;
17114        size_t res = iconv (cd_88591_to_utf8,
17115                            &inptr, &inbytesleft,
17116                            &outptr, &outbytesleft);
17117        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
17118          result |= 4;
17119        iconv_close (cd_88591_to_utf8);
17120      }
17121  }
17122#if 0 /* This bug could be worked around by the caller.  */
17123  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
17124  {
17125    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
17126    if (cd_88591_to_utf8 != (iconv_t)(-1))
17127      {
17128        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
17129        char buf[50];
17130        ICONV_CONST char *inptr = input;
17131        size_t inbytesleft = strlen (input);
17132        char *outptr = buf;
17133        size_t outbytesleft = sizeof (buf);
17134        size_t res = iconv (cd_88591_to_utf8,
17135                            &inptr, &inbytesleft,
17136                            &outptr, &outbytesleft);
17137        if ((int)res > 0)
17138          result |= 8;
17139        iconv_close (cd_88591_to_utf8);
17140      }
17141  }
17142#endif
17143  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
17144     provided.  */
17145  {
17146    /* Try standardized names.  */
17147    iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
17148    /* Try IRIX, OSF/1 names.  */
17149    iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
17150    /* Try AIX names.  */
17151    iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
17152    /* Try HP-UX names.  */
17153    iconv_t cd4 = iconv_open ("utf8", "eucJP");
17154    if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
17155        && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
17156      result |= 16;
17157    if (cd1 != (iconv_t)(-1))
17158      iconv_close (cd1);
17159    if (cd2 != (iconv_t)(-1))
17160      iconv_close (cd2);
17161    if (cd3 != (iconv_t)(-1))
17162      iconv_close (cd3);
17163    if (cd4 != (iconv_t)(-1))
17164      iconv_close (cd4);
17165  }
17166  return result;
17167
17168  ;
17169  return 0;
17170}
17171_ACEOF
17172if ac_fn_c_try_run "$LINENO"
17173then :
17174  am_cv_func_iconv_works=yes
17175fi
17176rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17177  conftest.$ac_objext conftest.beam conftest.$ac_ext
17178fi
17179
17180        test "$am_cv_func_iconv_works" = no || break
17181      done
17182      LIBS="$am_save_LIBS"
17183
17184fi
17185{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
17186printf "%s\n" "$am_cv_func_iconv_works" >&6; }
17187    case "$am_cv_func_iconv_works" in
17188      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
17189      *)   am_func_iconv=yes ;;
17190    esac
17191  else
17192    am_func_iconv=no am_cv_lib_iconv=no
17193  fi
17194  if test "$am_func_iconv" = yes; then
17195
17196printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
17197
17198  fi
17199  if test "$am_cv_lib_iconv" = yes; then
17200    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
17201printf %s "checking how to link with libiconv... " >&6; }
17202    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
17203printf "%s\n" "$LIBICONV" >&6; }
17204  else
17205            CPPFLAGS="$am_save_CPPFLAGS"
17206    LIBICONV=
17207    LTLIBICONV=
17208  fi
17209
17210
17211
17212  if test "$am_cv_func_iconv" = yes; then
17213    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
17214printf %s "checking whether iconv is compatible with its POSIX signature... " >&6; }
17215if test ${gl_cv_iconv_nonconst+y}
17216then :
17217  printf %s "(cached) " >&6
17218else $as_nop
17219  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17220/* end confdefs.h.  */
17221
17222#include <stdlib.h>
17223#include <iconv.h>
17224extern
17225#ifdef __cplusplus
17226"C"
17227#endif
17228size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
17229
17230int
17231main (void)
17232{
17233
17234  ;
17235  return 0;
17236}
17237_ACEOF
17238if ac_fn_c_try_compile "$LINENO"
17239then :
17240  gl_cv_iconv_nonconst=yes
17241else $as_nop
17242  gl_cv_iconv_nonconst=no
17243fi
17244rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17245
17246fi
17247{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
17248printf "%s\n" "$gl_cv_iconv_nonconst" >&6; }
17249  else
17250            gl_cv_iconv_nonconst=yes
17251  fi
17252  if test $gl_cv_iconv_nonconst = yes; then
17253    iconv_arg1=""
17254  else
17255    iconv_arg1="const"
17256  fi
17257
17258printf "%s\n" "#define ICONV_CONST $iconv_arg1" >>confdefs.h
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273     if test $gl_cv_have_include_next = yes; then
17274       gl_cv_next_limits_h='<'limits.h'>'
17275     else
17276       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
17277printf %s "checking absolute name of <limits.h>... " >&6; }
17278if test ${gl_cv_next_limits_h+y}
17279then :
17280  printf %s "(cached) " >&6
17281else $as_nop
17282
17283             if test $ac_cv_header_limits_h = yes; then
17284
17285
17286
17287
17288  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17289/* end confdefs.h.  */
17290#include <limits.h>
17291_ACEOF
17292                case "$host_os" in
17293    aix*) gl_absname_cpp="$ac_cpp -C" ;;
17294    *)    gl_absname_cpp="$ac_cpp" ;;
17295  esac
17296
17297  case "$host_os" in
17298    mingw*)
17299                                          gl_dirsep_regex='[/\\]'
17300      ;;
17301    *)
17302      gl_dirsep_regex='\/'
17303      ;;
17304  esac
17305      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17306  gl_header_literal_regex=`echo 'limits.h' \
17307                           | sed -e "$gl_make_literal_regex_sed"`
17308  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17309      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17310      s|^/[^/]|//&|
17311      p
17312      q
17313    }'
17314
17315        gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17316  sed -n "$gl_absolute_header_sed"`
17317
17318           gl_header=$gl_cv_absolute_limits_h
17319           gl_cv_next_limits_h='"'$gl_header'"'
17320          else
17321               gl_cv_next_limits_h='<'limits.h'>'
17322             fi
17323
17324
17325fi
17326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
17327printf "%s\n" "$gl_cv_next_limits_h" >&6; }
17328     fi
17329     NEXT_LIMITS_H=$gl_cv_next_limits_h
17330
17331     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17332       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17333       gl_next_as_first_directive='<'limits.h'>'
17334     else
17335       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17336       gl_next_as_first_directive=$gl_cv_next_limits_h
17337     fi
17338     NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
17339
17340
17341
17342
17343
17344  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
17345printf %s "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
17346if test ${gl_cv_header_limits_width+y}
17347then :
17348  printf %s "(cached) " >&6
17349else $as_nop
17350  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17351/* end confdefs.h.  */
17352#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
17353             #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
17354            #endif
17355            #include <limits.h>
17356            long long llm = LLONG_MAX;
17357            int wb = WORD_BIT;
17358            int ullw = ULLONG_WIDTH;
17359
17360int
17361main (void)
17362{
17363
17364  ;
17365  return 0;
17366}
17367_ACEOF
17368if ac_fn_c_try_compile "$LINENO"
17369then :
17370  gl_cv_header_limits_width=yes
17371else $as_nop
17372  gl_cv_header_limits_width=no
17373fi
17374rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17375fi
17376{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
17377printf "%s\n" "$gl_cv_header_limits_width" >&6; }
17378  if test "$gl_cv_header_limits_width" = yes; then
17379    LIMITS_H=
17380  else
17381    LIMITS_H=limits.h
17382  fi
17383
17384   if test -n "$LIMITS_H"; then
17385  GL_GENERATE_LIMITS_H_TRUE=
17386  GL_GENERATE_LIMITS_H_FALSE='#'
17387else
17388  GL_GENERATE_LIMITS_H_TRUE='#'
17389  GL_GENERATE_LIMITS_H_FALSE=
17390fi
17391
17392
17393
17394  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
17395printf %s "checking for wint_t... " >&6; }
17396if test ${gt_cv_c_wint_t+y}
17397then :
17398  printf %s "(cached) " >&6
17399else $as_nop
17400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17401/* end confdefs.h.  */
17402#include <wchar.h>
17403            wint_t foo = (wchar_t)'\0';
17404int
17405main (void)
17406{
17407
17408  ;
17409  return 0;
17410}
17411_ACEOF
17412if ac_fn_c_try_compile "$LINENO"
17413then :
17414  gt_cv_c_wint_t=yes
17415else $as_nop
17416  gt_cv_c_wint_t=no
17417fi
17418rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17419fi
17420{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
17421printf "%s\n" "$gt_cv_c_wint_t" >&6; }
17422  if test $gt_cv_c_wint_t = yes; then
17423
17424printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
17425
17426
17427            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
17428printf %s "checking whether wint_t is large enough... " >&6; }
17429if test ${gl_cv_type_wint_t_large_enough+y}
17430then :
17431  printf %s "(cached) " >&6
17432else $as_nop
17433  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17434/* end confdefs.h.  */
17435#include <wchar.h>
17436              int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
17437
17438int
17439main (void)
17440{
17441
17442  ;
17443  return 0;
17444}
17445_ACEOF
17446if ac_fn_c_try_compile "$LINENO"
17447then :
17448  gl_cv_type_wint_t_large_enough=yes
17449else $as_nop
17450  gl_cv_type_wint_t_large_enough=no
17451fi
17452rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17453fi
17454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
17455printf "%s\n" "$gl_cv_type_wint_t_large_enough" >&6; }
17456    if test $gl_cv_type_wint_t_large_enough = no; then
17457      GNULIB_OVERRIDES_WINT_T=1
17458    else
17459      GNULIB_OVERRIDES_WINT_T=0
17460    fi
17461  else
17462    GNULIB_OVERRIDES_WINT_T=0
17463  fi
17464
17465
17466
17467    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
17468printf %s "checking whether the compiler produces multi-arch binaries... " >&6; }
17469if test ${gl_cv_c_multiarch+y}
17470then :
17471  printf %s "(cached) " >&6
17472else $as_nop
17473  gl_cv_c_multiarch=no
17474     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17475/* end confdefs.h.  */
17476#ifndef __APPLE_CC__
17477            not a universal capable compiler
17478           #endif
17479           typedef int dummy;
17480
17481_ACEOF
17482if ac_fn_c_try_compile "$LINENO"
17483then :
17484
17485                        arch=
17486        prev=
17487        for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
17488          if test -n "$prev"; then
17489            case $word in
17490              i?86 | x86_64 | ppc | ppc64 | arm | arm64)
17491                if test -z "$arch" || test "$arch" = "$word"; then
17492                  arch="$word"
17493                else
17494                  gl_cv_c_multiarch=yes
17495                fi
17496                ;;
17497            esac
17498            prev=
17499          else
17500            if test "x$word" = "x-arch"; then
17501              prev=arch
17502            fi
17503          fi
17504        done
17505
17506fi
17507rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17508
17509fi
17510{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
17511printf "%s\n" "$gl_cv_c_multiarch" >&6; }
17512  if test $gl_cv_c_multiarch = yes; then
17513    APPLE_UNIVERSAL_BUILD=1
17514  else
17515    APPLE_UNIVERSAL_BUILD=0
17516  fi
17517
17518
17519
17520
17521
17522
17523
17524
17525printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
17526
17527
17528printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
17529
17530
17531
17532  if test $ac_cv_header_wchar_h = yes; then
17533    HAVE_WCHAR_H=1
17534  else
17535    HAVE_WCHAR_H=0
17536  fi
17537
17538
17539
17540  if test $ac_cv_header_inttypes_h = yes; then
17541    HAVE_INTTYPES_H=1
17542  else
17543    HAVE_INTTYPES_H=0
17544  fi
17545
17546
17547
17548  if test $ac_cv_header_sys_types_h = yes; then
17549    HAVE_SYS_TYPES_H=1
17550  else
17551    HAVE_SYS_TYPES_H=0
17552  fi
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564     if test $gl_cv_have_include_next = yes; then
17565       gl_cv_next_stdint_h='<'stdint.h'>'
17566     else
17567       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
17568printf %s "checking absolute name of <stdint.h>... " >&6; }
17569if test ${gl_cv_next_stdint_h+y}
17570then :
17571  printf %s "(cached) " >&6
17572else $as_nop
17573
17574             if test $ac_cv_header_stdint_h = yes; then
17575
17576
17577
17578
17579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17580/* end confdefs.h.  */
17581#include <stdint.h>
17582_ACEOF
17583                case "$host_os" in
17584    aix*) gl_absname_cpp="$ac_cpp -C" ;;
17585    *)    gl_absname_cpp="$ac_cpp" ;;
17586  esac
17587
17588  case "$host_os" in
17589    mingw*)
17590                                          gl_dirsep_regex='[/\\]'
17591      ;;
17592    *)
17593      gl_dirsep_regex='\/'
17594      ;;
17595  esac
17596      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17597  gl_header_literal_regex=`echo 'stdint.h' \
17598                           | sed -e "$gl_make_literal_regex_sed"`
17599  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17600      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17601      s|^/[^/]|//&|
17602      p
17603      q
17604    }'
17605
17606        gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17607  sed -n "$gl_absolute_header_sed"`
17608
17609           gl_header=$gl_cv_absolute_stdint_h
17610           gl_cv_next_stdint_h='"'$gl_header'"'
17611          else
17612               gl_cv_next_stdint_h='<'stdint.h'>'
17613             fi
17614
17615
17616fi
17617{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
17618printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
17619     fi
17620     NEXT_STDINT_H=$gl_cv_next_stdint_h
17621
17622     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17623       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17624       gl_next_as_first_directive='<'stdint.h'>'
17625     else
17626       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17627       gl_next_as_first_directive=$gl_cv_next_stdint_h
17628     fi
17629     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
17630
17631
17632
17633
17634  if test $ac_cv_header_stdint_h = yes; then
17635    HAVE_STDINT_H=1
17636  else
17637    HAVE_STDINT_H=0
17638  fi
17639
17640
17641    if test $ac_cv_header_stdint_h = yes; then
17642    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
17643printf %s "checking whether stdint.h conforms to C99... " >&6; }
17644if test ${gl_cv_header_working_stdint_h+y}
17645then :
17646  printf %s "(cached) " >&6
17647else $as_nop
17648  gl_cv_header_working_stdint_h=no
17649       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17650/* end confdefs.h.  */
17651
17652
17653#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17654#define __STDC_CONSTANT_MACROS 1
17655#define __STDC_LIMIT_MACROS 1
17656#include <stdint.h>
17657/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
17658#if !(defined WCHAR_MIN && defined WCHAR_MAX)
17659#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
17660#endif
17661
17662
17663  #include <stddef.h>
17664  #include <signal.h>
17665  #if HAVE_WCHAR_H
17666  # include <wchar.h>
17667  #endif
17668
17669
17670#ifdef INT8_MAX
17671int8_t a1 = INT8_MAX;
17672int8_t a1min = INT8_MIN;
17673#endif
17674#ifdef INT16_MAX
17675int16_t a2 = INT16_MAX;
17676int16_t a2min = INT16_MIN;
17677#endif
17678#ifdef INT32_MAX
17679int32_t a3 = INT32_MAX;
17680int32_t a3min = INT32_MIN;
17681#endif
17682#ifdef INT64_MAX
17683int64_t a4 = INT64_MAX;
17684int64_t a4min = INT64_MIN;
17685#endif
17686#ifdef UINT8_MAX
17687uint8_t b1 = UINT8_MAX;
17688#else
17689typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
17690#endif
17691#ifdef UINT16_MAX
17692uint16_t b2 = UINT16_MAX;
17693#endif
17694#ifdef UINT32_MAX
17695uint32_t b3 = UINT32_MAX;
17696#endif
17697#ifdef UINT64_MAX
17698uint64_t b4 = UINT64_MAX;
17699#endif
17700int_least8_t c1 = INT8_C (0x7f);
17701int_least8_t c1max = INT_LEAST8_MAX;
17702int_least8_t c1min = INT_LEAST8_MIN;
17703int_least16_t c2 = INT16_C (0x7fff);
17704int_least16_t c2max = INT_LEAST16_MAX;
17705int_least16_t c2min = INT_LEAST16_MIN;
17706int_least32_t c3 = INT32_C (0x7fffffff);
17707int_least32_t c3max = INT_LEAST32_MAX;
17708int_least32_t c3min = INT_LEAST32_MIN;
17709int_least64_t c4 = INT64_C (0x7fffffffffffffff);
17710int_least64_t c4max = INT_LEAST64_MAX;
17711int_least64_t c4min = INT_LEAST64_MIN;
17712uint_least8_t d1 = UINT8_C (0xff);
17713uint_least8_t d1max = UINT_LEAST8_MAX;
17714uint_least16_t d2 = UINT16_C (0xffff);
17715uint_least16_t d2max = UINT_LEAST16_MAX;
17716uint_least32_t d3 = UINT32_C (0xffffffff);
17717uint_least32_t d3max = UINT_LEAST32_MAX;
17718uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
17719uint_least64_t d4max = UINT_LEAST64_MAX;
17720int_fast8_t e1 = INT_FAST8_MAX;
17721int_fast8_t e1min = INT_FAST8_MIN;
17722int_fast16_t e2 = INT_FAST16_MAX;
17723int_fast16_t e2min = INT_FAST16_MIN;
17724int_fast32_t e3 = INT_FAST32_MAX;
17725int_fast32_t e3min = INT_FAST32_MIN;
17726int_fast64_t e4 = INT_FAST64_MAX;
17727int_fast64_t e4min = INT_FAST64_MIN;
17728uint_fast8_t f1 = UINT_FAST8_MAX;
17729uint_fast16_t f2 = UINT_FAST16_MAX;
17730uint_fast32_t f3 = UINT_FAST32_MAX;
17731uint_fast64_t f4 = UINT_FAST64_MAX;
17732#ifdef INTPTR_MAX
17733intptr_t g = INTPTR_MAX;
17734intptr_t gmin = INTPTR_MIN;
17735#endif
17736#ifdef UINTPTR_MAX
17737uintptr_t h = UINTPTR_MAX;
17738#endif
17739intmax_t i = INTMAX_MAX;
17740uintmax_t j = UINTMAX_MAX;
17741
17742/* Check that SIZE_MAX has the correct type, if possible.  */
17743#if 201112 <= __STDC_VERSION__
17744int k = _Generic (SIZE_MAX, size_t: 0);
17745#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
17746       || (0x5110 <= __SUNPRO_C && !__STDC__))
17747extern size_t k;
17748extern __typeof__ (SIZE_MAX) k;
17749#endif
17750
17751#include <limits.h> /* for CHAR_BIT */
17752#define TYPE_MINIMUM(t) \
17753  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
17754#define TYPE_MAXIMUM(t) \
17755  ((t) ((t) 0 < (t) -1 \
17756        ? (t) -1 \
17757        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
17758struct s {
17759  int check_PTRDIFF:
17760      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
17761      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
17762      ? 1 : -1;
17763  /* Detect bug in FreeBSD 6.0 / ia64.  */
17764  int check_SIG_ATOMIC:
17765      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
17766      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
17767      ? 1 : -1;
17768  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
17769  int check_WCHAR:
17770      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
17771      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
17772      ? 1 : -1;
17773  /* Detect bug in mingw.  */
17774  int check_WINT:
17775      WINT_MIN == TYPE_MINIMUM (wint_t)
17776      && WINT_MAX == TYPE_MAXIMUM (wint_t)
17777      ? 1 : -1;
17778
17779  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
17780  int check_UINT8_C:
17781        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
17782  int check_UINT16_C:
17783        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
17784
17785  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
17786#ifdef UINT8_MAX
17787  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
17788#endif
17789#ifdef UINT16_MAX
17790  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
17791#endif
17792#ifdef UINT32_MAX
17793  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
17794#endif
17795#ifdef UINT64_MAX
17796  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
17797#endif
17798  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
17799  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
17800  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
17801  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
17802  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
17803  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
17804  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
17805  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
17806  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
17807  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
17808  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
17809};
17810
17811int
17812main (void)
17813{
17814
17815  ;
17816  return 0;
17817}
17818_ACEOF
17819if ac_fn_c_try_compile "$LINENO"
17820then :
17821                                                    if test "$cross_compiling" = yes
17822then :
17823  case "$host_os" in
17824                         # Guess yes on native Windows.
17825                 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
17826                         # In general, assume it works.
17827                 *)      gl_cv_header_working_stdint_h="guessing yes" ;;
17828               esac
17829
17830else $as_nop
17831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17832/* end confdefs.h.  */
17833
17834
17835#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17836#define __STDC_CONSTANT_MACROS 1
17837#define __STDC_LIMIT_MACROS 1
17838#include <stdint.h>
17839
17840
17841  #include <stddef.h>
17842  #include <signal.h>
17843  #if HAVE_WCHAR_H
17844  # include <wchar.h>
17845  #endif
17846
17847
17848#include <stdio.h>
17849#include <string.h>
17850#define MVAL(macro) MVAL1(macro)
17851#define MVAL1(expression) #expression
17852static const char *macro_values[] =
17853  {
17854#ifdef INT8_MAX
17855    MVAL (INT8_MAX),
17856#endif
17857#ifdef INT16_MAX
17858    MVAL (INT16_MAX),
17859#endif
17860#ifdef INT32_MAX
17861    MVAL (INT32_MAX),
17862#endif
17863#ifdef INT64_MAX
17864    MVAL (INT64_MAX),
17865#endif
17866#ifdef UINT8_MAX
17867    MVAL (UINT8_MAX),
17868#endif
17869#ifdef UINT16_MAX
17870    MVAL (UINT16_MAX),
17871#endif
17872#ifdef UINT32_MAX
17873    MVAL (UINT32_MAX),
17874#endif
17875#ifdef UINT64_MAX
17876    MVAL (UINT64_MAX),
17877#endif
17878    NULL
17879  };
17880
17881int
17882main (void)
17883{
17884
17885  const char **mv;
17886  for (mv = macro_values; *mv != NULL; mv++)
17887    {
17888      const char *value = *mv;
17889      /* Test whether it looks like a cast expression.  */
17890      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
17891          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
17892          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
17893          || strncmp (value, "((int)"/*)*/, 6) == 0
17894          || strncmp (value, "((signed short)"/*)*/, 15) == 0
17895          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
17896        return mv - macro_values + 1;
17897    }
17898  return 0;
17899
17900  ;
17901  return 0;
17902}
17903_ACEOF
17904if ac_fn_c_try_run "$LINENO"
17905then :
17906  gl_cv_header_working_stdint_h=yes
17907fi
17908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17909  conftest.$ac_objext conftest.beam conftest.$ac_ext
17910fi
17911
17912
17913fi
17914rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17915
17916fi
17917{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
17918printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
17919  fi
17920
17921  HAVE_C99_STDINT_H=0
17922  HAVE_SYS_BITYPES_H=0
17923  HAVE_SYS_INTTYPES_H=0
17924  STDINT_H=stdint.h
17925  case "$gl_cv_header_working_stdint_h" in
17926    *yes)
17927      HAVE_C99_STDINT_H=1
17928                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
17929printf %s "checking whether stdint.h works without ISO C predefines... " >&6; }
17930if test ${gl_cv_header_stdint_without_STDC_macros+y}
17931then :
17932  printf %s "(cached) " >&6
17933else $as_nop
17934  gl_cv_header_stdint_without_STDC_macros=no
17935         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17936/* end confdefs.h.  */
17937
17938
17939#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17940#include <stdint.h>
17941
17942
17943  #include <stddef.h>
17944  #include <signal.h>
17945  #if HAVE_WCHAR_H
17946  # include <wchar.h>
17947  #endif
17948
17949
17950intmax_t im = INTMAX_MAX;
17951int32_t i32 = INT32_C (0x7fffffff);
17952
17953int
17954main (void)
17955{
17956
17957  ;
17958  return 0;
17959}
17960_ACEOF
17961if ac_fn_c_try_compile "$LINENO"
17962then :
17963  gl_cv_header_stdint_without_STDC_macros=yes
17964fi
17965rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17966
17967fi
17968{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
17969printf "%s\n" "$gl_cv_header_stdint_without_STDC_macros" >&6; }
17970
17971      if test $gl_cv_header_stdint_without_STDC_macros = no; then
17972
17973printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
17974
17975
17976printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
17977
17978      fi
17979      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
17980printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
17981if test ${gl_cv_header_stdint_width+y}
17982then :
17983  printf %s "(cached) " >&6
17984else $as_nop
17985  gl_cv_header_stdint_width=no
17986         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17987/* end confdefs.h.  */
17988
17989              /* Work if build is not clean.  */
17990              #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
17991              #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
17992               #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
17993              #endif
17994              #include <stdint.h>
17995
17996  #include <stddef.h>
17997  #include <signal.h>
17998  #if HAVE_WCHAR_H
17999  # include <wchar.h>
18000  #endif
18001
18002              int iw = UINTMAX_WIDTH;
18003
18004int
18005main (void)
18006{
18007
18008  ;
18009  return 0;
18010}
18011_ACEOF
18012if ac_fn_c_try_compile "$LINENO"
18013then :
18014  gl_cv_header_stdint_width=yes
18015fi
18016rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18017fi
18018{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
18019printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
18020      if test "$gl_cv_header_stdint_width" = yes; then
18021        STDINT_H=
18022      fi
18023      ;;
18024    *)
18025                  ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
18026if test "x$ac_cv_header_sys_inttypes_h" = xyes
18027then :
18028  printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
18029
18030fi
18031ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
18032if test "x$ac_cv_header_sys_bitypes_h" = xyes
18033then :
18034  printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
18035
18036fi
18037
18038      if test $ac_cv_header_sys_inttypes_h = yes; then
18039        HAVE_SYS_INTTYPES_H=1
18040      fi
18041      if test $ac_cv_header_sys_bitypes_h = yes; then
18042        HAVE_SYS_BITYPES_H=1
18043      fi
18044
18045
18046  if test $APPLE_UNIVERSAL_BUILD = 0; then
18047
18048
18049  for gltype in ptrdiff_t size_t ; do
18050    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18051printf %s "checking for bit size of $gltype... " >&6; }
18052if eval test \${gl_cv_bitsizeof_${gltype}+y}
18053then :
18054  printf %s "(cached) " >&6
18055else $as_nop
18056  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
18057  #include <stddef.h>
18058  #include <signal.h>
18059  #if HAVE_WCHAR_H
18060  # include <wchar.h>
18061  #endif
18062
18063#include <limits.h>"
18064then :
18065
18066else $as_nop
18067  result=unknown
18068fi
18069
18070       eval gl_cv_bitsizeof_${gltype}=\$result
18071
18072fi
18073eval ac_res=\$gl_cv_bitsizeof_${gltype}
18074	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18075printf "%s\n" "$ac_res" >&6; }
18076    eval result=\$gl_cv_bitsizeof_${gltype}
18077    if test $result = unknown; then
18078                                                result=0
18079    fi
18080    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18081    printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
18082
18083    eval BITSIZEOF_${GLTYPE}=\$result
18084  done
18085
18086
18087  fi
18088
18089
18090  for gltype in sig_atomic_t wchar_t wint_t ; do
18091    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18092printf %s "checking for bit size of $gltype... " >&6; }
18093if eval test \${gl_cv_bitsizeof_${gltype}+y}
18094then :
18095  printf %s "(cached) " >&6
18096else $as_nop
18097  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
18098  #include <stddef.h>
18099  #include <signal.h>
18100  #if HAVE_WCHAR_H
18101  # include <wchar.h>
18102  #endif
18103
18104#include <limits.h>"
18105then :
18106
18107else $as_nop
18108  result=unknown
18109fi
18110
18111       eval gl_cv_bitsizeof_${gltype}=\$result
18112
18113fi
18114eval ac_res=\$gl_cv_bitsizeof_${gltype}
18115	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18116printf "%s\n" "$ac_res" >&6; }
18117    eval result=\$gl_cv_bitsizeof_${gltype}
18118    if test $result = unknown; then
18119                                                result=0
18120    fi
18121    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18122    printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
18123
18124    eval BITSIZEOF_${GLTYPE}=\$result
18125  done
18126
18127
18128
18129
18130  for gltype in sig_atomic_t wchar_t wint_t ; do
18131    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
18132printf %s "checking whether $gltype is signed... " >&6; }
18133if eval test \${gl_cv_type_${gltype}_signed+y}
18134then :
18135  printf %s "(cached) " >&6
18136else $as_nop
18137  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18138/* end confdefs.h.  */
18139
18140  #include <stddef.h>
18141  #include <signal.h>
18142  #if HAVE_WCHAR_H
18143  # include <wchar.h>
18144  #endif
18145
18146            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
18147int
18148main (void)
18149{
18150
18151  ;
18152  return 0;
18153}
18154_ACEOF
18155if ac_fn_c_try_compile "$LINENO"
18156then :
18157  result=yes
18158else $as_nop
18159  result=no
18160fi
18161rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18162       eval gl_cv_type_${gltype}_signed=\$result
18163
18164fi
18165eval ac_res=\$gl_cv_type_${gltype}_signed
18166	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18167printf "%s\n" "$ac_res" >&6; }
18168    eval result=\$gl_cv_type_${gltype}_signed
18169    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18170    if test "$result" = yes; then
18171      printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
18172
18173      eval HAVE_SIGNED_${GLTYPE}=1
18174    else
18175      eval HAVE_SIGNED_${GLTYPE}=0
18176    fi
18177  done
18178
18179
18180  gl_cv_type_ptrdiff_t_signed=yes
18181  gl_cv_type_size_t_signed=no
18182  if test $APPLE_UNIVERSAL_BUILD = 0; then
18183
18184
18185  for gltype in ptrdiff_t size_t ; do
18186    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18187printf %s "checking for $gltype integer literal suffix... " >&6; }
18188if eval test \${gl_cv_type_${gltype}_suffix+y}
18189then :
18190  printf %s "(cached) " >&6
18191else $as_nop
18192  eval gl_cv_type_${gltype}_suffix=no
18193       eval result=\$gl_cv_type_${gltype}_signed
18194       if test "$result" = yes; then
18195         glsufu=
18196       else
18197         glsufu=u
18198       fi
18199       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18200         case $glsuf in
18201           '')  gltype1='int';;
18202           l)   gltype1='long int';;
18203           ll)  gltype1='long long int';;
18204           i64) gltype1='__int64';;
18205           u)   gltype1='unsigned int';;
18206           ul)  gltype1='unsigned long int';;
18207           ull) gltype1='unsigned long long int';;
18208           ui64)gltype1='unsigned __int64';;
18209         esac
18210         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18211/* end confdefs.h.  */
18212
18213  #include <stddef.h>
18214  #include <signal.h>
18215  #if HAVE_WCHAR_H
18216  # include <wchar.h>
18217  #endif
18218
18219              extern $gltype foo;
18220              extern $gltype1 foo;
18221int
18222main (void)
18223{
18224
18225  ;
18226  return 0;
18227}
18228_ACEOF
18229if ac_fn_c_try_compile "$LINENO"
18230then :
18231  eval gl_cv_type_${gltype}_suffix=\$glsuf
18232fi
18233rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18234         eval result=\$gl_cv_type_${gltype}_suffix
18235         test "$result" != no && break
18236       done
18237fi
18238eval ac_res=\$gl_cv_type_${gltype}_suffix
18239	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18240printf "%s\n" "$ac_res" >&6; }
18241    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18242    eval result=\$gl_cv_type_${gltype}_suffix
18243    test "$result" = no && result=
18244    eval ${GLTYPE}_SUFFIX=\$result
18245    printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
18246
18247  done
18248
18249
18250  fi
18251
18252
18253  for gltype in sig_atomic_t wchar_t wint_t ; do
18254    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18255printf %s "checking for $gltype integer literal suffix... " >&6; }
18256if eval test \${gl_cv_type_${gltype}_suffix+y}
18257then :
18258  printf %s "(cached) " >&6
18259else $as_nop
18260  eval gl_cv_type_${gltype}_suffix=no
18261       eval result=\$gl_cv_type_${gltype}_signed
18262       if test "$result" = yes; then
18263         glsufu=
18264       else
18265         glsufu=u
18266       fi
18267       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18268         case $glsuf in
18269           '')  gltype1='int';;
18270           l)   gltype1='long int';;
18271           ll)  gltype1='long long int';;
18272           i64) gltype1='__int64';;
18273           u)   gltype1='unsigned int';;
18274           ul)  gltype1='unsigned long int';;
18275           ull) gltype1='unsigned long long int';;
18276           ui64)gltype1='unsigned __int64';;
18277         esac
18278         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18279/* end confdefs.h.  */
18280
18281  #include <stddef.h>
18282  #include <signal.h>
18283  #if HAVE_WCHAR_H
18284  # include <wchar.h>
18285  #endif
18286
18287              extern $gltype foo;
18288              extern $gltype1 foo;
18289int
18290main (void)
18291{
18292
18293  ;
18294  return 0;
18295}
18296_ACEOF
18297if ac_fn_c_try_compile "$LINENO"
18298then :
18299  eval gl_cv_type_${gltype}_suffix=\$glsuf
18300fi
18301rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18302         eval result=\$gl_cv_type_${gltype}_suffix
18303         test "$result" != no && break
18304       done
18305fi
18306eval ac_res=\$gl_cv_type_${gltype}_suffix
18307	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18308printf "%s\n" "$ac_res" >&6; }
18309    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18310    eval result=\$gl_cv_type_${gltype}_suffix
18311    test "$result" = no && result=
18312    eval ${GLTYPE}_SUFFIX=\$result
18313    printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
18314
18315  done
18316
18317
18318
18319          if test $GNULIB_OVERRIDES_WINT_T = 1; then
18320    BITSIZEOF_WINT_T=32
18321  fi
18322
18323      ;;
18324  esac
18325
18326
18327
18328  LIMITS_H='limits.h'
18329   if test -n "$LIMITS_H"; then
18330  GL_GENERATE_LIMITS_H_TRUE=
18331  GL_GENERATE_LIMITS_H_FALSE='#'
18332else
18333  GL_GENERATE_LIMITS_H_TRUE='#'
18334  GL_GENERATE_LIMITS_H_FALSE=
18335fi
18336
18337
18338
18339
18340
18341
18342
18343   if test -n "$STDINT_H"; then
18344  GL_GENERATE_STDINT_H_TRUE=
18345  GL_GENERATE_STDINT_H_FALSE='#'
18346else
18347  GL_GENERATE_STDINT_H_TRUE='#'
18348  GL_GENERATE_STDINT_H_FALSE=
18349fi
18350
18351
18352
18353  GNULIB_IMAXABS=0;
18354  GNULIB_IMAXDIV=0;
18355  GNULIB_STRTOIMAX=0;
18356  GNULIB_STRTOUMAX=0;
18357    HAVE_DECL_IMAXABS=1;
18358  HAVE_DECL_IMAXDIV=1;
18359  HAVE_DECL_STRTOIMAX=1;
18360  HAVE_DECL_STRTOUMAX=1;
18361  HAVE_IMAXDIV_T=1;
18362  REPLACE_STRTOIMAX=0;
18363  REPLACE_STRTOUMAX=0;
18364  INT32_MAX_LT_INTMAX_MAX=1;
18365  INT64_MAX_EQ_LONG_MAX='defined _LP64';
18366  PRIPTR_PREFIX=__PRIPTR_PREFIX;
18367  UINT32_MAX_LT_UINTMAX_MAX=1;
18368  UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384     if test $gl_cv_have_include_next = yes; then
18385       gl_cv_next_inttypes_h='<'inttypes.h'>'
18386     else
18387       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
18388printf %s "checking absolute name of <inttypes.h>... " >&6; }
18389if test ${gl_cv_next_inttypes_h+y}
18390then :
18391  printf %s "(cached) " >&6
18392else $as_nop
18393
18394             if test $ac_cv_header_inttypes_h = yes; then
18395
18396
18397
18398
18399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18400/* end confdefs.h.  */
18401#include <inttypes.h>
18402_ACEOF
18403                case "$host_os" in
18404    aix*) gl_absname_cpp="$ac_cpp -C" ;;
18405    *)    gl_absname_cpp="$ac_cpp" ;;
18406  esac
18407
18408  case "$host_os" in
18409    mingw*)
18410                                          gl_dirsep_regex='[/\\]'
18411      ;;
18412    *)
18413      gl_dirsep_regex='\/'
18414      ;;
18415  esac
18416      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18417  gl_header_literal_regex=`echo 'inttypes.h' \
18418                           | sed -e "$gl_make_literal_regex_sed"`
18419  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18420      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18421      s|^/[^/]|//&|
18422      p
18423      q
18424    }'
18425
18426        gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18427  sed -n "$gl_absolute_header_sed"`
18428
18429           gl_header=$gl_cv_absolute_inttypes_h
18430           gl_cv_next_inttypes_h='"'$gl_header'"'
18431          else
18432               gl_cv_next_inttypes_h='<'inttypes.h'>'
18433             fi
18434
18435
18436fi
18437{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
18438printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
18439     fi
18440     NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
18441
18442     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18443       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18444       gl_next_as_first_directive='<'inttypes.h'>'
18445     else
18446       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18447       gl_next_as_first_directive=$gl_cv_next_inttypes_h
18448     fi
18449     NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465  GNULIB_NL_LANGINFO=0;
18466    HAVE_NL_LANGINFO=1;
18467  REPLACE_NL_LANGINFO=0;
18468
18469
18470
18471
18472  GNULIB_LOCALECONV=0;
18473  GNULIB_SETLOCALE=0;
18474  GNULIB_SETLOCALE_NULL=0;
18475  GNULIB_DUPLOCALE=0;
18476  GNULIB_LOCALENAME=0;
18477    HAVE_NEWLOCALE=1;
18478  HAVE_DUPLOCALE=1;
18479  HAVE_FREELOCALE=1;
18480  REPLACE_LOCALECONV=0;
18481  REPLACE_SETLOCALE=0;
18482  REPLACE_NEWLOCALE=0;
18483  REPLACE_DUPLOCALE=0;
18484  REPLACE_FREELOCALE=0;
18485  REPLACE_STRUCT_LCONV=0;
18486  LOCALENAME_ENHANCE_LOCALE_FUNCS=0;
18487
18488
18489    REPLACE_NULL=0;
18490  HAVE_MAX_ALIGN_T=1;
18491  HAVE_WCHAR_T=1;
18492
18493
18494  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
18495printf %s "checking for wchar_t... " >&6; }
18496if test ${gt_cv_c_wchar_t+y}
18497then :
18498  printf %s "(cached) " >&6
18499else $as_nop
18500  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18501/* end confdefs.h.  */
18502#include <stddef.h>
18503            wchar_t foo = (wchar_t)'\0';
18504int
18505main (void)
18506{
18507
18508  ;
18509  return 0;
18510}
18511_ACEOF
18512if ac_fn_c_try_compile "$LINENO"
18513then :
18514  gt_cv_c_wchar_t=yes
18515else $as_nop
18516  gt_cv_c_wchar_t=no
18517fi
18518rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18519fi
18520{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
18521printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
18522  if test $gt_cv_c_wchar_t = yes; then
18523
18524printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
18525
18526  fi
18527
18528
18529
18530
18531
18532
18533
18534  STDDEF_H=
18535
18536      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
18537printf %s "checking for good max_align_t... " >&6; }
18538if test ${gl_cv_type_max_align_t+y}
18539then :
18540  printf %s "(cached) " >&6
18541else $as_nop
18542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18543/* end confdefs.h.  */
18544#include <stddef.h>
18545            unsigned int s = sizeof (max_align_t);
18546            #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
18547            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
18548            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
18549            #endif
18550            typedef struct { char a; max_align_t b; } max_helper;
18551            typedef struct { char a; long b; } long_helper;
18552            typedef struct { char a; double b; } double_helper;
18553            typedef struct { char a; long double b; } long_double_helper;
18554            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
18555            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
18556            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
18557
18558int
18559main (void)
18560{
18561
18562  ;
18563  return 0;
18564}
18565_ACEOF
18566if ac_fn_c_try_compile "$LINENO"
18567then :
18568  gl_cv_type_max_align_t=yes
18569else $as_nop
18570  gl_cv_type_max_align_t=no
18571fi
18572rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18573
18574fi
18575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
18576printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
18577  if test $gl_cv_type_max_align_t = no; then
18578    HAVE_MAX_ALIGN_T=0
18579    STDDEF_H=stddef.h
18580  fi
18581
18582  if test $gt_cv_c_wchar_t = no; then
18583    HAVE_WCHAR_T=0
18584    STDDEF_H=stddef.h
18585  fi
18586
18587  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
18588printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
18589if test ${gl_cv_decl_null_works+y}
18590then :
18591  printf %s "(cached) " >&6
18592else $as_nop
18593  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18594/* end confdefs.h.  */
18595#include <stddef.h>
18596      int test[2 * (sizeof NULL == sizeof (void *)) -1];
18597
18598int
18599main (void)
18600{
18601
18602  ;
18603  return 0;
18604}
18605_ACEOF
18606if ac_fn_c_try_compile "$LINENO"
18607then :
18608  gl_cv_decl_null_works=yes
18609else $as_nop
18610  gl_cv_decl_null_works=no
18611fi
18612rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18613fi
18614{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
18615printf "%s\n" "$gl_cv_decl_null_works" >&6; }
18616  if test $gl_cv_decl_null_works = no; then
18617    REPLACE_NULL=1
18618    STDDEF_H=stddef.h
18619  fi
18620
18621
18622   if test -n "$STDDEF_H"; then
18623  GL_GENERATE_STDDEF_H_TRUE=
18624  GL_GENERATE_STDDEF_H_FALSE='#'
18625else
18626  GL_GENERATE_STDDEF_H_TRUE='#'
18627  GL_GENERATE_STDDEF_H_FALSE=
18628fi
18629
18630  if test -n "$STDDEF_H"; then
18631
18632
18633
18634
18635
18636
18637
18638
18639     if test $gl_cv_have_include_next = yes; then
18640       gl_cv_next_stddef_h='<'stddef.h'>'
18641     else
18642       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
18643printf %s "checking absolute name of <stddef.h>... " >&6; }
18644if test ${gl_cv_next_stddef_h+y}
18645then :
18646  printf %s "(cached) " >&6
18647else $as_nop
18648
18649
18650
18651  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18652/* end confdefs.h.  */
18653#include <stddef.h>
18654_ACEOF
18655                case "$host_os" in
18656    aix*) gl_absname_cpp="$ac_cpp -C" ;;
18657    *)    gl_absname_cpp="$ac_cpp" ;;
18658  esac
18659
18660  case "$host_os" in
18661    mingw*)
18662                                          gl_dirsep_regex='[/\\]'
18663      ;;
18664    *)
18665      gl_dirsep_regex='\/'
18666      ;;
18667  esac
18668      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18669  gl_header_literal_regex=`echo 'stddef.h' \
18670                           | sed -e "$gl_make_literal_regex_sed"`
18671  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18672      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18673      s|^/[^/]|//&|
18674      p
18675      q
18676    }'
18677
18678        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18679  sed -n "$gl_absolute_header_sed"`
18680
18681           gl_header=$gl_cv_absolute_stddef_h
18682           gl_cv_next_stddef_h='"'$gl_header'"'
18683
18684
18685fi
18686{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
18687printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
18688     fi
18689     NEXT_STDDEF_H=$gl_cv_next_stddef_h
18690
18691     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18692       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18693       gl_next_as_first_directive='<'stddef.h'>'
18694     else
18695       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18696       gl_next_as_first_directive=$gl_cv_next_stddef_h
18697     fi
18698     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
18699
18700
18701
18702
18703  fi
18704
18705
18706
18707
18708
18709        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
18710printf %s "checking whether locale.h defines locale_t... " >&6; }
18711if test ${gl_cv_header_locale_has_locale_t+y}
18712then :
18713  printf %s "(cached) " >&6
18714else $as_nop
18715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18716/* end confdefs.h.  */
18717#include <locale.h>
18718            locale_t x;
18719int
18720main (void)
18721{
18722
18723  ;
18724  return 0;
18725}
18726_ACEOF
18727if ac_fn_c_try_compile "$LINENO"
18728then :
18729  gl_cv_header_locale_has_locale_t=yes
18730else $as_nop
18731  gl_cv_header_locale_has_locale_t=no
18732fi
18733rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18734
18735fi
18736{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
18737printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
18738
18739
18740  if test $ac_cv_header_xlocale_h = yes; then
18741    HAVE_XLOCALE_H=1
18742    if test $gl_cv_header_locale_has_locale_t = yes; then
18743      gl_cv_header_locale_h_needs_xlocale_h=no
18744    else
18745      gl_cv_header_locale_h_needs_xlocale_h=yes
18746    fi
18747    HAVE_LOCALE_T=1
18748  else
18749    HAVE_XLOCALE_H=0
18750    gl_cv_header_locale_h_needs_xlocale_h=no
18751    if test $gl_cv_header_locale_has_locale_t = yes; then
18752      HAVE_LOCALE_T=1
18753    else
18754      HAVE_LOCALE_T=0
18755    fi
18756  fi
18757
18758
18759
18760  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
18761printf %s "checking for LC_MESSAGES... " >&6; }
18762if test ${gt_cv_val_LC_MESSAGES+y}
18763then :
18764  printf %s "(cached) " >&6
18765else $as_nop
18766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18767/* end confdefs.h.  */
18768#include <locale.h>
18769int
18770main (void)
18771{
18772return LC_MESSAGES
18773  ;
18774  return 0;
18775}
18776_ACEOF
18777if ac_fn_c_try_link "$LINENO"
18778then :
18779  gt_cv_val_LC_MESSAGES=yes
18780else $as_nop
18781  gt_cv_val_LC_MESSAGES=no
18782fi
18783rm -f core conftest.err conftest.$ac_objext conftest.beam \
18784    conftest$ac_exeext conftest.$ac_ext
18785fi
18786{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
18787printf "%s\n" "$gt_cv_val_LC_MESSAGES" >&6; }
18788  if test $gt_cv_val_LC_MESSAGES = yes; then
18789
18790printf "%s\n" "#define HAVE_LC_MESSAGES 1" >>confdefs.h
18791
18792  fi
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806          if test $ac_cv_func_uselocale = yes; then
18807
18808    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5
18809printf %s "checking whether uselocale works... " >&6; }
18810if test ${gt_cv_func_uselocale_works+y}
18811then :
18812  printf %s "(cached) " >&6
18813else $as_nop
18814  if test "$cross_compiling" = yes
18815then :
18816  # Guess no on AIX and z/OS, yes otherwise.
18817          case "$host_os" in
18818            aix* | openedition*) gt_cv_func_uselocale_works="guessing no" ;;
18819            *)                   gt_cv_func_uselocale_works="guessing yes" ;;
18820          esac
18821
18822else $as_nop
18823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18824/* end confdefs.h.  */
18825
18826#include <locale.h>
18827#if HAVE_XLOCALE_H
18828# include <xlocale.h>
18829#endif
18830locale_t loc1;
18831int main ()
18832{
18833  uselocale (NULL);
18834  setlocale (LC_ALL, "en_US.UTF-8");
18835  return 0;
18836}
18837_ACEOF
18838if ac_fn_c_try_run "$LINENO"
18839then :
18840  gt_cv_func_uselocale_works=yes
18841else $as_nop
18842  gt_cv_func_uselocale_works=no
18843fi
18844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18845  conftest.$ac_objext conftest.beam conftest.$ac_ext
18846fi
18847
18848
18849fi
18850{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_uselocale_works" >&5
18851printf "%s\n" "$gt_cv_func_uselocale_works" >&6; }
18852  else
18853    gt_cv_func_uselocale_works=no
18854  fi
18855  case "$gt_cv_func_uselocale_works" in
18856    *yes)
18857      gt_working_uselocale=yes
18858
18859printf "%s\n" "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h
18860
18861      ;;
18862    *)
18863      gt_working_uselocale=no
18864      ;;
18865  esac
18866
18867
18868                            case "$gt_cv_func_uselocale_works" in
18869    *yes)
18870
18871      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fake locale system (OpenBSD)" >&5
18872printf %s "checking for fake locale system (OpenBSD)... " >&6; }
18873if test ${gt_cv_locale_fake+y}
18874then :
18875  printf %s "(cached) " >&6
18876else $as_nop
18877  if test "$cross_compiling" = yes
18878then :
18879              case "$host_os" in
18880              openbsd*) gt_cv_locale_fake="guessing yes" ;;
18881              *)        gt_cv_locale_fake="guessing no" ;;
18882            esac
18883
18884else $as_nop
18885  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18886/* end confdefs.h.  */
18887
18888#include <locale.h>
18889#if HAVE_XLOCALE_H
18890# include <xlocale.h>
18891#endif
18892int main ()
18893{
18894  locale_t loc1, loc2;
18895  if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1;
18896  if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1;
18897  loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0);
18898  loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0);
18899  return !(loc1 == loc2);
18900}
18901_ACEOF
18902if ac_fn_c_try_run "$LINENO"
18903then :
18904  gt_cv_locale_fake=yes
18905else $as_nop
18906  gt_cv_locale_fake=no
18907fi
18908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18909  conftest.$ac_objext conftest.beam conftest.$ac_ext
18910fi
18911
18912
18913fi
18914{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fake" >&5
18915printf "%s\n" "$gt_cv_locale_fake" >&6; }
18916      ;;
18917    *) gt_cv_locale_fake=no ;;
18918  esac
18919  case "$gt_cv_locale_fake" in
18920    *yes)
18921      gt_fake_locales=yes
18922
18923printf "%s\n" "#define HAVE_FAKE_LOCALES 1" >>confdefs.h
18924
18925      ;;
18926    *)
18927      gt_fake_locales=no
18928      ;;
18929  esac
18930
18931  case "$gt_cv_func_uselocale_works" in
18932    *yes)
18933      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris 11.4 locale system" >&5
18934printf %s "checking for Solaris 11.4 locale system... " >&6; }
18935if test ${gt_cv_locale_solaris114+y}
18936then :
18937  printf %s "(cached) " >&6
18938else $as_nop
18939  case "$host_os" in
18940           solaris*)
18941                                                                                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18942/* end confdefs.h.  */
18943
18944                  #include <locale.h>
18945                  struct _LC_locale_t *x;
18946                  locale_t y;
18947
18948int
18949main (void)
18950{
18951*y = x;
18952  ;
18953  return 0;
18954}
18955_ACEOF
18956if ac_fn_c_try_compile "$LINENO"
18957then :
18958  gt_cv_locale_solaris114=yes
18959else $as_nop
18960  gt_cv_locale_solaris114=no
18961fi
18962rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18963             ;;
18964           *) gt_cv_locale_solaris114=no ;;
18965         esac
18966
18967fi
18968{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_solaris114" >&5
18969printf "%s\n" "$gt_cv_locale_solaris114" >&6; }
18970      ;;
18971    *) gt_cv_locale_solaris114=no ;;
18972  esac
18973  if test $gt_cv_locale_solaris114 = yes; then
18974
18975printf "%s\n" "#define HAVE_SOLARIS114_LOCALES 1" >>confdefs.h
18976
18977  fi
18978
18979        case "$gt_cv_func_uselocale_works" in
18980    *yes)
18981      ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l"
18982if test "x$ac_cv_func_getlocalename_l" = xyes
18983then :
18984  printf "%s\n" "#define HAVE_GETLOCALENAME_L 1" >>confdefs.h
18985
18986fi
18987
18988      ;;
18989  esac
18990
18991            gt_nameless_locales=no
18992  case "$host_os" in
18993        aix*)
18994      gt_nameless_locales=yes
18995
18996printf "%s\n" "#define HAVE_NAMELESS_LOCALES 1" >>confdefs.h
18997
18998      ;;
18999  esac
19000
19001        if test $gt_working_uselocale = yes && test $gt_fake_locales = no; then
19002    gt_good_uselocale=yes
19003
19004printf "%s\n" "#define HAVE_GOOD_USELOCALE 1" >>confdefs.h
19005
19006  else
19007    gt_good_uselocale=no
19008  fi
19009
19010        if test $gt_good_uselocale = yes && test $gt_nameless_locales = yes; then
19011    gt_localename_enhances_locale_funcs=yes
19012    LOCALENAME_ENHANCE_LOCALE_FUNCS=1
19013
19014printf "%s\n" "#define LOCALENAME_ENHANCE_LOCALE_FUNCS 1" >>confdefs.h
19015
19016  else
19017    gt_localename_enhances_locale_funcs=no
19018  fi
19019
19020
19021    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
19022printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
19023if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
19024then :
19025  printf %s "(cached) " >&6
19026else $as_nop
19027  gt_save_LIBS="$LIBS"
19028     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
19029     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19030/* end confdefs.h.  */
19031#include <CoreFoundation/CFPreferences.h>
19032int
19033main (void)
19034{
19035CFPreferencesCopyAppValue(NULL, NULL)
19036  ;
19037  return 0;
19038}
19039_ACEOF
19040if ac_fn_c_try_link "$LINENO"
19041then :
19042  gt_cv_func_CFPreferencesCopyAppValue=yes
19043else $as_nop
19044  gt_cv_func_CFPreferencesCopyAppValue=no
19045fi
19046rm -f core conftest.err conftest.$ac_objext conftest.beam \
19047    conftest$ac_exeext conftest.$ac_ext
19048     LIBS="$gt_save_LIBS"
19049fi
19050{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
19051printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
19052  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
19053
19054printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
19055
19056  fi
19057                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
19058printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; }
19059if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y}
19060then :
19061  printf %s "(cached) " >&6
19062else $as_nop
19063  gt_save_LIBS="$LIBS"
19064     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
19065     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19066/* end confdefs.h.  */
19067#include <CoreFoundation/CFLocale.h>
19068int
19069main (void)
19070{
19071CFLocaleCopyPreferredLanguages();
19072  ;
19073  return 0;
19074}
19075_ACEOF
19076if ac_fn_c_try_link "$LINENO"
19077then :
19078  gt_cv_func_CFLocaleCopyPreferredLanguages=yes
19079else $as_nop
19080  gt_cv_func_CFLocaleCopyPreferredLanguages=no
19081fi
19082rm -f core conftest.err conftest.$ac_objext conftest.beam \
19083    conftest$ac_exeext conftest.$ac_ext
19084     LIBS="$gt_save_LIBS"
19085fi
19086{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
19087printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
19088  if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
19089
19090printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
19091
19092  fi
19093  INTL_MACOSX_LIBS=
19094  if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
19095     || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
19096    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
19097  fi
19098
19099
19100
19101
19102
19103{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
19104printf %s "checking for a sed that does not truncate output... " >&6; }
19105if test ${ac_cv_path_SED+y}
19106then :
19107  printf %s "(cached) " >&6
19108else $as_nop
19109            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
19110     for ac_i in 1 2 3 4 5 6 7; do
19111       ac_script="$ac_script$as_nl$ac_script"
19112     done
19113     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
19114     { ac_script=; unset ac_script;}
19115     if test -z "$SED"; then
19116  ac_path_SED_found=false
19117  # Loop through the user's path and test for each of PROGNAME-LIST
19118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19119for as_dir in $PATH
19120do
19121  IFS=$as_save_IFS
19122  case $as_dir in #(((
19123    '') as_dir=./ ;;
19124    */) ;;
19125    *) as_dir=$as_dir/ ;;
19126  esac
19127    for ac_prog in sed gsed
19128   do
19129    for ac_exec_ext in '' $ac_executable_extensions; do
19130      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
19131      as_fn_executable_p "$ac_path_SED" || continue
19132# Check for GNU ac_path_SED and select it if it is found.
19133  # Check for GNU $ac_path_SED
19134case `"$ac_path_SED" --version 2>&1` in
19135*GNU*)
19136  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
19137*)
19138  ac_count=0
19139  printf %s 0123456789 >"conftest.in"
19140  while :
19141  do
19142    cat "conftest.in" "conftest.in" >"conftest.tmp"
19143    mv "conftest.tmp" "conftest.in"
19144    cp "conftest.in" "conftest.nl"
19145    printf "%s\n" '' >> "conftest.nl"
19146    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
19147    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
19148    as_fn_arith $ac_count + 1 && ac_count=$as_val
19149    if test $ac_count -gt ${ac_path_SED_max-0}; then
19150      # Best one so far, save it but keep looking for a better one
19151      ac_cv_path_SED="$ac_path_SED"
19152      ac_path_SED_max=$ac_count
19153    fi
19154    # 10*(2^10) chars as input seems more than enough
19155    test $ac_count -gt 10 && break
19156  done
19157  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
19158esac
19159
19160      $ac_path_SED_found && break 3
19161    done
19162  done
19163  done
19164IFS=$as_save_IFS
19165  if test -z "$ac_cv_path_SED"; then
19166    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
19167  fi
19168else
19169  ac_cv_path_SED=$SED
19170fi
19171
19172fi
19173{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
19174printf "%s\n" "$ac_cv_path_SED" >&6; }
19175 SED="$ac_cv_path_SED"
19176  rm -f conftest.sed
19177
19178
19179
19180    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
19181printf %s "checking for GNU libc compatible malloc... " >&6; }
19182if test ${ac_cv_func_malloc_0_nonnull+y}
19183then :
19184  printf %s "(cached) " >&6
19185else $as_nop
19186  if test "$cross_compiling" = yes
19187then :
19188  case "$host_os" in
19189          # Guess yes on platforms where we know the result.
19190          *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
19191          | hpux* | solaris* | cygwin* | mingw*)
19192            ac_cv_func_malloc_0_nonnull="guessing yes" ;;
19193          # If we don't know, obey --enable-cross-guesses.
19194          *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
19195        esac
19196
19197else $as_nop
19198  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19199/* end confdefs.h.  */
19200#include <stdlib.h>
19201
19202int
19203main (void)
19204{
19205char *p = malloc (0);
19206            int result = !p;
19207            free (p);
19208            return result;
19209  ;
19210  return 0;
19211}
19212
19213_ACEOF
19214if ac_fn_c_try_run "$LINENO"
19215then :
19216  ac_cv_func_malloc_0_nonnull=yes
19217else $as_nop
19218  ac_cv_func_malloc_0_nonnull=no
19219fi
19220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19221  conftest.$ac_objext conftest.beam conftest.$ac_ext
19222fi
19223
19224
19225fi
19226{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
19227printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
19228  case "$ac_cv_func_malloc_0_nonnull" in
19229    *yes)
19230      gl_cv_func_malloc_0_nonnull=1
19231      ;;
19232    *)
19233      gl_cv_func_malloc_0_nonnull=0
19234      ;;
19235  esac
19236
19237
19238printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
19239
19240
19241
19242
19243
19244
19245
19246  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
19247printf %s "checking for a traditional japanese locale... " >&6; }
19248if test ${gt_cv_locale_ja+y}
19249then :
19250  printf %s "(cached) " >&6
19251else $as_nop
19252
19253    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19254/* end confdefs.h.  */
19255
19256#include <locale.h>
19257#include <time.h>
19258#if HAVE_LANGINFO_CODESET
19259# include <langinfo.h>
19260#endif
19261#include <stdlib.h>
19262#include <string.h>
19263struct tm t;
19264char buf[16];
19265int main ()
19266{
19267  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
19268     imitates locale dependent behaviour by looking at the environment
19269     variables, and all locales use the UTF-8 encoding.  */
19270#if defined __BEOS__ || defined __HAIKU__
19271  return 1;
19272#else
19273  /* Check whether the given locale name is recognized by the system.  */
19274# if defined _WIN32 && !defined __CYGWIN__
19275  /* On native Windows, setlocale(category, "") looks at the system settings,
19276     not at the environment variables.  Also, when an encoding suffix such
19277     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
19278     category of the locale to "C".  */
19279  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
19280      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
19281    return 1;
19282# else
19283  if (setlocale (LC_ALL, "") == NULL) return 1;
19284# endif
19285  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
19286     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
19287     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
19288     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
19289     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
19290     some unit tests fail.
19291     On MirBSD 10, when an unsupported locale is specified, setlocale()
19292     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
19293# if HAVE_LANGINFO_CODESET
19294  {
19295    const char *cs = nl_langinfo (CODESET);
19296    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
19297        || strcmp (cs, "UTF-8") == 0)
19298      return 1;
19299  }
19300# endif
19301# ifdef __CYGWIN__
19302  /* On Cygwin, avoid locale names without encoding suffix, because the
19303     locale_charset() function relies on the encoding suffix.  Note that
19304     LC_ALL is set on the command line.  */
19305  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
19306# endif
19307  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
19308     on Cygwin 1.5.x.  */
19309  if (MB_CUR_MAX == 1)
19310    return 1;
19311  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
19312     This excludes the UTF-8 encoding (except on MirBSD).  */
19313  {
19314    const char *p;
19315    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
19316    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
19317    for (p = buf; *p != '\0'; p++)
19318      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
19319        return 1;
19320  }
19321  return 0;
19322#endif
19323}
19324
19325_ACEOF
19326    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19327  (eval $ac_link) 2>&5
19328  ac_status=$?
19329  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19330  test $ac_status = 0; } && test -s conftest$ac_exeext; then
19331      case "$host_os" in
19332        # Handle native Windows specially, because there setlocale() interprets
19333        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
19334        # "fr" or "fra" as "French" or "French_France.1252",
19335        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
19336        # "ja" as "Japanese" or "Japanese_Japan.932",
19337        # and similar.
19338        mingw*)
19339          # Note that on native Windows, the Japanese locale is
19340          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
19341          # cannot use it here.
19342          gt_cv_locale_ja=none
19343          ;;
19344        *)
19345          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
19346          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
19347          # configure script would override the LC_ALL setting. Likewise for
19348          # LC_CTYPE, which is also set at the beginning of the configure script.
19349          # Test for the AIX locale name.
19350          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19351            gt_cv_locale_ja=ja_JP
19352          else
19353            # Test for the locale name with explicit encoding suffix.
19354            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19355              gt_cv_locale_ja=ja_JP.EUC-JP
19356            else
19357              # Test for the HP-UX, OSF/1, NetBSD locale name.
19358              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19359                gt_cv_locale_ja=ja_JP.eucJP
19360              else
19361                # Test for the IRIX, FreeBSD locale name.
19362                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19363                  gt_cv_locale_ja=ja_JP.EUC
19364                else
19365                  # Test for the Solaris 7 locale name.
19366                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19367                    gt_cv_locale_ja=ja
19368                  else
19369                    # Special test for NetBSD 1.6.
19370                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
19371                      gt_cv_locale_ja=ja_JP.eucJP
19372                    else
19373                      # None found.
19374                      gt_cv_locale_ja=none
19375                    fi
19376                  fi
19377                fi
19378              fi
19379            fi
19380          fi
19381          ;;
19382      esac
19383    fi
19384    rm -fr conftest*
19385
19386fi
19387{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
19388printf "%s\n" "$gt_cv_locale_ja" >&6; }
19389  LOCALE_JA=$gt_cv_locale_ja
19390
19391
19392
19393
19394  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
19395printf %s "checking for a french Unicode locale... " >&6; }
19396if test ${gt_cv_locale_fr_utf8+y}
19397then :
19398  printf %s "(cached) " >&6
19399else $as_nop
19400
19401    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19402/* end confdefs.h.  */
19403
19404#include <locale.h>
19405#include <time.h>
19406#if HAVE_LANGINFO_CODESET
19407# include <langinfo.h>
19408#endif
19409#include <stdlib.h>
19410#include <string.h>
19411struct tm t;
19412char buf[16];
19413int main () {
19414  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
19415     imitates locale dependent behaviour by looking at the environment
19416     variables, and all locales use the UTF-8 encoding.  */
19417#if !(defined __BEOS__ || defined __HAIKU__)
19418  /* Check whether the given locale name is recognized by the system.  */
19419# if defined _WIN32 && !defined __CYGWIN__
19420  /* On native Windows, setlocale(category, "") looks at the system settings,
19421     not at the environment variables.  Also, when an encoding suffix such
19422     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
19423     category of the locale to "C".  */
19424  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
19425      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
19426    return 1;
19427# else
19428  if (setlocale (LC_ALL, "") == NULL) return 1;
19429# endif
19430  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
19431     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
19432     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
19433     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
19434     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
19435     some unit tests fail.  */
19436# if HAVE_LANGINFO_CODESET
19437  {
19438    const char *cs = nl_langinfo (CODESET);
19439    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
19440      return 1;
19441  }
19442# endif
19443# ifdef __CYGWIN__
19444  /* On Cygwin, avoid locale names without encoding suffix, because the
19445     locale_charset() function relies on the encoding suffix.  Note that
19446     LC_ALL is set on the command line.  */
19447  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
19448# endif
19449  /* Check whether in the abbreviation of the second month, the second
19450     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
19451     two bytes long, with UTF-8 encoding.  */
19452  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
19453  if (strftime (buf, sizeof (buf), "%b", &t) < 4
19454      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
19455    return 1;
19456#endif
19457#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
19458  /* Check whether the decimal separator is a comma.
19459     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
19460     are nl_langinfo(RADIXCHAR) are both ".".  */
19461  if (localeconv () ->decimal_point[0] != ',') return 1;
19462#endif
19463  return 0;
19464}
19465
19466_ACEOF
19467    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19468  (eval $ac_link) 2>&5
19469  ac_status=$?
19470  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19471  test $ac_status = 0; } && test -s conftest$ac_exeext; then
19472      case "$host_os" in
19473        # Handle native Windows specially, because there setlocale() interprets
19474        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
19475        # "fr" or "fra" as "French" or "French_France.1252",
19476        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
19477        # "ja" as "Japanese" or "Japanese_Japan.932",
19478        # and similar.
19479        mingw*)
19480          # Test for the hypothetical native Windows locale name.
19481          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19482            gt_cv_locale_fr_utf8=French_France.65001
19483          else
19484            # None found.
19485            gt_cv_locale_fr_utf8=none
19486          fi
19487          ;;
19488        *)
19489          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
19490          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
19491          # configure script would override the LC_ALL setting. Likewise for
19492          # LC_CTYPE, which is also set at the beginning of the configure script.
19493          # Test for the usual locale name.
19494          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19495            gt_cv_locale_fr_utf8=fr_FR
19496          else
19497            # Test for the locale name with explicit encoding suffix.
19498            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19499              gt_cv_locale_fr_utf8=fr_FR.UTF-8
19500            else
19501              # Test for the Solaris 7 locale name.
19502              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19503                gt_cv_locale_fr_utf8=fr.UTF-8
19504              else
19505                # None found.
19506                gt_cv_locale_fr_utf8=none
19507              fi
19508            fi
19509          fi
19510          ;;
19511      esac
19512    fi
19513    rm -fr conftest*
19514
19515fi
19516{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
19517printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
19518  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
19519
19520
19521
19522
19523
19524  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
19525printf %s "checking for a transitional chinese locale... " >&6; }
19526if test ${gt_cv_locale_zh_CN+y}
19527then :
19528  printf %s "(cached) " >&6
19529else $as_nop
19530
19531    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19532/* end confdefs.h.  */
19533
19534#include <locale.h>
19535#include <stdlib.h>
19536#include <time.h>
19537#if HAVE_LANGINFO_CODESET
19538# include <langinfo.h>
19539#endif
19540#include <stdlib.h>
19541#include <string.h>
19542struct tm t;
19543char buf[16];
19544int main ()
19545{
19546  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
19547     imitates locale dependent behaviour by looking at the environment
19548     variables, and all locales use the UTF-8 encoding.  */
19549#if defined __BEOS__ || defined __HAIKU__
19550  return 1;
19551#else
19552  /* Check whether the given locale name is recognized by the system.  */
19553# if defined _WIN32 && !defined __CYGWIN__
19554  /* On native Windows, setlocale(category, "") looks at the system settings,
19555     not at the environment variables.  Also, when an encoding suffix such
19556     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
19557     category of the locale to "C".  */
19558  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
19559      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
19560    return 1;
19561# else
19562  if (setlocale (LC_ALL, "") == NULL) return 1;
19563# endif
19564  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
19565     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
19566     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
19567     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
19568     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
19569     some unit tests fail.
19570     On MirBSD 10, when an unsupported locale is specified, setlocale()
19571     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
19572# if HAVE_LANGINFO_CODESET
19573  {
19574    const char *cs = nl_langinfo (CODESET);
19575    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
19576        || strcmp (cs, "UTF-8") == 0)
19577      return 1;
19578  }
19579# endif
19580# ifdef __CYGWIN__
19581  /* On Cygwin, avoid locale names without encoding suffix, because the
19582     locale_charset() function relies on the encoding suffix.  Note that
19583     LC_ALL is set on the command line.  */
19584  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
19585# endif
19586  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
19587     This excludes the UTF-8 encoding (except on MirBSD).  */
19588  {
19589    const char *p;
19590    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
19591    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
19592    for (p = buf; *p != '\0'; p++)
19593      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
19594        return 1;
19595  }
19596  /* Check whether a typical GB18030 multibyte sequence is recognized as a
19597     single wide character.  This excludes the GB2312 and GBK encodings.  */
19598  if (mblen ("\203\062\332\066", 5) != 4)
19599    return 1;
19600  return 0;
19601#endif
19602}
19603
19604_ACEOF
19605    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
19606  (eval $ac_link) 2>&5
19607  ac_status=$?
19608  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19609  test $ac_status = 0; } && test -s conftest$ac_exeext; then
19610      case "$host_os" in
19611        # Handle native Windows specially, because there setlocale() interprets
19612        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
19613        # "fr" or "fra" as "French" or "French_France.1252",
19614        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
19615        # "ja" as "Japanese" or "Japanese_Japan.932",
19616        # and similar.
19617        mingw*)
19618          # Test for the hypothetical native Windows locale name.
19619          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19620            gt_cv_locale_zh_CN=Chinese_China.54936
19621          else
19622            # None found.
19623            gt_cv_locale_zh_CN=none
19624          fi
19625          ;;
19626        solaris2.8)
19627          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
19628          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
19629          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
19630          gt_cv_locale_zh_CN=none
19631          ;;
19632        *)
19633          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
19634          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
19635          # configure script would override the LC_ALL setting. Likewise for
19636          # LC_CTYPE, which is also set at the beginning of the configure script.
19637          # Test for the locale name without encoding suffix.
19638          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19639            gt_cv_locale_zh_CN=zh_CN
19640          else
19641            # Test for the locale name with explicit encoding suffix.
19642            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
19643              gt_cv_locale_zh_CN=zh_CN.GB18030
19644            else
19645              # None found.
19646              gt_cv_locale_zh_CN=none
19647            fi
19648          fi
19649          ;;
19650      esac
19651    else
19652      # If there was a link error, due to mblen(), the system is so old that
19653      # it certainly doesn't have a chinese locale.
19654      gt_cv_locale_zh_CN=none
19655    fi
19656    rm -fr conftest*
19657
19658fi
19659{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
19660printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
19661  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
19662
19663
19664
19665
19666
19667  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
19668  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
19669  # irrelevant for anonymous mappings.
19670  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
19671if test "x$ac_cv_func_mmap" = xyes
19672then :
19673  gl_have_mmap=yes
19674else $as_nop
19675  gl_have_mmap=no
19676fi
19677
19678
19679  # Try to allow MAP_ANONYMOUS.
19680  gl_have_mmap_anonymous=no
19681  if test $gl_have_mmap = yes; then
19682    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
19683printf %s "checking for MAP_ANONYMOUS... " >&6; }
19684    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19685/* end confdefs.h.  */
19686
19687#include <sys/mman.h>
19688#ifdef MAP_ANONYMOUS
19689    I cannot identify this map
19690#endif
19691
19692_ACEOF
19693if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19694  $EGREP "I cannot identify this map" >/dev/null 2>&1
19695then :
19696  gl_have_mmap_anonymous=yes
19697fi
19698rm -rf conftest*
19699
19700    if test $gl_have_mmap_anonymous != yes; then
19701      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19702/* end confdefs.h.  */
19703
19704#include <sys/mman.h>
19705#ifdef MAP_ANON
19706    I cannot identify this map
19707#endif
19708
19709_ACEOF
19710if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19711  $EGREP "I cannot identify this map" >/dev/null 2>&1
19712then :
19713
19714printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
19715
19716         gl_have_mmap_anonymous=yes
19717fi
19718rm -rf conftest*
19719
19720    fi
19721    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
19722printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
19723    if test $gl_have_mmap_anonymous = yes; then
19724
19725printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
19726
19727    fi
19728  fi
19729
19730
19731
19732
19733  GNULIB_EXPLICIT_BZERO=0;
19734  GNULIB_FFSL=0;
19735  GNULIB_FFSLL=0;
19736  GNULIB_MEMCHR=0;
19737  GNULIB_MEMMEM=0;
19738  GNULIB_MEMPCPY=0;
19739  GNULIB_MEMRCHR=0;
19740  GNULIB_RAWMEMCHR=0;
19741  GNULIB_STPCPY=0;
19742  GNULIB_STPNCPY=0;
19743  GNULIB_STRCHRNUL=0;
19744  GNULIB_STRDUP=0;
19745  GNULIB_STRNCAT=0;
19746  GNULIB_STRNDUP=0;
19747  GNULIB_STRNLEN=0;
19748  GNULIB_STRPBRK=0;
19749  GNULIB_STRSEP=0;
19750  GNULIB_STRSTR=0;
19751  GNULIB_STRCASESTR=0;
19752  GNULIB_STRTOK_R=0;
19753  GNULIB_MBSLEN=0;
19754  GNULIB_MBSNLEN=0;
19755  GNULIB_MBSCHR=0;
19756  GNULIB_MBSRCHR=0;
19757  GNULIB_MBSSTR=0;
19758  GNULIB_MBSCASECMP=0;
19759  GNULIB_MBSNCASECMP=0;
19760  GNULIB_MBSPCASECMP=0;
19761  GNULIB_MBSCASESTR=0;
19762  GNULIB_MBSCSPN=0;
19763  GNULIB_MBSPBRK=0;
19764  GNULIB_MBSSPN=0;
19765  GNULIB_MBSSEP=0;
19766  GNULIB_MBSTOK_R=0;
19767  GNULIB_STRERROR=0;
19768  GNULIB_STRERROR_R=0;
19769  GNULIB_STRERRORNAME_NP=0;
19770  GNULIB_SIGABBREV_NP=0;
19771  GNULIB_SIGDESCR_NP=0;
19772  GNULIB_STRSIGNAL=0;
19773  GNULIB_STRVERSCMP=0;
19774  HAVE_MBSLEN=0;
19775    GNULIB_MDA_MEMCCPY=1;
19776  GNULIB_MDA_STRDUP=1;
19777    HAVE_EXPLICIT_BZERO=1;
19778  HAVE_FFSL=1;
19779  HAVE_FFSLL=1;
19780  HAVE_DECL_MEMMEM=1;
19781  HAVE_MEMPCPY=1;
19782  HAVE_DECL_MEMRCHR=1;
19783  HAVE_RAWMEMCHR=1;
19784  HAVE_STPCPY=1;
19785  HAVE_STPNCPY=1;
19786  HAVE_STRCHRNUL=1;
19787  HAVE_DECL_STRDUP=1;
19788  HAVE_DECL_STRNDUP=1;
19789  HAVE_DECL_STRNLEN=1;
19790  HAVE_STRPBRK=1;
19791  HAVE_STRSEP=1;
19792  HAVE_STRCASESTR=1;
19793  HAVE_DECL_STRTOK_R=1;
19794  HAVE_DECL_STRERROR_R=1;
19795  HAVE_STRERRORNAME_NP=1;
19796  HAVE_SIGABBREV_NP=1;
19797  HAVE_SIGDESCR_NP=1;
19798  HAVE_DECL_STRSIGNAL=1;
19799  HAVE_STRVERSCMP=1;
19800  REPLACE_FFSLL=0;
19801  REPLACE_MEMCHR=0;
19802  REPLACE_MEMMEM=0;
19803  REPLACE_STPNCPY=0;
19804  REPLACE_STRCHRNUL=0;
19805  REPLACE_STRDUP=0;
19806  REPLACE_STRNCAT=0;
19807  REPLACE_STRNDUP=0;
19808  REPLACE_STRNLEN=0;
19809  REPLACE_STRSTR=0;
19810  REPLACE_STRCASESTR=0;
19811  REPLACE_STRTOK_R=0;
19812  REPLACE_STRERROR=0;
19813  REPLACE_STRERROR_R=0;
19814  REPLACE_STRERRORNAME_NP=0;
19815  REPLACE_STRSIGNAL=0;
19816  UNDEFINE_STRTOK_R=0;
19817
19818
19819
19820
19821
19822
19823
19824
19825  # Detect platform-specific bugs in some versions of glibc:
19826  # memchr should not dereference anything with length 0
19827  #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
19828  # memchr should not dereference overestimated length after a match
19829  #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
19830  #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
19831  # memchr should cast the second argument to 'unsigned char'.
19832  #   This bug exists in Android 4.3.
19833  # Assume that memchr works on platforms that lack mprotect.
19834  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
19835printf %s "checking whether memchr works... " >&6; }
19836if test ${gl_cv_func_memchr_works+y}
19837then :
19838  printf %s "(cached) " >&6
19839else $as_nop
19840  if test "$cross_compiling" = yes
19841then :
19842  case "$host_os" in
19843                           # Guess no on Android.
19844          linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
19845                           # Guess yes on native Windows.
19846          mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
19847                           # If we don't know, obey --enable-cross-guesses.
19848          *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
19849        esac
19850
19851else $as_nop
19852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19853/* end confdefs.h.  */
19854
19855#include <string.h>
19856#if HAVE_SYS_MMAN_H
19857# include <fcntl.h>
19858# include <unistd.h>
19859# include <sys/types.h>
19860# include <sys/mman.h>
19861# ifndef MAP_FILE
19862#  define MAP_FILE 0
19863# endif
19864#endif
19865
19866int
19867main (void)
19868{
19869
19870  int result = 0;
19871  char *fence = NULL;
19872#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
19873# if HAVE_MAP_ANONYMOUS
19874  const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
19875  const int fd = -1;
19876# else /* !HAVE_MAP_ANONYMOUS */
19877  const int flags = MAP_FILE | MAP_PRIVATE;
19878  int fd = open ("/dev/zero", O_RDONLY, 0666);
19879  if (fd >= 0)
19880# endif
19881    {
19882      int pagesize = getpagesize ();
19883      char *two_pages =
19884        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
19885                       flags, fd, 0);
19886      if (two_pages != (char *)(-1)
19887          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
19888        fence = two_pages + pagesize;
19889    }
19890#endif
19891  if (fence)
19892    {
19893      /* Test against bugs on glibc systems.  */
19894      if (memchr (fence, 0, 0))
19895        result |= 1;
19896      strcpy (fence - 9, "12345678");
19897      if (memchr (fence - 9, 0, 79) != fence - 1)
19898        result |= 2;
19899      if (memchr (fence - 1, 0, 3) != fence - 1)
19900        result |= 4;
19901      /* Test against bug on AIX 7.2.  */
19902      if (memchr (fence - 4, '6', 16) != fence - 4)
19903        result |= 8;
19904    }
19905  /* Test against bug on Android 4.3.  */
19906  {
19907    char input[3];
19908    input[0] = 'a';
19909    input[1] = 'b';
19910    input[2] = 'c';
19911    if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
19912      result |= 16;
19913  }
19914  return result;
19915
19916  ;
19917  return 0;
19918}
19919_ACEOF
19920if ac_fn_c_try_run "$LINENO"
19921then :
19922  gl_cv_func_memchr_works=yes
19923else $as_nop
19924  gl_cv_func_memchr_works=no
19925fi
19926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19927  conftest.$ac_objext conftest.beam conftest.$ac_ext
19928fi
19929
19930
19931fi
19932{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
19933printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
19934  case "$gl_cv_func_memchr_works" in
19935    *yes) ;;
19936    *) REPLACE_MEMCHR=1 ;;
19937  esac
19938
19939ac_fn_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
19940if test "x$ac_cv_have_decl_memrchr" = xyes
19941then :
19942  ac_have_decl=1
19943else $as_nop
19944  ac_have_decl=0
19945fi
19946printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h
19947
19948
19949
19950
19951
19952  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
19953printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; }
19954if test ${gl_cv_minmax_in_limits_h+y}
19955then :
19956  printf %s "(cached) " >&6
19957else $as_nop
19958  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19959/* end confdefs.h.  */
19960#include <limits.h>
19961            int x = MIN (42, 17);
19962int
19963main (void)
19964{
19965
19966  ;
19967  return 0;
19968}
19969_ACEOF
19970if ac_fn_c_try_compile "$LINENO"
19971then :
19972  gl_cv_minmax_in_limits_h=yes
19973else $as_nop
19974  gl_cv_minmax_in_limits_h=no
19975fi
19976rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19977fi
19978{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
19979printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; }
19980  if test $gl_cv_minmax_in_limits_h = yes; then
19981
19982printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
19983
19984  fi
19985
19986
19987
19988
19989
19990
19991  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
19992printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
19993if test ${gl_cv_minmax_in_sys_param_h+y}
19994then :
19995  printf %s "(cached) " >&6
19996else $as_nop
19997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19998/* end confdefs.h.  */
19999#include <sys/param.h>
20000            int x = MIN (42, 17);
20001int
20002main (void)
20003{
20004
20005  ;
20006  return 0;
20007}
20008_ACEOF
20009if ac_fn_c_try_compile "$LINENO"
20010then :
20011  gl_cv_minmax_in_sys_param_h=yes
20012else $as_nop
20013  gl_cv_minmax_in_sys_param_h=no
20014fi
20015rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20016fi
20017{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
20018printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; }
20019  if test $gl_cv_minmax_in_sys_param_h = yes; then
20020
20021printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
20022
20023  fi
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033  GNULIB_CTIME=0;
20034  GNULIB_MKTIME=0;
20035  GNULIB_LOCALTIME=0;
20036  GNULIB_NANOSLEEP=0;
20037  GNULIB_STRFTIME=0;
20038  GNULIB_STRPTIME=0;
20039  GNULIB_TIMEGM=0;
20040  GNULIB_TIMESPEC_GET=0;
20041  GNULIB_TIME_R=0;
20042  GNULIB_TIME_RZ=0;
20043  GNULIB_TZSET=0;
20044    GNULIB_MDA_TZSET=1;
20045    HAVE_DECL_LOCALTIME_R=1;
20046  HAVE_NANOSLEEP=1;
20047  HAVE_STRPTIME=1;
20048  HAVE_TIMEGM=1;
20049  HAVE_TIMESPEC_GET=1;
20050    HAVE_TIMEZONE_T=0;
20051        REPLACE_CTIME=GNULIB_PORTCHECK;
20052  REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
20053  REPLACE_MKTIME=GNULIB_PORTCHECK;
20054  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
20055  REPLACE_STRFTIME=GNULIB_PORTCHECK;
20056  REPLACE_TIMEGM=GNULIB_PORTCHECK;
20057  REPLACE_TZSET=GNULIB_PORTCHECK;
20058
20059      : ${GNULIB_GETTIMEOFDAY=0};
20060        REPLACE_GMTIME=0;
20061  REPLACE_LOCALTIME=0;
20062
20063
20064  GNULIB_PSELECT=0;
20065  GNULIB_SELECT=0;
20066    HAVE_PSELECT=1;
20067  REPLACE_PSELECT=0;
20068  REPLACE_SELECT=0;
20069
20070
20071
20072
20073
20074  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
20075printf %s "checking whether <sys/select.h> is self-contained... " >&6; }
20076if test ${gl_cv_header_sys_select_h_selfcontained+y}
20077then :
20078  printf %s "(cached) " >&6
20079else $as_nop
20080
20081                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20082/* end confdefs.h.  */
20083#include <sys/select.h>
20084int
20085main (void)
20086{
20087struct timeval b;
20088  ;
20089  return 0;
20090}
20091_ACEOF
20092if ac_fn_c_try_compile "$LINENO"
20093then :
20094  gl_cv_header_sys_select_h_selfcontained=yes
20095else $as_nop
20096  gl_cv_header_sys_select_h_selfcontained=no
20097fi
20098rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20099                        if test $gl_cv_header_sys_select_h_selfcontained = yes; then
20100        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20101/* end confdefs.h.  */
20102#include <sys/select.h>
20103int
20104main (void)
20105{
20106int memset; int bzero;
20107  ;
20108  return 0;
20109}
20110
20111_ACEOF
20112if ac_fn_c_try_compile "$LINENO"
20113then :
20114  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20115/* end confdefs.h.  */
20116#include <sys/select.h>
20117int
20118main (void)
20119{
20120
20121                  #undef memset
20122                  #define memset nonexistent_memset
20123                  extern
20124                  #ifdef __cplusplus
20125                  "C"
20126                  #endif
20127                  void *memset (void *, int, unsigned long);
20128                  #undef bzero
20129                  #define bzero nonexistent_bzero
20130                  extern
20131                  #ifdef __cplusplus
20132                  "C"
20133                  #endif
20134                  void bzero (void *, unsigned long);
20135                  fd_set fds;
20136                  FD_ZERO (&fds);
20137
20138  ;
20139  return 0;
20140}
20141
20142_ACEOF
20143if ac_fn_c_try_link "$LINENO"
20144then :
20145
20146else $as_nop
20147  gl_cv_header_sys_select_h_selfcontained=no
20148fi
20149rm -f core conftest.err conftest.$ac_objext conftest.beam \
20150    conftest$ac_exeext conftest.$ac_ext
20151
20152fi
20153rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20154      fi
20155
20156fi
20157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
20158printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; }
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168     if test $gl_cv_have_include_next = yes; then
20169       gl_cv_next_sys_select_h='<'sys/select.h'>'
20170     else
20171       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
20172printf %s "checking absolute name of <sys/select.h>... " >&6; }
20173if test ${gl_cv_next_sys_select_h+y}
20174then :
20175  printf %s "(cached) " >&6
20176else $as_nop
20177
20178             if test $ac_cv_header_sys_select_h = yes; then
20179
20180
20181
20182
20183  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20184/* end confdefs.h.  */
20185#include <sys/select.h>
20186_ACEOF
20187                case "$host_os" in
20188    aix*) gl_absname_cpp="$ac_cpp -C" ;;
20189    *)    gl_absname_cpp="$ac_cpp" ;;
20190  esac
20191
20192  case "$host_os" in
20193    mingw*)
20194                                          gl_dirsep_regex='[/\\]'
20195      ;;
20196    *)
20197      gl_dirsep_regex='\/'
20198      ;;
20199  esac
20200      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20201  gl_header_literal_regex=`echo 'sys/select.h' \
20202                           | sed -e "$gl_make_literal_regex_sed"`
20203  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20204      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20205      s|^/[^/]|//&|
20206      p
20207      q
20208    }'
20209
20210        gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20211  sed -n "$gl_absolute_header_sed"`
20212
20213           gl_header=$gl_cv_absolute_sys_select_h
20214           gl_cv_next_sys_select_h='"'$gl_header'"'
20215          else
20216               gl_cv_next_sys_select_h='<'sys/select.h'>'
20217             fi
20218
20219
20220fi
20221{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
20222printf "%s\n" "$gl_cv_next_sys_select_h" >&6; }
20223     fi
20224     NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
20225
20226     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20227       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20228       gl_next_as_first_directive='<'sys/select.h'>'
20229     else
20230       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20231       gl_next_as_first_directive=$gl_cv_next_sys_select_h
20232     fi
20233     NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
20234
20235
20236
20237
20238  if test $ac_cv_header_sys_select_h = yes; then
20239    HAVE_SYS_SELECT_H=1
20240  else
20241    HAVE_SYS_SELECT_H=0
20242  fi
20243
20244
20245
20246
20247
20248  if test $ac_cv_header_sys_socket_h != yes; then
20249                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20250if test "x$ac_cv_header_winsock2_h" = xyes
20251then :
20252  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
20253
20254fi
20255
20256  fi
20257  if test "$ac_cv_header_winsock2_h" = yes; then
20258    HAVE_WINSOCK2_H=1
20259    UNISTD_H_HAVE_WINSOCK2_H=1
20260    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20261  else
20262    HAVE_WINSOCK2_H=0
20263  fi
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276  if test $ac_cv_header_sys_socket_h != yes; then
20277                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20278if test "x$ac_cv_header_winsock2_h" = xyes
20279then :
20280  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
20281
20282fi
20283
20284  fi
20285  if test "$ac_cv_header_winsock2_h" = yes; then
20286    HAVE_WINSOCK2_H=1
20287    UNISTD_H_HAVE_WINSOCK2_H=1
20288    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20289  else
20290    HAVE_WINSOCK2_H=0
20291  fi
20292
20293   LIBSOCKET=
20294  if test $HAVE_WINSOCK2_H = 1; then
20295                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
20296printf %s "checking for WSAStartup... " >&6; }
20297if test ${gl_cv_func_wsastartup+y}
20298then :
20299  printf %s "(cached) " >&6
20300else $as_nop
20301
20302       gl_save_LIBS="$LIBS"
20303       LIBS="$LIBS -lws2_32"
20304       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20305/* end confdefs.h.  */
20306
20307#ifdef HAVE_WINSOCK2_H
20308# include <winsock2.h>
20309#endif
20310int
20311main (void)
20312{
20313
20314            WORD wVersionRequested = MAKEWORD(1, 1);
20315            WSADATA wsaData;
20316            int err = WSAStartup(wVersionRequested, &wsaData);
20317            WSACleanup ();
20318
20319  ;
20320  return 0;
20321}
20322
20323_ACEOF
20324if ac_fn_c_try_link "$LINENO"
20325then :
20326  gl_cv_func_wsastartup=yes
20327else $as_nop
20328  gl_cv_func_wsastartup=no
20329fi
20330rm -f core conftest.err conftest.$ac_objext conftest.beam \
20331    conftest$ac_exeext conftest.$ac_ext
20332       LIBS="$gl_save_LIBS"
20333
20334fi
20335{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
20336printf "%s\n" "$gl_cv_func_wsastartup" >&6; }
20337    if test "$gl_cv_func_wsastartup" = "yes"; then
20338
20339printf "%s\n" "#define WINDOWS_SOCKETS 1" >>confdefs.h
20340
20341      LIBSOCKET='-lws2_32'
20342    fi
20343  else
20344                                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
20345printf %s "checking for library containing setsockopt... " >&6; }
20346if test ${gl_cv_lib_socket+y}
20347then :
20348  printf %s "(cached) " >&6
20349else $as_nop
20350
20351      gl_cv_lib_socket=
20352      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20353/* end confdefs.h.  */
20354extern
20355#ifdef __cplusplus
20356"C"
20357#endif
20358char setsockopt();
20359int
20360main (void)
20361{
20362setsockopt();
20363  ;
20364  return 0;
20365}
20366_ACEOF
20367if ac_fn_c_try_link "$LINENO"
20368then :
20369
20370else $as_nop
20371  gl_save_LIBS="$LIBS"
20372         LIBS="$gl_save_LIBS -lsocket"
20373         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20374/* end confdefs.h.  */
20375extern
20376#ifdef __cplusplus
20377"C"
20378#endif
20379char setsockopt();
20380int
20381main (void)
20382{
20383setsockopt();
20384  ;
20385  return 0;
20386}
20387_ACEOF
20388if ac_fn_c_try_link "$LINENO"
20389then :
20390  gl_cv_lib_socket="-lsocket"
20391fi
20392rm -f core conftest.err conftest.$ac_objext conftest.beam \
20393    conftest$ac_exeext conftest.$ac_ext
20394         if test -z "$gl_cv_lib_socket"; then
20395           LIBS="$gl_save_LIBS -lnetwork"
20396           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20397/* end confdefs.h.  */
20398extern
20399#ifdef __cplusplus
20400"C"
20401#endif
20402char setsockopt();
20403int
20404main (void)
20405{
20406setsockopt();
20407  ;
20408  return 0;
20409}
20410_ACEOF
20411if ac_fn_c_try_link "$LINENO"
20412then :
20413  gl_cv_lib_socket="-lnetwork"
20414fi
20415rm -f core conftest.err conftest.$ac_objext conftest.beam \
20416    conftest$ac_exeext conftest.$ac_ext
20417           if test -z "$gl_cv_lib_socket"; then
20418             LIBS="$gl_save_LIBS -lnet"
20419             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20420/* end confdefs.h.  */
20421extern
20422#ifdef __cplusplus
20423"C"
20424#endif
20425char setsockopt();
20426int
20427main (void)
20428{
20429setsockopt();
20430  ;
20431  return 0;
20432}
20433_ACEOF
20434if ac_fn_c_try_link "$LINENO"
20435then :
20436  gl_cv_lib_socket="-lnet"
20437fi
20438rm -f core conftest.err conftest.$ac_objext conftest.beam \
20439    conftest$ac_exeext conftest.$ac_ext
20440           fi
20441         fi
20442         LIBS="$gl_save_LIBS"
20443
20444fi
20445rm -f core conftest.err conftest.$ac_objext conftest.beam \
20446    conftest$ac_exeext conftest.$ac_ext
20447      if test -z "$gl_cv_lib_socket"; then
20448        gl_cv_lib_socket="none needed"
20449      fi
20450
20451fi
20452{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
20453printf "%s\n" "$gl_cv_lib_socket" >&6; }
20454    if test "$gl_cv_lib_socket" != "none needed"; then
20455      LIBSOCKET="$gl_cv_lib_socket"
20456    fi
20457  fi
20458
20459
20460
20461
20462
20463
20464  :
20465
20466
20467
20468
20469
20470
20471  if test "$ac_cv_header_winsock2_h" = yes; then
20472    REPLACE_SELECT=1
20473  else
20474
20475    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
20476printf %s "checking whether select supports a 0 argument... " >&6; }
20477if test ${gl_cv_func_select_supports0+y}
20478then :
20479  printf %s "(cached) " >&6
20480else $as_nop
20481
20482        if test "$cross_compiling" = yes
20483then :
20484
20485           case "$host_os" in
20486                       # Guess no on Interix.
20487             interix*) gl_cv_func_select_supports0="guessing no";;
20488                       # Guess yes otherwise.
20489             *)        gl_cv_func_select_supports0="guessing yes";;
20490           esac
20491
20492else $as_nop
20493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20494/* end confdefs.h.  */
20495
20496#include <sys/types.h>
20497#include <sys/time.h>
20498#if HAVE_SYS_SELECT_H
20499#include <sys/select.h>
20500#endif
20501int main ()
20502{
20503  struct timeval timeout;
20504  timeout.tv_sec = 0;
20505  timeout.tv_usec = 5;
20506  return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
20507}
20508_ACEOF
20509if ac_fn_c_try_run "$LINENO"
20510then :
20511  gl_cv_func_select_supports0=yes
20512else $as_nop
20513  gl_cv_func_select_supports0=no
20514fi
20515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20516  conftest.$ac_objext conftest.beam conftest.$ac_ext
20517fi
20518
20519
20520fi
20521{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
20522printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
20523    case "$gl_cv_func_select_supports0" in
20524      *yes) ;;
20525      *) REPLACE_SELECT=1 ;;
20526    esac
20527
20528        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
20529printf %s "checking whether select detects invalid fds... " >&6; }
20530if test ${gl_cv_func_select_detects_ebadf+y}
20531then :
20532  printf %s "(cached) " >&6
20533else $as_nop
20534
20535        if test "$cross_compiling" = yes
20536then :
20537
20538           case "$host_os" in
20539                             # Guess yes on Linux systems.
20540            linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
20541                             # Guess yes on glibc systems.
20542            *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
20543                             # If we don't know, obey --enable-cross-guesses.
20544            *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
20545           esac
20546
20547else $as_nop
20548  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20549/* end confdefs.h.  */
20550
20551#include <sys/types.h>
20552#include <sys/time.h>
20553#if HAVE_SYS_SELECT_H
20554# include <sys/select.h>
20555#endif
20556#include <unistd.h>
20557#include <errno.h>
20558
20559
20560$gl_mda_defines
20561
20562int
20563main (void)
20564{
20565
20566  fd_set set;
20567  dup2(0, 16);
20568  FD_ZERO(&set);
20569  FD_SET(16, &set);
20570  close(16);
20571  struct timeval timeout;
20572  timeout.tv_sec = 0;
20573  timeout.tv_usec = 5;
20574  return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
20575
20576  ;
20577  return 0;
20578}
20579_ACEOF
20580if ac_fn_c_try_run "$LINENO"
20581then :
20582  gl_cv_func_select_detects_ebadf=yes
20583else $as_nop
20584  gl_cv_func_select_detects_ebadf=no
20585fi
20586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20587  conftest.$ac_objext conftest.beam conftest.$ac_ext
20588fi
20589
20590
20591fi
20592{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
20593printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
20594    case $gl_cv_func_select_detects_ebadf in
20595      *yes) ;;
20596      *) REPLACE_SELECT=1 ;;
20597    esac
20598  fi
20599
20600    LIB_SELECT="$LIBSOCKET"
20601  if test $REPLACE_SELECT = 1; then
20602    case "$host_os" in
20603      mingw*)
20604                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20605/* end confdefs.h.  */
20606
20607#define WIN32_LEAN_AND_MEAN
20608#include <windows.h>
20609int
20610main ()
20611{
20612  MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
20613  return 0;
20614}
20615_ACEOF
20616if ac_fn_c_try_link "$LINENO"
20617then :
20618
20619else $as_nop
20620  LIB_SELECT="$LIB_SELECT -luser32"
20621fi
20622rm -f core conftest.err conftest.$ac_objext conftest.beam \
20623    conftest$ac_exeext conftest.$ac_ext
20624        ;;
20625    esac
20626  fi
20627
20628
20629ac_fn_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
20630if test "x$ac_cv_have_decl_alarm" = xyes
20631then :
20632  ac_have_decl=1
20633else $as_nop
20634  ac_have_decl=0
20635fi
20636printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
20637
20638
20639
20640  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
20641printf %s "checking for O_CLOEXEC... " >&6; }
20642if test ${gl_cv_macro_O_CLOEXEC+y}
20643then :
20644  printf %s "(cached) " >&6
20645else $as_nop
20646  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20647/* end confdefs.h.  */
20648#include <fcntl.h>
20649                          #ifndef O_CLOEXEC
20650                            choke me;
20651                          #endif
20652
20653int
20654main (void)
20655{
20656return O_CLOEXEC;
20657  ;
20658  return 0;
20659}
20660_ACEOF
20661if ac_fn_c_try_compile "$LINENO"
20662then :
20663  gl_cv_macro_O_CLOEXEC=yes
20664else $as_nop
20665  gl_cv_macro_O_CLOEXEC=no
20666fi
20667rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20668fi
20669{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
20670printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
20671
20672
20673
20674  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
20675printf %s "checking for promoted mode_t type... " >&6; }
20676if test ${gl_cv_promoted_mode_t+y}
20677then :
20678  printf %s "(cached) " >&6
20679else $as_nop
20680
20681                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20682/* end confdefs.h.  */
20683#include <sys/types.h>
20684int
20685main (void)
20686{
20687typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
20688  ;
20689  return 0;
20690}
20691_ACEOF
20692if ac_fn_c_try_compile "$LINENO"
20693then :
20694  gl_cv_promoted_mode_t='int'
20695else $as_nop
20696  gl_cv_promoted_mode_t='mode_t'
20697fi
20698rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20699
20700fi
20701{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
20702printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
20703
20704printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
20705
20706
20707
20708
20709
20710
20711
20712  GNULIB_POLL=0;
20713    HAVE_POLL=1;
20714  REPLACE_POLL=0;
20715
20716
20717
20718
20719
20720
20721  if test $ac_cv_header_poll_h = yes; then
20722    HAVE_POLL_H=1
20723  else
20724    HAVE_POLL_H=0
20725  fi
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737     if test $gl_cv_have_include_next = yes; then
20738       gl_cv_next_poll_h='<'poll.h'>'
20739     else
20740       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <poll.h>" >&5
20741printf %s "checking absolute name of <poll.h>... " >&6; }
20742if test ${gl_cv_next_poll_h+y}
20743then :
20744  printf %s "(cached) " >&6
20745else $as_nop
20746
20747             if test $ac_cv_header_poll_h = yes; then
20748
20749
20750
20751
20752  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20753/* end confdefs.h.  */
20754#include <poll.h>
20755_ACEOF
20756                case "$host_os" in
20757    aix*) gl_absname_cpp="$ac_cpp -C" ;;
20758    *)    gl_absname_cpp="$ac_cpp" ;;
20759  esac
20760
20761  case "$host_os" in
20762    mingw*)
20763                                          gl_dirsep_regex='[/\\]'
20764      ;;
20765    *)
20766      gl_dirsep_regex='\/'
20767      ;;
20768  esac
20769      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20770  gl_header_literal_regex=`echo 'poll.h' \
20771                           | sed -e "$gl_make_literal_regex_sed"`
20772  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20773      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20774      s|^/[^/]|//&|
20775      p
20776      q
20777    }'
20778
20779        gl_cv_absolute_poll_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20780  sed -n "$gl_absolute_header_sed"`
20781
20782           gl_header=$gl_cv_absolute_poll_h
20783           gl_cv_next_poll_h='"'$gl_header'"'
20784          else
20785               gl_cv_next_poll_h='<'poll.h'>'
20786             fi
20787
20788
20789fi
20790{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_poll_h" >&5
20791printf "%s\n" "$gl_cv_next_poll_h" >&6; }
20792     fi
20793     NEXT_POLL_H=$gl_cv_next_poll_h
20794
20795     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20796       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20797       gl_next_as_first_directive='<'poll.h'>'
20798     else
20799       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20800       gl_next_as_first_directive=$gl_cv_next_poll_h
20801     fi
20802     NEXT_AS_FIRST_DIRECTIVE_POLL_H=$gl_next_as_first_directive
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812  if test $ac_cv_header_sys_socket_h != yes; then
20813                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20814if test "x$ac_cv_header_winsock2_h" = xyes
20815then :
20816  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
20817
20818fi
20819
20820  fi
20821  if test "$ac_cv_header_winsock2_h" = yes; then
20822    HAVE_WINSOCK2_H=1
20823    UNISTD_H_HAVE_WINSOCK2_H=1
20824    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20825  else
20826    HAVE_WINSOCK2_H=0
20827  fi
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838  GNULIB_POSIX_SPAWN=0;
20839  GNULIB_POSIX_SPAWNP=0;
20840  GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0;
20841  GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0;
20842  GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
20843  GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
20844  GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=0;
20845  GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
20846  GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0;
20847  GNULIB_POSIX_SPAWNATTR_INIT=0;
20848  GNULIB_POSIX_SPAWNATTR_GETFLAGS=0;
20849  GNULIB_POSIX_SPAWNATTR_SETFLAGS=0;
20850  GNULIB_POSIX_SPAWNATTR_GETPGROUP=0;
20851  GNULIB_POSIX_SPAWNATTR_SETPGROUP=0;
20852  GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0;
20853  GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0;
20854  GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0;
20855  GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0;
20856  GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0;
20857  GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0;
20858  GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0;
20859  GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0;
20860  GNULIB_POSIX_SPAWNATTR_DESTROY=0;
20861    HAVE_POSIX_SPAWN=1;
20862  HAVE_POSIX_SPAWNATTR_T=1;
20863  HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
20864
20865  HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1;
20866
20867  HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=1;
20868
20869  REPLACE_POSIX_SPAWN=0;
20870  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0;
20871
20872  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
20873
20874  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
20875
20876  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=0;
20877
20878  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
20879
20880
20881
20882
20883
20884  LIB_POSIX_SPAWN=
20885
20886  gl_saved_libs=$LIBS
20887    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing posix_spawn" >&5
20888printf %s "checking for library containing posix_spawn... " >&6; }
20889if test ${ac_cv_search_posix_spawn+y}
20890then :
20891  printf %s "(cached) " >&6
20892else $as_nop
20893  ac_func_search_save_LIBS=$LIBS
20894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20895/* end confdefs.h.  */
20896
20897/* Override any GCC internal prototype to avoid an error.
20898   Use char because int might match the return type of a GCC
20899   builtin and then its argument prototype would still apply.  */
20900char posix_spawn ();
20901int
20902main (void)
20903{
20904return posix_spawn ();
20905  ;
20906  return 0;
20907}
20908_ACEOF
20909for ac_lib in '' rt
20910do
20911  if test -z "$ac_lib"; then
20912    ac_res="none required"
20913  else
20914    ac_res=-l$ac_lib
20915    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20916  fi
20917  if ac_fn_c_try_link "$LINENO"
20918then :
20919  ac_cv_search_posix_spawn=$ac_res
20920fi
20921rm -f core conftest.err conftest.$ac_objext conftest.beam \
20922    conftest$ac_exeext
20923  if test ${ac_cv_search_posix_spawn+y}
20924then :
20925  break
20926fi
20927done
20928if test ${ac_cv_search_posix_spawn+y}
20929then :
20930
20931else $as_nop
20932  ac_cv_search_posix_spawn=no
20933fi
20934rm conftest.$ac_ext
20935LIBS=$ac_func_search_save_LIBS
20936fi
20937{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_posix_spawn" >&5
20938printf "%s\n" "$ac_cv_search_posix_spawn" >&6; }
20939ac_res=$ac_cv_search_posix_spawn
20940if test "$ac_res" != no
20941then :
20942  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20943  test "$ac_cv_search_posix_spawn" = "none required" ||
20944                    LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn
20945fi
20946
20947    ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
20948if test "x$ac_cv_func_posix_spawn" = xyes
20949then :
20950  printf "%s\n" "#define HAVE_POSIX_SPAWN 1" >>confdefs.h
20951
20952fi
20953
20954  LIBS=$gl_saved_libs
20955
20956  if test $ac_cv_func_posix_spawn != yes; then
20957    HAVE_POSIX_SPAWN=0
20958  fi
20959
20960
20961
20962
20963
20964                                      if test $ac_cv_func_posix_spawn = yes; then
20965
20966       if test $ac_cv_func_posix_spawn_file_actions_addchdir_np = no; then
20967                           REPLACE_POSIX_SPAWN=1
20968       fi
20969
20970
20971    if test $REPLACE_POSIX_SPAWN = 0; then
20972
20973
20974     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
20975printf %s "checking whether posix_spawn works... " >&6; }
20976if test ${gl_cv_func_posix_spawn_works+y}
20977then :
20978  printf %s "(cached) " >&6
20979else $as_nop
20980  if test $cross_compiling = no; then
20981       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20982/* end confdefs.h.  */
20983
20984#include <errno.h>
20985#include <fcntl.h>
20986#include <signal.h>
20987#include <spawn.h>
20988#include <stdbool.h>
20989#include <stdio.h>
20990#include <stdlib.h>
20991#include <string.h>
20992#include <unistd.h>
20993#include <sys/types.h>
20994#include <sys/wait.h>
20995
20996
20997$gl_mda_defines
20998
20999
21000extern char **environ;
21001
21002#ifndef STDIN_FILENO
21003# define STDIN_FILENO 0
21004#endif
21005#ifndef STDOUT_FILENO
21006# define STDOUT_FILENO 1
21007#endif
21008#ifndef STDERR_FILENO
21009# define STDERR_FILENO 2
21010#endif
21011
21012#ifndef WTERMSIG
21013# define WTERMSIG(x) ((x) & 0x7f)
21014#endif
21015#ifndef WIFEXITED
21016# define WIFEXITED(x) (WTERMSIG (x) == 0)
21017#endif
21018#ifndef WEXITSTATUS
21019# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
21020#endif
21021
21022#define CHILD_PROGRAM_FILENAME "/non/exist/ent"
21023
21024static int
21025fd_safer (int fd)
21026{
21027  if (0 <= fd && fd <= 2)
21028    {
21029      int f = fd_safer (dup (fd));
21030      int e = errno;
21031      close (fd);
21032      errno = e;
21033      fd = f;
21034    }
21035
21036  return fd;
21037}
21038
21039int
21040main ()
21041{
21042  char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
21043  int ofd[2];
21044  sigset_t blocked_signals;
21045  sigset_t fatal_signal_set;
21046  posix_spawn_file_actions_t actions;
21047  bool actions_allocated;
21048  posix_spawnattr_t attrs;
21049  bool attrs_allocated;
21050  int err;
21051  pid_t child;
21052  int status;
21053  int exitstatus;
21054
21055  setvbuf (stdout, NULL, _IOFBF, 0);
21056  puts ("This should be seen only once.");
21057  if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
21058    {
21059      perror ("cannot create pipe");
21060      exit (1);
21061    }
21062  sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
21063  sigemptyset (&fatal_signal_set);
21064  sigaddset (&fatal_signal_set, SIGINT);
21065  sigaddset (&fatal_signal_set, SIGTERM);
21066  sigaddset (&fatal_signal_set, SIGHUP);
21067  sigaddset (&fatal_signal_set, SIGPIPE);
21068  sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
21069  actions_allocated = false;
21070  attrs_allocated = false;
21071  if ((err = posix_spawn_file_actions_init (&actions)) != 0
21072      || (actions_allocated = true,
21073          (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
21074          || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
21075          || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
21076          || (err = posix_spawnattr_init (&attrs)) != 0
21077          || (attrs_allocated = true,
21078              (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
21079              || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
21080          || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
21081    {
21082      if (actions_allocated)
21083        posix_spawn_file_actions_destroy (&actions);
21084      if (attrs_allocated)
21085        posix_spawnattr_destroy (&attrs);
21086      sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
21087      if (err == ENOENT)
21088        return 0;
21089      else
21090        {
21091          errno = err;
21092          perror ("subprocess failed");
21093          exit (1);
21094        }
21095    }
21096  posix_spawn_file_actions_destroy (&actions);
21097  posix_spawnattr_destroy (&attrs);
21098  sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
21099  close (ofd[0]);
21100  close (ofd[1]);
21101  status = 0;
21102  while (waitpid (child, &status, 0) != child)
21103    ;
21104  if (!WIFEXITED (status))
21105    {
21106      fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
21107      exit (1);
21108    }
21109  exitstatus = WEXITSTATUS (status);
21110  if (exitstatus != 127)
21111    {
21112      fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
21113      exit (1);
21114    }
21115  return 0;
21116}
21117
21118_ACEOF
21119if ac_fn_c_try_link "$LINENO"
21120then :
21121  if test -s conftest$ac_exeext \
21122             && ./conftest$ac_exeext > conftest.out \
21123             && echo 'This should be seen only once.' > conftest.ok \
21124             && cmp conftest.out conftest.ok >/dev/null 2>&1; then
21125            gl_cv_func_posix_spawn_works=yes
21126          else
21127            gl_cv_func_posix_spawn_works=no
21128          fi
21129else $as_nop
21130  gl_cv_func_posix_spawn_works=no
21131fi
21132rm -f core conftest.err conftest.$ac_objext conftest.beam \
21133    conftest$ac_exeext conftest.$ac_ext
21134       if test $gl_cv_func_posix_spawn_works = yes; then
21135         if test "$cross_compiling" = yes
21136then :
21137  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
21138printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
21139as_fn_error $? "cannot run test program while cross compiling
21140See \`config.log' for more details" "$LINENO" 5; }
21141else $as_nop
21142  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21143/* end confdefs.h.  */
21144
21145/* Test whether posix_spawn_file_actions_addopen supports filename arguments
21146   that contain special characters such as '*'.  */
21147
21148#include <errno.h>
21149#include <fcntl.h>
21150#include <signal.h>
21151#include <spawn.h>
21152#include <stdbool.h>
21153#include <stdio.h>
21154#include <string.h>
21155#include <unistd.h>
21156#include <sys/types.h>
21157#include <sys/wait.h>
21158
21159
21160$gl_mda_defines
21161
21162
21163extern char **environ;
21164
21165#ifndef STDIN_FILENO
21166# define STDIN_FILENO 0
21167#endif
21168#ifndef STDOUT_FILENO
21169# define STDOUT_FILENO 1
21170#endif
21171#ifndef STDERR_FILENO
21172# define STDERR_FILENO 2
21173#endif
21174
21175#ifndef WTERMSIG
21176# define WTERMSIG(x) ((x) & 0x7f)
21177#endif
21178#ifndef WIFEXITED
21179# define WIFEXITED(x) (WTERMSIG (x) == 0)
21180#endif
21181#ifndef WEXITSTATUS
21182# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
21183#endif
21184
21185#define CHILD_PROGRAM_FILENAME "conftest"
21186#define DATA_FILENAME "conftest%=*#?"
21187
21188static int
21189parent_main (void)
21190{
21191  FILE *fp;
21192  char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
21193  posix_spawn_file_actions_t actions;
21194  bool actions_allocated;
21195  int err;
21196  pid_t child;
21197  int status;
21198  int exitstatus;
21199
21200  /* Create a data file with specific contents.  */
21201  fp = fopen (DATA_FILENAME, "wb");
21202  if (fp == NULL)
21203    {
21204      perror ("cannot create data file");
21205      return 1;
21206    }
21207  fwrite ("Halle Potta", 1, 11, fp);
21208  if (fflush (fp) || fclose (fp))
21209    {
21210      perror ("cannot prepare data file");
21211      return 2;
21212    }
21213
21214  /* Avoid reading from our stdin, as it could block.  */
21215  freopen ("/dev/null", "rb", stdin);
21216
21217  /* Test whether posix_spawn_file_actions_addopen with this file name
21218     actually works, but spawning a child that reads from this file.  */
21219  actions_allocated = false;
21220  if ((err = posix_spawn_file_actions_init (&actions)) != 0
21221      || (actions_allocated = true,
21222          (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
21223          || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
21224    {
21225      if (actions_allocated)
21226        posix_spawn_file_actions_destroy (&actions);
21227      errno = err;
21228      perror ("subprocess failed");
21229      return 3;
21230    }
21231  posix_spawn_file_actions_destroy (&actions);
21232  status = 0;
21233  while (waitpid (child, &status, 0) != child)
21234    ;
21235  if (!WIFEXITED (status))
21236    {
21237      fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
21238      return 4;
21239    }
21240  exitstatus = WEXITSTATUS (status);
21241  if (exitstatus != 0)
21242    {
21243      fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
21244      return 5;
21245    }
21246  return 0;
21247}
21248
21249static int
21250child_main (void)
21251{
21252  char buf[1024];
21253
21254  /* See if reading from STDIN_FILENO yields the expected contents.  */
21255  if (fread (buf, 1, sizeof (buf), stdin) == 11
21256      && memcmp (buf, "Halle Potta", 11) == 0)
21257    return 0;
21258  else
21259    return 8;
21260}
21261
21262static void
21263cleanup_then_die (int sig)
21264{
21265  /* Clean up data file.  */
21266  unlink (DATA_FILENAME);
21267
21268  /* Re-raise the signal and die from it.  */
21269  signal (sig, SIG_DFL);
21270  raise (sig);
21271}
21272
21273int
21274main (int argc, char *argv[])
21275{
21276  int exitstatus;
21277
21278  if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
21279    {
21280      /* This is the parent process.  */
21281      signal (SIGINT, cleanup_then_die);
21282      signal (SIGTERM, cleanup_then_die);
21283      #ifdef SIGHUP
21284      signal (SIGHUP, cleanup_then_die);
21285      #endif
21286
21287      exitstatus = parent_main ();
21288    }
21289  else
21290    {
21291      /* This is the child process.  */
21292
21293      exitstatus = child_main ();
21294    }
21295  unlink (DATA_FILENAME);
21296  return exitstatus;
21297}
21298
21299_ACEOF
21300if ac_fn_c_try_run "$LINENO"
21301then :
21302
21303else $as_nop
21304  gl_cv_func_posix_spawn_works=no
21305fi
21306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21307  conftest.$ac_objext conftest.beam conftest.$ac_ext
21308fi
21309
21310       fi
21311     else
21312       case "$host_os" in
21313         aix*) gl_cv_func_posix_spawn_works="guessing no";;
21314         *)    gl_cv_func_posix_spawn_works="guessing yes";;
21315       esac
21316     fi
21317
21318fi
21319{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
21320printf "%s\n" "$gl_cv_func_posix_spawn_works" >&6; }
21321
21322      case "$gl_cv_func_posix_spawn_works" in
21323        *yes) ;;
21324        *) REPLACE_POSIX_SPAWN=1 ;;
21325      esac
21326    fi
21327    if test $REPLACE_POSIX_SPAWN = 0; then
21328
21329
21330         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn rejects scripts without shebang" >&5
21331printf %s "checking whether posix_spawn rejects scripts without shebang... " >&6; }
21332if test ${gl_cv_func_posix_spawn_secure_exec+y}
21333then :
21334  printf %s "(cached) " >&6
21335else $as_nop
21336  echo ':' > conftest.scr
21337     chmod a+x conftest.scr
21338     if test "$cross_compiling" = yes
21339then :
21340  case "$host_os" in
21341          # Guess no on GNU/Hurd.
21342          gnu*)
21343            gl_cv_func_posix_spawn_secure_exec="guessing no" ;;
21344          # Guess yes on all other platforms.
21345          *)
21346            gl_cv_func_posix_spawn_secure_exec="guessing yes" ;;
21347        esac
21348
21349else $as_nop
21350  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21351/* end confdefs.h.  */
21352
21353       #include <errno.h>
21354       #include <spawn.h>
21355       #include <stddef.h>
21356       #include <sys/types.h>
21357       #include <sys/wait.h>
21358       int
21359       main ()
21360       {
21361         const char *prog_path = "./conftest.scr";
21362         const char *prog_argv[2] = { prog_path, NULL };
21363         const char *environment[2] = { "PATH=.", NULL };
21364         pid_t child;
21365         int status;
21366         int err = posix_spawn (&child, prog_path, NULL, NULL,
21367                                (char **) prog_argv, (char **) environment);
21368         if (err == ENOEXEC)
21369           return 0;
21370         if (err != 0)
21371           return 1;
21372         status = 0;
21373         while (waitpid (child, &status, 0) != child)
21374           ;
21375         if (!WIFEXITED (status))
21376           return 2;
21377         if (WEXITSTATUS (status) != 127)
21378           return 3;
21379         return 0;
21380       }
21381
21382_ACEOF
21383if ac_fn_c_try_run "$LINENO"
21384then :
21385  gl_cv_func_posix_spawn_secure_exec=yes
21386else $as_nop
21387  gl_cv_func_posix_spawn_secure_exec=no
21388fi
21389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21390  conftest.$ac_objext conftest.beam conftest.$ac_ext
21391fi
21392
21393     rm -f conftest.scr
21394
21395fi
21396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_secure_exec" >&5
21397printf "%s\n" "$gl_cv_func_posix_spawn_secure_exec" >&6; }
21398  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnp rejects scripts without shebang" >&5
21399printf %s "checking whether posix_spawnp rejects scripts without shebang... " >&6; }
21400if test ${gl_cv_func_posix_spawnp_secure_exec+y}
21401then :
21402  printf %s "(cached) " >&6
21403else $as_nop
21404  echo ':' > conftest.scr
21405     chmod a+x conftest.scr
21406     if test "$cross_compiling" = yes
21407then :
21408  case "$host_os" in
21409          # Guess yes on glibc systems (glibc >= 2.15 actually) except GNU/Hurd,
21410          # musl libc, NetBSD.
21411          *-gnu* | *-musl* | netbsd*)
21412            gl_cv_func_posix_spawnp_secure_exec="guessing yes" ;;
21413          # Guess no on GNU/Hurd, macOS, FreeBSD, OpenBSD, AIX, Solaris, Cygwin.
21414          gnu* | darwin* | freebsd* | dragonfly* | openbsd* | aix* | solaris* | cygwin*)
21415            gl_cv_func_posix_spawnp_secure_exec="guessing no" ;;
21416          # If we don't know, obey --enable-cross-guesses.
21417          *)
21418            gl_cv_func_posix_spawnp_secure_exec="$gl_cross_guess_normal" ;;
21419        esac
21420
21421else $as_nop
21422  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21423/* end confdefs.h.  */
21424
21425       #include <errno.h>
21426       #include <spawn.h>
21427       #include <stddef.h>
21428       #include <sys/types.h>
21429       #include <sys/wait.h>
21430       int
21431       main ()
21432       {
21433         const char *prog_path = "./conftest.scr";
21434         const char *prog_argv[2] = { prog_path, NULL };
21435         const char *environment[2] = { "PATH=.", NULL };
21436         pid_t child;
21437         int status;
21438         int err = posix_spawnp (&child, prog_path, NULL, NULL,
21439                                 (char **) prog_argv, (char **) environment);
21440         if (err == ENOEXEC)
21441           return 0;
21442         if (err != 0)
21443           return 1;
21444         status = 0;
21445         while (waitpid (child, &status, 0) != child)
21446           ;
21447         if (!WIFEXITED (status))
21448           return 2;
21449         if (WEXITSTATUS (status) != 127)
21450           return 3;
21451         return 0;
21452       }
21453
21454_ACEOF
21455if ac_fn_c_try_run "$LINENO"
21456then :
21457  gl_cv_func_posix_spawnp_secure_exec=yes
21458else $as_nop
21459  gl_cv_func_posix_spawnp_secure_exec=no
21460fi
21461rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21462  conftest.$ac_objext conftest.beam conftest.$ac_ext
21463fi
21464
21465     rm -f conftest.scr
21466
21467fi
21468{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawnp_secure_exec" >&5
21469printf "%s\n" "$gl_cv_func_posix_spawnp_secure_exec" >&6; }
21470
21471      case "$gl_cv_func_posix_spawn_secure_exec" in
21472        *yes) ;;
21473        *) REPLACE_POSIX_SPAWN=1 ;;
21474      esac
21475      case "$gl_cv_func_posix_spawnp_secure_exec" in
21476        *yes) ;;
21477        *) REPLACE_POSIX_SPAWN=1 ;;
21478      esac
21479    fi
21480    if test $REPLACE_POSIX_SPAWN = 0; then
21481                              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5
21482printf %s "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; }
21483if test ${gl_cv_func_spawnattr_setschedpolicy+y}
21484then :
21485  printf %s "(cached) " >&6
21486else $as_nop
21487  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21488/* end confdefs.h.  */
21489
21490#include <spawn.h>
21491#if POSIX_SPAWN_SETSCHEDULER
21492 POSIX scheduling supported
21493#endif
21494
21495_ACEOF
21496if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21497  $EGREP "POSIX scheduling supported" >/dev/null 2>&1
21498then :
21499  gl_cv_func_spawnattr_setschedpolicy=yes
21500else $as_nop
21501  gl_cv_func_spawnattr_setschedpolicy=no
21502fi
21503rm -rf conftest*
21504
21505
21506fi
21507{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedpolicy" >&5
21508printf "%s\n" "$gl_cv_func_spawnattr_setschedpolicy" >&6; }
21509                              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5
21510printf %s "checking whether posix_spawnattr_setschedparam is supported... " >&6; }
21511if test ${gl_cv_func_spawnattr_setschedparam+y}
21512then :
21513  printf %s "(cached) " >&6
21514else $as_nop
21515  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21516/* end confdefs.h.  */
21517
21518#include <spawn.h>
21519#if POSIX_SPAWN_SETSCHEDPARAM
21520 POSIX scheduling supported
21521#endif
21522
21523_ACEOF
21524if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21525  $EGREP "POSIX scheduling supported" >/dev/null 2>&1
21526then :
21527  gl_cv_func_spawnattr_setschedparam=yes
21528else $as_nop
21529  gl_cv_func_spawnattr_setschedparam=no
21530fi
21531rm -rf conftest*
21532
21533
21534fi
21535{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5
21536printf "%s\n" "$gl_cv_func_spawnattr_setschedparam" >&6; }
21537    fi
21538  fi
21539  if test $ac_cv_func_posix_spawn != yes || test $REPLACE_POSIX_SPAWN = 1; then
21540
21541printf "%s\n" "#define REPLACE_POSIX_SPAWN 1" >>confdefs.h
21542
21543  fi
21544
21545
21546
21547  GNULIB_PTHREAD_SIGMASK=0;
21548  GNULIB_RAISE=0;
21549  GNULIB_SIGNAL_H_SIGPIPE=0;
21550  GNULIB_SIGPROCMASK=0;
21551  GNULIB_SIGACTION=0;
21552    HAVE_POSIX_SIGNALBLOCKING=1;
21553  HAVE_PTHREAD_SIGMASK=1;
21554  HAVE_RAISE=1;
21555  HAVE_SIGSET_T=1;
21556  HAVE_SIGINFO_T=1;
21557  HAVE_SIGACTION=1;
21558  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
21559
21560  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
21561
21562  HAVE_SIGHANDLER_T=1;
21563  REPLACE_PTHREAD_SIGMASK=0;
21564  REPLACE_RAISE=0;
21565
21566
21567
21568
21569
21570  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
21571      #include <signal.h>
21572      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
21573      #include <sys/types.h>
21574
21575"
21576if test "x$ac_cv_type_sigset_t" = xyes
21577then :
21578
21579printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h
21580
21581gl_cv_type_sigset_t=yes
21582else $as_nop
21583  gl_cv_type_sigset_t=no
21584fi
21585
21586  if test $gl_cv_type_sigset_t != yes; then
21587    HAVE_SIGSET_T=0
21588  fi
21589
21590
21591
21592
21593
21594  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
21595printf %s "checking for ssize_t... " >&6; }
21596if test ${gt_cv_ssize_t+y}
21597then :
21598  printf %s "(cached) " >&6
21599else $as_nop
21600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21601/* end confdefs.h.  */
21602#include <sys/types.h>
21603int
21604main (void)
21605{
21606int x = sizeof (ssize_t *) + sizeof (ssize_t);
21607            return !x;
21608  ;
21609  return 0;
21610}
21611_ACEOF
21612if ac_fn_c_try_compile "$LINENO"
21613then :
21614  gt_cv_ssize_t=yes
21615else $as_nop
21616  gt_cv_ssize_t=no
21617fi
21618rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21619fi
21620{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
21621printf "%s\n" "$gt_cv_ssize_t" >&6; }
21622  if test $gt_cv_ssize_t = no; then
21623
21624printf "%s\n" "#define ssize_t int" >>confdefs.h
21625
21626  fi
21627
21628
21629  GNULIB_SCHED_YIELD=0;
21630    HAVE_SCHED_YIELD=1;
21631  REPLACE_SCHED_YIELD=0;
21632
21633
21634
21635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
21636printf %s "checking for uid_t in sys/types.h... " >&6; }
21637if test ${ac_cv_type_uid_t+y}
21638then :
21639  printf %s "(cached) " >&6
21640else $as_nop
21641  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21642/* end confdefs.h.  */
21643#include <sys/types.h>
21644
21645_ACEOF
21646if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21647  $EGREP "uid_t" >/dev/null 2>&1
21648then :
21649  ac_cv_type_uid_t=yes
21650else $as_nop
21651  ac_cv_type_uid_t=no
21652fi
21653rm -rf conftest*
21654
21655fi
21656{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
21657printf "%s\n" "$ac_cv_type_uid_t" >&6; }
21658if test $ac_cv_type_uid_t = no; then
21659
21660printf "%s\n" "#define uid_t int" >>confdefs.h
21661
21662
21663printf "%s\n" "#define gid_t int" >>confdefs.h
21664
21665fi
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
21677printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
21678if test ${gl_cv_func_snprintf_retval_c99+y}
21679then :
21680  printf %s "(cached) " >&6
21681else $as_nop
21682
21683      if test "$cross_compiling" = yes
21684then :
21685  case "$host_os" in
21686                                 # Guess yes on glibc systems.
21687           *-gnu* | gnu*)        gl_cv_func_snprintf_retval_c99="guessing yes";;
21688                                 # Guess yes on musl systems.
21689           *-musl*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
21690                                 # Guess yes on FreeBSD >= 5.
21691           freebsd[1-4].*)       gl_cv_func_snprintf_retval_c99="guessing no";;
21692           freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
21693                                 # Guess yes on Mac OS X >= 10.3.
21694           darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
21695           darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
21696                                 # Guess yes on OpenBSD >= 3.9.
21697           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
21698                                 gl_cv_func_snprintf_retval_c99="guessing no";;
21699           openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
21700                                 # Guess yes on Solaris >= 2.10.
21701           solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
21702           solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
21703                                 # Guess yes on AIX >= 4.
21704           aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
21705           aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
21706                                 # Guess yes on NetBSD >= 3.
21707           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
21708                                 gl_cv_func_snprintf_retval_c99="guessing no";;
21709           netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
21710                                 # Guess yes on BeOS.
21711           beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
21712                                 # Guess yes on Android.
21713           linux*-android*)      gl_cv_func_snprintf_retval_c99="guessing yes";;
21714                                 # Guess yes on MSVC, no on mingw.
21715           mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21716/* end confdefs.h.  */
21717
21718#ifdef _MSC_VER
21719 Known
21720#endif
21721
21722_ACEOF
21723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21724  $EGREP "Known" >/dev/null 2>&1
21725then :
21726  gl_cv_func_snprintf_retval_c99="guessing yes"
21727else $as_nop
21728  gl_cv_func_snprintf_retval_c99="guessing no"
21729fi
21730rm -rf conftest*
21731
21732                                 ;;
21733                                 # If we don't know, obey --enable-cross-guesses.
21734           *)                    gl_cv_func_snprintf_retval_c99="$gl_cross_guess_normal";;
21735         esac
21736
21737else $as_nop
21738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21739/* end confdefs.h.  */
21740
21741#include <stdio.h>
21742#include <string.h>
21743#if HAVE_SNPRINTF
21744# define my_snprintf snprintf
21745#else
21746# include <stdarg.h>
21747static int my_snprintf (char *buf, int size, const char *format, ...)
21748{
21749  va_list args;
21750  int ret;
21751  va_start (args, format);
21752  ret = vsnprintf (buf, size, format, args);
21753  va_end (args);
21754  return ret;
21755}
21756#endif
21757static char buf[100];
21758int main ()
21759{
21760  strcpy (buf, "ABCDEF");
21761  if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
21762    return 1;
21763  if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
21764    return 2;
21765  if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
21766    return 3;
21767  return 0;
21768}
21769_ACEOF
21770if ac_fn_c_try_run "$LINENO"
21771then :
21772  gl_cv_func_snprintf_retval_c99=yes
21773else $as_nop
21774  gl_cv_func_snprintf_retval_c99=no
21775fi
21776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21777  conftest.$ac_objext conftest.beam conftest.$ac_ext
21778fi
21779
21780
21781fi
21782{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
21783printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
21784
21785ac_fn_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21786if test "x$ac_cv_have_decl_snprintf" = xyes
21787then :
21788  ac_have_decl=1
21789else $as_nop
21790  ac_have_decl=0
21791fi
21792printf "%s\n" "#define HAVE_DECL_SNPRINTF $ac_have_decl" >>confdefs.h
21793
21794
21795{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
21796printf %s "checking for stdbool.h that conforms to C99... " >&6; }
21797if test ${ac_cv_header_stdbool_h+y}
21798then :
21799  printf %s "(cached) " >&6
21800else $as_nop
21801  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21802/* end confdefs.h.  */
21803
21804             #include <stdbool.h>
21805
21806             #ifdef __cplusplus
21807              typedef bool Bool;
21808             #else
21809              typedef _Bool Bool;
21810              #ifndef bool
21811               "error: bool is not defined"
21812              #endif
21813              #ifndef false
21814               "error: false is not defined"
21815              #endif
21816              #if false
21817               "error: false is not 0"
21818              #endif
21819              #ifndef true
21820               "error: true is not defined"
21821              #endif
21822              #if true != 1
21823               "error: true is not 1"
21824              #endif
21825             #endif
21826
21827             #ifndef __bool_true_false_are_defined
21828              "error: __bool_true_false_are_defined is not defined"
21829             #endif
21830
21831             struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
21832
21833             char a[true == 1 ? 1 : -1];
21834             char b[false == 0 ? 1 : -1];
21835             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
21836             char d[(bool) 0.5 == true ? 1 : -1];
21837             /* See body of main program for 'e'.  */
21838             char f[(Bool) 0.0 == false ? 1 : -1];
21839             char g[true];
21840             char h[sizeof (Bool)];
21841             char i[sizeof s.t];
21842             enum { j = false, k = true, l = false * true, m = true * 256 };
21843             /* The following fails for
21844                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
21845             Bool n[m];
21846             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
21847             char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
21848             /* Catch a bug in an HP-UX C compiler.  See
21849                https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
21850                https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
21851              */
21852             Bool q = true;
21853             Bool *pq = &q;
21854             bool *qq = &q;
21855
21856int
21857main (void)
21858{
21859
21860             bool e = &s;
21861             *pq |= q; *pq |= ! q;
21862             *qq |= q; *qq |= ! q;
21863             /* Refer to every declared value, to avoid compiler optimizations.  */
21864             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
21865                     + !m + !n + !o + !p + !q + !pq + !qq);
21866
21867  ;
21868  return 0;
21869}
21870_ACEOF
21871if ac_fn_c_try_compile "$LINENO"
21872then :
21873  ac_cv_header_stdbool_h=yes
21874else $as_nop
21875  ac_cv_header_stdbool_h=no
21876fi
21877rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21878fi
21879{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
21880printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
21881   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
21882if test "x$ac_cv_type__Bool" = xyes
21883then :
21884
21885printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
21886
21887
21888fi
21889
21890
21891ac_fn_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21892if test "x$ac_cv_have_decl_fcloseall" = xyes
21893then :
21894  ac_have_decl=1
21895else $as_nop
21896  ac_have_decl=0
21897fi
21898printf "%s\n" "#define HAVE_DECL_FCLOSEALL $ac_have_decl" >>confdefs.h
21899
21900ac_fn_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21901if test "x$ac_cv_have_decl_ecvt" = xyes
21902then :
21903  ac_have_decl=1
21904else $as_nop
21905  ac_have_decl=0
21906fi
21907printf "%s\n" "#define HAVE_DECL_ECVT $ac_have_decl" >>confdefs.h
21908
21909ac_fn_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21910if test "x$ac_cv_have_decl_fcvt" = xyes
21911then :
21912  ac_have_decl=1
21913else $as_nop
21914  ac_have_decl=0
21915fi
21916printf "%s\n" "#define HAVE_DECL_FCVT $ac_have_decl" >>confdefs.h
21917
21918ac_fn_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21919if test "x$ac_cv_have_decl_gcvt" = xyes
21920then :
21921  ac_have_decl=1
21922else $as_nop
21923  ac_have_decl=0
21924fi
21925printf "%s\n" "#define HAVE_DECL_GCVT $ac_have_decl" >>confdefs.h
21926
21927
21928  GNULIB_FFS=0;
21929    HAVE_FFS=1;
21930  HAVE_STRCASECMP=1;
21931  HAVE_DECL_STRNCASECMP=1;
21932
21933ac_fn_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
21934if test "x$ac_cv_have_decl_strdup" = xyes
21935then :
21936  ac_have_decl=1
21937else $as_nop
21938  ac_have_decl=0
21939fi
21940printf "%s\n" "#define HAVE_DECL_STRDUP $ac_have_decl" >>confdefs.h
21941
21942
21943     REPLACE_STRERROR_0=0
21944  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
21945printf %s "checking whether strerror(0) succeeds... " >&6; }
21946if test ${gl_cv_func_strerror_0_works+y}
21947then :
21948  printf %s "(cached) " >&6
21949else $as_nop
21950  if test "$cross_compiling" = yes
21951then :
21952  case "$host_os" in
21953                        # Guess yes on glibc systems.
21954         *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
21955                        # Guess yes on musl systems.
21956         *-musl*)       gl_cv_func_strerror_0_works="guessing yes" ;;
21957                        # Guess yes on native Windows.
21958         mingw*)        gl_cv_func_strerror_0_works="guessing yes" ;;
21959                        # If we don't know, obey --enable-cross-guesses.
21960         *)             gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
21961       esac
21962
21963else $as_nop
21964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21965/* end confdefs.h.  */
21966#include <string.h>
21967           #include <errno.h>
21968
21969int
21970main (void)
21971{
21972int result = 0;
21973           char *str;
21974           errno = 0;
21975           str = strerror (0);
21976           if (!*str) result |= 1;
21977           if (errno) result |= 2;
21978           if (strstr (str, "nknown") || strstr (str, "ndefined"))
21979             result |= 4;
21980           return result;
21981  ;
21982  return 0;
21983}
21984_ACEOF
21985if ac_fn_c_try_run "$LINENO"
21986then :
21987  gl_cv_func_strerror_0_works=yes
21988else $as_nop
21989  gl_cv_func_strerror_0_works=no
21990fi
21991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21992  conftest.$ac_objext conftest.beam conftest.$ac_ext
21993fi
21994
21995
21996fi
21997{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
21998printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
21999  case "$gl_cv_func_strerror_0_works" in
22000    *yes) ;;
22001    *)
22002      REPLACE_STRERROR_0=1
22003
22004printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
22005
22006      ;;
22007  esac
22008
22009
22010
22011
22012
22013
22014
22015
22016  if test $ac_cv_func_strerror_r = yes; then
22017    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
22018                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
22019printf %s "checking for strerror_r with POSIX signature... " >&6; }
22020if test ${gl_cv_func_strerror_r_posix_signature+y}
22021then :
22022  printf %s "(cached) " >&6
22023else $as_nop
22024  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22025/* end confdefs.h.  */
22026#include <string.h>
22027                int strerror_r (int, char *, size_t);
22028
22029int
22030main (void)
22031{
22032
22033  ;
22034  return 0;
22035}
22036_ACEOF
22037if ac_fn_c_try_compile "$LINENO"
22038then :
22039  gl_cv_func_strerror_r_posix_signature=yes
22040else $as_nop
22041  gl_cv_func_strerror_r_posix_signature=no
22042fi
22043rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22044
22045fi
22046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
22047printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
22048      if test $gl_cv_func_strerror_r_posix_signature = yes; then
22049                                                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
22050printf %s "checking whether strerror_r works... " >&6; }
22051if test ${gl_cv_func_strerror_r_works+y}
22052then :
22053  printf %s "(cached) " >&6
22054else $as_nop
22055  if test "$cross_compiling" = yes
22056then :
22057
22058              case "$host_os" in
22059                       # Guess no on AIX.
22060                aix*)  gl_cv_func_strerror_r_works="guessing no";;
22061                       # Guess no on HP-UX.
22062                hpux*) gl_cv_func_strerror_r_works="guessing no";;
22063                       # Guess no on BSD variants.
22064                *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
22065                       # Guess yes otherwise.
22066                *)     gl_cv_func_strerror_r_works="guessing yes";;
22067              esac
22068
22069else $as_nop
22070  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22071/* end confdefs.h.  */
22072#include <errno.h>
22073                  #include <string.h>
22074
22075int
22076main (void)
22077{
22078int result = 0;
22079                  char buf[79];
22080                  if (strerror_r (EACCES, buf, 0) < 0)
22081                    result |= 1;
22082                  errno = 0;
22083                  if (strerror_r (EACCES, buf, sizeof buf) != 0)
22084                    result |= 2;
22085                  strcpy (buf, "Unknown");
22086                  if (strerror_r (0, buf, sizeof buf) != 0)
22087                    result |= 4;
22088                  if (errno)
22089                    result |= 8;
22090                  if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
22091                    result |= 0x10;
22092                  errno = 0;
22093                  *buf = 0;
22094                  if (strerror_r (-3, buf, sizeof buf) < 0)
22095                    result |= 0x20;
22096                  if (errno)
22097                    result |= 0x40;
22098                  if (!*buf)
22099                    result |= 0x80;
22100                  return result;
22101
22102  ;
22103  return 0;
22104}
22105_ACEOF
22106if ac_fn_c_try_run "$LINENO"
22107then :
22108  gl_cv_func_strerror_r_works=yes
22109else $as_nop
22110  gl_cv_func_strerror_r_works=no
22111fi
22112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22113  conftest.$ac_objext conftest.beam conftest.$ac_ext
22114fi
22115
22116
22117fi
22118{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
22119printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
22120      else
22121
22122                        if test $ac_cv_func___xpg_strerror_r = yes; then
22123          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
22124printf %s "checking whether __xpg_strerror_r works... " >&6; }
22125if test ${gl_cv_func_strerror_r_works+y}
22126then :
22127  printf %s "(cached) " >&6
22128else $as_nop
22129  if test "$cross_compiling" = yes
22130then :
22131                                  gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
22132
22133else $as_nop
22134  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22135/* end confdefs.h.  */
22136#include <errno.h>
22137                    #include <string.h>
22138                    extern
22139                    #ifdef __cplusplus
22140                    "C"
22141                    #endif
22142                    int __xpg_strerror_r(int, char *, size_t);
22143
22144int
22145main (void)
22146{
22147int result = 0;
22148                    char buf[256] = "^";
22149                    char copy[256];
22150                    char *str = strerror (-1);
22151                    strcpy (copy, str);
22152                    if (__xpg_strerror_r (-2, buf, 1) == 0)
22153                      result |= 1;
22154                    if (*buf)
22155                      result |= 2;
22156                    __xpg_strerror_r (-2, buf, 256);
22157                    if (strcmp (str, copy))
22158                      result |= 4;
22159                    return result;
22160
22161  ;
22162  return 0;
22163}
22164_ACEOF
22165if ac_fn_c_try_run "$LINENO"
22166then :
22167  gl_cv_func_strerror_r_works=yes
22168else $as_nop
22169  gl_cv_func_strerror_r_works=no
22170fi
22171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22172  conftest.$ac_objext conftest.beam conftest.$ac_ext
22173fi
22174
22175
22176fi
22177{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
22178printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
22179        fi
22180      fi
22181    fi
22182  fi
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194     if test $gl_cv_have_include_next = yes; then
22195       gl_cv_next_string_h='<'string.h'>'
22196     else
22197       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
22198printf %s "checking absolute name of <string.h>... " >&6; }
22199if test ${gl_cv_next_string_h+y}
22200then :
22201  printf %s "(cached) " >&6
22202else $as_nop
22203
22204
22205
22206  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22207/* end confdefs.h.  */
22208#include <string.h>
22209_ACEOF
22210                case "$host_os" in
22211    aix*) gl_absname_cpp="$ac_cpp -C" ;;
22212    *)    gl_absname_cpp="$ac_cpp" ;;
22213  esac
22214
22215  case "$host_os" in
22216    mingw*)
22217                                          gl_dirsep_regex='[/\\]'
22218      ;;
22219    *)
22220      gl_dirsep_regex='\/'
22221      ;;
22222  esac
22223      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22224  gl_header_literal_regex=`echo 'string.h' \
22225                           | sed -e "$gl_make_literal_regex_sed"`
22226  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22227      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22228      s|^/[^/]|//&|
22229      p
22230      q
22231    }'
22232
22233        gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22234  sed -n "$gl_absolute_header_sed"`
22235
22236           gl_header=$gl_cv_absolute_string_h
22237           gl_cv_next_string_h='"'$gl_header'"'
22238
22239
22240fi
22241{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
22242printf "%s\n" "$gl_cv_next_string_h" >&6; }
22243     fi
22244     NEXT_STRING_H=$gl_cv_next_string_h
22245
22246     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22247       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22248       gl_next_as_first_directive='<'string.h'>'
22249     else
22250       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22251       gl_next_as_first_directive=$gl_cv_next_string_h
22252     fi
22253     NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277     if test $gl_cv_have_include_next = yes; then
22278       gl_cv_next_strings_h='<'strings.h'>'
22279     else
22280       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
22281printf %s "checking absolute name of <strings.h>... " >&6; }
22282if test ${gl_cv_next_strings_h+y}
22283then :
22284  printf %s "(cached) " >&6
22285else $as_nop
22286
22287             if test $ac_cv_header_strings_h = yes; then
22288
22289
22290
22291
22292  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22293/* end confdefs.h.  */
22294#include <strings.h>
22295_ACEOF
22296                case "$host_os" in
22297    aix*) gl_absname_cpp="$ac_cpp -C" ;;
22298    *)    gl_absname_cpp="$ac_cpp" ;;
22299  esac
22300
22301  case "$host_os" in
22302    mingw*)
22303                                          gl_dirsep_regex='[/\\]'
22304      ;;
22305    *)
22306      gl_dirsep_regex='\/'
22307      ;;
22308  esac
22309      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22310  gl_header_literal_regex=`echo 'strings.h' \
22311                           | sed -e "$gl_make_literal_regex_sed"`
22312  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22313      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22314      s|^/[^/]|//&|
22315      p
22316      q
22317    }'
22318
22319        gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22320  sed -n "$gl_absolute_header_sed"`
22321
22322           gl_header=$gl_cv_absolute_strings_h
22323           gl_cv_next_strings_h='"'$gl_header'"'
22324          else
22325               gl_cv_next_strings_h='<'strings.h'>'
22326             fi
22327
22328
22329fi
22330{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
22331printf "%s\n" "$gl_cv_next_strings_h" >&6; }
22332     fi
22333     NEXT_STRINGS_H=$gl_cv_next_strings_h
22334
22335     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22336       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22337       gl_next_as_first_directive='<'strings.h'>'
22338     else
22339       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22340       gl_next_as_first_directive=$gl_cv_next_strings_h
22341     fi
22342     NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
22343
22344
22345
22346
22347  if test $ac_cv_header_strings_h = yes; then
22348    HAVE_STRINGS_H=1
22349  else
22350    HAVE_STRINGS_H=0
22351  fi
22352
22353
22354
22355
22356
22357
22358ac_fn_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22359if test "x$ac_cv_have_decl_strndup" = xyes
22360then :
22361  ac_have_decl=1
22362else $as_nop
22363  ac_have_decl=0
22364fi
22365printf "%s\n" "#define HAVE_DECL_STRNDUP $ac_have_decl" >>confdefs.h
22366
22367
22368ac_fn_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22369if test "x$ac_cv_have_decl_strnlen" = xyes
22370then :
22371  ac_have_decl=1
22372else $as_nop
22373  ac_have_decl=0
22374fi
22375printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h
22376
22377
22378
22379
22380  if test $REPLACE_MEMCHR = 1; then
22381    REPLACE_STRSTR=1
22382  else
22383            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
22384printf %s "checking whether strstr works... " >&6; }
22385if test ${gl_cv_func_strstr_works_always+y}
22386then :
22387  printf %s "(cached) " >&6
22388else $as_nop
22389  if test "$cross_compiling" = yes
22390then :
22391                                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22392/* end confdefs.h.  */
22393
22394#ifdef __GNU_LIBRARY__
22395 #include <features.h>
22396 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
22397     || defined __UCLIBC__
22398  Lucky user
22399 #endif
22400#elif defined __CYGWIN__
22401 #include <cygwin/version.h>
22402 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
22403  Lucky user
22404 #endif
22405#else
22406  Lucky user
22407#endif
22408
22409_ACEOF
22410if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22411  $EGREP "Lucky user" >/dev/null 2>&1
22412then :
22413  gl_cv_func_strstr_works_always="guessing yes"
22414else $as_nop
22415  gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
22416fi
22417rm -rf conftest*
22418
22419
22420else $as_nop
22421  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22422/* end confdefs.h.  */
22423
22424#include <string.h> /* for strstr */
22425#ifdef __GNU_LIBRARY__
22426 #include <features.h>
22427 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
22428  Unlucky user
22429 #endif
22430#endif
22431#define P "_EF_BF_BD"
22432#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
22433#define NEEDLE P P P P P
22434
22435int
22436main (void)
22437{
22438return !!strstr (HAYSTACK, NEEDLE);
22439
22440  ;
22441  return 0;
22442}
22443_ACEOF
22444if ac_fn_c_try_run "$LINENO"
22445then :
22446  gl_cv_func_strstr_works_always=yes
22447else $as_nop
22448  gl_cv_func_strstr_works_always=no
22449fi
22450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22451  conftest.$ac_objext conftest.beam conftest.$ac_ext
22452fi
22453
22454
22455fi
22456{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
22457printf "%s\n" "$gl_cv_func_strstr_works_always" >&6; }
22458    case "$gl_cv_func_strstr_works_always" in
22459      *yes) ;;
22460      *)
22461        REPLACE_STRSTR=1
22462        ;;
22463    esac
22464  fi
22465
22466
22467
22468
22469
22470
22471
22472  GNULIB_WAITPID=0;
22473
22474
22475
22476
22477  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
22478printf %s "checking for struct timespec in <time.h>... " >&6; }
22479if test ${gl_cv_sys_struct_timespec_in_time_h+y}
22480then :
22481  printf %s "(cached) " >&6
22482else $as_nop
22483  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22484/* end confdefs.h.  */
22485#include <time.h>
22486
22487int
22488main (void)
22489{
22490static struct timespec x; x.tv_sec = x.tv_nsec;
22491  ;
22492  return 0;
22493}
22494_ACEOF
22495if ac_fn_c_try_compile "$LINENO"
22496then :
22497  gl_cv_sys_struct_timespec_in_time_h=yes
22498else $as_nop
22499  gl_cv_sys_struct_timespec_in_time_h=no
22500fi
22501rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22502fi
22503{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
22504printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
22505
22506  TIME_H_DEFINES_STRUCT_TIMESPEC=0
22507  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
22508  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
22509  UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
22510  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
22511    TIME_H_DEFINES_STRUCT_TIMESPEC=1
22512  else
22513    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
22514printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
22515if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
22516then :
22517  printf %s "(cached) " >&6
22518else $as_nop
22519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22520/* end confdefs.h.  */
22521#include <sys/time.h>
22522
22523int
22524main (void)
22525{
22526static struct timespec x; x.tv_sec = x.tv_nsec;
22527  ;
22528  return 0;
22529}
22530_ACEOF
22531if ac_fn_c_try_compile "$LINENO"
22532then :
22533  gl_cv_sys_struct_timespec_in_sys_time_h=yes
22534else $as_nop
22535  gl_cv_sys_struct_timespec_in_sys_time_h=no
22536fi
22537rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22538fi
22539{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
22540printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
22541    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
22542      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
22543    else
22544      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
22545printf %s "checking for struct timespec in <pthread.h>... " >&6; }
22546if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
22547then :
22548  printf %s "(cached) " >&6
22549else $as_nop
22550  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22551/* end confdefs.h.  */
22552#include <pthread.h>
22553
22554int
22555main (void)
22556{
22557static struct timespec x; x.tv_sec = x.tv_nsec;
22558  ;
22559  return 0;
22560}
22561_ACEOF
22562if ac_fn_c_try_compile "$LINENO"
22563then :
22564  gl_cv_sys_struct_timespec_in_pthread_h=yes
22565else $as_nop
22566  gl_cv_sys_struct_timespec_in_pthread_h=no
22567fi
22568rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22569fi
22570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
22571printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
22572      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
22573        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
22574      else
22575        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
22576printf %s "checking for struct timespec in <unistd.h>... " >&6; }
22577if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
22578then :
22579  printf %s "(cached) " >&6
22580else $as_nop
22581  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22582/* end confdefs.h.  */
22583#include <unistd.h>
22584
22585int
22586main (void)
22587{
22588static struct timespec x; x.tv_sec = x.tv_nsec;
22589  ;
22590  return 0;
22591}
22592_ACEOF
22593if ac_fn_c_try_compile "$LINENO"
22594then :
22595  gl_cv_sys_struct_timespec_in_unistd_h=yes
22596else $as_nop
22597  gl_cv_sys_struct_timespec_in_unistd_h=no
22598fi
22599rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22600fi
22601{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
22602printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
22603        if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
22604          UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
22605        fi
22606      fi
22607    fi
22608  fi
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622
22623
22624
22625     if test $gl_cv_have_include_next = yes; then
22626       gl_cv_next_time_h='<'time.h'>'
22627     else
22628       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
22629printf %s "checking absolute name of <time.h>... " >&6; }
22630if test ${gl_cv_next_time_h+y}
22631then :
22632  printf %s "(cached) " >&6
22633else $as_nop
22634
22635
22636
22637  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22638/* end confdefs.h.  */
22639#include <time.h>
22640_ACEOF
22641                case "$host_os" in
22642    aix*) gl_absname_cpp="$ac_cpp -C" ;;
22643    *)    gl_absname_cpp="$ac_cpp" ;;
22644  esac
22645
22646  case "$host_os" in
22647    mingw*)
22648                                          gl_dirsep_regex='[/\\]'
22649      ;;
22650    *)
22651      gl_dirsep_regex='\/'
22652      ;;
22653  esac
22654      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22655  gl_header_literal_regex=`echo 'time.h' \
22656                           | sed -e "$gl_make_literal_regex_sed"`
22657  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22658      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22659      s|^/[^/]|//&|
22660      p
22661      q
22662    }'
22663
22664        gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22665  sed -n "$gl_absolute_header_sed"`
22666
22667           gl_header=$gl_cv_absolute_time_h
22668           gl_cv_next_time_h='"'$gl_header'"'
22669
22670
22671fi
22672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
22673printf "%s\n" "$gl_cv_next_time_h" >&6; }
22674     fi
22675     NEXT_TIME_H=$gl_cv_next_time_h
22676
22677     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22678       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22679       gl_next_as_first_directive='<'time.h'>'
22680     else
22681       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22682       gl_next_as_first_directive=$gl_cv_next_time_h
22683     fi
22684     NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
22685
22686
22687
22688
22689
22690
22691
22692
22693  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
22694printf %s "checking for TIME_UTC in <time.h>... " >&6; }
22695if test ${gl_cv_time_h_has_TIME_UTC+y}
22696then :
22697  printf %s "(cached) " >&6
22698else $as_nop
22699  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22700/* end confdefs.h.  */
22701#include <time.h>
22702
22703int
22704main (void)
22705{
22706static int x = TIME_UTC; x++;
22707  ;
22708  return 0;
22709}
22710_ACEOF
22711if ac_fn_c_try_compile "$LINENO"
22712then :
22713  gl_cv_time_h_has_TIME_UTC=yes
22714else $as_nop
22715  gl_cv_time_h_has_TIME_UTC=no
22716fi
22717rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22718fi
22719{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
22720printf "%s\n" "$gl_cv_time_h_has_TIME_UTC" >&6; }
22721  if test $gl_cv_time_h_has_TIME_UTC = yes; then
22722    TIME_H_DEFINES_TIME_UTC=1
22723  else
22724    TIME_H_DEFINES_TIME_UTC=0
22725  fi
22726
22727
22728
22729ac_fn_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
22730if test "x$ac_cv_have_decl_execvpe" = xyes
22731then :
22732  ac_have_decl=1
22733else $as_nop
22734  ac_have_decl=0
22735fi
22736printf "%s\n" "#define HAVE_DECL_EXECVPE $ac_have_decl" >>confdefs.h
22737
22738
22739
22740
22741
22742
22743
22744gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
22745i\
227460
22747q
22748'
22749gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
22750i\
227510
22752q
22753'
22754gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
22755i\
227560
22757q
22758'
22759
22760
22761  if test "$HAVE_LIBUNISTRING" = yes; then
22762    LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
22763    LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
22764    LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
22765  fi
22766
22767
22768  GNULIB_UTIME=0;
22769    GNULIB_MDA_UTIME=1;
22770    HAVE_UTIME=1;
22771  REPLACE_UTIME=0;
22772
22773
22774
22775     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
22776printf %s "checking whether the utimes function works... " >&6; }
22777if test ${gl_cv_func_working_utimes+y}
22778then :
22779  printf %s "(cached) " >&6
22780else $as_nop
22781  if test "$cross_compiling" = yes
22782then :
22783  case "$host_os" in
22784                   # Guess yes on musl systems.
22785          *-musl*) gl_cv_func_working_utimes="guessing yes" ;;
22786                   # Guess no on native Windows.
22787          mingw*)  gl_cv_func_working_utimes="guessing no" ;;
22788          *)       gl_cv_func_working_utimes="$gl_cross_guess_normal" ;;
22789        esac
22790
22791else $as_nop
22792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22793/* end confdefs.h.  */
22794
22795#include <sys/types.h>
22796#include <sys/stat.h>
22797#include <fcntl.h>
22798#include <sys/time.h>
22799#include <time.h>
22800#include <unistd.h>
22801#include <stdlib.h>
22802#include <stdio.h>
22803#include <utime.h>
22804#include <errno.h>
22805
22806
22807$gl_mda_defines
22808
22809
22810static int
22811inorder (time_t a, time_t b, time_t c)
22812{
22813  return a <= b && b <= c;
22814}
22815
22816int
22817main ()
22818{
22819  int result = 0;
22820  char const *file = "conftest.utimes";
22821  /* On OS/2, file timestamps must be on or after 1980 in local time,
22822     with an even number of seconds.  */
22823  static struct timeval timeval[2] = {{315620000 + 10, 10},
22824                                      {315620000 + 1000000, 999998}};
22825
22826  /* Test whether utimes() essentially works.  */
22827  {
22828    struct stat sbuf;
22829    FILE *f = fopen (file, "w");
22830    if (f == NULL)
22831      result |= 1;
22832    else if (fclose (f) != 0)
22833      result |= 1;
22834    else if (utimes (file, timeval) != 0)
22835      result |= 2;
22836    else if (lstat (file, &sbuf) != 0)
22837      result |= 1;
22838    else if (!(sbuf.st_atime == timeval[0].tv_sec
22839               && sbuf.st_mtime == timeval[1].tv_sec))
22840      result |= 4;
22841    if (unlink (file) != 0)
22842      result |= 1;
22843  }
22844
22845  /* Test whether utimes() with a NULL argument sets the file's timestamp
22846     to the current time.  Use 'fstat' as well as 'time' to
22847     determine the "current" time, to accommodate NFS file systems
22848     if there is a time skew between the host and the NFS server.  */
22849  {
22850    int fd = open (file, O_WRONLY|O_CREAT, 0644);
22851    if (fd < 0)
22852      result |= 1;
22853    else
22854      {
22855        time_t t0, t2;
22856        struct stat st0, st1, st2;
22857        if (time (&t0) == (time_t) -1)
22858          result |= 1;
22859        else if (fstat (fd, &st0) != 0)
22860          result |= 1;
22861        else if (utimes (file, timeval) != 0
22862                 && (errno != EACCES
22863                     /* OS/2 kLIBC utimes fails on opened files.  */
22864                     || close (fd) != 0
22865                     || utimes (file, timeval) != 0
22866                     || (fd = open (file, O_WRONLY)) < 0))
22867          result |= 2;
22868        else if (utimes (file, NULL) != 0
22869                 && (errno != EACCES
22870                     /* OS/2 kLIBC utimes fails on opened files.  */
22871                     || close (fd) != 0
22872                     || utimes (file, NULL) != 0
22873                     || (fd = open (file, O_WRONLY)) < 0))
22874          result |= 8;
22875        else if (fstat (fd, &st1) != 0)
22876          result |= 1;
22877        else if (write (fd, "\n", 1) != 1)
22878          result |= 1;
22879        else if (fstat (fd, &st2) != 0)
22880          result |= 1;
22881        else if (time (&t2) == (time_t) -1)
22882          result |= 1;
22883        else
22884          {
22885            int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
22886            int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
22887            if (! (st1.st_atime == st1.st_mtime))
22888              result |= 16;
22889            if (! (m_ok_POSIX || m_ok_NFS))
22890              result |= 32;
22891          }
22892        if (close (fd) != 0)
22893          result |= 1;
22894      }
22895    if (unlink (file) != 0)
22896      result |= 1;
22897  }
22898
22899  /* Test whether utimes() with a NULL argument works on read-only files.  */
22900  {
22901    int fd = open (file, O_WRONLY|O_CREAT, 0444);
22902    if (fd < 0)
22903      result |= 1;
22904    else if (close (fd) != 0)
22905      result |= 1;
22906    else if (utimes (file, NULL) != 0)
22907      result |= 64;
22908    if (unlink (file) != 0)
22909      result |= 1;
22910  }
22911
22912  return result;
22913}
22914
22915_ACEOF
22916if ac_fn_c_try_run "$LINENO"
22917then :
22918  gl_cv_func_working_utimes=yes
22919else $as_nop
22920  gl_cv_func_working_utimes=no
22921fi
22922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22923  conftest.$ac_objext conftest.beam conftest.$ac_ext
22924fi
22925
22926
22927fi
22928{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
22929printf "%s\n" "$gl_cv_func_working_utimes" >&6; }
22930
22931  case "$gl_cv_func_working_utimes" in
22932    *yes)
22933
22934printf "%s\n" "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
22935
22936      ;;
22937  esac
22938
22939
22940
22941
22942
22943
22944
22945  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
22946printf %s "checking for inttypes.h... " >&6; }
22947if test ${gl_cv_header_inttypes_h+y}
22948then :
22949  printf %s "(cached) " >&6
22950else $as_nop
22951  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22952/* end confdefs.h.  */
22953
22954#include <sys/types.h>
22955#include <inttypes.h>
22956
22957int
22958main (void)
22959{
22960uintmax_t i = (uintmax_t) -1; return !i;
22961  ;
22962  return 0;
22963}
22964_ACEOF
22965if ac_fn_c_try_compile "$LINENO"
22966then :
22967  gl_cv_header_inttypes_h=yes
22968else $as_nop
22969  gl_cv_header_inttypes_h=no
22970fi
22971rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
22972fi
22973{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
22974printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
22975  if test $gl_cv_header_inttypes_h = yes; then
22976
22977printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
22978
22979  fi
22980
22981
22982  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
22983printf %s "checking for stdint.h... " >&6; }
22984if test ${gl_cv_header_stdint_h+y}
22985then :
22986  printf %s "(cached) " >&6
22987else $as_nop
22988  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22989/* end confdefs.h.  */
22990#include <sys/types.h>
22991            #include <stdint.h>
22992int
22993main (void)
22994{
22995uintmax_t i = (uintmax_t) -1; return !i;
22996  ;
22997  return 0;
22998}
22999_ACEOF
23000if ac_fn_c_try_compile "$LINENO"
23001then :
23002  gl_cv_header_stdint_h=yes
23003else $as_nop
23004  gl_cv_header_stdint_h=no
23005fi
23006rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23007fi
23008{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
23009printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
23010  if test $gl_cv_header_stdint_h = yes; then
23011
23012printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
23013
23014  fi
23015
23016
23017
23018
23019  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
23020printf %s "checking for intmax_t... " >&6; }
23021if test ${gt_cv_c_intmax_t+y}
23022then :
23023  printf %s "(cached) " >&6
23024else $as_nop
23025  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23026/* end confdefs.h.  */
23027
23028#include <stddef.h>
23029#include <stdlib.h>
23030#if HAVE_STDINT_H_WITH_UINTMAX
23031#include <stdint.h>
23032#endif
23033#if HAVE_INTTYPES_H_WITH_UINTMAX
23034#include <inttypes.h>
23035#endif
23036
23037int
23038main (void)
23039{
23040intmax_t x = -1; return !x;
23041  ;
23042  return 0;
23043}
23044_ACEOF
23045if ac_fn_c_try_compile "$LINENO"
23046then :
23047  gt_cv_c_intmax_t=yes
23048else $as_nop
23049  gt_cv_c_intmax_t=no
23050fi
23051rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23052fi
23053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
23054printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
23055  if test $gt_cv_c_intmax_t = yes; then
23056
23057printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
23058
23059  else
23060
23061printf "%s\n" "#define intmax_t long long" >>confdefs.h
23062
23063  fi
23064
23065
23066  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
23067printf %s "checking where to find the exponent in a 'double'... " >&6; }
23068if test ${gl_cv_cc_double_expbit0+y}
23069then :
23070  printf %s "(cached) " >&6
23071else $as_nop
23072
23073      if test "$cross_compiling" = yes
23074then :
23075
23076                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23077/* end confdefs.h.  */
23078
23079#if defined arm || defined __arm || defined __arm__
23080  mixed_endianness
23081#endif
23082
23083_ACEOF
23084if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23085  $EGREP "mixed_endianness" >/dev/null 2>&1
23086then :
23087  gl_cv_cc_double_expbit0="unknown"
23088else $as_nop
23089
23090                                                         :
23091if test ${ac_cv_c_bigendian+y}
23092then :
23093  printf %s "(cached) " >&6
23094else $as_nop
23095  ac_cv_c_bigendian=unknown
23096    # See if we're dealing with a universal compiler.
23097    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23098/* end confdefs.h.  */
23099#ifndef __APPLE_CC__
23100	       not a universal capable compiler
23101	     #endif
23102	     typedef int dummy;
23103
23104_ACEOF
23105if ac_fn_c_try_compile "$LINENO"
23106then :
23107
23108	# Check for potential -arch flags.  It is not universal unless
23109	# there are at least two -arch flags with different values.
23110	ac_arch=
23111	ac_prev=
23112	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
23113	 if test -n "$ac_prev"; then
23114	   case $ac_word in
23115	     i?86 | x86_64 | ppc | ppc64)
23116	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
23117		 ac_arch=$ac_word
23118	       else
23119		 ac_cv_c_bigendian=universal
23120		 break
23121	       fi
23122	       ;;
23123	   esac
23124	   ac_prev=
23125	 elif test "x$ac_word" = "x-arch"; then
23126	   ac_prev=arch
23127	 fi
23128       done
23129fi
23130rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23131    if test $ac_cv_c_bigendian = unknown; then
23132      # See if sys/param.h defines the BYTE_ORDER macro.
23133      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23134/* end confdefs.h.  */
23135#include <sys/types.h>
23136	     #include <sys/param.h>
23137
23138int
23139main (void)
23140{
23141#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
23142		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
23143		     && LITTLE_ENDIAN)
23144	      bogus endian macros
23145	     #endif
23146
23147  ;
23148  return 0;
23149}
23150_ACEOF
23151if ac_fn_c_try_compile "$LINENO"
23152then :
23153  # It does; now see whether it defined to BIG_ENDIAN or not.
23154	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23155/* end confdefs.h.  */
23156#include <sys/types.h>
23157		#include <sys/param.h>
23158
23159int
23160main (void)
23161{
23162#if BYTE_ORDER != BIG_ENDIAN
23163		 not big endian
23164		#endif
23165
23166  ;
23167  return 0;
23168}
23169_ACEOF
23170if ac_fn_c_try_compile "$LINENO"
23171then :
23172  ac_cv_c_bigendian=yes
23173else $as_nop
23174  ac_cv_c_bigendian=no
23175fi
23176rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23177fi
23178rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23179    fi
23180    if test $ac_cv_c_bigendian = unknown; then
23181      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
23182      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23183/* end confdefs.h.  */
23184#include <limits.h>
23185
23186int
23187main (void)
23188{
23189#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
23190	      bogus endian macros
23191	     #endif
23192
23193  ;
23194  return 0;
23195}
23196_ACEOF
23197if ac_fn_c_try_compile "$LINENO"
23198then :
23199  # It does; now see whether it defined to _BIG_ENDIAN or not.
23200	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23201/* end confdefs.h.  */
23202#include <limits.h>
23203
23204int
23205main (void)
23206{
23207#ifndef _BIG_ENDIAN
23208		 not big endian
23209		#endif
23210
23211  ;
23212  return 0;
23213}
23214_ACEOF
23215if ac_fn_c_try_compile "$LINENO"
23216then :
23217  ac_cv_c_bigendian=yes
23218else $as_nop
23219  ac_cv_c_bigendian=no
23220fi
23221rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23222fi
23223rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23224    fi
23225    if test $ac_cv_c_bigendian = unknown; then
23226      # Compile a test program.
23227      if test "$cross_compiling" = yes
23228then :
23229  # Try to guess by grepping values from an object file.
23230	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23231/* end confdefs.h.  */
23232unsigned short int ascii_mm[] =
23233		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23234		unsigned short int ascii_ii[] =
23235		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23236		int use_ascii (int i) {
23237		  return ascii_mm[i] + ascii_ii[i];
23238		}
23239		unsigned short int ebcdic_ii[] =
23240		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23241		unsigned short int ebcdic_mm[] =
23242		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23243		int use_ebcdic (int i) {
23244		  return ebcdic_mm[i] + ebcdic_ii[i];
23245		}
23246		extern int foo;
23247
23248int
23249main (void)
23250{
23251return use_ascii (foo) == use_ebcdic (foo);
23252  ;
23253  return 0;
23254}
23255_ACEOF
23256if ac_fn_c_try_compile "$LINENO"
23257then :
23258  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
23259	      ac_cv_c_bigendian=yes
23260	    fi
23261	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23262	      if test "$ac_cv_c_bigendian" = unknown; then
23263		ac_cv_c_bigendian=no
23264	      else
23265		# finding both strings is unlikely to happen, but who knows?
23266		ac_cv_c_bigendian=unknown
23267	      fi
23268	    fi
23269fi
23270rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23271else $as_nop
23272  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23273/* end confdefs.h.  */
23274$ac_includes_default
23275int
23276main (void)
23277{
23278
23279	     /* Are we little or big endian?  From Harbison&Steele.  */
23280	     union
23281	     {
23282	       long int l;
23283	       char c[sizeof (long int)];
23284	     } u;
23285	     u.l = 1;
23286	     return u.c[sizeof (long int) - 1] == 1;
23287
23288  ;
23289  return 0;
23290}
23291_ACEOF
23292if ac_fn_c_try_run "$LINENO"
23293then :
23294  ac_cv_c_bigendian=no
23295else $as_nop
23296  ac_cv_c_bigendian=yes
23297fi
23298rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23299  conftest.$ac_objext conftest.beam conftest.$ac_ext
23300fi
23301
23302    fi
23303fi
23304:
23305 case $ac_cv_c_bigendian in #(
23306   yes)
23307     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
23308   no)
23309     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
23310   universal)
23311
23312printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
23313
23314     ;; #(
23315   *)
23316     gl_cv_cc_double_expbit0="unknown" ;;
23317 esac
23318
23319
23320fi
23321rm -rf conftest*
23322
23323
23324else $as_nop
23325  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23326/* end confdefs.h.  */
23327
23328#include <float.h>
23329#include <stddef.h>
23330#include <stdio.h>
23331#include <string.h>
23332#define NWORDS \
23333  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23334typedef union { double value; unsigned int word[NWORDS]; } memory_double;
23335static unsigned int ored_words[NWORDS];
23336static unsigned int anded_words[NWORDS];
23337static void add_to_ored_words (double x)
23338{
23339  memory_double m;
23340  size_t i;
23341  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
23342  memset (&m, 0, sizeof (memory_double));
23343  m.value = x;
23344  for (i = 0; i < NWORDS; i++)
23345    {
23346      ored_words[i] |= m.word[i];
23347      anded_words[i] &= m.word[i];
23348    }
23349}
23350int main ()
23351{
23352  size_t j;
23353  FILE *fp = fopen ("conftest.out", "w");
23354  if (fp == NULL)
23355    return 1;
23356  for (j = 0; j < NWORDS; j++)
23357    anded_words[j] = ~ (unsigned int) 0;
23358  add_to_ored_words (0.25);
23359  add_to_ored_words (0.5);
23360  add_to_ored_words (1.0);
23361  add_to_ored_words (2.0);
23362  add_to_ored_words (4.0);
23363  /* Remove bits that are common (e.g. if representation of the first mantissa
23364     bit is explicit).  */
23365  for (j = 0; j < NWORDS; j++)
23366    ored_words[j] &= ~anded_words[j];
23367  /* Now find the nonzero word.  */
23368  for (j = 0; j < NWORDS; j++)
23369    if (ored_words[j] != 0)
23370      break;
23371  if (j < NWORDS)
23372    {
23373      size_t i;
23374      for (i = j + 1; i < NWORDS; i++)
23375        if (ored_words[i] != 0)
23376          {
23377            fprintf (fp, "unknown");
23378            return (fclose (fp) != 0);
23379          }
23380      for (i = 0; ; i++)
23381        if ((ored_words[j] >> i) & 1)
23382          {
23383            fprintf (fp, "word %d bit %d", (int) j, (int) i);
23384            return (fclose (fp) != 0);
23385          }
23386    }
23387  fprintf (fp, "unknown");
23388  return (fclose (fp) != 0);
23389}
23390
23391_ACEOF
23392if ac_fn_c_try_run "$LINENO"
23393then :
23394  gl_cv_cc_double_expbit0=`cat conftest.out`
23395else $as_nop
23396  gl_cv_cc_double_expbit0="unknown"
23397fi
23398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23399  conftest.$ac_objext conftest.beam conftest.$ac_ext
23400fi
23401
23402      rm -f conftest.out
23403
23404fi
23405{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
23406printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
23407  case "$gl_cv_cc_double_expbit0" in
23408    word*bit*)
23409      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23410      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
23411
23412printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
23413
23414
23415printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
23416
23417      ;;
23418  esac
23419
23420
23421
23422
23423  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
23424printf %s "checking whether snprintf truncates the result as in C99... " >&6; }
23425if test ${gl_cv_func_snprintf_truncation_c99+y}
23426then :
23427  printf %s "(cached) " >&6
23428else $as_nop
23429
23430      if test "$cross_compiling" = yes
23431then :
23432
23433         case "$host_os" in
23434                                 # Guess yes on glibc systems.
23435           *-gnu* | gnu*)        gl_cv_func_snprintf_truncation_c99="guessing yes";;
23436                                 # Guess yes on musl systems.
23437           *-musl*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
23438                                 # Guess yes on FreeBSD >= 5.
23439           freebsd[1-4].*)       gl_cv_func_snprintf_truncation_c99="guessing no";;
23440           freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
23441                                 # Guess yes on Mac OS X >= 10.3.
23442           darwin[1-6].*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
23443           darwin*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
23444                                 # Guess yes on OpenBSD >= 3.9.
23445           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
23446                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
23447           openbsd*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
23448                                 # Guess yes on Solaris >= 2.6.
23449           solaris2.[0-5] | solaris2.[0-5].*)
23450                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
23451           solaris*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
23452                                 # Guess yes on AIX >= 4.
23453           aix[1-3]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
23454           aix*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
23455                                 # Guess yes on HP-UX >= 11.
23456           hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
23457           hpux*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
23458                                 # Guess yes on IRIX >= 6.5.
23459           irix6.5)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
23460                                 # Guess yes on OSF/1 >= 5.
23461           osf[3-4]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
23462           osf*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
23463                                 # Guess yes on NetBSD >= 3.
23464           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
23465                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
23466           netbsd*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
23467                                 # Guess yes on BeOS.
23468           beos*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
23469                                 # Guess yes on Android.
23470           linux*-android*)      gl_cv_func_snprintf_truncation_c99="guessing yes";;
23471                                 # Guess no on native Windows.
23472           mingw*)               gl_cv_func_snprintf_truncation_c99="guessing no";;
23473                                 # If we don't know, obey --enable-cross-guesses.
23474           *)                    gl_cv_func_snprintf_truncation_c99="$gl_cross_guess_normal";;
23475         esac
23476
23477else $as_nop
23478  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23479/* end confdefs.h.  */
23480
23481#include <stdio.h>
23482#include <string.h>
23483#if HAVE_SNPRINTF
23484# define my_snprintf snprintf
23485#else
23486# include <stdarg.h>
23487static int my_snprintf (char *buf, int size, const char *format, ...)
23488{
23489  va_list args;
23490  int ret;
23491  va_start (args, format);
23492  ret = vsnprintf (buf, size, format, args);
23493  va_end (args);
23494  return ret;
23495}
23496#endif
23497static char buf[100];
23498int main ()
23499{
23500  strcpy (buf, "ABCDEF");
23501  my_snprintf (buf, 3, "%d %d", 4567, 89);
23502  if (memcmp (buf, "45\0DEF", 6) != 0)
23503    return 1;
23504  return 0;
23505}
23506_ACEOF
23507if ac_fn_c_try_run "$LINENO"
23508then :
23509  gl_cv_func_snprintf_truncation_c99=yes
23510else $as_nop
23511  gl_cv_func_snprintf_truncation_c99=no
23512fi
23513rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23514  conftest.$ac_objext conftest.beam conftest.$ac_ext
23515fi
23516
23517
23518fi
23519{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
23520printf "%s\n" "$gl_cv_func_snprintf_truncation_c99" >&6; }
23521
23522
23523
23524
23525
23526  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
23527if test "x$ac_cv_func_snprintf" = xyes
23528then :
23529  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
23530
23531fi
23532ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
23533if test "x$ac_cv_func_strnlen" = xyes
23534then :
23535  printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
23536
23537fi
23538ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
23539if test "x$ac_cv_func_wcslen" = xyes
23540then :
23541  printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
23542
23543fi
23544ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen"
23545if test "x$ac_cv_func_wcsnlen" = xyes
23546then :
23547  printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h
23548
23549fi
23550ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
23551if test "x$ac_cv_func_mbrtowc" = xyes
23552then :
23553  printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
23554
23555fi
23556ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
23557if test "x$ac_cv_func_wcrtomb" = xyes
23558then :
23559  printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
23560
23561fi
23562
23563      ac_fn_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
23564" "$ac_c_undeclared_builtin_options" "CFLAGS"
23565if test "x$ac_cv_have_decl__snprintf" = xyes
23566then :
23567  ac_have_decl=1
23568else $as_nop
23569  ac_have_decl=0
23570fi
23571printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
23572
23573
23574
23575  case "$gl_cv_func_snprintf_retval_c99" in
23576    *yes)
23577
23578printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
23579
23580      ;;
23581  esac
23582
23583  case "$gl_cv_func_snprintf_truncation_c99" in
23584    *yes)
23585
23586printf "%s\n" "#define HAVE_SNPRINTF_TRUNCATION_C99 1" >>confdefs.h
23587
23588      ;;
23589  esac
23590
23591
23592
23593
23594  if test $ac_cv_header_crtdefs_h = yes; then
23595    HAVE_CRTDEFS_H=1
23596  else
23597    HAVE_CRTDEFS_H=0
23598  fi
23599
23600
23601
23602
23603  GNULIB_ISWBLANK=0;
23604  GNULIB_ISWDIGIT=0;
23605  GNULIB_ISWXDIGIT=0;
23606  GNULIB_WCTYPE=0;
23607  GNULIB_ISWCTYPE=0;
23608  GNULIB_WCTRANS=0;
23609  GNULIB_TOWCTRANS=0;
23610    HAVE_ISWBLANK=1;
23611  HAVE_WCTYPE_T=1;
23612  HAVE_WCTRANS_T=1;
23613  REPLACE_ISWBLANK=0;
23614  REPLACE_ISWDIGIT=0;
23615  REPLACE_ISWXDIGIT=0;
23616
23617
23618
23619
23620
23621
23622   if true; then
23623  GL_COND_LIBTOOL_TRUE=
23624  GL_COND_LIBTOOL_FALSE='#'
23625else
23626  GL_COND_LIBTOOL_TRUE='#'
23627  GL_COND_LIBTOOL_FALSE=
23628fi
23629
23630  gl_cond_libtool=true
23631  gl_m4_base='m4'
23632
23633
23634
23635
23636
23637
23638
23639
23640
23641
23642  gl_source_base='lib'
23643
23644  if test "$ac_cv_header_winsock2_h" = yes; then
23645
23646
23647
23648
23649
23650
23651
23652
23653  gl_LIBOBJS="$gl_LIBOBJS accept.$ac_objext"
23654
23655  fi
23656
23657
23658
23659
23660
23661          GNULIB_ACCEPT=1
23662
23663
23664
23665
23666
23667printf "%s\n" "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
23668
23669
23670
23671
23672
23673
23674      case "$host_os" in
23675    mingw*) REPLACE_ACCESS=1 ;;
23676  esac
23677
23678  if test $REPLACE_ACCESS = 1; then
23679
23680
23681
23682
23683
23684
23685
23686
23687  gl_LIBOBJS="$gl_LIBOBJS access.$ac_objext"
23688
23689  fi
23690
23691
23692
23693
23694
23695          GNULIB_ACCESS=1
23696
23697
23698
23699
23700
23701printf "%s\n" "#define GNULIB_TEST_ACCESS 1" >>confdefs.h
23702
23703
23704
23705LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
23706
23707
23708
23709  if test $ac_cv_func_alloca_works = no; then
23710    :
23711  fi
23712
23713  # Define an additional variable used in the Makefile substitution.
23714  if test $ac_cv_working_alloca_h = yes; then
23715    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
23716printf %s "checking for alloca as a compiler built-in... " >&6; }
23717if test ${gl_cv_rpl_alloca+y}
23718then :
23719  printf %s "(cached) " >&6
23720else $as_nop
23721
23722      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23723/* end confdefs.h.  */
23724
23725#if defined __GNUC__ || defined _AIX || defined _MSC_VER
23726        Need own alloca
23727#endif
23728
23729_ACEOF
23730if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23731  $EGREP "Need own alloca" >/dev/null 2>&1
23732then :
23733  gl_cv_rpl_alloca=yes
23734else $as_nop
23735  gl_cv_rpl_alloca=no
23736fi
23737rm -rf conftest*
23738
23739
23740fi
23741{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
23742printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
23743    if test $gl_cv_rpl_alloca = yes; then
23744
23745printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
23746
23747      ALLOCA_H=alloca.h
23748    else
23749                  ALLOCA_H=
23750    fi
23751  else
23752    ALLOCA_H=alloca.h
23753  fi
23754
23755   if test -n "$ALLOCA_H"; then
23756  GL_GENERATE_ALLOCA_H_TRUE=
23757  GL_GENERATE_ALLOCA_H_FALSE='#'
23758else
23759  GL_GENERATE_ALLOCA_H_TRUE='#'
23760  GL_GENERATE_ALLOCA_H_FALSE=
23761fi
23762
23763
23764  if test $ac_cv_working_alloca_h = yes; then
23765    HAVE_ALLOCA_H=1
23766  else
23767    HAVE_ALLOCA_H=0
23768  fi
23769
23770
23771
23772
23773
23774
23775  if test $ac_cv_header_arpa_inet_h = yes; then
23776    HAVE_ARPA_INET_H=1
23777  else
23778    HAVE_ARPA_INET_H=0
23779  fi
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790     if test $gl_cv_have_include_next = yes; then
23791       gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
23792     else
23793       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
23794printf %s "checking absolute name of <arpa/inet.h>... " >&6; }
23795if test ${gl_cv_next_arpa_inet_h+y}
23796then :
23797  printf %s "(cached) " >&6
23798else $as_nop
23799
23800             if test $ac_cv_header_arpa_inet_h = yes; then
23801
23802
23803
23804
23805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23806/* end confdefs.h.  */
23807#include <arpa/inet.h>
23808_ACEOF
23809                case "$host_os" in
23810    aix*) gl_absname_cpp="$ac_cpp -C" ;;
23811    *)    gl_absname_cpp="$ac_cpp" ;;
23812  esac
23813
23814  case "$host_os" in
23815    mingw*)
23816                                          gl_dirsep_regex='[/\\]'
23817      ;;
23818    *)
23819      gl_dirsep_regex='\/'
23820      ;;
23821  esac
23822      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23823  gl_header_literal_regex=`echo 'arpa/inet.h' \
23824                           | sed -e "$gl_make_literal_regex_sed"`
23825  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23826      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23827      s|^/[^/]|//&|
23828      p
23829      q
23830    }'
23831
23832        gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23833  sed -n "$gl_absolute_header_sed"`
23834
23835           gl_header=$gl_cv_absolute_arpa_inet_h
23836           gl_cv_next_arpa_inet_h='"'$gl_header'"'
23837          else
23838               gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
23839             fi
23840
23841
23842fi
23843{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
23844printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
23845     fi
23846     NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
23847
23848     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23849       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23850       gl_next_as_first_directive='<'arpa/inet.h'>'
23851     else
23852       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23853       gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
23854     fi
23855     NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865  if test $ac_cv_header_sys_socket_h = yes; then
23866    HAVE_WS2TCPIP_H=0
23867  else
23868    if test $ac_cv_header_ws2tcpip_h = yes; then
23869      HAVE_WS2TCPIP_H=1
23870    else
23871      HAVE_WS2TCPIP_H=0
23872    fi
23873  fi
23874
23875
23876
23877
23878
23879
23880
23881
23882
23883
23884
23885  ac_fn_c_check_func "$LINENO" "atoll" "ac_cv_func_atoll"
23886if test "x$ac_cv_func_atoll" = xyes
23887then :
23888  printf "%s\n" "#define HAVE_ATOLL 1" >>confdefs.h
23889
23890fi
23891
23892  if test $ac_cv_func_atoll = no; then
23893    HAVE_ATOLL=0
23894  fi
23895
23896  if test $HAVE_ATOLL = 0; then
23897
23898
23899
23900
23901
23902
23903
23904
23905  gl_LIBOBJS="$gl_LIBOBJS atoll.$ac_objext"
23906
23907
23908  :
23909
23910  fi
23911
23912
23913
23914
23915
23916          GNULIB_ATOLL=1
23917
23918
23919
23920
23921
23922printf "%s\n" "#define GNULIB_TEST_ATOLL 1" >>confdefs.h
23923
23924
23925
23926
23927  if test "$ac_cv_header_winsock2_h" = yes; then
23928
23929
23930
23931
23932
23933
23934
23935
23936  gl_LIBOBJS="$gl_LIBOBJS bind.$ac_objext"
23937
23938  fi
23939
23940
23941
23942
23943
23944          GNULIB_BIND=1
23945
23946
23947
23948
23949
23950printf "%s\n" "#define GNULIB_TEST_BIND 1" >>confdefs.h
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960  if test $ac_cv_func_btowc = no; then
23961    HAVE_BTOWC=0
23962  else
23963
23964
23965
23966
23967        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
23968printf %s "checking whether btowc(0) is correct... " >&6; }
23969if test ${gl_cv_func_btowc_nul+y}
23970then :
23971  printf %s "(cached) " >&6
23972else $as_nop
23973
23974        if test "$cross_compiling" = yes
23975then :
23976
23977           case "$host_os" in
23978                      # Guess no on Cygwin.
23979             cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
23980                      # Guess yes on native Windows.
23981             mingw*)  gl_cv_func_btowc_nul="guessing yes" ;;
23982                      # Guess yes otherwise.
23983             *)       gl_cv_func_btowc_nul="guessing yes" ;;
23984           esac
23985
23986else $as_nop
23987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23988/* end confdefs.h.  */
23989
23990#include <wchar.h>
23991int main ()
23992{
23993  if (btowc ('\0') != 0)
23994    return 1;
23995  return 0;
23996}
23997_ACEOF
23998if ac_fn_c_try_run "$LINENO"
23999then :
24000  gl_cv_func_btowc_nul=yes
24001else $as_nop
24002  gl_cv_func_btowc_nul=no
24003fi
24004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24005  conftest.$ac_objext conftest.beam conftest.$ac_ext
24006fi
24007
24008
24009fi
24010{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
24011printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
24012
24013        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
24014printf %s "checking whether btowc(EOF) is correct... " >&6; }
24015if test ${gl_cv_func_btowc_eof+y}
24016then :
24017  printf %s "(cached) " >&6
24018else $as_nop
24019
24020                        case "$host_os" in
24021                  # Guess no on IRIX.
24022          irix*)  gl_cv_func_btowc_eof="guessing no" ;;
24023                  # Guess yes on native Windows.
24024          mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
24025                  # Guess yes otherwise.
24026          *)      gl_cv_func_btowc_eof="guessing yes" ;;
24027        esac
24028        if test $LOCALE_FR != none; then
24029          if test "$cross_compiling" = yes
24030then :
24031  :
24032else $as_nop
24033  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24034/* end confdefs.h.  */
24035
24036#include <locale.h>
24037#include <stdio.h>
24038#include <wchar.h>
24039int main ()
24040{
24041  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
24042    {
24043      if (btowc (EOF) != WEOF)
24044        return 1;
24045    }
24046  return 0;
24047}
24048_ACEOF
24049if ac_fn_c_try_run "$LINENO"
24050then :
24051  gl_cv_func_btowc_eof=yes
24052else $as_nop
24053  gl_cv_func_btowc_eof=no
24054fi
24055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24056  conftest.$ac_objext conftest.beam conftest.$ac_ext
24057fi
24058
24059        fi
24060
24061fi
24062{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
24063printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
24064
24065    case "$gl_cv_func_btowc_nul" in
24066      *yes) ;;
24067      *) REPLACE_BTOWC=1 ;;
24068    esac
24069    case "$gl_cv_func_btowc_eof" in
24070      *yes) ;;
24071      *) REPLACE_BTOWC=1 ;;
24072    esac
24073  fi
24074
24075  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
24076
24077
24078
24079
24080
24081
24082
24083
24084  gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
24085
24086
24087  :
24088
24089  fi
24090
24091
24092
24093
24094
24095          GNULIB_BTOWC=1
24096
24097
24098
24099
24100
24101printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
24102
24103
24104
24105
24106  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
24107printf %s "checking for __builtin_expect... " >&6; }
24108if test ${gl_cv___builtin_expect+y}
24109then :
24110  printf %s "(cached) " >&6
24111else $as_nop
24112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24113/* end confdefs.h.  */
24114
24115         int
24116         main (int argc, char **argv)
24117         {
24118           argc = __builtin_expect (argc, 100);
24119           return argv[argc != 100][0];
24120         }
24121_ACEOF
24122if ac_fn_c_try_link "$LINENO"
24123then :
24124  gl_cv___builtin_expect=yes
24125else $as_nop
24126  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24127/* end confdefs.h.  */
24128
24129             #include <builtins.h>
24130             int
24131             main (int argc, char **argv)
24132             {
24133               argc = __builtin_expect (argc, 100);
24134               return argv[argc != 100][0];
24135             }
24136_ACEOF
24137if ac_fn_c_try_link "$LINENO"
24138then :
24139  gl_cv___builtin_expect="in <builtins.h>"
24140else $as_nop
24141  gl_cv___builtin_expect=no
24142fi
24143rm -f core conftest.err conftest.$ac_objext conftest.beam \
24144    conftest$ac_exeext conftest.$ac_ext
24145fi
24146rm -f core conftest.err conftest.$ac_objext conftest.beam \
24147    conftest$ac_exeext conftest.$ac_ext
24148fi
24149{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
24150printf "%s\n" "$gl_cv___builtin_expect" >&6; }
24151  if test "$gl_cv___builtin_expect" = yes; then
24152    printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
24153
24154  elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
24155    printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
24156
24157  fi
24158
24159
24160
24161           for ac_header in byteswap.h
24162do :
24163  ac_fn_c_check_header_compile "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default"
24164if test "x$ac_cv_header_byteswap_h" = xyes
24165then :
24166  printf "%s\n" "#define HAVE_BYTESWAP_H 1" >>confdefs.h
24167
24168    BYTESWAP_H=''
24169
24170else $as_nop
24171
24172    BYTESWAP_H='byteswap.h'
24173
24174fi
24175
24176done
24177
24178   if test -n "$BYTESWAP_H"; then
24179  GL_GENERATE_BYTESWAP_H_TRUE=
24180  GL_GENERATE_BYTESWAP_H_FALSE='#'
24181else
24182  GL_GENERATE_BYTESWAP_H_TRUE='#'
24183  GL_GENERATE_BYTESWAP_H_FALSE=
24184fi
24185
24186
24187
24188
24189
24190  if test $gl_cv_func_malloc_posix = yes; then
24191
24192printf "%s\n" "#define HAVE_CALLOC_POSIX 1" >>confdefs.h
24193
24194  else
24195    REPLACE_CALLOC=1
24196  fi
24197
24198  if test $REPLACE_CALLOC = 1; then
24199
24200
24201
24202
24203
24204
24205
24206
24207  gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
24208
24209  fi
24210
24211
24212
24213
24214
24215          GNULIB_CALLOC_POSIX=1
24216
24217
24218
24219
24220
24221printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231  if test $ac_cv_func_canonicalize_file_name = no; then
24232    HAVE_CANONICALIZE_FILE_NAME=0
24233  else
24234    case "$gl_cv_func_realpath_works" in
24235      *yes) ;;
24236      *)    REPLACE_CANONICALIZE_FILE_NAME=1 ;;
24237    esac
24238  fi
24239
24240
24241
24242printf "%s\n" "#define GNULIB_CANONICALIZE 1" >>confdefs.h
24243
24244
24245
24246
24247printf "%s\n" "#define GNULIB_TEST_CANONICALIZE 1" >>confdefs.h
24248
24249
24250
24251
24252
24253
24254
24255          GNULIB_CANONICALIZE_FILE_NAME=1
24256
24257
24258
24259
24260
24261printf "%s\n" "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
24262
24263
24264
24265
24266
24267
24268  if test $ac_cv_func_canonicalize_file_name = no; then
24269    HAVE_CANONICALIZE_FILE_NAME=0
24270    if test $ac_cv_func_realpath = no; then
24271      HAVE_REALPATH=0
24272    else
24273      case "$gl_cv_func_realpath_works" in
24274        *yes) ;;
24275        *)    REPLACE_REALPATH=1 ;;
24276      esac
24277    fi
24278  else
24279    case "$gl_cv_func_realpath_works" in
24280      *yes)
24281        ;;
24282      *)
24283        REPLACE_CANONICALIZE_FILE_NAME=1
24284        REPLACE_REALPATH=1
24285        ;;
24286    esac
24287  fi
24288
24289  if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
24290
24291
24292
24293
24294
24295
24296
24297
24298  gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
24299
24300  fi
24301
24302
24303printf "%s\n" "#define GNULIB_CANONICALIZE_LGPL 1" >>confdefs.h
24304
24305
24306
24307
24308
24309
24310
24311          GNULIB_CANONICALIZE_FILE_NAME=1
24312
24313
24314
24315
24316
24317printf "%s\n" "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
24318
24319
24320
24321
24322
24323
24324
24325
24326          GNULIB_REALPATH=1
24327
24328
24329
24330
24331
24332printf "%s\n" "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
24333
24334
24335
24336
24337
24338
24339
24340
24341          GNULIB_CHDIR=1
24342
24343
24344
24345
24346
24347printf "%s\n" "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
24348
24349
24350
24351
24352
24353  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
24354printf %s "checking whether this system supports file names of any length... " >&6; }
24355if test ${gl_cv_have_unlimited_file_name_length+y}
24356then :
24357  printf %s "(cached) " >&6
24358else $as_nop
24359  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24360/* end confdefs.h.  */
24361
24362/* Arrange to define PATH_MAX, like "pathmax.h" does. */
24363#if HAVE_UNISTD_H
24364# include <unistd.h>
24365#endif
24366#include <limits.h>
24367#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
24368# include <sys/param.h>
24369#endif
24370#if !defined PATH_MAX && defined MAXPATHLEN
24371# define PATH_MAX MAXPATHLEN
24372#endif
24373#ifdef __hpux
24374# undef PATH_MAX
24375# define PATH_MAX 1024
24376#endif
24377#if defined _WIN32 && ! defined __CYGWIN__
24378# undef PATH_MAX
24379# define PATH_MAX 260
24380#endif
24381
24382#ifdef PATH_MAX
24383have_arbitrary_file_name_length_limit
24384#endif
24385_ACEOF
24386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24387  $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1
24388then :
24389  gl_cv_have_unlimited_file_name_length=no
24390else $as_nop
24391  gl_cv_have_unlimited_file_name_length=yes
24392fi
24393rm -rf conftest*
24394
24395fi
24396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
24397printf "%s\n" "$gl_cv_have_unlimited_file_name_length" >&6; }
24398
24399  if test $gl_cv_have_unlimited_file_name_length = no; then
24400
24401
24402
24403
24404
24405
24406
24407
24408  gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
24409
24410    :
24411  fi
24412
24413
24414
24415  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
24416  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
24417
24418  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
24419  # programs in the package would end up linked with that potentially-shared
24420  # library, inducing unnecessary run-time overhead.
24421  LIB_CLOCK_GETTIME=
24422
24423  gl_saved_libs=$LIBS
24424    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
24425printf %s "checking for library containing clock_gettime... " >&6; }
24426if test ${ac_cv_search_clock_gettime+y}
24427then :
24428  printf %s "(cached) " >&6
24429else $as_nop
24430  ac_func_search_save_LIBS=$LIBS
24431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24432/* end confdefs.h.  */
24433
24434/* Override any GCC internal prototype to avoid an error.
24435   Use char because int might match the return type of a GCC
24436   builtin and then its argument prototype would still apply.  */
24437char clock_gettime ();
24438int
24439main (void)
24440{
24441return clock_gettime ();
24442  ;
24443  return 0;
24444}
24445_ACEOF
24446for ac_lib in '' rt posix4
24447do
24448  if test -z "$ac_lib"; then
24449    ac_res="none required"
24450  else
24451    ac_res=-l$ac_lib
24452    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24453  fi
24454  if ac_fn_c_try_link "$LINENO"
24455then :
24456  ac_cv_search_clock_gettime=$ac_res
24457fi
24458rm -f core conftest.err conftest.$ac_objext conftest.beam \
24459    conftest$ac_exeext
24460  if test ${ac_cv_search_clock_gettime+y}
24461then :
24462  break
24463fi
24464done
24465if test ${ac_cv_search_clock_gettime+y}
24466then :
24467
24468else $as_nop
24469  ac_cv_search_clock_gettime=no
24470fi
24471rm conftest.$ac_ext
24472LIBS=$ac_func_search_save_LIBS
24473fi
24474{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
24475printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
24476ac_res=$ac_cv_search_clock_gettime
24477if test "$ac_res" != no
24478then :
24479  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24480  test "$ac_cv_search_clock_gettime" = "none required" ||
24481                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
24482fi
24483
24484    ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
24485if test "x$ac_cv_func_clock_gettime" = xyes
24486then :
24487  printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
24488
24489fi
24490ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
24491if test "x$ac_cv_func_clock_settime" = xyes
24492then :
24493  printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
24494
24495fi
24496
24497  LIBS=$gl_saved_libs
24498
24499
24500
24501printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
24502
24503
24504
24505
24506
24507
24508    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24509      REPLACE_CLOSE=1
24510    fi
24511
24512
24513
24514
24515
24516
24517  if test $ac_cv_header_sys_socket_h != yes; then
24518                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
24519if test "x$ac_cv_header_winsock2_h" = xyes
24520then :
24521  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
24522
24523fi
24524
24525  fi
24526  if test "$ac_cv_header_winsock2_h" = yes; then
24527    HAVE_WINSOCK2_H=1
24528    UNISTD_H_HAVE_WINSOCK2_H=1
24529    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
24530  else
24531    HAVE_WINSOCK2_H=0
24532  fi
24533
24534
24535    if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
24536                        REPLACE_CLOSE=1
24537    fi
24538
24539
24540    if test $REPLACE_CLOSE = 0; then
24541
24542
24543
24544  if test $ac_cv_func_fchdir = no; then
24545    HAVE_FCHDIR=0
24546  fi
24547
24548      if test $HAVE_FCHDIR = 0; then
24549        REPLACE_CLOSE=1
24550      fi
24551    fi
24552
24553
24554  if test $REPLACE_CLOSE = 1; then
24555
24556
24557
24558
24559
24560
24561
24562
24563  gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
24564
24565  fi
24566
24567
24568
24569
24570
24571          GNULIB_CLOSE=1
24572
24573
24574
24575
24576
24577printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
24578
24579
24580
24581
24582
24583
24584  ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
24585if test "x$ac_cv_func_closedir" = xyes
24586then :
24587  printf "%s\n" "#define HAVE_CLOSEDIR 1" >>confdefs.h
24588
24589fi
24590
24591  if test $ac_cv_func_closedir = no; then
24592    HAVE_CLOSEDIR=0
24593  fi
24594
24595
24596
24597
24598  if test $ac_cv_func_fchdir = no; then
24599    HAVE_FCHDIR=0
24600  fi
24601
24602    if test $HAVE_FCHDIR = 0; then
24603      if test $HAVE_CLOSEDIR = 1; then
24604        REPLACE_CLOSEDIR=1
24605      fi
24606    fi
24607
24608    case $host_os,$HAVE_CLOSEDIR in
24609    os2*,1)
24610      REPLACE_CLOSEDIR=1;;
24611  esac
24612
24613  if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
24614
24615
24616
24617
24618
24619
24620
24621
24622  gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
24623
24624  fi
24625
24626
24627
24628
24629
24630          GNULIB_CLOSEDIR=1
24631
24632
24633
24634
24635
24636printf "%s\n" "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
24637
24638
24639
24640
24641
24642
24643
24644  if test "$ac_cv_header_winsock2_h" = yes; then
24645
24646
24647
24648
24649
24650
24651
24652
24653  gl_LIBOBJS="$gl_LIBOBJS connect.$ac_objext"
24654
24655  fi
24656
24657
24658
24659
24660
24661          GNULIB_CONNECT=1
24662
24663
24664
24665
24666
24667printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
24668
24669
24670
24671
24672
24673
24674printf "%s\n" "#define GL_COMPILE_CRYPTO_STREAM 1" >>confdefs.h
24675
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685
24686# Check whether --with-openssl was given.
24687if test ${with_openssl+y}
24688then :
24689  withval=$with_openssl;
24690else $as_nop
24691  with_openssl=$with_openssl_default
24692fi
24693
24694
24695
24696  if test "x$with_openssl" != xno; then
24697    if test "x$with_openssl" = xauto-gpl-compat; then
24698      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether openssl is GPL compatible" >&5
24699printf %s "checking whether openssl is GPL compatible... " >&6; }
24700if test ${gl_cv_openssl_gpl_compat+y}
24701then :
24702  printf %s "(cached) " >&6
24703else $as_nop
24704  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24705/* end confdefs.h.  */
24706
24707                #include <openssl/opensslv.h>
24708                #if OPENSSL_VERSION_MAJOR < 3
24709                  #error "openssl >= version 3 not found"
24710                #endif
24711
24712int
24713main (void)
24714{
24715
24716  ;
24717  return 0;
24718}
24719_ACEOF
24720if ac_fn_c_try_compile "$LINENO"
24721then :
24722  gl_cv_openssl_gpl_compat=yes
24723else $as_nop
24724  gl_cv_openssl_gpl_compat=no
24725fi
24726rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24727fi
24728{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_openssl_gpl_compat" >&5
24729printf "%s\n" "$gl_cv_openssl_gpl_compat" >&6; }
24730    fi
24731    if test "x$with_openssl" != xauto-gpl-compat ||
24732       test "x$gl_cv_openssl_gpl_compat" = xyes; then
24733      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MD5 in -lcrypto" >&5
24734printf %s "checking for MD5 in -lcrypto... " >&6; }
24735if test ${ac_cv_lib_crypto_MD5+y}
24736then :
24737  printf %s "(cached) " >&6
24738else $as_nop
24739  ac_check_lib_save_LIBS=$LIBS
24740LIBS="-lcrypto  $LIBS"
24741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24742/* end confdefs.h.  */
24743
24744/* Override any GCC internal prototype to avoid an error.
24745   Use char because int might match the return type of a GCC
24746   builtin and then its argument prototype would still apply.  */
24747char MD5 ();
24748int
24749main (void)
24750{
24751return MD5 ();
24752  ;
24753  return 0;
24754}
24755_ACEOF
24756if ac_fn_c_try_link "$LINENO"
24757then :
24758  ac_cv_lib_crypto_MD5=yes
24759else $as_nop
24760  ac_cv_lib_crypto_MD5=no
24761fi
24762rm -f core conftest.err conftest.$ac_objext conftest.beam \
24763    conftest$ac_exeext conftest.$ac_ext
24764LIBS=$ac_check_lib_save_LIBS
24765fi
24766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5" >&5
24767printf "%s\n" "$ac_cv_lib_crypto_MD5" >&6; }
24768if test "x$ac_cv_lib_crypto_MD5" = xyes
24769then :
24770         for ac_header in openssl/md5.h
24771do :
24772  ac_fn_c_check_header_compile "$LINENO" "openssl/md5.h" "ac_cv_header_openssl_md5_h" "$ac_includes_default"
24773if test "x$ac_cv_header_openssl_md5_h" = xyes
24774then :
24775  printf "%s\n" "#define HAVE_OPENSSL_MD5_H 1" >>confdefs.h
24776 LIB_CRYPTO=-lcrypto
24777
24778printf "%s\n" "#define HAVE_OPENSSL_MD5 1" >>confdefs.h
24779
24780fi
24781
24782done
24783fi
24784
24785    fi
24786    if test "x$LIB_CRYPTO" = x; then
24787      if test "x$with_openssl" = xyes; then
24788        as_fn_error $? "openssl development library not found for MD5" "$LINENO" 5
24789      elif test "x$with_openssl" = xoptional; then
24790        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: openssl development library not found for MD5" >&5
24791printf "%s\n" "$as_me: WARNING: openssl development library not found for MD5" >&2;}
24792      fi
24793    fi
24794  fi
24795
24796
24797
24798printf "%s\n" "#define GL_COMPILE_CRYPTO_STREAM 1" >>confdefs.h
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810# Check whether --with-openssl was given.
24811if test ${with_openssl+y}
24812then :
24813  withval=$with_openssl;
24814else $as_nop
24815  with_openssl=$with_openssl_default
24816fi
24817
24818
24819
24820  if test "x$with_openssl" != xno; then
24821    if test "x$with_openssl" = xauto-gpl-compat; then
24822      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether openssl is GPL compatible" >&5
24823printf %s "checking whether openssl is GPL compatible... " >&6; }
24824if test ${gl_cv_openssl_gpl_compat+y}
24825then :
24826  printf %s "(cached) " >&6
24827else $as_nop
24828  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24829/* end confdefs.h.  */
24830
24831                #include <openssl/opensslv.h>
24832                #if OPENSSL_VERSION_MAJOR < 3
24833                  #error "openssl >= version 3 not found"
24834                #endif
24835
24836int
24837main (void)
24838{
24839
24840  ;
24841  return 0;
24842}
24843_ACEOF
24844if ac_fn_c_try_compile "$LINENO"
24845then :
24846  gl_cv_openssl_gpl_compat=yes
24847else $as_nop
24848  gl_cv_openssl_gpl_compat=no
24849fi
24850rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24851fi
24852{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_openssl_gpl_compat" >&5
24853printf "%s\n" "$gl_cv_openssl_gpl_compat" >&6; }
24854    fi
24855    if test "x$with_openssl" != xauto-gpl-compat ||
24856       test "x$gl_cv_openssl_gpl_compat" = xyes; then
24857      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA1 in -lcrypto" >&5
24858printf %s "checking for SHA1 in -lcrypto... " >&6; }
24859if test ${ac_cv_lib_crypto_SHA1+y}
24860then :
24861  printf %s "(cached) " >&6
24862else $as_nop
24863  ac_check_lib_save_LIBS=$LIBS
24864LIBS="-lcrypto  $LIBS"
24865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24866/* end confdefs.h.  */
24867
24868/* Override any GCC internal prototype to avoid an error.
24869   Use char because int might match the return type of a GCC
24870   builtin and then its argument prototype would still apply.  */
24871char SHA1 ();
24872int
24873main (void)
24874{
24875return SHA1 ();
24876  ;
24877  return 0;
24878}
24879_ACEOF
24880if ac_fn_c_try_link "$LINENO"
24881then :
24882  ac_cv_lib_crypto_SHA1=yes
24883else $as_nop
24884  ac_cv_lib_crypto_SHA1=no
24885fi
24886rm -f core conftest.err conftest.$ac_objext conftest.beam \
24887    conftest$ac_exeext conftest.$ac_ext
24888LIBS=$ac_check_lib_save_LIBS
24889fi
24890{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1" >&5
24891printf "%s\n" "$ac_cv_lib_crypto_SHA1" >&6; }
24892if test "x$ac_cv_lib_crypto_SHA1" = xyes
24893then :
24894         for ac_header in openssl/sha.h
24895do :
24896  ac_fn_c_check_header_compile "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default"
24897if test "x$ac_cv_header_openssl_sha_h" = xyes
24898then :
24899  printf "%s\n" "#define HAVE_OPENSSL_SHA_H 1" >>confdefs.h
24900 LIB_CRYPTO=-lcrypto
24901
24902printf "%s\n" "#define HAVE_OPENSSL_SHA1 1" >>confdefs.h
24903
24904fi
24905
24906done
24907fi
24908
24909    fi
24910    if test "x$LIB_CRYPTO" = x; then
24911      if test "x$with_openssl" = xyes; then
24912        as_fn_error $? "openssl development library not found for SHA1" "$LINENO" 5
24913      elif test "x$with_openssl" = xoptional; then
24914        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: openssl development library not found for SHA1" >&5
24915printf "%s\n" "$as_me: WARNING: openssl development library not found for SHA1" >&2;}
24916      fi
24917    fi
24918  fi
24919
24920
24921
24922printf "%s\n" "#define GL_COMPILE_CRYPTO_STREAM 1" >>confdefs.h
24923
24924
24925
24926
24927
24928
24929
24930
24931
24932
24933
24934# Check whether --with-openssl was given.
24935if test ${with_openssl+y}
24936then :
24937  withval=$with_openssl;
24938else $as_nop
24939  with_openssl=$with_openssl_default
24940fi
24941
24942
24943
24944  if test "x$with_openssl" != xno; then
24945    if test "x$with_openssl" = xauto-gpl-compat; then
24946      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether openssl is GPL compatible" >&5
24947printf %s "checking whether openssl is GPL compatible... " >&6; }
24948if test ${gl_cv_openssl_gpl_compat+y}
24949then :
24950  printf %s "(cached) " >&6
24951else $as_nop
24952  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24953/* end confdefs.h.  */
24954
24955                #include <openssl/opensslv.h>
24956                #if OPENSSL_VERSION_MAJOR < 3
24957                  #error "openssl >= version 3 not found"
24958                #endif
24959
24960int
24961main (void)
24962{
24963
24964  ;
24965  return 0;
24966}
24967_ACEOF
24968if ac_fn_c_try_compile "$LINENO"
24969then :
24970  gl_cv_openssl_gpl_compat=yes
24971else $as_nop
24972  gl_cv_openssl_gpl_compat=no
24973fi
24974rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24975fi
24976{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_openssl_gpl_compat" >&5
24977printf "%s\n" "$gl_cv_openssl_gpl_compat" >&6; }
24978    fi
24979    if test "x$with_openssl" != xauto-gpl-compat ||
24980       test "x$gl_cv_openssl_gpl_compat" = xyes; then
24981      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA256 in -lcrypto" >&5
24982printf %s "checking for SHA256 in -lcrypto... " >&6; }
24983if test ${ac_cv_lib_crypto_SHA256+y}
24984then :
24985  printf %s "(cached) " >&6
24986else $as_nop
24987  ac_check_lib_save_LIBS=$LIBS
24988LIBS="-lcrypto  $LIBS"
24989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24990/* end confdefs.h.  */
24991
24992/* Override any GCC internal prototype to avoid an error.
24993   Use char because int might match the return type of a GCC
24994   builtin and then its argument prototype would still apply.  */
24995char SHA256 ();
24996int
24997main (void)
24998{
24999return SHA256 ();
25000  ;
25001  return 0;
25002}
25003_ACEOF
25004if ac_fn_c_try_link "$LINENO"
25005then :
25006  ac_cv_lib_crypto_SHA256=yes
25007else $as_nop
25008  ac_cv_lib_crypto_SHA256=no
25009fi
25010rm -f core conftest.err conftest.$ac_objext conftest.beam \
25011    conftest$ac_exeext conftest.$ac_ext
25012LIBS=$ac_check_lib_save_LIBS
25013fi
25014{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA256" >&5
25015printf "%s\n" "$ac_cv_lib_crypto_SHA256" >&6; }
25016if test "x$ac_cv_lib_crypto_SHA256" = xyes
25017then :
25018         for ac_header in openssl/sha.h
25019do :
25020  ac_fn_c_check_header_compile "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default"
25021if test "x$ac_cv_header_openssl_sha_h" = xyes
25022then :
25023  printf "%s\n" "#define HAVE_OPENSSL_SHA_H 1" >>confdefs.h
25024 LIB_CRYPTO=-lcrypto
25025
25026printf "%s\n" "#define HAVE_OPENSSL_SHA256 1" >>confdefs.h
25027
25028fi
25029
25030done
25031fi
25032
25033    fi
25034    if test "x$LIB_CRYPTO" = x; then
25035      if test "x$with_openssl" = xyes; then
25036        as_fn_error $? "openssl development library not found for SHA256" "$LINENO" 5
25037      elif test "x$with_openssl" = xoptional; then
25038        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: openssl development library not found for SHA256" >&5
25039printf "%s\n" "$as_me: WARNING: openssl development library not found for SHA256" >&2;}
25040      fi
25041    fi
25042  fi
25043
25044
25045
25046printf "%s\n" "#define GL_COMPILE_CRYPTO_STREAM 1" >>confdefs.h
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058# Check whether --with-openssl was given.
25059if test ${with_openssl+y}
25060then :
25061  withval=$with_openssl;
25062else $as_nop
25063  with_openssl=$with_openssl_default
25064fi
25065
25066
25067
25068  if test "x$with_openssl" != xno; then
25069    if test "x$with_openssl" = xauto-gpl-compat; then
25070      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether openssl is GPL compatible" >&5
25071printf %s "checking whether openssl is GPL compatible... " >&6; }
25072if test ${gl_cv_openssl_gpl_compat+y}
25073then :
25074  printf %s "(cached) " >&6
25075else $as_nop
25076  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25077/* end confdefs.h.  */
25078
25079                #include <openssl/opensslv.h>
25080                #if OPENSSL_VERSION_MAJOR < 3
25081                  #error "openssl >= version 3 not found"
25082                #endif
25083
25084int
25085main (void)
25086{
25087
25088  ;
25089  return 0;
25090}
25091_ACEOF
25092if ac_fn_c_try_compile "$LINENO"
25093then :
25094  gl_cv_openssl_gpl_compat=yes
25095else $as_nop
25096  gl_cv_openssl_gpl_compat=no
25097fi
25098rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25099fi
25100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_openssl_gpl_compat" >&5
25101printf "%s\n" "$gl_cv_openssl_gpl_compat" >&6; }
25102    fi
25103    if test "x$with_openssl" != xauto-gpl-compat ||
25104       test "x$gl_cv_openssl_gpl_compat" = xyes; then
25105      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA512 in -lcrypto" >&5
25106printf %s "checking for SHA512 in -lcrypto... " >&6; }
25107if test ${ac_cv_lib_crypto_SHA512+y}
25108then :
25109  printf %s "(cached) " >&6
25110else $as_nop
25111  ac_check_lib_save_LIBS=$LIBS
25112LIBS="-lcrypto  $LIBS"
25113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25114/* end confdefs.h.  */
25115
25116/* Override any GCC internal prototype to avoid an error.
25117   Use char because int might match the return type of a GCC
25118   builtin and then its argument prototype would still apply.  */
25119char SHA512 ();
25120int
25121main (void)
25122{
25123return SHA512 ();
25124  ;
25125  return 0;
25126}
25127_ACEOF
25128if ac_fn_c_try_link "$LINENO"
25129then :
25130  ac_cv_lib_crypto_SHA512=yes
25131else $as_nop
25132  ac_cv_lib_crypto_SHA512=no
25133fi
25134rm -f core conftest.err conftest.$ac_objext conftest.beam \
25135    conftest$ac_exeext conftest.$ac_ext
25136LIBS=$ac_check_lib_save_LIBS
25137fi
25138{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA512" >&5
25139printf "%s\n" "$ac_cv_lib_crypto_SHA512" >&6; }
25140if test "x$ac_cv_lib_crypto_SHA512" = xyes
25141then :
25142         for ac_header in openssl/sha.h
25143do :
25144  ac_fn_c_check_header_compile "$LINENO" "openssl/sha.h" "ac_cv_header_openssl_sha_h" "$ac_includes_default"
25145if test "x$ac_cv_header_openssl_sha_h" = xyes
25146then :
25147  printf "%s\n" "#define HAVE_OPENSSL_SHA_H 1" >>confdefs.h
25148 LIB_CRYPTO=-lcrypto
25149
25150printf "%s\n" "#define HAVE_OPENSSL_SHA512 1" >>confdefs.h
25151
25152fi
25153
25154done
25155fi
25156
25157    fi
25158    if test "x$LIB_CRYPTO" = x; then
25159      if test "x$with_openssl" = xyes; then
25160        as_fn_error $? "openssl development library not found for SHA512" "$LINENO" 5
25161      elif test "x$with_openssl" = xoptional; then
25162        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: openssl development library not found for SHA512" >&5
25163printf "%s\n" "$as_me: WARNING: openssl development library not found for SHA512" >&2;}
25164      fi
25165    fi
25166  fi
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180     if test $gl_cv_have_include_next = yes; then
25181       gl_cv_next_ctype_h='<'ctype.h'>'
25182     else
25183       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
25184printf %s "checking absolute name of <ctype.h>... " >&6; }
25185if test ${gl_cv_next_ctype_h+y}
25186then :
25187  printf %s "(cached) " >&6
25188else $as_nop
25189
25190
25191
25192  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25193/* end confdefs.h.  */
25194#include <ctype.h>
25195_ACEOF
25196                case "$host_os" in
25197    aix*) gl_absname_cpp="$ac_cpp -C" ;;
25198    *)    gl_absname_cpp="$ac_cpp" ;;
25199  esac
25200
25201  case "$host_os" in
25202    mingw*)
25203                                          gl_dirsep_regex='[/\\]'
25204      ;;
25205    *)
25206      gl_dirsep_regex='\/'
25207      ;;
25208  esac
25209      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25210  gl_header_literal_regex=`echo 'ctype.h' \
25211                           | sed -e "$gl_make_literal_regex_sed"`
25212  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25213      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25214      s|^/[^/]|//&|
25215      p
25216      q
25217    }'
25218
25219        gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25220  sed -n "$gl_absolute_header_sed"`
25221
25222           gl_header=$gl_cv_absolute_ctype_h
25223           gl_cv_next_ctype_h='"'$gl_header'"'
25224
25225
25226fi
25227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
25228printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
25229     fi
25230     NEXT_CTYPE_H=$gl_cv_next_ctype_h
25231
25232     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25233       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25234       gl_next_as_first_directive='<'ctype.h'>'
25235     else
25236       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25237       gl_next_as_first_directive=$gl_cv_next_ctype_h
25238     fi
25239     NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
25250printf %s "checking for d_ino member in directory struct... " >&6; }
25251if test ${gl_cv_struct_dirent_d_ino+y}
25252then :
25253  printf %s "(cached) " >&6
25254else $as_nop
25255  if test "$cross_compiling" = yes
25256then :
25257  case "$host_os" in
25258                            # Guess yes on glibc systems with Linux kernel.
25259              linux*-gnu*)  gl_cv_struct_dirent_d_ino="guessing yes" ;;
25260                            # Guess yes on musl systems with Linux kernel.
25261              linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
25262                            # Guess no on native Windows.
25263              mingw*)       gl_cv_struct_dirent_d_ino="guessing no" ;;
25264                            # If we don't know, obey --enable-cross-guesses.
25265              *)            gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
25266            esac
25267
25268else $as_nop
25269  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25270/* end confdefs.h.  */
25271#include <sys/types.h>
25272             #include <sys/stat.h>
25273             #include <dirent.h>
25274
25275int
25276main (void)
25277{
25278DIR *dp = opendir (".");
25279             struct dirent *e;
25280             struct stat st;
25281             if (! dp)
25282               return 1;
25283             e = readdir (dp);
25284             if (! e)
25285               { closedir (dp); return 2; }
25286             if (lstat (e->d_name, &st) != 0)
25287               { closedir (dp); return 3; }
25288             if (e->d_ino != st.st_ino)
25289               { closedir (dp); return 4; }
25290             closedir (dp);
25291             return 0;
25292
25293  ;
25294  return 0;
25295}
25296_ACEOF
25297if ac_fn_c_try_run "$LINENO"
25298then :
25299  gl_cv_struct_dirent_d_ino=yes
25300else $as_nop
25301  gl_cv_struct_dirent_d_ino=no
25302fi
25303rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25304  conftest.$ac_objext conftest.beam conftest.$ac_ext
25305fi
25306
25307fi
25308{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
25309printf "%s\n" "$gl_cv_struct_dirent_d_ino" >&6; }
25310   case "$gl_cv_struct_dirent_d_ino" in
25311     *yes)
25312
25313printf "%s\n" "#define D_INO_IN_DIRENT 1" >>confdefs.h
25314
25315       ;;
25316   esac
25317
25318
25319  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
25320printf %s "checking for d_type member in directory struct... " >&6; }
25321if test ${gl_cv_struct_dirent_d_type+y}
25322then :
25323  printf %s "(cached) " >&6
25324else $as_nop
25325  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25326/* end confdefs.h.  */
25327
25328#include <sys/types.h>
25329#include <dirent.h>
25330
25331int
25332main (void)
25333{
25334struct dirent dp; dp.d_type = 0;
25335  ;
25336  return 0;
25337}
25338_ACEOF
25339if ac_fn_c_try_link "$LINENO"
25340then :
25341  gl_cv_struct_dirent_d_type=yes
25342else $as_nop
25343  gl_cv_struct_dirent_d_type=no
25344fi
25345rm -f core conftest.err conftest.$ac_objext conftest.beam \
25346    conftest$ac_exeext conftest.$ac_ext
25347
25348
25349fi
25350{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
25351printf "%s\n" "$gl_cv_struct_dirent_d_type" >&6; }
25352   if test $gl_cv_struct_dirent_d_type = yes; then
25353
25354printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
25355
25356   fi
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371     if test $gl_cv_have_include_next = yes; then
25372       gl_cv_next_dirent_h='<'dirent.h'>'
25373     else
25374       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
25375printf %s "checking absolute name of <dirent.h>... " >&6; }
25376if test ${gl_cv_next_dirent_h+y}
25377then :
25378  printf %s "(cached) " >&6
25379else $as_nop
25380
25381             if test $ac_cv_header_dirent_h = yes; then
25382
25383
25384
25385
25386  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25387/* end confdefs.h.  */
25388#include <dirent.h>
25389_ACEOF
25390                case "$host_os" in
25391    aix*) gl_absname_cpp="$ac_cpp -C" ;;
25392    *)    gl_absname_cpp="$ac_cpp" ;;
25393  esac
25394
25395  case "$host_os" in
25396    mingw*)
25397                                          gl_dirsep_regex='[/\\]'
25398      ;;
25399    *)
25400      gl_dirsep_regex='\/'
25401      ;;
25402  esac
25403      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25404  gl_header_literal_regex=`echo 'dirent.h' \
25405                           | sed -e "$gl_make_literal_regex_sed"`
25406  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25407      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25408      s|^/[^/]|//&|
25409      p
25410      q
25411    }'
25412
25413        gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25414  sed -n "$gl_absolute_header_sed"`
25415
25416           gl_header=$gl_cv_absolute_dirent_h
25417           gl_cv_next_dirent_h='"'$gl_header'"'
25418          else
25419               gl_cv_next_dirent_h='<'dirent.h'>'
25420             fi
25421
25422
25423fi
25424{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
25425printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
25426     fi
25427     NEXT_DIRENT_H=$gl_cv_next_dirent_h
25428
25429     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25430       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25431       gl_next_as_first_directive='<'dirent.h'>'
25432     else
25433       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25434       gl_next_as_first_directive=$gl_cv_next_dirent_h
25435     fi
25436     NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
25437
25438
25439
25440
25441  if test $ac_cv_header_dirent_h = yes; then
25442    HAVE_DIRENT_H=1
25443  else
25444    HAVE_DIRENT_H=0
25445  fi
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
25458if test "x$ac_cv_func_dirfd" = xyes
25459then :
25460  printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
25461
25462fi
25463
25464  ac_fn_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
25465      #include <dirent.h>
25466" "$ac_c_undeclared_builtin_options" "CFLAGS"
25467if test "x$ac_cv_have_decl_dirfd" = xyes
25468then :
25469  ac_have_decl=1
25470else $as_nop
25471  ac_have_decl=0
25472fi
25473printf "%s\n" "#define HAVE_DECL_DIRFD $ac_have_decl" >>confdefs.h
25474
25475  if test $ac_cv_have_decl_dirfd = no; then
25476    HAVE_DECL_DIRFD=0
25477  fi
25478
25479  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
25480printf %s "checking whether dirfd is a macro... " >&6; }
25481if test ${gl_cv_func_dirfd_macro+y}
25482then :
25483  printf %s "(cached) " >&6
25484else $as_nop
25485  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25486/* end confdefs.h.  */
25487
25488#include <sys/types.h>
25489#include <dirent.h>
25490#ifdef dirfd
25491 dirent_header_defines_dirfd
25492#endif
25493_ACEOF
25494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25495  $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1
25496then :
25497  gl_cv_func_dirfd_macro=yes
25498else $as_nop
25499  gl_cv_func_dirfd_macro=no
25500fi
25501rm -rf conftest*
25502
25503fi
25504{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
25505printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }
25506
25507  # Use the replacement if we have no function or macro with that name,
25508  # or if OS/2 kLIBC whose dirfd() does not work.
25509  # Replace only if the system declares dirfd already.
25510  case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
25511    no,no,*,yes | *,*,os2*,yes)
25512      REPLACE_DIRFD=1
25513
25514printf "%s\n" "#define REPLACE_DIRFD 1" >>confdefs.h
25515;;
25516  esac
25517
25518  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
25519     || test $REPLACE_DIRFD = 1; then
25520
25521
25522
25523
25524
25525
25526
25527
25528  gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
25529
25530
25531  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
25532printf %s "checking how to get the file descriptor associated with an open DIR*... " >&6; }
25533if test ${gl_cv_sys_dir_fd_member_name+y}
25534then :
25535  printf %s "(cached) " >&6
25536else $as_nop
25537
25538      dirfd_save_CFLAGS=$CFLAGS
25539      for ac_expr in d_fd dd_fd; do
25540
25541        CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
25542        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25543/* end confdefs.h.  */
25544
25545           #include <sys/types.h>
25546           #include <dirent.h>
25547int
25548main (void)
25549{
25550DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
25551  ;
25552  return 0;
25553}
25554_ACEOF
25555if ac_fn_c_try_compile "$LINENO"
25556then :
25557  dir_fd_found=yes
25558
25559fi
25560rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25561        CFLAGS=$dirfd_save_CFLAGS
25562        test "$dir_fd_found" = yes && break
25563      done
25564      test "$dir_fd_found" = yes || ac_expr=no_such_member
25565
25566      gl_cv_sys_dir_fd_member_name=$ac_expr
25567
25568
25569fi
25570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
25571printf "%s\n" "$gl_cv_sys_dir_fd_member_name" >&6; }
25572  if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
25573
25574printf "%s\n" "#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name" >>confdefs.h
25575
25576  fi
25577
25578
25579  fi
25580
25581
25582
25583
25584
25585          GNULIB_DIRFD=1
25586
25587
25588
25589
25590
25591printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
25592
25593
25594
25595
25596
25597printf "%s\n" "#define GNULIB_DIRNAME 1" >>confdefs.h
25598
25599
25600
25601
25602  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
25603printf %s "checking whether // is distinct from /... " >&6; }
25604if test ${gl_cv_double_slash_root+y}
25605then :
25606  printf %s "(cached) " >&6
25607else $as_nop
25608   if test x"$cross_compiling" = xyes ; then
25609        # When cross-compiling, there is no way to tell whether // is special
25610        # short of a list of hosts.  However, the only known hosts to date
25611        # that have a distinct // are Apollo DomainOS (too old to port to),
25612        # Cygwin, and z/OS.  If anyone knows of another system for which // has
25613        # special semantics and is distinct from /, please report it to
25614        # <bug-gnulib@gnu.org>.
25615        case $host in
25616          *-cygwin | i370-ibm-openedition)
25617            gl_cv_double_slash_root=yes ;;
25618          *)
25619            # Be optimistic and assume that / and // are the same when we
25620            # don't know.
25621            gl_cv_double_slash_root='unknown, assuming no' ;;
25622        esac
25623      else
25624        set x `ls -di / // 2>/dev/null`
25625        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
25626          gl_cv_double_slash_root=no
25627        else
25628          gl_cv_double_slash_root=yes
25629        fi
25630      fi
25631fi
25632{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
25633printf "%s\n" "$gl_cv_double_slash_root" >&6; }
25634  if test "$gl_cv_double_slash_root" = yes; then
25635
25636printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
25637
25638  fi
25639
25640
25641
25642
25643
25644    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25645      REPLACE_DUP=1
25646    fi
25647
25648
25649
25650
25651
25652  if test $ac_cv_func_fchdir = no; then
25653    HAVE_FCHDIR=0
25654  fi
25655
25656    if test $HAVE_FCHDIR = 0; then
25657      REPLACE_DUP=1
25658    fi
25659
25660  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
25661printf %s "checking whether dup works... " >&6; }
25662if test ${gl_cv_func_dup_works+y}
25663then :
25664  printf %s "(cached) " >&6
25665else $as_nop
25666  if test "$cross_compiling" = yes
25667then :
25668  case "$host_os" in
25669                 # Guess no on native Windows.
25670         mingw*) gl_cv_func_dup_works="guessing no" ;;
25671         *)      gl_cv_func_dup_works="guessing yes" ;;
25672       esac
25673
25674else $as_nop
25675  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25676/* end confdefs.h.  */
25677#include <unistd.h>
25678                         #include <fcntl.h>
25679                         #include <errno.h>
25680
25681
25682$gl_mda_defines
25683
25684int
25685main (void)
25686{
25687/* On OS/2 kLIBC, dup does not work on a directory fd.  */
25688           int fd = open (".", O_RDONLY);
25689           return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
25690
25691  ;
25692  return 0;
25693}
25694
25695_ACEOF
25696if ac_fn_c_try_run "$LINENO"
25697then :
25698  gl_cv_func_dup_works=yes
25699else $as_nop
25700  gl_cv_func_dup_works=no
25701fi
25702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25703  conftest.$ac_objext conftest.beam conftest.$ac_ext
25704fi
25705
25706
25707fi
25708{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
25709printf "%s\n" "$gl_cv_func_dup_works" >&6; }
25710  case "$gl_cv_func_dup_works" in
25711    *yes) ;;
25712    *)
25713      REPLACE_DUP=1
25714      ;;
25715  esac
25716
25717  if test $REPLACE_DUP = 1; then
25718
25719
25720
25721
25722
25723
25724
25725
25726  gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
25727
25728    :
25729  fi
25730
25731
25732
25733
25734
25735          GNULIB_DUP=1
25736
25737
25738
25739
25740
25741printf "%s\n" "#define GNULIB_TEST_DUP 1" >>confdefs.h
25742
25743
25744
25745
25746
25747
25748  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
25749printf %s "checking whether dup2 works... " >&6; }
25750if test ${gl_cv_func_dup2_works+y}
25751then :
25752  printf %s "(cached) " >&6
25753else $as_nop
25754  if test "$cross_compiling" = yes
25755then :
25756  case "$host_os" in
25757         mingw*) # on this platform, dup2 always returns 0 for success
25758           gl_cv_func_dup2_works="guessing no" ;;
25759         cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
25760           gl_cv_func_dup2_works="guessing no" ;;
25761         aix* | freebsd*)
25762                 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
25763                 # not EBADF.
25764           gl_cv_func_dup2_works="guessing no" ;;
25765         haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
25766           gl_cv_func_dup2_works="guessing no" ;;
25767         *-android*) # implemented using dup3(), which fails if oldfd == newfd
25768           gl_cv_func_dup2_works="guessing no" ;;
25769         os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
25770           gl_cv_func_dup2_works="guessing no" ;;
25771         *) gl_cv_func_dup2_works="guessing yes" ;;
25772       esac
25773else $as_nop
25774  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25775/* end confdefs.h.  */
25776
25777       #include <errno.h>
25778           #include <fcntl.h>
25779           #include <limits.h>
25780           #include <sys/resource.h>
25781           #include <unistd.h>
25782
25783
25784$gl_mda_defines
25785
25786           #ifndef RLIM_SAVED_CUR
25787           # define RLIM_SAVED_CUR RLIM_INFINITY
25788           #endif
25789           #ifndef RLIM_SAVED_MAX
25790           # define RLIM_SAVED_MAX RLIM_INFINITY
25791           #endif
25792
25793int
25794main (void)
25795{
25796int result = 0;
25797           int bad_fd = INT_MAX;
25798           struct rlimit rlim;
25799           if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
25800               && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
25801               && rlim.rlim_cur != RLIM_INFINITY
25802               && rlim.rlim_cur != RLIM_SAVED_MAX
25803               && rlim.rlim_cur != RLIM_SAVED_CUR)
25804             bad_fd = rlim.rlim_cur;
25805           #ifdef FD_CLOEXEC
25806             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
25807               result |= 1;
25808           #endif
25809           if (dup2 (1, 1) != 1)
25810             result |= 2;
25811           #ifdef FD_CLOEXEC
25812             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
25813               result |= 4;
25814           #endif
25815           close (0);
25816           if (dup2 (0, 0) != -1)
25817             result |= 8;
25818           /* Many gnulib modules require POSIX conformance of EBADF.  */
25819           if (dup2 (2, bad_fd) == -1 && errno != EBADF)
25820             result |= 16;
25821           /* Flush out some cygwin core dumps.  */
25822           if (dup2 (2, -1) != -1 || errno != EBADF)
25823             result |= 32;
25824           dup2 (2, 255);
25825           dup2 (2, 256);
25826           /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
25827           {
25828             int fd = open (".", O_RDONLY);
25829             if (fd == -1)
25830               result |= 64;
25831             else if (dup2 (fd, fd + 1) == -1)
25832               result |= 128;
25833             close (fd);
25834           }
25835           return result;
25836  ;
25837  return 0;
25838}
25839
25840_ACEOF
25841if ac_fn_c_try_run "$LINENO"
25842then :
25843  gl_cv_func_dup2_works=yes
25844else $as_nop
25845  gl_cv_func_dup2_works=no
25846fi
25847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25848  conftest.$ac_objext conftest.beam conftest.$ac_ext
25849fi
25850
25851
25852fi
25853{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
25854printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
25855  case "$gl_cv_func_dup2_works" in
25856    *yes) ;;
25857    *)
25858      REPLACE_DUP2=1
25859      ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
25860if test "x$ac_cv_func_setdtablesize" = xyes
25861then :
25862  printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
25863
25864fi
25865
25866      ;;
25867  esac
25868
25869
25870
25871
25872  if test $ac_cv_func_fchdir = no; then
25873    HAVE_FCHDIR=0
25874  fi
25875
25876    if test $HAVE_FCHDIR = 0; then
25877      REPLACE_DUP2=1
25878    fi
25879
25880
25881  if test $REPLACE_DUP2 = 1; then
25882
25883
25884
25885
25886
25887
25888
25889
25890  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
25891
25892
25893  fi
25894
25895
25896
25897
25898
25899          GNULIB_DUP2=1
25900
25901
25902
25903
25904
25905printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
25906
25907
25908
25909
25910
25911
25912
25913
25914
25915          GNULIB_ENVIRON=1
25916
25917
25918
25919
25920
25921printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
25922
25923
25924
25925
25926
25927      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
25928printf %s "checking for error_at_line... " >&6; }
25929if test ${ac_cv_lib_error_at_line+y}
25930then :
25931  printf %s "(cached) " >&6
25932else $as_nop
25933  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25934/* end confdefs.h.  */
25935#include <error.h>
25936int
25937main (void)
25938{
25939error_at_line (0, 0, "", 0, "an error occurred");
25940  ;
25941  return 0;
25942}
25943_ACEOF
25944if ac_fn_c_try_link "$LINENO"
25945then :
25946  ac_cv_lib_error_at_line=yes
25947else $as_nop
25948  ac_cv_lib_error_at_line=no
25949fi
25950rm -f core conftest.err conftest.$ac_objext conftest.beam \
25951    conftest$ac_exeext conftest.$ac_ext
25952fi
25953{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
25954printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
25955
25956  if test $ac_cv_lib_error_at_line = no; then
25957
25958
25959
25960
25961
25962
25963
25964
25965  gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
25966
25967
25968
25969  :
25970
25971  fi
25972
25973
25974  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
25975
25976
25977
25978  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
25979
25980
25981
25982
25983
25984  :
25985
25986
25987
25988
25989
25990
25991  if test $ac_cv_have_decl_fchdir = no; then
25992    HAVE_DECL_FCHDIR=0
25993  fi
25994
25995
25996  if test $HAVE_FCHDIR = 0; then
25997
25998
25999
26000
26001
26002
26003
26004
26005  gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
26006
26007    :
26008
26009printf "%s\n" "#define REPLACE_FCHDIR 1" >>confdefs.h
26010
26011                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
26012printf %s "checking whether open can visit directories... " >&6; }
26013if test ${gl_cv_func_open_directory_works+y}
26014then :
26015  printf %s "(cached) " >&6
26016else $as_nop
26017  if test "$cross_compiling" = yes
26018then :
26019  case "$host_os" in
26020                             # Guess yes on Linux systems.
26021            linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
26022                             # Guess yes on glibc systems.
26023            *-gnu* | gnu*)   gl_cv_func_open_directory_works="guessing yes" ;;
26024                             # Guess no on native Windows.
26025            mingw*)          gl_cv_func_open_directory_works="guessing no" ;;
26026                             # If we don't know, obey --enable-cross-guesses.
26027            *)               gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
26028          esac
26029
26030else $as_nop
26031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26032/* end confdefs.h.  */
26033#include <fcntl.h>
26034
26035
26036$gl_mda_defines
26037
26038int
26039main (void)
26040{
26041return open(".", O_RDONLY) < 0;
26042  ;
26043  return 0;
26044}
26045_ACEOF
26046if ac_fn_c_try_run "$LINENO"
26047then :
26048  gl_cv_func_open_directory_works=yes
26049else $as_nop
26050  gl_cv_func_open_directory_works=no
26051fi
26052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26053  conftest.$ac_objext conftest.beam conftest.$ac_ext
26054fi
26055
26056fi
26057{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
26058printf "%s\n" "$gl_cv_func_open_directory_works" >&6; }
26059    case "$gl_cv_func_open_directory_works" in
26060      *yes) ;;
26061      *)
26062
26063printf "%s\n" "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
26064
26065        ;;
26066    esac
26067  fi
26068
26069
26070
26071
26072
26073
26074          GNULIB_FCHDIR=1
26075
26076
26077
26078
26079
26080printf "%s\n" "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
26081
26082
26083
26084
26085
26086
26087
26088
26089
26090  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
26091printf %s "checking whether fflush works on input streams... " >&6; }
26092if test ${gl_cv_func_fflush_stdin+y}
26093then :
26094  printf %s "(cached) " >&6
26095else $as_nop
26096  echo hello world > conftest.txt
26097     if test "$cross_compiling" = yes
26098then :
26099  case "$host_os" in
26100                  # Guess no on native Windows.
26101          mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
26102          *)      gl_cv_func_fflush_stdin=cross ;;
26103        esac
26104
26105else $as_nop
26106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26107/* end confdefs.h.  */
26108
26109#include <stdio.h>
26110#if HAVE_UNISTD_H
26111# include <unistd.h>
26112#else /* on Windows with MSVC */
26113# include <io.h>
26114#endif
26115
26116
26117$gl_mda_defines
26118
26119int
26120main (void)
26121{
26122FILE *f = fopen ("conftest.txt", "r");
26123         char buffer[10];
26124         int fd;
26125         int c;
26126         if (f == NULL)
26127           return 1;
26128         fd = fileno (f);
26129         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
26130           { fclose (f); return 2; }
26131         /* For deterministic results, ensure f read a bigger buffer.  */
26132         if (lseek (fd, 0, SEEK_CUR) == 5)
26133           { fclose (f); return 3; }
26134         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
26135            on BSD systems and on mingw.  */
26136         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
26137           { fclose (f); return 4; }
26138         if (lseek (fd, 0, SEEK_CUR) != 5)
26139           { fclose (f); return 5; }
26140         /* Verify behaviour of fflush after ungetc. See
26141            <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
26142         /* Verify behaviour of fflush after a backup ungetc.  This fails on
26143            mingw.  */
26144         c = fgetc (f);
26145         ungetc (c, f);
26146         fflush (f);
26147         if (fgetc (f) != c)
26148           { fclose (f); return 6; }
26149         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
26150            on glibc 2.8 and on BSD systems.  */
26151         c = fgetc (f);
26152         ungetc ('@', f);
26153         fflush (f);
26154         if (fgetc (f) != c)
26155           { fclose (f); return 7; }
26156         fclose (f);
26157         return 0;
26158
26159  ;
26160  return 0;
26161}
26162_ACEOF
26163if ac_fn_c_try_run "$LINENO"
26164then :
26165  gl_cv_func_fflush_stdin=yes
26166else $as_nop
26167  gl_cv_func_fflush_stdin=no
26168fi
26169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26170  conftest.$ac_objext conftest.beam conftest.$ac_ext
26171fi
26172
26173     rm conftest.txt
26174
26175fi
26176{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
26177printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
26178  case "$gl_cv_func_fflush_stdin" in
26179    *yes) gl_func_fflush_stdin=1 ;;
26180    *no)  gl_func_fflush_stdin=0 ;;
26181    *)    gl_func_fflush_stdin='(-1)' ;;
26182  esac
26183
26184printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
26185
26186
26187  case "$gl_cv_func_fflush_stdin" in
26188    *yes) ;;
26189    *) REPLACE_FCLOSE=1 ;;
26190  esac
26191
26192
26193  if test $REPLACE_CLOSE = 1; then
26194    REPLACE_FCLOSE=1
26195  fi
26196
26197  case "$host_os" in
26198    openedition) REPLACE_FCLOSE=1 ;;
26199  esac
26200
26201  if test $REPLACE_FCLOSE = 0; then
26202
26203
26204  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fclose works on input streams" >&5
26205printf %s "checking whether fclose works on input streams... " >&6; }
26206if test ${gl_cv_func_fclose_stdin+y}
26207then :
26208  printf %s "(cached) " >&6
26209else $as_nop
26210  echo hello world > conftest.txt
26211     if test "$cross_compiling" = yes
26212then :
26213  case "$host_os" in
26214                         # Guess no on glibc systems.
26215          *-gnu* | gnu*) gl_cv_func_fclose_stdin="guessing no" ;;
26216                         # Guess yes on musl systems.
26217          *-musl*)       gl_cv_func_fclose_stdin="guessing yes" ;;
26218                         # Guess no on native Windows.
26219          mingw*)        gl_cv_func_fclose_stdin="guessing no" ;;
26220                         # If we don't know, obey --enable-cross-guesses.
26221          *)             gl_cv_func_fclose_stdin="$gl_cross_guess_normal" ;;
26222        esac
26223
26224else $as_nop
26225  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26226/* end confdefs.h.  */
26227#include <fcntl.h>
26228            #include <stdio.h>
26229            #if HAVE_UNISTD_H
26230            # include <unistd.h>
26231            #else /* on Windows with MSVC */
26232            # include <io.h>
26233            #endif
26234
26235
26236$gl_mda_defines
26237
26238int
26239main (void)
26240{
26241int fd;
26242            int fd2;
26243            FILE *fp;
26244            fd = open ("conftest.txt", O_RDONLY);
26245            if (fd < 0)
26246              return 1;
26247            if (lseek (fd, 1, SEEK_SET) != 1)
26248              return 2;
26249            fd2 = dup (fd);
26250            if (fd2 < 0)
26251              return 3;
26252            fp = fdopen (fd2, "r");
26253            if (fp == NULL)
26254              return 4;
26255            if (fgetc (fp) != 'e')
26256              { fclose (fp); return 5; }
26257            /* This fclose() call should reposition the underlying file
26258               descriptor.  */
26259            if (fclose (fp) != 0)
26260              return 6;
26261            if (lseek (fd2, 0, SEEK_CUR) != -1) /* should fail with EBADF */
26262              return 7;
26263            /* Verify the file position.  */
26264            if (lseek (fd, 0, SEEK_CUR) != 2)
26265              return 8;
26266            return 0;
26267
26268  ;
26269  return 0;
26270}
26271_ACEOF
26272if ac_fn_c_try_run "$LINENO"
26273then :
26274  gl_cv_func_fclose_stdin=yes
26275else $as_nop
26276  gl_cv_func_fclose_stdin=no
26277fi
26278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26279  conftest.$ac_objext conftest.beam conftest.$ac_ext
26280fi
26281
26282     rm conftest.txt
26283
26284fi
26285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fclose_stdin" >&5
26286printf "%s\n" "$gl_cv_func_fclose_stdin" >&6; }
26287
26288    case "$gl_cv_func_fclose_stdin" in
26289      *yes) ;;
26290      *) REPLACE_FCLOSE=1 ;;
26291    esac
26292  fi
26293
26294  if test $REPLACE_FCLOSE = 1; then
26295
26296
26297
26298
26299
26300
26301
26302
26303  gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
26304
26305  fi
26306
26307
26308
26309
26310
26311          GNULIB_FCLOSE=1
26312
26313
26314
26315
26316
26317printf "%s\n" "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
26318
26319
26320
26321
26322
26323
26324
26325
26326  if test $ac_cv_func_fcntl = no; then
26327
26328
26329
26330  if test $ac_cv_func_fcntl = no; then
26331    HAVE_FCNTL=0
26332  else
26333    REPLACE_FCNTL=1
26334  fi
26335
26336  else
26337            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
26338printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
26339if test ${gl_cv_func_fcntl_f_dupfd_works+y}
26340then :
26341  printf %s "(cached) " >&6
26342else $as_nop
26343  if test "$cross_compiling" = yes
26344then :
26345  case $host_os in
26346            aix* | cygwin* | haiku*)
26347               gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
26348            *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
26349          esac
26350else $as_nop
26351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26352/* end confdefs.h.  */
26353#include <errno.h>
26354              #include <fcntl.h>
26355              #include <limits.h>
26356              #include <sys/resource.h>
26357              #include <unistd.h>
26358
26359
26360$gl_mda_defines
26361
26362              #ifndef RLIM_SAVED_CUR
26363              # define RLIM_SAVED_CUR RLIM_INFINITY
26364              #endif
26365              #ifndef RLIM_SAVED_MAX
26366              # define RLIM_SAVED_MAX RLIM_INFINITY
26367              #endif
26368
26369int
26370main (void)
26371{
26372int result = 0;
26373              int bad_fd = INT_MAX;
26374              struct rlimit rlim;
26375              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
26376                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
26377                  && rlim.rlim_cur != RLIM_INFINITY
26378                  && rlim.rlim_cur != RLIM_SAVED_MAX
26379                  && rlim.rlim_cur != RLIM_SAVED_CUR)
26380                bad_fd = rlim.rlim_cur;
26381              if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
26382              if (errno != EINVAL) result |= 2;
26383              if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
26384              if (errno != EINVAL) result |= 8;
26385              /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
26386              {
26387                int fd;
26388                fd = open (".", O_RDONLY);
26389                if (fd == -1)
26390                  result |= 16;
26391                else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
26392                  result |= 32;
26393
26394                close (fd);
26395              }
26396              return result;
26397  ;
26398  return 0;
26399}
26400_ACEOF
26401if ac_fn_c_try_run "$LINENO"
26402then :
26403  gl_cv_func_fcntl_f_dupfd_works=yes
26404else $as_nop
26405  gl_cv_func_fcntl_f_dupfd_works=no
26406fi
26407rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26408  conftest.$ac_objext conftest.beam conftest.$ac_ext
26409fi
26410
26411fi
26412{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
26413printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
26414    case $gl_cv_func_fcntl_f_dupfd_works in
26415      *yes) ;;
26416      *)
26417
26418
26419  if test $ac_cv_func_fcntl = no; then
26420    HAVE_FCNTL=0
26421  else
26422    REPLACE_FCNTL=1
26423  fi
26424
26425
26426printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
26427 ;;
26428    esac
26429
26430            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
26431printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
26432if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
26433then :
26434  printf %s "(cached) " >&6
26435else $as_nop
26436  if test "$cross_compiling" = yes
26437then :
26438  case "$host_os" in
26439                     # Guess no on NetBSD.
26440            netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
26441            *)       gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
26442          esac
26443
26444else $as_nop
26445  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26446/* end confdefs.h.  */
26447#include <fcntl.h>
26448              #include <unistd.h>
26449              int main (int argc, char *argv[])
26450              {
26451                if (argc == 1)
26452                  /* parent process */
26453                  {
26454                    if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
26455                      return 1;
26456                    return execl ("./conftest", "./conftest", "child", NULL);
26457                  }
26458                else
26459                  /* child process */
26460                  return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
26461              }
26462
26463
26464_ACEOF
26465if ac_fn_c_try_run "$LINENO"
26466then :
26467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26468/* end confdefs.h.  */
26469
26470#ifdef __linux__
26471/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
26472   it to support the semantics on older kernels that failed with EINVAL.  */
26473choke me
26474#endif
26475
26476int
26477main (void)
26478{
26479
26480  ;
26481  return 0;
26482}
26483_ACEOF
26484if ac_fn_c_try_compile "$LINENO"
26485then :
26486  gl_cv_func_fcntl_f_dupfd_cloexec=yes
26487else $as_nop
26488  gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
26489fi
26490rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26491
26492else $as_nop
26493  gl_cv_func_fcntl_f_dupfd_cloexec=no
26494fi
26495rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26496  conftest.$ac_objext conftest.beam conftest.$ac_ext
26497fi
26498
26499
26500fi
26501{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
26502printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
26503    case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
26504      *yes) ;;
26505      *)
26506
26507
26508  if test $ac_cv_func_fcntl = no; then
26509    HAVE_FCNTL=0
26510  else
26511    REPLACE_FCNTL=1
26512  fi
26513
26514                        ;;
26515    esac
26516  fi
26517
26518
26519
26520
26521  if test $ac_cv_func_fchdir = no; then
26522    HAVE_FCHDIR=0
26523  fi
26524
26525    if test $HAVE_FCHDIR = 0; then
26526
26527
26528
26529  if test $ac_cv_func_fcntl = no; then
26530    HAVE_FCNTL=0
26531  else
26532    REPLACE_FCNTL=1
26533  fi
26534
26535    fi
26536
26537
26538  if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
26539
26540
26541
26542
26543
26544
26545
26546
26547  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
26548
26549  fi
26550
26551
26552
26553
26554
26555          GNULIB_FCNTL=1
26556
26557
26558
26559
26560
26561printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576     if test $gl_cv_have_include_next = yes; then
26577       gl_cv_next_fcntl_h='<'fcntl.h'>'
26578     else
26579       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
26580printf %s "checking absolute name of <fcntl.h>... " >&6; }
26581if test ${gl_cv_next_fcntl_h+y}
26582then :
26583  printf %s "(cached) " >&6
26584else $as_nop
26585
26586
26587
26588  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26589/* end confdefs.h.  */
26590#include <fcntl.h>
26591_ACEOF
26592                case "$host_os" in
26593    aix*) gl_absname_cpp="$ac_cpp -C" ;;
26594    *)    gl_absname_cpp="$ac_cpp" ;;
26595  esac
26596
26597  case "$host_os" in
26598    mingw*)
26599                                          gl_dirsep_regex='[/\\]'
26600      ;;
26601    *)
26602      gl_dirsep_regex='\/'
26603      ;;
26604  esac
26605      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26606  gl_header_literal_regex=`echo 'fcntl.h' \
26607                           | sed -e "$gl_make_literal_regex_sed"`
26608  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26609      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26610      s|^/[^/]|//&|
26611      p
26612      q
26613    }'
26614
26615        gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26616  sed -n "$gl_absolute_header_sed"`
26617
26618           gl_header=$gl_cv_absolute_fcntl_h
26619           gl_cv_next_fcntl_h='"'$gl_header'"'
26620
26621
26622fi
26623{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
26624printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
26625     fi
26626     NEXT_FCNTL_H=$gl_cv_next_fcntl_h
26627
26628     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26629       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26630       gl_next_as_first_directive='<'fcntl.h'>'
26631     else
26632       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26633       gl_next_as_first_directive=$gl_cv_next_fcntl_h
26634     fi
26635     NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649
26650
26651printf "%s\n" "#define GNULIB_FD_SAFER_FLAG 1" >>confdefs.h
26652
26653
26654
26655
26656
26657
26658    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26659      REPLACE_FDOPEN=1
26660    fi
26661
26662  if test $REPLACE_FDOPEN = 0; then
26663        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
26664printf %s "checking whether fdopen sets errno... " >&6; }
26665if test ${gl_cv_func_fdopen_works+y}
26666then :
26667  printf %s "(cached) " >&6
26668else $as_nop
26669
26670        if test "$cross_compiling" = yes
26671then :
26672  case "$host_os" in
26673             mingw*) gl_cv_func_fdopen_works="guessing no" ;;
26674             *)      gl_cv_func_fdopen_works="guessing yes" ;;
26675           esac
26676
26677else $as_nop
26678  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26679/* end confdefs.h.  */
26680
26681#include <stdio.h>
26682#include <errno.h>
26683
26684
26685$gl_mda_defines
26686
26687int
26688main (void)
26689{
26690  FILE *fp;
26691  errno = 0;
26692  fp = fdopen (-1, "r");
26693  if (fp == NULL && errno == 0)
26694    return 1;
26695  return 0;
26696}
26697_ACEOF
26698if ac_fn_c_try_run "$LINENO"
26699then :
26700  gl_cv_func_fdopen_works=yes
26701else $as_nop
26702  gl_cv_func_fdopen_works=no
26703fi
26704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26705  conftest.$ac_objext conftest.beam conftest.$ac_ext
26706fi
26707
26708
26709fi
26710{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
26711printf "%s\n" "$gl_cv_func_fdopen_works" >&6; }
26712    case "$gl_cv_func_fdopen_works" in
26713      *no) REPLACE_FDOPEN=1 ;;
26714    esac
26715  fi
26716
26717  if test $REPLACE_FDOPEN = 1; then
26718
26719
26720
26721
26722
26723
26724
26725
26726  gl_LIBOBJS="$gl_LIBOBJS fdopen.$ac_objext"
26727
26728
26729  fi
26730
26731
26732
26733
26734
26735          GNULIB_FDOPEN=1
26736
26737
26738
26739
26740
26741printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
26742
26743
26744
26745
26746
26747
26748
26749
26750    ac_fn_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
26751#include <dirent.h>
26752
26753" "$ac_c_undeclared_builtin_options" "CFLAGS"
26754if test "x$ac_cv_have_decl_fdopendir" = xyes
26755then :
26756  ac_have_decl=1
26757else $as_nop
26758  ac_have_decl=0
26759fi
26760printf "%s\n" "#define HAVE_DECL_FDOPENDIR $ac_have_decl" >>confdefs.h
26761if test $ac_have_decl = 1
26762then :
26763
26764else $as_nop
26765  HAVE_DECL_FDOPENDIR=0
26766fi
26767
26768
26769  if test $ac_cv_func_fdopendir = no; then
26770    HAVE_FDOPENDIR=0
26771  else
26772    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
26773printf %s "checking whether fdopendir works... " >&6; }
26774if test ${gl_cv_func_fdopendir_works+y}
26775then :
26776  printf %s "(cached) " >&6
26777else $as_nop
26778  if test "$cross_compiling" = yes
26779then :
26780  case "$host_os" in
26781                     # Guess yes on glibc systems.
26782            *-gnu*)  gl_cv_func_fdopendir_works="guessing yes" ;;
26783                     # Guess yes on musl systems.
26784            *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
26785                     # If we don't know, obey --enable-cross-guesses.
26786            *)       gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
26787          esac
26788
26789else $as_nop
26790  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26791/* end confdefs.h.  */
26792
26793#include <dirent.h>
26794#include <fcntl.h>
26795#include <unistd.h>
26796
26797
26798$gl_mda_defines
26799
26800#if !HAVE_DECL_FDOPENDIR
26801extern
26802# ifdef __cplusplus
26803"C"
26804# endif
26805DIR *fdopendir (int);
26806#endif
26807
26808int
26809main (void)
26810{
26811int result = 0;
26812              int fd = open ("conftest.c", O_RDONLY);
26813              if (fd < 0) result |= 1;
26814              if (fdopendir (fd)) result |= 2;
26815              if (close (fd)) result |= 4;
26816              return result;
26817
26818  ;
26819  return 0;
26820}
26821_ACEOF
26822if ac_fn_c_try_run "$LINENO"
26823then :
26824  gl_cv_func_fdopendir_works=yes
26825else $as_nop
26826  gl_cv_func_fdopendir_works=no
26827fi
26828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26829  conftest.$ac_objext conftest.beam conftest.$ac_ext
26830fi
26831
26832fi
26833{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
26834printf "%s\n" "$gl_cv_func_fdopendir_works" >&6; }
26835    case "$gl_cv_func_fdopendir_works" in
26836      *yes) ;;
26837      *)
26838        REPLACE_FDOPENDIR=1
26839        ;;
26840    esac
26841  fi
26842
26843  if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
26844
26845
26846
26847
26848
26849
26850
26851
26852  gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
26853
26854  fi
26855
26856
26857
26858
26859
26860          GNULIB_FDOPENDIR=1
26861
26862
26863
26864
26865
26866printf "%s\n" "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
26867
26868
26869
26870
26871
26872printf "%s\n" "#define GNULIB_FDOPENDIR 1" >>confdefs.h
26873
26874
26875
26876
26877
26878
26879  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
26880printf %s "checking whether fflush works on input streams... " >&6; }
26881if test ${gl_cv_func_fflush_stdin+y}
26882then :
26883  printf %s "(cached) " >&6
26884else $as_nop
26885  echo hello world > conftest.txt
26886     if test "$cross_compiling" = yes
26887then :
26888  case "$host_os" in
26889                  # Guess no on native Windows.
26890          mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
26891          *)      gl_cv_func_fflush_stdin=cross ;;
26892        esac
26893
26894else $as_nop
26895  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26896/* end confdefs.h.  */
26897
26898#include <stdio.h>
26899#if HAVE_UNISTD_H
26900# include <unistd.h>
26901#else /* on Windows with MSVC */
26902# include <io.h>
26903#endif
26904
26905
26906$gl_mda_defines
26907
26908int
26909main (void)
26910{
26911FILE *f = fopen ("conftest.txt", "r");
26912         char buffer[10];
26913         int fd;
26914         int c;
26915         if (f == NULL)
26916           return 1;
26917         fd = fileno (f);
26918         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
26919           { fclose (f); return 2; }
26920         /* For deterministic results, ensure f read a bigger buffer.  */
26921         if (lseek (fd, 0, SEEK_CUR) == 5)
26922           { fclose (f); return 3; }
26923         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
26924            on BSD systems and on mingw.  */
26925         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
26926           { fclose (f); return 4; }
26927         if (lseek (fd, 0, SEEK_CUR) != 5)
26928           { fclose (f); return 5; }
26929         /* Verify behaviour of fflush after ungetc. See
26930            <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
26931         /* Verify behaviour of fflush after a backup ungetc.  This fails on
26932            mingw.  */
26933         c = fgetc (f);
26934         ungetc (c, f);
26935         fflush (f);
26936         if (fgetc (f) != c)
26937           { fclose (f); return 6; }
26938         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
26939            on glibc 2.8 and on BSD systems.  */
26940         c = fgetc (f);
26941         ungetc ('@', f);
26942         fflush (f);
26943         if (fgetc (f) != c)
26944           { fclose (f); return 7; }
26945         fclose (f);
26946         return 0;
26947
26948  ;
26949  return 0;
26950}
26951_ACEOF
26952if ac_fn_c_try_run "$LINENO"
26953then :
26954  gl_cv_func_fflush_stdin=yes
26955else $as_nop
26956  gl_cv_func_fflush_stdin=no
26957fi
26958rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26959  conftest.$ac_objext conftest.beam conftest.$ac_ext
26960fi
26961
26962     rm conftest.txt
26963
26964fi
26965{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
26966printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
26967  case "$gl_cv_func_fflush_stdin" in
26968    *yes) gl_func_fflush_stdin=1 ;;
26969    *no)  gl_func_fflush_stdin=0 ;;
26970    *)    gl_func_fflush_stdin='(-1)' ;;
26971  esac
26972
26973printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
26974
26975
26976  case "$gl_cv_func_fflush_stdin" in
26977    *yes) ;;
26978    *) REPLACE_FFLUSH=1 ;;
26979  esac
26980
26981  if test $REPLACE_FFLUSH = 1; then
26982
26983
26984
26985
26986
26987
26988
26989
26990  gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
26991
26992    :
26993  fi
26994
26995
26996printf "%s\n" "#define GNULIB_FFLUSH 1" >>confdefs.h
26997
26998
26999
27000
27001
27002
27003
27004          GNULIB_FFLUSH=1
27005
27006
27007
27008
27009
27010printf "%s\n" "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
27022printf %s "checking for flexible array member... " >&6; }
27023if test ${ac_cv_c_flexmember+y}
27024then :
27025  printf %s "(cached) " >&6
27026else $as_nop
27027  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27028/* end confdefs.h.  */
27029#include <stdlib.h>
27030            #include <stdio.h>
27031            #include <stddef.h>
27032            struct m { struct m *next, **list; char name[]; };
27033            struct s { struct s *p; struct m *m; int n; double d[]; };
27034int
27035main (void)
27036{
27037int m = getchar ();
27038            size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
27039            nbytes += sizeof (struct s) - 1;
27040            nbytes -= nbytes % sizeof (struct s);
27041            struct s *p = malloc (nbytes);
27042            p->p = p;
27043            p->m = NULL;
27044            p->d[0] = 0.0;
27045            return p->d != (double *) NULL;
27046  ;
27047  return 0;
27048}
27049_ACEOF
27050if ac_fn_c_try_compile "$LINENO"
27051then :
27052  ac_cv_c_flexmember=yes
27053else $as_nop
27054  ac_cv_c_flexmember=no
27055fi
27056rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27057fi
27058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
27059printf "%s\n" "$ac_cv_c_flexmember" >&6; }
27060  if test $ac_cv_c_flexmember = yes; then
27061
27062printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
27063
27064  else
27065    printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
27066
27067  fi
27068
27069
27070
27071
27072  FLOAT_H=
27073  REPLACE_FLOAT_LDBL=0
27074  case "$host_os" in
27075    aix* | beos* | openbsd* | mirbsd* | irix*)
27076      FLOAT_H=float.h
27077      ;;
27078    freebsd* | dragonfly*)
27079      case "$host_cpu" in
27080        i[34567]86 )
27081          FLOAT_H=float.h
27082          ;;
27083        x86_64 )
27084          # On x86_64 systems, the C compiler may still be generating
27085          # 32-bit code.
27086          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27087/* end confdefs.h.  */
27088#if defined __LP64__ || defined __x86_64__ || defined __amd64__
27089                  int ok;
27090                 #else
27091                  error fail
27092                 #endif
27093
27094_ACEOF
27095if ac_fn_c_try_compile "$LINENO"
27096then :
27097
27098else $as_nop
27099  FLOAT_H=float.h
27100fi
27101rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27102          ;;
27103      esac
27104      ;;
27105    linux*)
27106      case "$host_cpu" in
27107        powerpc*)
27108          FLOAT_H=float.h
27109          ;;
27110      esac
27111      ;;
27112  esac
27113  case "$host_os" in
27114    aix* | freebsd* | dragonfly* | linux*)
27115      if test -n "$FLOAT_H"; then
27116        REPLACE_FLOAT_LDBL=1
27117      fi
27118      ;;
27119  esac
27120
27121    REPLACE_ITOLD=0
27122  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
27123printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
27124if test ${gl_cv_func_itold_works+y}
27125then :
27126  printf %s "(cached) " >&6
27127else $as_nop
27128
27129      if test "$cross_compiling" = yes
27130then :
27131  case "$host" in
27132           sparc*-*-linux*)
27133             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27134/* end confdefs.h.  */
27135#if defined __LP64__ || defined __arch64__
27136                    int ok;
27137                   #else
27138                    error fail
27139                   #endif
27140
27141_ACEOF
27142if ac_fn_c_try_compile "$LINENO"
27143then :
27144  gl_cv_func_itold_works="guessing no"
27145else $as_nop
27146  gl_cv_func_itold_works="guessing yes"
27147fi
27148rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27149             ;;
27150                   # Guess yes on native Windows.
27151           mingw*) gl_cv_func_itold_works="guessing yes" ;;
27152           *)      gl_cv_func_itold_works="guessing yes" ;;
27153         esac
27154
27155else $as_nop
27156  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27157/* end confdefs.h.  */
27158
27159int i = -1;
27160volatile long double ld;
27161int main ()
27162{
27163  ld += i * 1.0L;
27164  if (ld > 0)
27165    return 1;
27166  return 0;
27167}
27168_ACEOF
27169if ac_fn_c_try_run "$LINENO"
27170then :
27171  gl_cv_func_itold_works=yes
27172else $as_nop
27173  gl_cv_func_itold_works=no
27174fi
27175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27176  conftest.$ac_objext conftest.beam conftest.$ac_ext
27177fi
27178
27179
27180fi
27181{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
27182printf "%s\n" "$gl_cv_func_itold_works" >&6; }
27183  case "$gl_cv_func_itold_works" in
27184    *no)
27185      REPLACE_ITOLD=1
27186                  FLOAT_H=float.h
27187      ;;
27188  esac
27189
27190  if test -n "$FLOAT_H"; then
27191
27192
27193
27194
27195
27196
27197
27198
27199     if test $gl_cv_have_include_next = yes; then
27200       gl_cv_next_float_h='<'float.h'>'
27201     else
27202       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
27203printf %s "checking absolute name of <float.h>... " >&6; }
27204if test ${gl_cv_next_float_h+y}
27205then :
27206  printf %s "(cached) " >&6
27207else $as_nop
27208
27209
27210
27211  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27212/* end confdefs.h.  */
27213#include <float.h>
27214_ACEOF
27215                case "$host_os" in
27216    aix*) gl_absname_cpp="$ac_cpp -C" ;;
27217    *)    gl_absname_cpp="$ac_cpp" ;;
27218  esac
27219
27220  case "$host_os" in
27221    mingw*)
27222                                          gl_dirsep_regex='[/\\]'
27223      ;;
27224    *)
27225      gl_dirsep_regex='\/'
27226      ;;
27227  esac
27228      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27229  gl_header_literal_regex=`echo 'float.h' \
27230                           | sed -e "$gl_make_literal_regex_sed"`
27231  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27232      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27233      s|^/[^/]|//&|
27234      p
27235      q
27236    }'
27237
27238        gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27239  sed -n "$gl_absolute_header_sed"`
27240
27241           gl_header=$gl_cv_absolute_float_h
27242           gl_cv_next_float_h='"'$gl_header'"'
27243
27244
27245fi
27246{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
27247printf "%s\n" "$gl_cv_next_float_h" >&6; }
27248     fi
27249     NEXT_FLOAT_H=$gl_cv_next_float_h
27250
27251     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27252       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27253       gl_next_as_first_directive='<'float.h'>'
27254     else
27255       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27256       gl_next_as_first_directive=$gl_cv_next_float_h
27257     fi
27258     NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
27259
27260
27261
27262
27263  fi
27264
27265   if test -n "$FLOAT_H"; then
27266  GL_GENERATE_FLOAT_H_TRUE=
27267  GL_GENERATE_FLOAT_H_FALSE='#'
27268else
27269  GL_GENERATE_FLOAT_H_TRUE='#'
27270  GL_GENERATE_FLOAT_H_FALSE=
27271fi
27272
27273
27274
27275  if test $REPLACE_FLOAT_LDBL = 1; then
27276
27277
27278
27279
27280
27281
27282
27283
27284  gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
27285
27286  fi
27287  if test $REPLACE_ITOLD = 1; then
27288
27289
27290
27291
27292
27293
27294
27295
27296  gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
27297
27298  fi
27299
27300
27301
27302  if test $ac_cv_func_flock = no; then
27303    HAVE_FLOCK=0
27304  fi
27305
27306  if test $HAVE_FLOCK = 0; then
27307
27308
27309
27310
27311
27312
27313
27314
27315  gl_LIBOBJS="$gl_LIBOBJS flock.$ac_objext"
27316
27317
27318
27319
27320
27321    ac_fn_c_check_member "$LINENO" "struct flock" "l_type" "ac_cv_member_struct_flock_l_type" "#include <fcntl.h>
27322"
27323if test "x$ac_cv_member_struct_flock_l_type" = xyes
27324then :
27325
27326printf "%s\n" "#define HAVE_STRUCT_FLOCK_L_TYPE 1" >>confdefs.h
27327
27328
27329fi
27330
27331
27332  fi
27333
27334
27335
27336
27337
27338          GNULIB_FLOCK=1
27339
27340
27341
27342
27343
27344
27345
27346
27347     gl_fnmatch_required_lowercase=`
27348    echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
27349  `
27350
27351  if test $ac_cv_func_fnmatch = no; then
27352    HAVE_FNMATCH=0
27353  else
27354    gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
27355    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
27356printf %s "checking for working $gl_fnmatch_required fnmatch... " >&6; }
27357if eval test \${$gl_fnmatch_cache_var+y}
27358then :
27359  printf %s "(cached) " >&6
27360else $as_nop
27361                                     if test $gl_fnmatch_required = GNU; then
27362         gl_fnmatch_gnu_start=
27363         gl_fnmatch_gnu_end=
27364       else
27365         gl_fnmatch_gnu_start='#if 0'
27366         gl_fnmatch_gnu_end='#endif'
27367       fi
27368       if test "$cross_compiling" = yes
27369then :
27370  case "$host_os" in
27371                     # Guess yes on musl systems.
27372            *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
27373                     # Guess no otherwise, even on glibc systems.
27374            *)       eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
27375          esac
27376
27377else $as_nop
27378  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27379/* end confdefs.h.  */
27380#include <fnmatch.h>
27381              static int
27382              y (char const *pattern, char const *string, int flags)
27383              {
27384                return fnmatch (pattern, string, flags) == 0;
27385              }
27386              static int
27387              n (char const *pattern, char const *string, int flags)
27388              {
27389                return fnmatch (pattern, string, flags) == FNM_NOMATCH;
27390              }
27391
27392int
27393main (void)
27394{
27395char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
27396              char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
27397              static char const A_1[] = { 'A' - 1, 0 };
27398              static char const A01[] = { 'A' + 1, 0 };
27399              static char const a_1[] = { 'a' - 1, 0 };
27400              static char const a01[] = { 'a' + 1, 0 };
27401              static char const bs_1[] = { '\\\\' - 1, 0 };
27402              static char const bs01[] = { '\\\\' + 1, 0 };
27403              int result = 0;
27404              if (!n ("a*", "", 0))
27405                return 1;
27406              if (!y ("a*", "abc", 0))
27407                return 1;
27408              if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
27409                return 1;
27410              if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
27411                return 2;
27412              if (!y ("a\\\\bc", "abc", 0))
27413                return 3;
27414              if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
27415                return 3;
27416              if (!y ("*x", ".x", 0))
27417                return 4;
27418              if (!n ("*x", ".x", FNM_PERIOD))
27419                return 4;
27420              if (!y (Apat, "\\\\", 0))
27421                return 5;
27422              if (!y (Apat, "A", 0))
27423                return 5;
27424              if (!y (apat, "\\\\", 0))
27425                return 5;
27426              if (!y (apat, "a", 0))
27427                return 5;
27428              if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
27429                return 5;
27430              if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
27431                return 5;
27432              if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
27433                return 5;
27434              if (!(y (apat, a01, 0) == ('a' < '\\\\')))
27435                return 5;
27436              if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
27437                return 5;
27438              if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
27439                return 5;
27440              if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
27441                return 5;
27442              if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
27443                return 5;
27444              $gl_fnmatch_gnu_start
27445              if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
27446                result |= 8;
27447              if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
27448                result |= 16;
27449              if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
27450                result |= 32;
27451              if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
27452                result |= 64;
27453              if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
27454                result |= 64;
27455              if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
27456                result |= 64;
27457              $gl_fnmatch_gnu_end
27458              return result;
27459
27460  ;
27461  return 0;
27462}
27463_ACEOF
27464if ac_fn_c_try_run "$LINENO"
27465then :
27466  eval "$gl_fnmatch_cache_var=yes"
27467else $as_nop
27468  eval "$gl_fnmatch_cache_var=no"
27469fi
27470rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27471  conftest.$ac_objext conftest.beam conftest.$ac_ext
27472fi
27473
27474
27475fi
27476eval ac_res=\$$gl_fnmatch_cache_var
27477	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27478printf "%s\n" "$ac_res" >&6; }
27479    eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
27480    case "$gl_fnmatch_result" in
27481      *yes) ;;
27482      *) REPLACE_FNMATCH=1 ;;
27483    esac
27484  fi
27485  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
27486
27487
27488  FNMATCH_H='fnmatch.h'
27489   if test -n "$FNMATCH_H"; then
27490  GL_GENERATE_FNMATCH_H_TRUE=
27491  GL_GENERATE_FNMATCH_H_FALSE='#'
27492else
27493  GL_GENERATE_FNMATCH_H_TRUE='#'
27494  GL_GENERATE_FNMATCH_H_FALSE=
27495fi
27496
27497
27498  fi
27499
27500  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
27501
27502
27503
27504
27505
27506
27507
27508
27509  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
27510
27511
27512
27513
27514
27515  fi
27516
27517
27518
27519
27520
27521          GNULIB_FNMATCH=1
27522
27523
27524
27525
27526
27527printf "%s\n" "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
27528
27529
27530
27531
27532
27533
27534
27535
27536  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
27537
27538
27539
27540
27541
27542
27543
27544
27545  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
27546
27547
27548
27549
27550
27551  fi
27552
27553
27554printf "%s\n" "#define GNULIB_FNMATCH_GNU 1" >>confdefs.h
27555
27556
27557
27558
27559
27560
27561  case "$host_os" in
27562    mingw* | pw*)
27563            REPLACE_FOPEN=1
27564            gl_cv_func_fopen_slash="guessing no"
27565      ;;
27566    *)
27567                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
27568printf %s "checking whether fopen recognizes a trailing slash... " >&6; }
27569if test ${gl_cv_func_fopen_slash+y}
27570then :
27571  printf %s "(cached) " >&6
27572else $as_nop
27573
27574          if test "$cross_compiling" = yes
27575then :
27576
27577             case "$host_os" in
27578               aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
27579                 gl_cv_func_fopen_slash="guessing no" ;;
27580               *)
27581                 gl_cv_func_fopen_slash="guessing yes" ;;
27582             esac
27583
27584else $as_nop
27585  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27586/* end confdefs.h.  */
27587
27588#include <stddef.h>
27589#include <stdio.h>
27590int main ()
27591{
27592  FILE *fp = fopen ("conftest.sl/", "w");
27593  int result = (fp != NULL);
27594  if (fp != NULL)
27595    fclose (fp);
27596  return result;
27597}
27598_ACEOF
27599if ac_fn_c_try_run "$LINENO"
27600then :
27601  gl_cv_func_fopen_slash=yes
27602else $as_nop
27603  gl_cv_func_fopen_slash=no
27604fi
27605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27606  conftest.$ac_objext conftest.beam conftest.$ac_ext
27607fi
27608
27609          rm -f conftest.sl
27610
27611fi
27612{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
27613printf "%s\n" "$gl_cv_func_fopen_slash" >&6; }
27614      ;;
27615  esac
27616  case "$gl_cv_func_fopen_slash" in
27617    *no)
27618
27619printf "%s\n" "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
27620
27621      REPLACE_FOPEN=1
27622      ;;
27623  esac
27624
27625  if test $REPLACE_FOPEN = 1; then
27626
27627
27628
27629
27630
27631
27632
27633
27634  gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
27635
27636    :
27637  fi
27638
27639
27640
27641
27642
27643          GNULIB_FOPEN=1
27644
27645
27646
27647
27648
27649printf "%s\n" "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
27650
27651
27652
27653
27654
27655  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'x'" >&5
27656printf %s "checking whether fopen supports the mode character 'x'... " >&6; }
27657if test ${gl_cv_func_fopen_mode_x+y}
27658then :
27659  printf %s "(cached) " >&6
27660else $as_nop
27661  rm -f conftest.x
27662     if test "$cross_compiling" = yes
27663then :
27664  case "$host_os" in
27665          # Guess yes on glibc and musl systems.
27666          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
27667            gl_cv_func_fopen_mode_x="guessing yes" ;;
27668          # If we don't know, obey --enable-cross-guesses.
27669          *)
27670            gl_cv_func_fopen_mode_x="$gl_cross_guess_normal" ;;
27671        esac
27672
27673else $as_nop
27674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27675/* end confdefs.h.  */
27676
27677#include <stdio.h>
27678#include <errno.h>
27679int main ()
27680{
27681  FILE *fp;
27682  fp = fopen ("conftest.x", "w");
27683  fclose (fp);
27684  fp = fopen ("conftest.x", "wx");
27685  if (fp != NULL)
27686    /* 'x' ignored */
27687    return 1;
27688  else if (errno == EEXIST)
27689    return 0;
27690  else
27691    /* 'x' rejected */
27692    return 2;
27693}
27694_ACEOF
27695if ac_fn_c_try_run "$LINENO"
27696then :
27697  gl_cv_func_fopen_mode_x=yes
27698else $as_nop
27699  gl_cv_func_fopen_mode_x=no
27700fi
27701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27702  conftest.$ac_objext conftest.beam conftest.$ac_ext
27703fi
27704
27705     rm -f conftest.x
27706
27707fi
27708{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_x" >&5
27709printf "%s\n" "$gl_cv_func_fopen_mode_x" >&6; }
27710  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'e'" >&5
27711printf %s "checking whether fopen supports the mode character 'e'... " >&6; }
27712if test ${gl_cv_func_fopen_mode_e+y}
27713then :
27714  printf %s "(cached) " >&6
27715else $as_nop
27716  echo foo > conftest.x
27717     if test "$cross_compiling" = yes
27718then :
27719  case "$host_os" in
27720          # Guess yes on glibc and musl systems.
27721          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
27722            gl_cv_func_fopen_mode_e="guessing yes" ;;
27723          # Guess no on native Windows.
27724          mingw*)
27725            gl_cv_func_fopen_mode_e="guessing no" ;;
27726          # If we don't know, obey --enable-cross-guesses.
27727          *)
27728            gl_cv_func_fopen_mode_e="$gl_cross_guess_normal" ;;
27729        esac
27730
27731else $as_nop
27732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27733/* end confdefs.h.  */
27734
27735#include <stdio.h>
27736#include <errno.h>
27737#include <fcntl.h>
27738
27739
27740$gl_mda_defines
27741
27742int main ()
27743{
27744  FILE *fp = fopen ("conftest.x", "re");
27745  if (fp != NULL)
27746    {
27747      if (fcntl (fileno (fp), F_GETFD) & FD_CLOEXEC)
27748        return 0;
27749      else
27750        /* 'e' ignored */
27751        return 1;
27752    }
27753  else
27754    /* 'e' rejected */
27755    return 2;
27756}
27757_ACEOF
27758if ac_fn_c_try_run "$LINENO"
27759then :
27760  gl_cv_func_fopen_mode_e=yes
27761else $as_nop
27762  gl_cv_func_fopen_mode_e=no
27763fi
27764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27765  conftest.$ac_objext conftest.beam conftest.$ac_ext
27766fi
27767
27768     rm -f conftest.x
27769
27770fi
27771{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_e" >&5
27772printf "%s\n" "$gl_cv_func_fopen_mode_e" >&6; }
27773  case "$gl_cv_func_fopen_mode_x" in
27774    *no) REPLACE_FOPEN=1 ;;
27775  esac
27776  case "$gl_cv_func_fopen_mode_e" in
27777    *no) REPLACE_FOPEN=1 ;;
27778  esac
27779
27780  if test $REPLACE_FOPEN = 1; then
27781
27782
27783
27784
27785
27786
27787
27788
27789  gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
27790
27791    :
27792  fi
27793
27794
27795printf "%s\n" "#define GNULIB_FOPEN_GNU 1" >>confdefs.h
27796
27797
27798
27799
27800
27801
27802
27803  ac_fn_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
27804" "$ac_c_undeclared_builtin_options" "CFLAGS"
27805if test "x$ac_cv_have_decl_fpurge" = xyes
27806then :
27807  ac_have_decl=1
27808else $as_nop
27809  ac_have_decl=0
27810fi
27811printf "%s\n" "#define HAVE_DECL_FPURGE $ac_have_decl" >>confdefs.h
27812
27813  if test "x$ac_cv_func_fpurge" = xyes; then
27814    HAVE_FPURGE=1
27815    # Detect BSD bug.  Only cygwin 1.7 and musl are known to be immune.
27816    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
27817printf %s "checking whether fpurge works... " >&6; }
27818if test ${gl_cv_func_fpurge_works+y}
27819then :
27820  printf %s "(cached) " >&6
27821else $as_nop
27822  if test "$cross_compiling" = yes
27823then :
27824  case "$host_os" in
27825                     # Guess yes on musl systems.
27826            *-musl*) gl_cv_func_fpurge_works="guessing yes" ;;
27827                     # Otherwise obey --enable-cross-guesses.
27828            *)       gl_cv_func_fpurge_works="$gl_cross_guess_normal" ;;
27829          esac
27830
27831else $as_nop
27832  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27833/* end confdefs.h.  */
27834#include <stdio.h>
27835
27836int
27837main (void)
27838{
27839FILE *f = fopen ("conftest.txt", "w+");
27840              if (!f)
27841                return 1;
27842              if (fputc ('a', f) != 'a')
27843                { fclose (f); return 2; }
27844              rewind (f);
27845              if (fgetc (f) != 'a')
27846                { fclose (f); return 3; }
27847              if (fgetc (f) != EOF)
27848                { fclose (f); return 4; }
27849              if (fpurge (f) != 0)
27850                { fclose (f); return 5; }
27851              if (putc ('b', f) != 'b')
27852                { fclose (f); return 6; }
27853              if (fclose (f) != 0)
27854                return 7;
27855              if ((f = fopen ("conftest.txt", "r")) == NULL)
27856                return 8;
27857              if (fgetc (f) != 'a')
27858                { fclose (f); return 9; }
27859              if (fgetc (f) != 'b')
27860                { fclose (f); return 10; }
27861              if (fgetc (f) != EOF)
27862                { fclose (f); return 11; }
27863              if (fclose (f) != 0)
27864                return 12;
27865              if (remove ("conftest.txt") != 0)
27866                return 13;
27867              return 0;
27868
27869  ;
27870  return 0;
27871}
27872_ACEOF
27873if ac_fn_c_try_run "$LINENO"
27874then :
27875  gl_cv_func_fpurge_works=yes
27876else $as_nop
27877  gl_cv_func_fpurge_works=no
27878fi
27879rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27880  conftest.$ac_objext conftest.beam conftest.$ac_ext
27881fi
27882
27883
27884fi
27885{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
27886printf "%s\n" "$gl_cv_func_fpurge_works" >&6; }
27887    case "$gl_cv_func_fpurge_works" in
27888      *yes) ;;
27889      *) REPLACE_FPURGE=1 ;;
27890    esac
27891  else
27892    HAVE_FPURGE=0
27893  fi
27894  if test "x$ac_cv_have_decl_fpurge" = xno; then
27895    HAVE_DECL_FPURGE=0
27896  fi
27897
27898  if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
27899
27900
27901
27902
27903
27904
27905
27906
27907  gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
27908
27909  fi
27910
27911
27912
27913
27914
27915          GNULIB_FPURGE=1
27916
27917
27918
27919
27920
27921printf "%s\n" "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932                          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
27933printf %s "checking whether free is known to preserve errno... " >&6; }
27934if test ${gl_cv_func_free_preserves_errno+y}
27935then :
27936  printf %s "(cached) " >&6
27937else $as_nop
27938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27939/* end confdefs.h.  */
27940#include <stdlib.h>
27941
27942int
27943main (void)
27944{
27945#if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
27946            #elif defined __OpenBSD__
27947            #elif defined __sun
27948            #else
27949              #error "'free' is not known to preserve errno"
27950            #endif
27951
27952  ;
27953  return 0;
27954}
27955_ACEOF
27956if ac_fn_c_try_compile "$LINENO"
27957then :
27958  gl_cv_func_free_preserves_errno=yes
27959else $as_nop
27960  gl_cv_func_free_preserves_errno=no
27961fi
27962rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27963
27964fi
27965{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
27966printf "%s\n" "$gl_cv_func_free_preserves_errno" >&6; }
27967
27968  case $gl_cv_func_free_preserves_errno in
27969   *yes)
27970
27971printf "%s\n" "#define HAVE_FREE_POSIX 1" >>confdefs.h
27972
27973    ;;
27974   *) REPLACE_FREE=1 ;;
27975  esac
27976
27977  if test $REPLACE_FREE = 1; then
27978
27979
27980
27981
27982
27983
27984
27985
27986  gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
27987
27988    :
27989  fi
27990
27991
27992
27993
27994
27995          GNULIB_FREE_POSIX=1
27996
27997
27998
27999
28000
28001printf "%s\n" "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
28002
28003
28004
28005
28006
28007
28008  case "$host_os" in
28009    mingw* | pw* | os2*)
28010      REPLACE_FREOPEN=1
28011      ;;
28012    *)
28013      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether freopen works on closed fds" >&5
28014printf %s "checking whether freopen works on closed fds... " >&6; }
28015if test ${gl_cv_func_freopen_works_on_closed+y}
28016then :
28017  printf %s "(cached) " >&6
28018else $as_nop
28019  if test "$cross_compiling" = yes
28020then :
28021  case $host_os in
28022              *gnu*) gl_cv_func_freopen_works_on_closed="guessing no" ;;
28023              *)     gl_cv_func_freopen_works_on_closed="guessing yes";;
28024            esac
28025else $as_nop
28026  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28027/* end confdefs.h.  */
28028#include <stdio.h>
28029                #include <unistd.h>
28030
28031
28032$gl_mda_defines
28033
28034int
28035main (void)
28036{
28037close (0);
28038                return !(freopen ("/dev/null", "r", stdin)
28039                         && getchar () == EOF
28040                         && !ferror (stdin) && feof (stdin));
28041  ;
28042  return 0;
28043}
28044_ACEOF
28045if ac_fn_c_try_run "$LINENO"
28046then :
28047  gl_cv_func_freopen_works_on_closed=yes
28048else $as_nop
28049  gl_cv_func_freopen_works_on_closed=no
28050fi
28051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28052  conftest.$ac_objext conftest.beam conftest.$ac_ext
28053fi
28054
28055fi
28056{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_freopen_works_on_closed" >&5
28057printf "%s\n" "$gl_cv_func_freopen_works_on_closed" >&6; }
28058      case $gl_cv_func_freopen_works_on_closed in
28059        *no) REPLACE_FREOPEN=1;;
28060      esac
28061  esac
28062
28063  if test $REPLACE_FREOPEN = 1; then
28064
28065
28066
28067
28068
28069
28070
28071
28072  gl_LIBOBJS="$gl_LIBOBJS freopen.$ac_objext"
28073
28074    :
28075  fi
28076
28077
28078
28079
28080
28081          GNULIB_FREOPEN=1
28082
28083
28084
28085
28086
28087printf "%s\n" "#define GNULIB_TEST_FREOPEN 1" >>confdefs.h
28088
28089
28090
28091
28092
28093
28094    if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
28095    REPLACE_FSEEK=1
28096  fi
28097
28098  if test $REPLACE_FSEEK = 1; then
28099
28100
28101
28102
28103
28104
28105
28106
28107  gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
28108
28109  fi
28110
28111
28112
28113
28114
28115          GNULIB_FSEEK=1
28116
28117
28118
28119
28120
28121printf "%s\n" "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
28122
28123
28124
28125
28126
28127
28128
28129
28130
28131
28132
28133  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
28134printf %s "checking for fseeko... " >&6; }
28135if test ${gl_cv_func_fseeko+y}
28136then :
28137  printf %s "(cached) " >&6
28138else $as_nop
28139
28140      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28141/* end confdefs.h.  */
28142#include <stdio.h>
28143
28144int
28145main (void)
28146{
28147fseeko (stdin, 0, 0);
28148  ;
28149  return 0;
28150}
28151_ACEOF
28152if ac_fn_c_try_link "$LINENO"
28153then :
28154  gl_cv_func_fseeko=yes
28155else $as_nop
28156  gl_cv_func_fseeko=no
28157fi
28158rm -f core conftest.err conftest.$ac_objext conftest.beam \
28159    conftest$ac_exeext conftest.$ac_ext
28160
28161fi
28162{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
28163printf "%s\n" "$gl_cv_func_fseeko" >&6; }
28164
28165
28166  if test $ac_cv_have_decl_fseeko = no; then
28167    HAVE_DECL_FSEEKO=0
28168  fi
28169
28170  if test $gl_cv_func_fseeko = no; then
28171    HAVE_FSEEKO=0
28172  else
28173    if test $WINDOWS_64_BIT_OFF_T = 1; then
28174      REPLACE_FSEEKO=1
28175    fi
28176    if test $gl_cv_var_stdin_large_offset = no; then
28177      REPLACE_FSEEKO=1
28178    fi
28179
28180
28181
28182  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
28183printf %s "checking whether fflush works on input streams... " >&6; }
28184if test ${gl_cv_func_fflush_stdin+y}
28185then :
28186  printf %s "(cached) " >&6
28187else $as_nop
28188  echo hello world > conftest.txt
28189     if test "$cross_compiling" = yes
28190then :
28191  case "$host_os" in
28192                  # Guess no on native Windows.
28193          mingw*) gl_cv_func_fflush_stdin="guessing no" ;;
28194          *)      gl_cv_func_fflush_stdin=cross ;;
28195        esac
28196
28197else $as_nop
28198  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28199/* end confdefs.h.  */
28200
28201#include <stdio.h>
28202#if HAVE_UNISTD_H
28203# include <unistd.h>
28204#else /* on Windows with MSVC */
28205# include <io.h>
28206#endif
28207
28208
28209$gl_mda_defines
28210
28211int
28212main (void)
28213{
28214FILE *f = fopen ("conftest.txt", "r");
28215         char buffer[10];
28216         int fd;
28217         int c;
28218         if (f == NULL)
28219           return 1;
28220         fd = fileno (f);
28221         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
28222           { fclose (f); return 2; }
28223         /* For deterministic results, ensure f read a bigger buffer.  */
28224         if (lseek (fd, 0, SEEK_CUR) == 5)
28225           { fclose (f); return 3; }
28226         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
28227            on BSD systems and on mingw.  */
28228         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
28229           { fclose (f); return 4; }
28230         if (lseek (fd, 0, SEEK_CUR) != 5)
28231           { fclose (f); return 5; }
28232         /* Verify behaviour of fflush after ungetc. See
28233            <https://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
28234         /* Verify behaviour of fflush after a backup ungetc.  This fails on
28235            mingw.  */
28236         c = fgetc (f);
28237         ungetc (c, f);
28238         fflush (f);
28239         if (fgetc (f) != c)
28240           { fclose (f); return 6; }
28241         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
28242            on glibc 2.8 and on BSD systems.  */
28243         c = fgetc (f);
28244         ungetc ('@', f);
28245         fflush (f);
28246         if (fgetc (f) != c)
28247           { fclose (f); return 7; }
28248         fclose (f);
28249         return 0;
28250
28251  ;
28252  return 0;
28253}
28254_ACEOF
28255if ac_fn_c_try_run "$LINENO"
28256then :
28257  gl_cv_func_fflush_stdin=yes
28258else $as_nop
28259  gl_cv_func_fflush_stdin=no
28260fi
28261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28262  conftest.$ac_objext conftest.beam conftest.$ac_ext
28263fi
28264
28265     rm conftest.txt
28266
28267fi
28268{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
28269printf "%s\n" "$gl_cv_func_fflush_stdin" >&6; }
28270  case "$gl_cv_func_fflush_stdin" in
28271    *yes) gl_func_fflush_stdin=1 ;;
28272    *no)  gl_func_fflush_stdin=0 ;;
28273    *)    gl_func_fflush_stdin='(-1)' ;;
28274  esac
28275
28276printf "%s\n" "#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin" >>confdefs.h
28277
28278
28279      case "$gl_cv_func_fflush_stdin" in
28280        *yes) ;;
28281        *) REPLACE_FSEEKO=1 ;;
28282      esac
28283
28284  fi
28285
28286  if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
28287
28288
28289
28290
28291
28292
28293
28294
28295  gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
28296
28297
28298      ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
28299if test "x$ac_cv_func__fseeki64" = xyes
28300then :
28301  printf "%s\n" "#define HAVE__FSEEKI64 1" >>confdefs.h
28302
28303fi
28304
28305  if test $ac_cv_func__fseeki64 = yes; then
28306    ac_fn_check_decl "$LINENO" "_fseeki64" "ac_cv_have_decl__fseeki64" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
28307if test "x$ac_cv_have_decl__fseeki64" = xyes
28308then :
28309  ac_have_decl=1
28310else $as_nop
28311  ac_have_decl=0
28312fi
28313printf "%s\n" "#define HAVE_DECL__FSEEKI64 $ac_have_decl" >>confdefs.h
28314
28315  fi
28316
28317  fi
28318
28319
28320
28321
28322
28323          GNULIB_FSEEKO=1
28324
28325
28326
28327
28328
28329printf "%s\n" "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
28330
28331
28332
28333
28334
28335
28336
28337  case "$host_os" in
28338    mingw* | solaris*)
28339                        REPLACE_FSTAT=1
28340      ;;
28341  esac
28342
28343
28344
28345
28346
28347  if test $ac_cv_func_fchdir = no; then
28348    HAVE_FCHDIR=0
28349  fi
28350
28351    if test $HAVE_FCHDIR = 0; then
28352      case "$gl_cv_func_open_directory_works" in
28353        *yes) ;;
28354        *)
28355          REPLACE_FSTAT=1
28356          ;;
28357      esac
28358    fi
28359
28360
28361  if test $REPLACE_FSTAT = 1; then
28362
28363
28364
28365
28366
28367
28368
28369
28370  gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
28371
28372    case "$host_os" in
28373      mingw*)
28374
28375
28376
28377
28378
28379
28380
28381
28382  gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
28383
28384        ;;
28385    esac
28386
28387
28388
28389  :
28390
28391  fi
28392
28393
28394
28395
28396
28397          GNULIB_FSTAT=1
28398
28399
28400
28401
28402
28403printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414  if test $ac_cv_func_fstatat = no; then
28415    HAVE_FSTATAT=0
28416  else
28417            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
28418printf %s "checking whether fstatat (..., 0) works... " >&6; }
28419if test ${gl_cv_func_fstatat_zero_flag+y}
28420then :
28421  printf %s "(cached) " >&6
28422else $as_nop
28423  if test "$cross_compiling" = yes
28424then :
28425  case "$host_os" in
28426            aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
28427            *)    gl_cv_func_fstatat_zero_flag="guessing yes";;
28428          esac
28429
28430else $as_nop
28431  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28432/* end confdefs.h.  */
28433
28434              #include <fcntl.h>
28435              #include <sys/stat.h>
28436              int
28437              main (void)
28438              {
28439                struct stat a;
28440                return fstatat (AT_FDCWD, ".", &a, 0) != 0;
28441              }
28442
28443_ACEOF
28444if ac_fn_c_try_run "$LINENO"
28445then :
28446  gl_cv_func_fstatat_zero_flag=yes
28447else $as_nop
28448  gl_cv_func_fstatat_zero_flag=no
28449fi
28450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28451  conftest.$ac_objext conftest.beam conftest.$ac_ext
28452fi
28453
28454
28455fi
28456{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
28457printf "%s\n" "$gl_cv_func_fstatat_zero_flag" >&6; }
28458
28459    case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
28460    *yes+*yes) ;;
28461    *) REPLACE_FSTATAT=1 ;;
28462    esac
28463
28464    case $host_os in
28465      solaris*)
28466        REPLACE_FSTATAT=1 ;;
28467    esac
28468
28469    case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
28470      1,*yes)
28471
28472printf "%s\n" "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
28473
28474         ;;
28475    esac
28476  fi
28477
28478  if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28479
28480
28481
28482
28483
28484
28485
28486
28487  gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
28488
28489  fi
28490
28491
28492
28493
28494
28495          GNULIB_FSTATAT=1
28496
28497
28498
28499
28500
28501printf "%s\n" "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
28502
28503
28504
28505
28506
28507
28508  if test $ac_cv_func_fsync = no; then
28509    HAVE_FSYNC=0
28510  fi
28511
28512  if test $HAVE_FSYNC = 0; then
28513
28514
28515
28516
28517
28518
28519
28520
28521  gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
28522
28523    :
28524  fi
28525
28526
28527
28528
28529
28530          GNULIB_FSYNC=1
28531
28532
28533
28534
28535
28536printf "%s\n" "#define GNULIB_TEST_FSYNC 1" >>confdefs.h
28537
28538
28539
28540
28541
28542
28543    if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
28544    REPLACE_FTELL=1
28545  fi
28546
28547  if test $REPLACE_FTELL = 1; then
28548
28549
28550
28551
28552
28553
28554
28555
28556  gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
28557
28558  fi
28559
28560
28561
28562
28563
28564          GNULIB_FTELL=1
28565
28566
28567
28568
28569
28570printf "%s\n" "#define GNULIB_TEST_FTELL 1" >>confdefs.h
28571
28572
28573
28574
28575
28576
28577
28578
28579
28580
28581
28582
28583  if test $ac_cv_have_decl_ftello = no; then
28584    HAVE_DECL_FTELLO=0
28585  fi
28586
28587  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
28588printf %s "checking for ftello... " >&6; }
28589if test ${gl_cv_func_ftello+y}
28590then :
28591  printf %s "(cached) " >&6
28592else $as_nop
28593
28594      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28595/* end confdefs.h.  */
28596#include <stdio.h>
28597int
28598main (void)
28599{
28600ftello (stdin);
28601  ;
28602  return 0;
28603}
28604_ACEOF
28605if ac_fn_c_try_link "$LINENO"
28606then :
28607  gl_cv_func_ftello=yes
28608else $as_nop
28609  gl_cv_func_ftello=no
28610fi
28611rm -f core conftest.err conftest.$ac_objext conftest.beam \
28612    conftest$ac_exeext conftest.$ac_ext
28613
28614fi
28615{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
28616printf "%s\n" "$gl_cv_func_ftello" >&6; }
28617  if test $gl_cv_func_ftello = no; then
28618    HAVE_FTELLO=0
28619  else
28620    if test $WINDOWS_64_BIT_OFF_T = 1; then
28621      REPLACE_FTELLO=1
28622    fi
28623    if test $gl_cv_var_stdin_large_offset = no; then
28624      REPLACE_FTELLO=1
28625    fi
28626    if test $REPLACE_FTELLO = 0; then
28627
28628      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
28629printf %s "checking whether ftello works... " >&6; }
28630if test ${gl_cv_func_ftello_works+y}
28631then :
28632  printf %s "(cached) " >&6
28633else $as_nop
28634
28635                              case "$host_os" in
28636                      # Guess no on Solaris.
28637            solaris*) gl_cv_func_ftello_works="guessing no" ;;
28638                      # Guess yes on native Windows.
28639            mingw*)   gl_cv_func_ftello_works="guessing yes" ;;
28640                      # Guess yes otherwise.
28641            *)        gl_cv_func_ftello_works="guessing yes" ;;
28642          esac
28643          if test "$cross_compiling" = yes
28644then :
28645  :
28646else $as_nop
28647  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28648/* end confdefs.h.  */
28649
28650#include <stdio.h>
28651#include <stdlib.h>
28652#include <string.h>
28653#define TESTFILE "conftest.tmp"
28654int
28655main (void)
28656{
28657  FILE *fp;
28658
28659  /* Create a file with some contents.  */
28660  fp = fopen (TESTFILE, "w");
28661  if (fp == NULL)
28662    return 70;
28663  if (fwrite ("foogarsh", 1, 8, fp) < 8)
28664    { fclose (fp); return 71; }
28665  if (fclose (fp))
28666    return 72;
28667
28668  /* The file's contents is now "foogarsh".  */
28669
28670  /* Try writing after reading to EOF.  */
28671  fp = fopen (TESTFILE, "r+");
28672  if (fp == NULL)
28673    return 73;
28674  if (fseek (fp, -1, SEEK_END))
28675    { fclose (fp); return 74; }
28676  if (!(getc (fp) == 'h'))
28677    { fclose (fp); return 1; }
28678  if (!(getc (fp) == EOF))
28679    { fclose (fp); return 2; }
28680  if (!(ftell (fp) == 8))
28681    { fclose (fp); return 3; }
28682  if (!(ftell (fp) == 8))
28683    { fclose (fp); return 4; }
28684  if (!(putc ('!', fp) == '!'))
28685    { fclose (fp); return 5; }
28686  if (!(ftell (fp) == 9))
28687    { fclose (fp); return 6; }
28688  if (!(fclose (fp) == 0))
28689    return 7;
28690  fp = fopen (TESTFILE, "r");
28691  if (fp == NULL)
28692    return 75;
28693  {
28694    char buf[10];
28695    if (!(fread (buf, 1, 10, fp) == 9))
28696      { fclose (fp); return 10; }
28697    if (!(memcmp (buf, "foogarsh!", 9) == 0))
28698      { fclose (fp); return 11; }
28699  }
28700  if (!(fclose (fp) == 0))
28701    return 12;
28702
28703  /* The file's contents is now "foogarsh!".  */
28704
28705  return 0;
28706}
28707_ACEOF
28708if ac_fn_c_try_run "$LINENO"
28709then :
28710  gl_cv_func_ftello_works=yes
28711else $as_nop
28712  gl_cv_func_ftello_works=no
28713fi
28714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28715  conftest.$ac_objext conftest.beam conftest.$ac_ext
28716fi
28717
28718
28719fi
28720{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
28721printf "%s\n" "$gl_cv_func_ftello_works" >&6; }
28722      case "$gl_cv_func_ftello_works" in
28723        *yes) ;;
28724        *)
28725          REPLACE_FTELLO=1
28726
28727printf "%s\n" "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
28728
28729          ;;
28730      esac
28731    fi
28732  fi
28733
28734  if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
28735
28736
28737
28738
28739
28740
28741
28742
28743  gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
28744
28745
28746      ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
28747if test "x$ac_cv_func__ftelli64" = xyes
28748then :
28749  printf "%s\n" "#define HAVE__FTELLI64 1" >>confdefs.h
28750
28751fi
28752
28753
28754  fi
28755
28756
28757
28758
28759
28760          GNULIB_FTELLO=1
28761
28762
28763
28764
28765
28766printf "%s\n" "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
28767
28768
28769
28770
28771
28772
28773  if test $ac_cv_func_ftruncate = yes; then
28774
28775
28776      case "$host_os" in
28777        mingw*)
28778                                                                      REPLACE_FTRUNCATE=1
28779          ;;
28780      esac
28781
28782  else
28783    HAVE_FTRUNCATE=0
28784  fi
28785
28786  if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
28787
28788
28789
28790
28791
28792
28793
28794
28795  gl_LIBOBJS="$gl_LIBOBJS ftruncate.$ac_objext"
28796
28797
28798  ac_fn_c_check_func "$LINENO" "_chsize" "ac_cv_func__chsize"
28799if test "x$ac_cv_func__chsize" = xyes
28800then :
28801  printf "%s\n" "#define HAVE__CHSIZE 1" >>confdefs.h
28802
28803fi
28804
28805
28806  fi
28807
28808
28809
28810
28811
28812          GNULIB_FTRUNCATE=1
28813
28814
28815
28816
28817
28818printf "%s\n" "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
28819
28820
28821
28822
28823
28824
28825
28826  if test $ac_cv_func_futimens = no; then
28827    HAVE_FUTIMENS=0
28828  else
28829    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether futimens works" >&5
28830printf %s "checking whether futimens works... " >&6; }
28831if test ${gl_cv_func_futimens_works+y}
28832then :
28833  printf %s "(cached) " >&6
28834else $as_nop
28835  if test "$cross_compiling" = yes
28836then :
28837  case "$host_os" in
28838                           # Guess no on glibc systems.
28839            *-gnu* | gnu*) gl_cv_func_futimens_works="guessing no" ;;
28840                           # Guess no on musl systems.
28841            *-musl*)       gl_cv_func_futimens_works="guessing no" ;;
28842                           # Guess yes otherwise.
28843            *)             gl_cv_func_futimens_works="guessing yes" ;;
28844          esac
28845
28846else $as_nop
28847  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28848/* end confdefs.h.  */
28849
28850#include <fcntl.h>
28851#include <sys/stat.h>
28852#include <unistd.h>
28853#include <errno.h>
28854
28855
28856$gl_mda_defines
28857
28858int
28859main (void)
28860{
28861struct timespec ts[2];
28862      int fd = creat ("conftest.file", 0600);
28863      struct stat st;
28864      if (fd < 0) return 1;
28865      ts[0].tv_sec = 1;
28866      ts[0].tv_nsec = UTIME_OMIT;
28867      ts[1].tv_sec = 1;
28868      ts[1].tv_nsec = UTIME_NOW;
28869      errno = 0;
28870      if (futimens (AT_FDCWD, NULL) == 0) return 2;
28871      if (errno != EBADF) return 3;
28872      if (futimens (fd, ts)) return 4;
28873      sleep (1);
28874      ts[0].tv_nsec = UTIME_NOW;
28875      ts[1].tv_nsec = UTIME_OMIT;
28876      if (futimens (fd, ts)) return 5;
28877      if (fstat (fd, &st)) return 6;
28878      if (st.st_ctime < st.st_atime) return 7;
28879
28880  ;
28881  return 0;
28882}
28883_ACEOF
28884if ac_fn_c_try_run "$LINENO"
28885then :
28886  gl_cv_func_futimens_works=yes
28887else $as_nop
28888  gl_cv_func_futimens_works=no
28889fi
28890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28891  conftest.$ac_objext conftest.beam conftest.$ac_ext
28892fi
28893
28894      rm -f conftest.file
28895fi
28896{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimens_works" >&5
28897printf "%s\n" "$gl_cv_func_futimens_works" >&6; }
28898    case "$gl_cv_func_futimens_works" in
28899      *yes) ;;
28900      *)
28901        REPLACE_FUTIMENS=1
28902        ;;
28903    esac
28904  fi
28905
28906  if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
28907
28908
28909
28910
28911
28912
28913
28914
28915  gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext"
28916
28917  fi
28918
28919
28920
28921
28922
28923          GNULIB_FUTIMENS=1
28924
28925
28926
28927
28928
28929printf "%s\n" "#define GNULIB_TEST_FUTIMENS 1" >>confdefs.h
28930
28931
28932
28933
28934      GETADDRINFO_LIB=
28935  gai_saved_LIBS="$LIBS"
28936
28937              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5
28938printf %s "checking for library containing getaddrinfo... " >&6; }
28939if test ${ac_cv_search_getaddrinfo+y}
28940then :
28941  printf %s "(cached) " >&6
28942else $as_nop
28943  ac_func_search_save_LIBS=$LIBS
28944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28945/* end confdefs.h.  */
28946
28947/* Override any GCC internal prototype to avoid an error.
28948   Use char because int might match the return type of a GCC
28949   builtin and then its argument prototype would still apply.  */
28950char getaddrinfo ();
28951int
28952main (void)
28953{
28954return getaddrinfo ();
28955  ;
28956  return 0;
28957}
28958_ACEOF
28959for ac_lib in '' socket network net
28960do
28961  if test -z "$ac_lib"; then
28962    ac_res="none required"
28963  else
28964    ac_res=-l$ac_lib
28965    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28966  fi
28967  if ac_fn_c_try_link "$LINENO"
28968then :
28969  ac_cv_search_getaddrinfo=$ac_res
28970fi
28971rm -f core conftest.err conftest.$ac_objext conftest.beam \
28972    conftest$ac_exeext
28973  if test ${ac_cv_search_getaddrinfo+y}
28974then :
28975  break
28976fi
28977done
28978if test ${ac_cv_search_getaddrinfo+y}
28979then :
28980
28981else $as_nop
28982  ac_cv_search_getaddrinfo=no
28983fi
28984rm conftest.$ac_ext
28985LIBS=$ac_func_search_save_LIBS
28986fi
28987{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5
28988printf "%s\n" "$ac_cv_search_getaddrinfo" >&6; }
28989ac_res=$ac_cv_search_getaddrinfo
28990if test "$ac_res" != no
28991then :
28992  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28993  if test "$ac_cv_search_getaddrinfo" != "none required"; then
28994       GETADDRINFO_LIB="$ac_cv_search_getaddrinfo"
28995     fi
28996fi
28997
28998  LIBS="$gai_saved_LIBS $GETADDRINFO_LIB"
28999
29000  HAVE_GETADDRINFO=1
29001  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
29002printf %s "checking for getaddrinfo... " >&6; }
29003if test ${gl_cv_func_getaddrinfo+y}
29004then :
29005  printf %s "(cached) " >&6
29006else $as_nop
29007
29008    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29009/* end confdefs.h.  */
29010
29011#include <sys/types.h>
29012#ifdef HAVE_SYS_SOCKET_H
29013#include <sys/socket.h>
29014#endif
29015#ifdef HAVE_NETDB_H
29016#include <netdb.h>
29017#endif
29018#include <stddef.h>
29019
29020int
29021main (void)
29022{
29023getaddrinfo("", "", NULL, NULL);
29024  ;
29025  return 0;
29026}
29027_ACEOF
29028if ac_fn_c_try_link "$LINENO"
29029then :
29030  gl_cv_func_getaddrinfo=yes
29031else $as_nop
29032  gl_cv_func_getaddrinfo=no
29033fi
29034rm -f core conftest.err conftest.$ac_objext conftest.beam \
29035    conftest$ac_exeext conftest.$ac_ext
29036fi
29037{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getaddrinfo" >&5
29038printf "%s\n" "$gl_cv_func_getaddrinfo" >&6; }
29039  if test $gl_cv_func_getaddrinfo = no; then
29040    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in ws2tcpip.h and -lws2_32" >&5
29041printf %s "checking for getaddrinfo in ws2tcpip.h and -lws2_32... " >&6; }
29042if test ${gl_cv_w32_getaddrinfo+y}
29043then :
29044  printf %s "(cached) " >&6
29045else $as_nop
29046
29047      gl_cv_w32_getaddrinfo=no
29048      am_save_LIBS="$LIBS"
29049      LIBS="$LIBS -lws2_32"
29050      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29051/* end confdefs.h.  */
29052
29053#ifdef HAVE_WS2TCPIP_H
29054#include <ws2tcpip.h>
29055#endif
29056#include <stddef.h>
29057
29058int
29059main (void)
29060{
29061getaddrinfo(NULL, NULL, NULL, NULL);
29062  ;
29063  return 0;
29064}
29065_ACEOF
29066if ac_fn_c_try_link "$LINENO"
29067then :
29068  gl_cv_w32_getaddrinfo=yes
29069fi
29070rm -f core conftest.err conftest.$ac_objext conftest.beam \
29071    conftest$ac_exeext conftest.$ac_ext
29072      LIBS="$am_save_LIBS"
29073
29074fi
29075{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_getaddrinfo" >&5
29076printf "%s\n" "$gl_cv_w32_getaddrinfo" >&6; }
29077    if test "$gl_cv_w32_getaddrinfo" = "yes"; then
29078      GETADDRINFO_LIB="-lws2_32"
29079      LIBS="$gai_saved_LIBS $GETADDRINFO_LIB"
29080                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo with POSIX signature" >&5
29081printf %s "checking for getaddrinfo with POSIX signature... " >&6; }
29082if test ${gl_cv_func_getaddrinfo_posix_signature+y}
29083then :
29084  printf %s "(cached) " >&6
29085else $as_nop
29086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29087/* end confdefs.h.  */
29088
29089#include <sys/types.h>
29090#ifdef HAVE_SYS_SOCKET_H
29091#include <sys/socket.h>
29092#endif
29093#ifdef HAVE_NETDB_H
29094#include <netdb.h>
29095#endif
29096#ifdef HAVE_WS2TCPIP_H
29097#include <ws2tcpip.h>
29098#endif
29099#include <stddef.h>
29100extern
29101#ifdef __cplusplus
29102"C"
29103#endif
29104int getaddrinfo (const char *, const char *, const struct addrinfo *, struct addrinfo **);
29105
29106_ACEOF
29107if ac_fn_c_try_compile "$LINENO"
29108then :
29109  gl_cv_func_getaddrinfo_posix_signature=yes
29110else $as_nop
29111  gl_cv_func_getaddrinfo_posix_signature=no
29112fi
29113rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29114
29115fi
29116{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getaddrinfo_posix_signature" >&5
29117printf "%s\n" "$gl_cv_func_getaddrinfo_posix_signature" >&6; }
29118      if test $gl_cv_func_getaddrinfo_posix_signature = no; then
29119        REPLACE_GETADDRINFO=1
29120      fi
29121    else
29122      HAVE_GETADDRINFO=0
29123    fi
29124  fi
29125
29126printf "%s\n" "#define HAVE_GETADDRINFO $HAVE_GETADDRINFO" >>confdefs.h
29127
29128
29129  # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an
29130  # inline function declared in ws2tcpip.h, so we need to get that
29131  # header included somehow.
29132  ac_fn_check_decl "$LINENO" "gai_strerror" "ac_cv_have_decl_gai_strerror" "
29133#include <sys/types.h>
29134#ifdef HAVE_SYS_SOCKET_H
29135#include <sys/socket.h>
29136#endif
29137#ifdef HAVE_NETDB_H
29138#include <netdb.h>
29139#endif
29140#ifdef HAVE_WS2TCPIP_H
29141#include <ws2tcpip.h>
29142#endif
29143#include <stddef.h>
29144
29145" "$ac_c_undeclared_builtin_options" "CFLAGS"
29146if test "x$ac_cv_have_decl_gai_strerror" = xyes
29147then :
29148  ac_have_decl=1
29149else $as_nop
29150  ac_have_decl=0
29151fi
29152printf "%s\n" "#define HAVE_DECL_GAI_STRERROR $ac_have_decl" >>confdefs.h
29153
29154  if test $ac_cv_have_decl_gai_strerror = yes; then
29155    ac_fn_check_decl "$LINENO" "gai_strerrorA" "ac_cv_have_decl_gai_strerrorA" "
29156#include <sys/types.h>
29157#ifdef HAVE_SYS_SOCKET_H
29158#include <sys/socket.h>
29159#endif
29160#ifdef HAVE_NETDB_H
29161#include <netdb.h>
29162#endif
29163#ifdef HAVE_WS2TCPIP_H
29164#include <ws2tcpip.h>
29165#endif
29166#include <stddef.h>
29167
29168" "$ac_c_undeclared_builtin_options" "CFLAGS"
29169if test "x$ac_cv_have_decl_gai_strerrorA" = xyes
29170then :
29171  ac_have_decl=1
29172else $as_nop
29173  ac_have_decl=0
29174fi
29175printf "%s\n" "#define HAVE_DECL_GAI_STRERRORA $ac_have_decl" >>confdefs.h
29176
29177        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gai_strerror with POSIX signature" >&5
29178printf %s "checking for gai_strerror with POSIX signature... " >&6; }
29179if test ${gl_cv_func_gai_strerror_posix_signature+y}
29180then :
29181  printf %s "(cached) " >&6
29182else $as_nop
29183
29184      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29185/* end confdefs.h.  */
29186
29187#include <sys/types.h>
29188#ifdef HAVE_SYS_SOCKET_H
29189#include <sys/socket.h>
29190#endif
29191#ifdef HAVE_NETDB_H
29192#include <netdb.h>
29193#endif
29194#ifdef HAVE_WS2TCPIP_H
29195#include <ws2tcpip.h>
29196#endif
29197#include <stddef.h>
29198extern
29199#ifdef __cplusplus
29200"C"
29201#endif
29202const char *gai_strerror(int);
29203_ACEOF
29204if ac_fn_c_try_compile "$LINENO"
29205then :
29206  gl_cv_func_gai_strerror_posix_signature=yes
29207else $as_nop
29208  gl_cv_func_gai_strerror_posix_signature=no
29209fi
29210rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29211fi
29212{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gai_strerror_posix_signature" >&5
29213printf "%s\n" "$gl_cv_func_gai_strerror_posix_signature" >&6; }
29214    if test $gl_cv_func_gai_strerror_posix_signature = no; then
29215      REPLACE_GAI_STRERROR=1
29216    fi
29217  fi
29218
29219  LIBS="$gai_saved_LIBS"
29220
29221
29222
29223
29224
29225
29226
29227
29228      ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "
29229#include <sys/types.h>
29230#include <sys/socket.h>
29231
29232"
29233if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes
29234then :
29235
29236printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_SA_LEN 1" >>confdefs.h
29237
29238
29239fi
29240
29241
29242
29243
29244  ac_fn_check_decl "$LINENO" "getaddrinfo" "ac_cv_have_decl_getaddrinfo" "
29245  /* sys/types.h is not needed according to POSIX, but the
29246     sys/socket.h in i386-unknown-freebsd4.10 and
29247     powerpc-apple-darwin5.5 required it. */
29248#include <sys/types.h>
29249#ifdef HAVE_SYS_SOCKET_H
29250#include <sys/socket.h>
29251#endif
29252#ifdef HAVE_NETDB_H
29253#include <netdb.h>
29254#endif
29255#ifdef HAVE_WS2TCPIP_H
29256#include <ws2tcpip.h>
29257#endif
29258
29259" "$ac_c_undeclared_builtin_options" "CFLAGS"
29260if test "x$ac_cv_have_decl_getaddrinfo" = xyes
29261then :
29262  ac_have_decl=1
29263else $as_nop
29264  ac_have_decl=0
29265fi
29266printf "%s\n" "#define HAVE_DECL_GETADDRINFO $ac_have_decl" >>confdefs.h
29267ac_fn_check_decl "$LINENO" "freeaddrinfo" "ac_cv_have_decl_freeaddrinfo" "
29268  /* sys/types.h is not needed according to POSIX, but the
29269     sys/socket.h in i386-unknown-freebsd4.10 and
29270     powerpc-apple-darwin5.5 required it. */
29271#include <sys/types.h>
29272#ifdef HAVE_SYS_SOCKET_H
29273#include <sys/socket.h>
29274#endif
29275#ifdef HAVE_NETDB_H
29276#include <netdb.h>
29277#endif
29278#ifdef HAVE_WS2TCPIP_H
29279#include <ws2tcpip.h>
29280#endif
29281
29282" "$ac_c_undeclared_builtin_options" "CFLAGS"
29283if test "x$ac_cv_have_decl_freeaddrinfo" = xyes
29284then :
29285  ac_have_decl=1
29286else $as_nop
29287  ac_have_decl=0
29288fi
29289printf "%s\n" "#define HAVE_DECL_FREEADDRINFO $ac_have_decl" >>confdefs.h
29290ac_fn_check_decl "$LINENO" "getnameinfo" "ac_cv_have_decl_getnameinfo" "
29291  /* sys/types.h is not needed according to POSIX, but the
29292     sys/socket.h in i386-unknown-freebsd4.10 and
29293     powerpc-apple-darwin5.5 required it. */
29294#include <sys/types.h>
29295#ifdef HAVE_SYS_SOCKET_H
29296#include <sys/socket.h>
29297#endif
29298#ifdef HAVE_NETDB_H
29299#include <netdb.h>
29300#endif
29301#ifdef HAVE_WS2TCPIP_H
29302#include <ws2tcpip.h>
29303#endif
29304
29305" "$ac_c_undeclared_builtin_options" "CFLAGS"
29306if test "x$ac_cv_have_decl_getnameinfo" = xyes
29307then :
29308  ac_have_decl=1
29309else $as_nop
29310  ac_have_decl=0
29311fi
29312printf "%s\n" "#define HAVE_DECL_GETNAMEINFO $ac_have_decl" >>confdefs.h
29313
29314  if test $ac_cv_have_decl_getaddrinfo = no; then
29315    HAVE_DECL_GETADDRINFO=0
29316  fi
29317  if test $ac_cv_have_decl_freeaddrinfo = no; then
29318    HAVE_DECL_FREEADDRINFO=0
29319  fi
29320  if test $ac_cv_have_decl_gai_strerror = no; then
29321    HAVE_DECL_GAI_STRERROR=0
29322  fi
29323  if test $ac_cv_have_decl_getnameinfo = no; then
29324    HAVE_DECL_GETNAMEINFO=0
29325  fi
29326
29327  ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "
29328#include <sys/types.h>
29329#ifdef HAVE_SYS_SOCKET_H
29330#include <sys/socket.h>
29331#endif
29332#ifdef HAVE_NETDB_H
29333#include <netdb.h>
29334#endif
29335#ifdef HAVE_WS2TCPIP_H
29336#include <ws2tcpip.h>
29337#endif
29338
29339"
29340if test "x$ac_cv_type_struct_addrinfo" = xyes
29341then :
29342
29343printf "%s\n" "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
29344
29345
29346fi
29347
29348  if test $ac_cv_type_struct_addrinfo = no; then
29349    HAVE_STRUCT_ADDRINFO=0
29350  fi
29351
29352    case " $GETADDRINFO_LIB " in
29353    *" $HOSTENT_LIB "*) ;;
29354    *) GETADDRINFO_LIB="$GETADDRINFO_LIB $HOSTENT_LIB" ;;
29355  esac
29356
29357    case " $GETADDRINFO_LIB " in
29358    *" $SERVENT_LIB "*) ;;
29359    *) GETADDRINFO_LIB="$GETADDRINFO_LIB $SERVENT_LIB" ;;
29360  esac
29361
29362    case " $GETADDRINFO_LIB " in
29363    *" $INET_NTOP_LIB "*) ;;
29364    *) GETADDRINFO_LIB="$GETADDRINFO_LIB $INET_NTOP_LIB" ;;
29365  esac
29366
29367
29368
29369
29370  if test $HAVE_GETADDRINFO = 0 || test $REPLACE_GETADDRINFO = 1; then
29371
29372
29373
29374
29375
29376
29377
29378
29379  gl_LIBOBJS="$gl_LIBOBJS getaddrinfo.$ac_objext"
29380
29381  fi
29382  if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then
29383
29384
29385
29386
29387
29388
29389
29390
29391  gl_LIBOBJS="$gl_LIBOBJS gai_strerror.$ac_objext"
29392
29393  fi
29394
29395
29396
29397
29398
29399          GNULIB_GETADDRINFO=1
29400
29401
29402
29403
29404
29405printf "%s\n" "#define GNULIB_TEST_GETADDRINFO 1" >>confdefs.h
29406
29407
29408
29409
29410
29411
29412
29413
29414  gl_abort_bug=no
29415  case "$host_os" in
29416    mingw*)
29417      gl_cv_func_getcwd_path_max=yes
29418      ;;
29419    *)
29420
29421
29422
29423
29424
29425  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
29426printf %s "checking whether getcwd handles long file names properly... " >&6; }
29427if test ${gl_cv_func_getcwd_path_max+y}
29428then :
29429  printf %s "(cached) " >&6
29430else $as_nop
29431  # Arrange for deletion of the temporary directory this test creates.
29432     ac_clean_files="$ac_clean_files confdir3"
29433          if test "$cross_compiling" = yes
29434then :
29435  # Cross-compilation guesses:
29436        case "$host_os" in
29437          aix*) # On AIX, it has the AIX bug.
29438            gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;;
29439          gnu*) # On Hurd, it is 'yes'.
29440            gl_cv_func_getcwd_path_max='guessing yes' ;;
29441          linux* | kfreebsd*)
29442            # On older Linux+glibc it's 'no, but it is partly working',
29443            # on newer Linux+glibc it's 'yes'.
29444            # On Linux+musl libc, it's 'no, but it is partly working'.
29445            # On kFreeBSD+glibc, it's 'no, but it is partly working'.
29446            gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;;
29447          *) # If we don't know, obey --enable-cross-guesses.
29448            gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;;
29449        esac
29450
29451else $as_nop
29452  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29453/* end confdefs.h.  */
29454
29455#include <errno.h>
29456#include <stdlib.h>
29457#if HAVE_UNISTD_H
29458# include <unistd.h>
29459#else
29460# include <direct.h>
29461#endif
29462#include <string.h>
29463#include <limits.h>
29464#include <sys/stat.h>
29465#include <sys/types.h>
29466#include <fcntl.h>
29467
29468
29469/* Arrange to define PATH_MAX, like "pathmax.h" does. */
29470#if HAVE_UNISTD_H
29471# include <unistd.h>
29472#endif
29473#include <limits.h>
29474#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
29475# include <sys/param.h>
29476#endif
29477#if !defined PATH_MAX && defined MAXPATHLEN
29478# define PATH_MAX MAXPATHLEN
29479#endif
29480#ifdef __hpux
29481# undef PATH_MAX
29482# define PATH_MAX 1024
29483#endif
29484#if defined _WIN32 && ! defined __CYGWIN__
29485# undef PATH_MAX
29486# define PATH_MAX 260
29487#endif
29488
29489
29490#ifndef AT_FDCWD
29491# define AT_FDCWD 0
29492#endif
29493#ifdef ENAMETOOLONG
29494# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
29495#else
29496# define is_ENAMETOOLONG(x) 0
29497#endif
29498
29499/* Use the getcwd function, not any macro.  */
29500#undef getcwd
29501
29502
29503
29504$gl_mda_defines
29505
29506
29507#ifndef S_IRWXU
29508# define S_IRWXU 0700
29509#endif
29510
29511/* The length of this name must be 8.  */
29512#define DIR_NAME "confdir3"
29513#define DIR_NAME_LEN 8
29514#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
29515
29516/* The length of "../".  */
29517#define DOTDOTSLASH_LEN 3
29518
29519/* Leftover bytes in the buffer, to work around library or OS bugs.  */
29520#define BUF_SLOP 20
29521
29522int
29523main ()
29524{
29525#ifndef PATH_MAX
29526  /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
29527     at least not on a local file system.  And if we were to start worrying
29528     about remote file systems, we'd have to enable the wrapper function
29529     all of the time, just to be safe.  That's not worth the cost.  */
29530  exit (0);
29531#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
29532        - DIR_NAME_SIZE - BUF_SLOP) \
29533       <= PATH_MAX)
29534  /* FIXME: Assuming there's a system for which this is true,
29535     this should be done in a compile test.  */
29536  exit (0);
29537#else
29538  char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
29539           + DIR_NAME_SIZE + BUF_SLOP];
29540  char *cwd = getcwd (buf, PATH_MAX);
29541  size_t initial_cwd_len;
29542  size_t cwd_len;
29543  int fail = 0;
29544  size_t n_chdirs = 0;
29545
29546  if (cwd == NULL)
29547    exit (10);
29548
29549  cwd_len = initial_cwd_len = strlen (cwd);
29550
29551  while (1)
29552    {
29553      size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
29554      char *c = NULL;
29555
29556      cwd_len += DIR_NAME_SIZE;
29557      /* If mkdir or chdir fails, it could be that this system cannot create
29558         any file with an absolute name longer than PATH_MAX, such as cygwin.
29559         If so, leave fail as 0, because the current working directory can't
29560         be too long for getcwd if it can't even be created.  On Linux with
29561         the 9p file system, mkdir fails with error EINVAL when cwd_len gets
29562         too long; ignore this failure because the getcwd() system call
29563         produces good results whereas the gnulib substitute calls getdents64
29564         which fails with error EPROTO.
29565         For other errors, be pessimistic and consider that as a failure,
29566         too.  */
29567      if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
29568        {
29569          if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
29570            #ifdef __linux__
29571            if (! (errno == EINVAL))
29572            #endif
29573              fail = 20;
29574          break;
29575        }
29576
29577      if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
29578        {
29579          struct stat sb;
29580
29581          c = getcwd (buf, PATH_MAX);
29582          if (!c && errno == ENOENT)
29583            {
29584              fail = 11;
29585              break;
29586            }
29587          if (c)
29588            {
29589              fail = 31;
29590              break;
29591            }
29592          if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
29593            {
29594              fail = 21;
29595              break;
29596            }
29597
29598          /* Our replacement needs to be able to stat() long ../../paths,
29599             so generate a path larger than PATH_MAX to check,
29600             avoiding the replacement if we can't stat().  */
29601          c = getcwd (buf, cwd_len + 1);
29602          if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
29603            {
29604              fail = 32;
29605              break;
29606            }
29607        }
29608
29609      if (dotdot_max <= cwd_len - initial_cwd_len)
29610        {
29611          if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
29612            break;
29613          c = getcwd (buf, cwd_len + 1);
29614          if (!c)
29615            {
29616              if (! (errno == ERANGE || errno == ENOENT
29617                     || is_ENAMETOOLONG (errno)))
29618                {
29619                  fail = 22;
29620                  break;
29621                }
29622              if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
29623                {
29624                  fail = 12;
29625                  break;
29626                }
29627            }
29628        }
29629
29630      if (c && strlen (c) != cwd_len)
29631        {
29632          fail = 23;
29633          break;
29634        }
29635      ++n_chdirs;
29636    }
29637
29638  /* Leaving behind such a deep directory is not polite.
29639     So clean up here, right away, even though the driving
29640     shell script would also clean up.  */
29641  {
29642    size_t i;
29643
29644    /* Try rmdir first, in case the chdir failed.  */
29645    rmdir (DIR_NAME);
29646    for (i = 0; i <= n_chdirs; i++)
29647      {
29648        if (chdir ("..") < 0)
29649          break;
29650        if (rmdir (DIR_NAME) != 0)
29651          break;
29652      }
29653  }
29654
29655  exit (fail);
29656#endif
29657}
29658
29659_ACEOF
29660if ac_fn_c_try_run "$LINENO"
29661then :
29662  gl_cv_func_getcwd_path_max=yes
29663else $as_nop
29664  case $? in
29665        10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
29666        31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
29667        32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
29668        *) gl_cv_func_getcwd_path_max=no;;
29669        esac
29670fi
29671rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29672  conftest.$ac_objext conftest.beam conftest.$ac_ext
29673fi
29674
29675
29676fi
29677{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
29678printf "%s\n" "$gl_cv_func_getcwd_path_max" >&6; }
29679
29680      case "$gl_cv_func_getcwd_null" in
29681        *yes)
29682
29683
29684
29685
29686
29687
29688      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
29689printf %s "checking for getpagesize... " >&6; }
29690if test ${gl_cv_func_getpagesize+y}
29691then :
29692  printf %s "(cached) " >&6
29693else $as_nop
29694  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29695/* end confdefs.h.  */
29696#include <unistd.h>
29697int
29698main (void)
29699{
29700return getpagesize();
29701  ;
29702  return 0;
29703}
29704
29705_ACEOF
29706if ac_fn_c_try_link "$LINENO"
29707then :
29708  gl_cv_func_getpagesize=yes
29709else $as_nop
29710  gl_cv_func_getpagesize=no
29711fi
29712rm -f core conftest.err conftest.$ac_objext conftest.beam \
29713    conftest$ac_exeext conftest.$ac_ext
29714
29715fi
29716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
29717printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
29718
29719  if test $gl_cv_func_getpagesize = yes; then
29720
29721printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h
29722
29723  fi
29724
29725  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5
29726printf %s "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; }
29727if test ${gl_cv_func_getcwd_succeeds_beyond_4k+y}
29728then :
29729  printf %s "(cached) " >&6
29730else $as_nop
29731  # Remove any remnants of a previous test.
29732     rm -rf confdir-14B---
29733     # Arrange for deletion of the temporary directory this test creates.
29734     ac_clean_files="$ac_clean_files confdir-14B---"
29735          if test "$cross_compiling" = yes
29736then :
29737  case "$host_os" in
29738             # Guess no otherwise, even on glibc systems and musl systems.
29739          *) gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
29740        esac
29741
29742else $as_nop
29743  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29744/* end confdefs.h.  */
29745
29746#include <errno.h>
29747#include <stdlib.h>
29748#if HAVE_UNISTD_H
29749# include <unistd.h>
29750#else /* on Windows with MSVC */
29751# include <direct.h>
29752#endif
29753#include <string.h>
29754#include <sys/stat.h>
29755
29756
29757/* Arrange to define PATH_MAX, like "pathmax.h" does. */
29758#if HAVE_UNISTD_H
29759# include <unistd.h>
29760#endif
29761#include <limits.h>
29762#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
29763# include <sys/param.h>
29764#endif
29765#if !defined PATH_MAX && defined MAXPATHLEN
29766# define PATH_MAX MAXPATHLEN
29767#endif
29768#ifdef __hpux
29769# undef PATH_MAX
29770# define PATH_MAX 1024
29771#endif
29772#if defined _WIN32 && ! defined __CYGWIN__
29773# undef PATH_MAX
29774# define PATH_MAX 260
29775#endif
29776
29777
29778
29779$gl_mda_defines
29780
29781
29782#ifndef S_IRWXU
29783# define S_IRWXU 0700
29784#endif
29785
29786/* FIXME: skip the run-test altogether on systems without getpagesize.  */
29787#if ! HAVE_GETPAGESIZE
29788# define getpagesize() 0
29789#endif
29790
29791/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
29792   the 16kB pagesize on ia64 linux.  Those conditions make the code below
29793   trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
29794#define TARGET_LEN (5 * 1024)
29795
29796int
29797main ()
29798{
29799  char *cwd;
29800  size_t initial_cwd_len;
29801  int fail = 0;
29802
29803  /* The bug is triggered when PATH_MAX < getpagesize (), so skip
29804     this relatively expensive and invasive test if that's not true.  */
29805#ifdef PATH_MAX
29806  int bug_possible = PATH_MAX < getpagesize ();
29807#else
29808  int bug_possible = 0;
29809#endif
29810  if (! bug_possible)
29811    return 0;
29812
29813  cwd = getcwd (NULL, 0);
29814  if (cwd == NULL)
29815    return 2;
29816
29817  initial_cwd_len = strlen (cwd);
29818  free (cwd);
29819
29820  if (1)
29821    {
29822      static char const dir_name[] = "confdir-14B---";
29823      size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
29824                              / sizeof dir_name);
29825      size_t d;
29826      for (d = 0; d < desired_depth; d++)
29827        {
29828          if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
29829            {
29830              if (! (errno == ERANGE || errno == ENAMETOOLONG
29831                     || errno == ENOENT))
29832                fail = 3; /* Unable to construct deep hierarchy.  */
29833              break;
29834            }
29835        }
29836
29837      /* If libc has the bug in question, this invocation of getcwd
29838         results in a failed assertion.  */
29839      cwd = getcwd (NULL, 0);
29840      if (cwd == NULL)
29841        fail = 4; /* getcwd didn't assert, but it failed for a long name
29842                     where the answer could have been learned.  */
29843      free (cwd);
29844
29845      /* Call rmdir first, in case the above chdir failed.  */
29846      rmdir (dir_name);
29847      while (0 < d--)
29848        {
29849          if (chdir ("..") < 0)
29850            {
29851              fail = 5;
29852              break;
29853            }
29854          rmdir (dir_name);
29855        }
29856    }
29857
29858  return fail;
29859}
29860
29861_ACEOF
29862if ac_fn_c_try_run "$LINENO"
29863then :
29864  gl_cv_func_getcwd_succeeds_beyond_4k=yes
29865else $as_nop
29866                                                          ret=$?
29867        if test $ret -ge 128 || test $ret = 4; then
29868          gl_cv_func_getcwd_succeeds_beyond_4k=no
29869        else
29870          gl_cv_func_getcwd_succeeds_beyond_4k=yes
29871        fi
29872
29873fi
29874rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29875  conftest.$ac_objext conftest.beam conftest.$ac_ext
29876fi
29877
29878
29879fi
29880{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5
29881printf "%s\n" "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; }
29882  case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
29883    *no)
29884      gl_abort_bug=yes
29885      ;;
29886    *)
29887
29888      ;;
29889  esac
29890
29891          ;;
29892      esac
29893      ;;
29894  esac
29895      case "$gl_cv_func_getcwd_path_max" in
29896    *"no" | *"no, it has the AIX bug") ;;
29897    *)
29898
29899printf "%s\n" "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
29900
29901      ;;
29902  esac
29903  case "$gl_cv_func_getcwd_path_max" in
29904    *"no, but it is partly working")
29905
29906printf "%s\n" "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
29907
29908      ;;
29909    *"yes, but with shorter paths")
29910
29911printf "%s\n" "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
29912
29913      ;;
29914  esac
29915
29916  if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
29917     || test $gl_cv_func_getcwd_posix_signature != yes \
29918     || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
29919     || test $gl_abort_bug = yes; then
29920    REPLACE_GETCWD=1
29921  fi
29922
29923  if test $REPLACE_GETCWD = 1; then
29924
29925
29926
29927
29928
29929
29930
29931
29932  gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
29933
29934
29935
29936
29937  :
29938
29939  fi
29940
29941
29942printf "%s\n" "#define GNULIB_GETCWD 1" >>confdefs.h
29943
29944
29945
29946
29947
29948
29949
29950          GNULIB_GETCWD=1
29951
29952
29953
29954
29955
29956printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
29957
29958
29959
29960
29961
29962
29963
29964
29965  case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
29966  *yes,yes) ;;
29967  *)
29968        REPLACE_GETCWD=1
29969    ;;
29970  esac
29971
29972  if test $REPLACE_GETCWD = 1; then
29973
29974
29975
29976
29977
29978
29979
29980
29981  gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
29982
29983  fi
29984
29985
29986
29987
29988
29989          GNULIB_GETCWD=1
29990
29991
29992
29993
29994
29995printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
29996
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007  if test $ac_cv_func_getdelim = yes; then
30008    HAVE_GETDELIM=1
30009        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
30010printf %s "checking for working getdelim function... " >&6; }
30011if test ${gl_cv_func_working_getdelim+y}
30012then :
30013  printf %s "(cached) " >&6
30014else $as_nop
30015  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
30016       if test "$cross_compiling" = yes
30017then :
30018                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30019/* end confdefs.h.  */
30020
30021#include <features.h>
30022#ifdef __GNU_LIBRARY__
30023 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
30024  Lucky GNU user
30025 #endif
30026#endif
30027
30028_ACEOF
30029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30030  $EGREP "Lucky GNU user" >/dev/null 2>&1
30031then :
30032  gl_cv_func_working_getdelim="guessing yes"
30033else $as_nop
30034  case "$host_os" in
30035               *-musl*) gl_cv_func_working_getdelim="guessing yes" ;;
30036               *)       gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
30037             esac
30038
30039fi
30040rm -rf conftest*
30041
30042
30043else $as_nop
30044  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30045/* end confdefs.h.  */
30046
30047#    include <stdio.h>
30048#    include <stdlib.h>
30049#    include <string.h>
30050    int main ()
30051    {
30052      FILE *in = fopen ("./conftest.data", "r");
30053      if (!in)
30054        return 1;
30055      {
30056        /* Test result for a NULL buffer and a zero size.
30057           Based on a test program from Karl Heuer.  */
30058        char *line = NULL;
30059        size_t siz = 0;
30060        int len = getdelim (&line, &siz, '\n', in);
30061        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
30062          { free (line); fclose (in); return 2; }
30063        free (line);
30064      }
30065      {
30066        /* Test result for a NULL buffer and a non-zero size.
30067           This crashes on FreeBSD 8.0.  */
30068        char *line = NULL;
30069        size_t siz = (size_t)(~0) / 4;
30070        if (getdelim (&line, &siz, '\n', in) == -1)
30071          { fclose (in); return 3; }
30072        free (line);
30073      }
30074      fclose (in);
30075      return 0;
30076    }
30077
30078_ACEOF
30079if ac_fn_c_try_run "$LINENO"
30080then :
30081  gl_cv_func_working_getdelim=yes
30082else $as_nop
30083  gl_cv_func_working_getdelim=no
30084fi
30085rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30086  conftest.$ac_objext conftest.beam conftest.$ac_ext
30087fi
30088
30089
30090fi
30091{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
30092printf "%s\n" "$gl_cv_func_working_getdelim" >&6; }
30093    case "$gl_cv_func_working_getdelim" in
30094      *yes) ;;
30095      *) REPLACE_GETDELIM=1 ;;
30096    esac
30097  else
30098    HAVE_GETDELIM=0
30099  fi
30100
30101  if test $ac_cv_have_decl_getdelim = no; then
30102    HAVE_DECL_GETDELIM=0
30103  fi
30104
30105  if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
30106
30107
30108
30109
30110
30111
30112
30113
30114  gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
30115
30116
30117  ac_fn_c_check_func "$LINENO" "flockfile" "ac_cv_func_flockfile"
30118if test "x$ac_cv_func_flockfile" = xyes
30119then :
30120  printf "%s\n" "#define HAVE_FLOCKFILE 1" >>confdefs.h
30121
30122fi
30123ac_fn_c_check_func "$LINENO" "funlockfile" "ac_cv_func_funlockfile"
30124if test "x$ac_cv_func_funlockfile" = xyes
30125then :
30126  printf "%s\n" "#define HAVE_FUNLOCKFILE 1" >>confdefs.h
30127
30128fi
30129
30130  ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
30131if test "x$ac_cv_have_decl_getc_unlocked" = xyes
30132then :
30133  ac_have_decl=1
30134else $as_nop
30135  ac_have_decl=0
30136fi
30137printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
30138
30139
30140  fi
30141
30142
30143
30144
30145
30146          GNULIB_GETDELIM=1
30147
30148
30149
30150
30151
30152printf "%s\n" "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
30153
30154
30155
30156
30157
30158
30159
30160
30161  if test $ac_cv_func_getdtablesize = yes &&
30162     test $ac_cv_have_decl_getdtablesize = yes; then
30163    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
30164printf %s "checking whether getdtablesize works... " >&6; }
30165if test ${gl_cv_func_getdtablesize_works+y}
30166then :
30167  printf %s "(cached) " >&6
30168else $as_nop
30169                                                   case "$host_os" in
30170         vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
30171         *)
30172                                                       if test "$cross_compiling" = yes
30173then :
30174  case "$host_os" in
30175                cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
30176                  gl_cv_func_getdtablesize_works="guessing no" ;;
30177                *) gl_cv_func_getdtablesize_works="guessing yes" ;;
30178              esac
30179
30180else $as_nop
30181  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30182/* end confdefs.h.  */
30183
30184             #include <unistd.h>
30185
30186
30187$gl_mda_defines
30188
30189
30190int
30191main (void)
30192{
30193int size = getdtablesize();
30194                 if (dup2 (0, getdtablesize()) != -1)
30195                   return 1;
30196                 if (size != getdtablesize())
30197                   return 2;
30198
30199  ;
30200  return 0;
30201}
30202_ACEOF
30203if ac_fn_c_try_run "$LINENO"
30204then :
30205  gl_cv_func_getdtablesize_works=yes
30206else $as_nop
30207  gl_cv_func_getdtablesize_works=no
30208fi
30209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30210  conftest.$ac_objext conftest.beam conftest.$ac_ext
30211fi
30212
30213           ;;
30214       esac
30215
30216fi
30217{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
30218printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
30219    case "$gl_cv_func_getdtablesize_works" in
30220      *yes | "no (limitation)") ;;
30221      *) REPLACE_GETDTABLESIZE=1 ;;
30222    esac
30223  else
30224    HAVE_GETDTABLESIZE=0
30225  fi
30226
30227  if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
30228
30229
30230
30231
30232
30233
30234
30235
30236  gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
30237
30238    :
30239  fi
30240
30241
30242
30243
30244
30245          GNULIB_GETDTABLESIZE=1
30246
30247
30248
30249
30250
30251printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
30252
30253
30254
30255
30256
30257
30258
30259
30260
30261  if test $ac_cv_header_sys_socket_h != yes; then
30262                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
30263if test "x$ac_cv_header_winsock2_h" = xyes
30264then :
30265  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
30266
30267fi
30268
30269  fi
30270  if test "$ac_cv_header_winsock2_h" = yes; then
30271    HAVE_WINSOCK2_H=1
30272    UNISTD_H_HAVE_WINSOCK2_H=1
30273    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
30274  else
30275    HAVE_WINSOCK2_H=0
30276  fi
30277
30278
30279
30280        GETHOSTNAME_LIB=
30281
30282  for ac_func in gethostname
30283do :
30284  ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname"
30285if test "x$ac_cv_func_gethostname" = xyes
30286then :
30287  printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h
30288
30289else $as_nop
30290
30291    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostname in winsock2.h and -lws2_32" >&5
30292printf %s "checking for gethostname in winsock2.h and -lws2_32... " >&6; }
30293if test ${gl_cv_w32_gethostname+y}
30294then :
30295  printf %s "(cached) " >&6
30296else $as_nop
30297  gl_cv_w32_gethostname=no
30298       gl_save_LIBS="$LIBS"
30299       LIBS="$LIBS -lws2_32"
30300       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30301/* end confdefs.h.  */
30302
30303#ifdef HAVE_WINSOCK2_H
30304#include <winsock2.h>
30305#endif
30306#include <stddef.h>
30307
30308int
30309main (void)
30310{
30311gethostname(NULL, 0);
30312  ;
30313  return 0;
30314}
30315_ACEOF
30316if ac_fn_c_try_link "$LINENO"
30317then :
30318  gl_cv_w32_gethostname=yes
30319fi
30320rm -f core conftest.err conftest.$ac_objext conftest.beam \
30321    conftest$ac_exeext conftest.$ac_ext
30322       LIBS="$gl_save_LIBS"
30323
30324fi
30325{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_gethostname" >&5
30326printf "%s\n" "$gl_cv_w32_gethostname" >&6; }
30327    if test "$gl_cv_w32_gethostname" = "yes"; then
30328      GETHOSTNAME_LIB="-lws2_32"
30329    fi
30330
30331fi
30332
30333done
30334
30335
30336  if test "$ac_cv_func_gethostname" = no; then
30337    HAVE_GETHOSTNAME=0
30338  fi
30339
30340
30341
30342
30343
30344  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HOST_NAME_MAX" >&5
30345printf %s "checking for HOST_NAME_MAX... " >&6; }
30346if test ${gl_cv_decl_HOST_NAME_MAX+y}
30347then :
30348  printf %s "(cached) " >&6
30349else $as_nop
30350
30351    gl_cv_decl_HOST_NAME_MAX=
30352    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30353/* end confdefs.h.  */
30354
30355#include <limits.h>
30356#ifdef HOST_NAME_MAX
30357lucky
30358#endif
30359
30360_ACEOF
30361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30362  $EGREP "lucky" >/dev/null 2>&1
30363then :
30364  gl_cv_decl_HOST_NAME_MAX=yes
30365fi
30366rm -rf conftest*
30367
30368    if test -z "$gl_cv_decl_HOST_NAME_MAX"; then
30369            if test "$gl_cv_w32_gethostname" = yes; then
30370                gl_cv_decl_HOST_NAME_MAX=256
30371      else
30372        if ac_fn_c_compute_int "$LINENO" "MAXHOSTNAMELEN" "gl_cv_decl_HOST_NAME_MAX"        "
30373#include <sys/types.h>
30374#if HAVE_SYS_PARAM_H
30375# include <sys/param.h>
30376#endif
30377#if HAVE_SYS_SOCKET_H
30378# include <sys/socket.h>
30379#endif
30380#if HAVE_NETDB_H
30381# include <netdb.h>
30382#endif
30383"
30384then :
30385
30386else $as_nop
30387                        gl_cv_decl_HOST_NAME_MAX=256
30388
30389fi
30390
30391      fi
30392    fi
30393
30394fi
30395{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_HOST_NAME_MAX" >&5
30396printf "%s\n" "$gl_cv_decl_HOST_NAME_MAX" >&6; }
30397  if test "$gl_cv_decl_HOST_NAME_MAX" != yes; then
30398
30399printf "%s\n" "#define HOST_NAME_MAX $gl_cv_decl_HOST_NAME_MAX" >>confdefs.h
30400
30401  fi
30402
30403
30404  if test $HAVE_GETHOSTNAME = 0; then
30405
30406
30407
30408
30409
30410
30411
30412
30413  gl_LIBOBJS="$gl_LIBOBJS gethostname.$ac_objext"
30414
30415
30416  if test "$gl_cv_w32_gethostname" != "yes"; then
30417    ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
30418if test "x$ac_cv_func_uname" = xyes
30419then :
30420  printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h
30421
30422fi
30423
30424  fi
30425
30426  fi
30427
30428
30429
30430
30431
30432          GNULIB_GETHOSTNAME=1
30433
30434
30435
30436
30437
30438printf "%s\n" "#define GNULIB_TEST_GETHOSTNAME 1" >>confdefs.h
30439
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449  gl_getline_needs_run_time_check=no
30450  ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
30451if test "x$ac_cv_func_getline" = xyes
30452then :
30453                   gl_getline_needs_run_time_check=yes
30454else $as_nop
30455  am_cv_func_working_getline=no
30456fi
30457
30458  if test $gl_getline_needs_run_time_check = yes; then
30459    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
30460printf %s "checking for working getline function... " >&6; }
30461if test ${am_cv_func_working_getline+y}
30462then :
30463  printf %s "(cached) " >&6
30464else $as_nop
30465  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
30466       if test "$cross_compiling" = yes
30467then :
30468                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30469/* end confdefs.h.  */
30470
30471#include <features.h>
30472#ifdef __GNU_LIBRARY__
30473 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
30474  Lucky GNU user
30475 #endif
30476#endif
30477
30478_ACEOF
30479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30480  $EGREP "Lucky GNU user" >/dev/null 2>&1
30481then :
30482  am_cv_func_working_getline="guessing yes"
30483else $as_nop
30484  case "$host_os" in
30485               *-musl*) am_cv_func_working_getline="guessing yes" ;;
30486               *)       am_cv_func_working_getline="$gl_cross_guess_normal" ;;
30487             esac
30488
30489fi
30490rm -rf conftest*
30491
30492
30493else $as_nop
30494  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30495/* end confdefs.h.  */
30496
30497#    include <stdio.h>
30498#    include <stdlib.h>
30499#    include <string.h>
30500    int main ()
30501    {
30502      FILE *in = fopen ("./conftest.data", "r");
30503      if (!in)
30504        return 1;
30505      {
30506        /* Test result for a NULL buffer and a zero size.
30507           Based on a test program from Karl Heuer.  */
30508        char *line = NULL;
30509        size_t siz = 0;
30510        int len = getline (&line, &siz, in);
30511        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
30512          { free (line); fclose (in); return 2; }
30513        free (line);
30514      }
30515      {
30516        /* Test result for a NULL buffer and a non-zero size.
30517           This crashes on FreeBSD 8.0.  */
30518        char *line = NULL;
30519        size_t siz = (size_t)(~0) / 4;
30520        if (getline (&line, &siz, in) == -1)
30521          { fclose (in); return 3; }
30522        free (line);
30523      }
30524      fclose (in);
30525      return 0;
30526    }
30527
30528_ACEOF
30529if ac_fn_c_try_run "$LINENO"
30530then :
30531  am_cv_func_working_getline=yes
30532else $as_nop
30533  am_cv_func_working_getline=no
30534fi
30535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30536  conftest.$ac_objext conftest.beam conftest.$ac_ext
30537fi
30538
30539
30540fi
30541{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
30542printf "%s\n" "$am_cv_func_working_getline" >&6; }
30543  fi
30544
30545  if test $ac_cv_have_decl_getline = no; then
30546    HAVE_DECL_GETLINE=0
30547  fi
30548
30549  case "$am_cv_func_working_getline" in
30550    *yes) ;;
30551    *)
30552                        REPLACE_GETLINE=1
30553      ;;
30554  esac
30555
30556  if test $REPLACE_GETLINE = 1; then
30557
30558
30559
30560
30561
30562
30563
30564
30565  gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
30566
30567
30568  :
30569
30570  fi
30571
30572
30573
30574
30575
30576          GNULIB_GETLINE=1
30577
30578
30579
30580
30581
30582printf "%s\n" "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
30583
30584
30585
30586
30587
30588
30589
30590
30591
30592  if test $ac_cv_have_decl_getlogin_r = no; then
30593    HAVE_DECL_GETLOGIN_R=0
30594  fi
30595
30596
30597  if test $ac_cv_func_getlogin_r = no; then
30598    HAVE_GETLOGIN_R=0
30599  else
30600    HAVE_GETLOGIN_R=1
30601
30602    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
30603printf %s "checking whether getlogin_r works with small buffers... " >&6; }
30604if test ${gl_cv_func_getlogin_r_works+y}
30605then :
30606  printf %s "(cached) " >&6
30607else $as_nop
30608
30609                case "$host_os" in
30610                          # Guess no on Mac OS X, OSF/1.
30611          darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
30612                          # Guess yes otherwise.
30613          *)              gl_cv_func_getlogin_r_works="guessing yes" ;;
30614        esac
30615        if test "$cross_compiling" = yes
30616then :
30617  :
30618else $as_nop
30619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30620/* end confdefs.h.  */
30621
30622#include <stddef.h>
30623#include <string.h>
30624#include <unistd.h>
30625#if !HAVE_DECL_GETLOGIN_R
30626extern
30627# ifdef __cplusplus
30628"C"
30629# endif
30630int getlogin_r (char *, size_t);
30631#endif
30632int
30633main (void)
30634{
30635  int result = 0;
30636  char buf[100];
30637
30638  if (getlogin_r (buf, 0) == 0)
30639    result |= 1;
30640  if (getlogin_r (buf, 1) == 0)
30641    result |= 2;
30642  if (getlogin_r (buf, 100) == 0)
30643    {
30644      size_t n = strlen (buf);
30645      if (getlogin_r (buf, n) == 0)
30646        result |= 4;
30647    }
30648  return result;
30649}
30650_ACEOF
30651if ac_fn_c_try_run "$LINENO"
30652then :
30653  gl_cv_func_getlogin_r_works=yes
30654else $as_nop
30655  gl_cv_func_getlogin_r_works=no
30656fi
30657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30658  conftest.$ac_objext conftest.beam conftest.$ac_ext
30659fi
30660
30661
30662fi
30663{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
30664printf "%s\n" "$gl_cv_func_getlogin_r_works" >&6; }
30665    case "$gl_cv_func_getlogin_r_works" in
30666      *yes) ;;
30667      *) REPLACE_GETLOGIN_R=1 ;;
30668    esac
30669  fi
30670
30671  if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
30672
30673
30674
30675
30676
30677
30678
30679
30680  gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
30681
30682
30683
30684
30685  fi
30686
30687
30688
30689
30690
30691          GNULIB_GETLOGIN_R=1
30692
30693
30694
30695
30696
30697printf "%s\n" "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
30698
30699
30700
30701
30702
30703  if test $HAVE_GETPASS = 0 || test $REPLACE_GETPASS = 1; then
30704
30705
30706
30707
30708
30709
30710
30711
30712  gl_LIBOBJS="$gl_LIBOBJS getpass.$ac_objext"
30713
30714
30715
30716
30717  ac_fn_check_decl "$LINENO" "__fsetlocking" "ac_cv_have_decl___fsetlocking" "#include <stdio.h>
30718      #if HAVE_STDIO_EXT_H
30719       #include <stdio_ext.h>
30720      #endif
30721" "$ac_c_undeclared_builtin_options" "CFLAGS"
30722if test "x$ac_cv_have_decl___fsetlocking" = xyes
30723then :
30724  ac_have_decl=1
30725else $as_nop
30726  ac_have_decl=0
30727fi
30728printf "%s\n" "#define HAVE_DECL___FSETLOCKING $ac_have_decl" >>confdefs.h
30729
30730
30731
30732
30733
30734
30735
30736      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tcgetattr" >&5
30737printf %s "checking for tcgetattr... " >&6; }
30738if test ${gl_cv_func_tcgetattr+y}
30739then :
30740  printf %s "(cached) " >&6
30741else $as_nop
30742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30743/* end confdefs.h.  */
30744#include <termios.h>
30745            struct termios x;
30746
30747int
30748main (void)
30749{
30750return tcgetattr(0,&x);
30751  ;
30752  return 0;
30753}
30754
30755_ACEOF
30756if ac_fn_c_try_link "$LINENO"
30757then :
30758  gl_cv_func_tcgetattr=yes
30759else $as_nop
30760  gl_cv_func_tcgetattr=no
30761fi
30762rm -f core conftest.err conftest.$ac_objext conftest.beam \
30763    conftest$ac_exeext conftest.$ac_ext
30764
30765fi
30766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_tcgetattr" >&5
30767printf "%s\n" "$gl_cv_func_tcgetattr" >&6; }
30768  if test $gl_cv_func_tcgetattr = yes; then
30769    HAVE_TCGETATTR=1
30770  else
30771    HAVE_TCGETATTR=0
30772  fi
30773
30774printf "%s\n" "#define HAVE_TCGETATTR $HAVE_TCGETATTR" >>confdefs.h
30775
30776
30777      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tcsetattr" >&5
30778printf %s "checking for tcsetattr... " >&6; }
30779if test ${gl_cv_func_tcsetattr+y}
30780then :
30781  printf %s "(cached) " >&6
30782else $as_nop
30783  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30784/* end confdefs.h.  */
30785#include <termios.h>
30786            struct termios x;
30787
30788int
30789main (void)
30790{
30791return tcsetattr(0,0,&x);
30792  ;
30793  return 0;
30794}
30795
30796_ACEOF
30797if ac_fn_c_try_link "$LINENO"
30798then :
30799  gl_cv_func_tcsetattr=yes
30800else $as_nop
30801  gl_cv_func_tcsetattr=no
30802fi
30803rm -f core conftest.err conftest.$ac_objext conftest.beam \
30804    conftest$ac_exeext conftest.$ac_ext
30805
30806fi
30807{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_tcsetattr" >&5
30808printf "%s\n" "$gl_cv_func_tcsetattr" >&6; }
30809  if test $gl_cv_func_tcsetattr = yes; then
30810    HAVE_TCSETATTR=1
30811  else
30812    HAVE_TCSETATTR=0
30813  fi
30814
30815printf "%s\n" "#define HAVE_TCSETATTR $HAVE_TCSETATTR" >>confdefs.h
30816
30817
30818  fi
30819
30820
30821
30822
30823
30824          GNULIB_GETPASS=1
30825
30826
30827
30828
30829
30830printf "%s\n" "#define GNULIB_TEST_GETPASS 1" >>confdefs.h
30831
30832
30833
30834
30835  if test "$ac_cv_header_winsock2_h" = yes; then
30836
30837
30838
30839
30840
30841
30842
30843
30844  gl_LIBOBJS="$gl_LIBOBJS getpeername.$ac_objext"
30845
30846  fi
30847
30848
30849
30850
30851
30852          GNULIB_GETPEERNAME=1
30853
30854
30855
30856
30857
30858printf "%s\n" "#define GNULIB_TEST_GETPEERNAME 1" >>confdefs.h
30859
30860
30861
30862
30863
30864
30865  ac_found=0
30866  ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
30867" "$ac_c_undeclared_builtin_options" "CFLAGS"
30868if test "x$ac_cv_have_decl_program_invocation_name" = xyes
30869then :
30870  ac_have_decl=1
30871else $as_nop
30872  ac_have_decl=0
30873fi
30874printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
30875if test $ac_have_decl = 1
30876then :
30877  ac_found=1
30878fi
30879
30880  ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
30881" "$ac_c_undeclared_builtin_options" "CFLAGS"
30882if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
30883then :
30884  ac_have_decl=1
30885else $as_nop
30886  ac_have_decl=0
30887fi
30888printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
30889if test $ac_have_decl = 1
30890then :
30891  ac_found=1
30892fi
30893
30894  ac_fn_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
30895" "$ac_c_undeclared_builtin_options" "CFLAGS"
30896if test "x$ac_cv_have_decl___argv" = xyes
30897then :
30898  ac_have_decl=1
30899else $as_nop
30900  ac_have_decl=0
30901fi
30902printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
30903if test $ac_have_decl = 1
30904then :
30905  ac_found=1
30906fi
30907
30908
30909  # Incur the cost of this test only if none of the above worked.
30910  if test $ac_found = 0; then
30911    # On OpenBSD 5.1, using the global __progname variable appears to be
30912    # the only way to implement getprogname.
30913    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
30914printf %s "checking whether __progname is defined in default libraries... " >&6; }
30915if test ${gl_cv_var___progname+y}
30916then :
30917  printf %s "(cached) " >&6
30918else $as_nop
30919
30920        gl_cv_var___progname=
30921        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30922/* end confdefs.h.  */
30923extern char *__progname;
30924int
30925main (void)
30926{
30927return *__progname;
30928
30929  ;
30930  return 0;
30931}
30932_ACEOF
30933if ac_fn_c_try_link "$LINENO"
30934then :
30935  gl_cv_var___progname=yes
30936
30937fi
30938rm -f core conftest.err conftest.$ac_objext conftest.beam \
30939    conftest$ac_exeext conftest.$ac_ext
30940
30941
30942fi
30943{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
30944printf "%s\n" "$gl_cv_var___progname" >&6; }
30945    if test "$gl_cv_var___progname" = yes; then
30946
30947printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
30948
30949    fi
30950  fi
30951
30952
30953
30954
30955
30956  if test "$ac_cv_func_getrandom" != yes; then
30957    HAVE_GETRANDOM=0
30958  else
30959        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
30960printf %s "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
30961if test ${gl_cv_func_getrandom_ok+y}
30962then :
30963  printf %s "(cached) " >&6
30964else $as_nop
30965  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30966/* end confdefs.h.  */
30967/* Additional includes are needed before <sys/random.h> on uClibc
30968                 and Mac OS X.  */
30969              #include <sys/types.h>
30970              #include <stdlib.h>
30971              #include <sys/random.h>
30972              ssize_t getrandom (void *, size_t, unsigned int);
30973
30974int
30975main (void)
30976{
30977
30978  ;
30979  return 0;
30980}
30981
30982_ACEOF
30983if ac_fn_c_try_compile "$LINENO"
30984then :
30985  gl_cv_func_getrandom_ok=yes
30986else $as_nop
30987  gl_cv_func_getrandom_ok=no
30988fi
30989rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30990
30991fi
30992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
30993printf "%s\n" "$gl_cv_func_getrandom_ok" >&6; }
30994    if test $gl_cv_func_getrandom_ok = no; then
30995      REPLACE_GETRANDOM=1
30996    fi
30997  fi
30998
30999  case "$host_os" in
31000    mingw*)
31001      ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
31002
31003"
31004if test "x$ac_cv_header_bcrypt_h" = xyes
31005then :
31006  printf "%s\n" "#define HAVE_BCRYPT_H 1" >>confdefs.h
31007
31008fi
31009
31010      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
31011printf %s "checking whether the bcrypt library is guaranteed to be present... " >&6; }
31012if test ${gl_cv_lib_assume_bcrypt+y}
31013then :
31014  printf %s "(cached) " >&6
31015else $as_nop
31016  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31017/* end confdefs.h.  */
31018#include <windows.h>
31019int
31020main (void)
31021{
31022#if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
31023                  cannot assume it
31024                #endif
31025
31026  ;
31027  return 0;
31028}
31029
31030_ACEOF
31031if ac_fn_c_try_compile "$LINENO"
31032then :
31033  gl_cv_lib_assume_bcrypt=yes
31034else $as_nop
31035  gl_cv_lib_assume_bcrypt=no
31036fi
31037rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31038
31039fi
31040{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
31041printf "%s\n" "$gl_cv_lib_assume_bcrypt" >&6; }
31042      if test $gl_cv_lib_assume_bcrypt = yes; then
31043
31044printf "%s\n" "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
31045
31046        LIB_GETRANDOM='-lbcrypt'
31047      else
31048        LIB_GETRANDOM='-ladvapi32'
31049      fi
31050      ;;
31051    *)
31052      LIB_GETRANDOM= ;;
31053  esac
31054
31055
31056  if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
31057
31058
31059
31060
31061
31062
31063
31064
31065  gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext"
31066
31067  fi
31068
31069
31070
31071
31072
31073          GNULIB_GETRANDOM=1
31074
31075
31076
31077
31078
31079printf "%s\n" "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
31080
31081
31082
31083
31084  if test "$ac_cv_header_winsock2_h" = yes; then
31085
31086
31087
31088
31089
31090
31091
31092
31093  gl_LIBOBJS="$gl_LIBOBJS getsockname.$ac_objext"
31094
31095  fi
31096
31097
31098
31099
31100
31101          GNULIB_GETSOCKNAME=1
31102
31103
31104
31105
31106
31107printf "%s\n" "#define GNULIB_TEST_GETSOCKNAME 1" >>confdefs.h
31108
31109
31110
31111
31112
31113
31114
31115
31116
31117
31118
31119
31120
31121
31122
31123
31124
31125  gl_gettimeofday_timezone=void
31126  if test $ac_cv_func_gettimeofday != yes; then
31127    HAVE_GETTIMEOFDAY=0
31128  else
31129    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
31130printf %s "checking for gettimeofday with POSIX signature... " >&6; }
31131if test ${gl_cv_func_gettimeofday_posix_signature+y}
31132then :
31133  printf %s "(cached) " >&6
31134else $as_nop
31135  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31136/* end confdefs.h.  */
31137#include <sys/time.h>
31138              struct timeval c;
31139              int gettimeofday (struct timeval *restrict, void *restrict);
31140
31141int
31142main (void)
31143{
31144/* glibc uses struct timezone * rather than the POSIX void *
31145                 if _GNU_SOURCE is defined.  However, since the only portable
31146                 use of gettimeofday uses NULL as the second parameter, and
31147                 since the glibc definition is actually more typesafe, it is
31148                 not worth wrapping this to get a compliant signature.  */
31149              int (*f) (struct timeval *restrict, void *restrict)
31150                = gettimeofday;
31151              int x = f (&c, 0);
31152              return !(x | c.tv_sec | c.tv_usec);
31153
31154  ;
31155  return 0;
31156}
31157_ACEOF
31158if ac_fn_c_try_compile "$LINENO"
31159then :
31160  gl_cv_func_gettimeofday_posix_signature=yes
31161else $as_nop
31162  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31163/* end confdefs.h.  */
31164#include <sys/time.h>
31165int gettimeofday (struct timeval *restrict, struct timezone *restrict);
31166
31167int
31168main (void)
31169{
31170
31171  ;
31172  return 0;
31173}
31174_ACEOF
31175if ac_fn_c_try_compile "$LINENO"
31176then :
31177  gl_cv_func_gettimeofday_posix_signature=almost
31178else $as_nop
31179  gl_cv_func_gettimeofday_posix_signature=no
31180fi
31181rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31182fi
31183rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31184fi
31185{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
31186printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
31187    if test $gl_cv_func_gettimeofday_posix_signature = almost; then
31188      gl_gettimeofday_timezone='struct timezone'
31189    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
31190      REPLACE_GETTIMEOFDAY=1
31191    fi
31192        if test $REPLACE_STRUCT_TIMEVAL = 1; then
31193      REPLACE_GETTIMEOFDAY=1
31194    fi
31195            case "$host_os" in
31196      mingw*) REPLACE_GETTIMEOFDAY=1 ;;
31197    esac
31198  fi
31199
31200printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
31201
31202
31203  if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
31204
31205
31206
31207
31208
31209
31210
31211
31212  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
31213
31214    :
31215  fi
31216
31217
31218
31219
31220
31221          GNULIB_GETTIMEOFDAY=1
31222
31223
31224
31225
31226
31227printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
31228
31229
31230
31231
31232
31233
31234
31235  if test $ac_cv_func_glob = no; then
31236    HAVE_GLOB=0
31237  else
31238
31239    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5
31240printf %s "checking for GNU glob interface version 1 or 2... " >&6; }
31241if test ${gl_cv_gnu_glob_interface_version_1_2+y}
31242then :
31243  printf %s "(cached) " >&6
31244else $as_nop
31245       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31246/* end confdefs.h.  */
31247#include <gnu-versions.h>
31248char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1];
31249_ACEOF
31250if ac_fn_c_try_compile "$LINENO"
31251then :
31252  gl_cv_gnu_glob_interface_version_1_2=yes
31253else $as_nop
31254  gl_cv_gnu_glob_interface_version_1_2=no
31255fi
31256rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31257fi
31258{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5
31259printf "%s\n" "$gl_cv_gnu_glob_interface_version_1_2" >&6; }
31260    if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then
31261      REPLACE_GLOB=1
31262    fi
31263
31264    if test $REPLACE_GLOB = 0; then
31265      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
31266printf %s "checking whether glob lists broken symlinks... " >&6; }
31267if test ${gl_cv_glob_lists_symlinks+y}
31268then :
31269  printf %s "(cached) " >&6
31270else $as_nop
31271  if test $cross_compiling != yes; then
31272           if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
31273             gl_cv_glob_lists_symlinks=maybe
31274           else
31275             # If we can't make a symlink, then we cannot test this issue.  Be
31276             # pessimistic about this.
31277             gl_cv_glob_lists_symlinks=no
31278           fi
31279           if test $gl_cv_glob_lists_symlinks = maybe; then
31280             if test "$cross_compiling" = yes
31281then :
31282                  :
31283
31284else $as_nop
31285  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31286/* end confdefs.h.  */
31287#include <stddef.h>
31288                    #include <glob.h>
31289int
31290main (void)
31291{
31292glob_t found;
31293                    if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH)
31294                      return 1;
31295                    globfree (&found);
31296
31297  ;
31298  return 0;
31299}
31300_ACEOF
31301if ac_fn_c_try_run "$LINENO"
31302then :
31303  gl_cv_glob_lists_symlinks=yes
31304else $as_nop
31305  gl_cv_glob_lists_symlinks=no
31306fi
31307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31308  conftest.$ac_objext conftest.beam conftest.$ac_ext
31309fi
31310
31311           fi
31312           rm -f conf$$-globtest
31313         else
31314           gl_cv_glob_lists_symlinks="$gl_cross_guess_normal"
31315         fi
31316
31317fi
31318{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
31319printf "%s\n" "$gl_cv_glob_lists_symlinks" >&6; }
31320      case "$gl_cv_glob_lists_symlinks" in
31321        *yes) ;;
31322        *) REPLACE_GLOB=1 ;;
31323      esac
31324    fi
31325
31326  fi
31327
31328  if test $ac_cv_func_glob_pattern_p = no; then
31329    HAVE_GLOB_PATTERN_P=0
31330  else
31331    if test $REPLACE_GLOB = 1; then
31332      REPLACE_GLOB_PATTERN_P=1
31333    fi
31334  fi
31335
31336  if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
31337
31338
31339  GLOB_H='glob.h'
31340   if test -n "$GLOB_H"; then
31341  GL_GENERATE_GLOB_H_TRUE=
31342  GL_GENERATE_GLOB_H_FALSE='#'
31343else
31344  GL_GENERATE_GLOB_H_TRUE='#'
31345  GL_GENERATE_GLOB_H_FALSE=
31346fi
31347
31348
31349  fi
31350
31351  if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
31352
31353
31354
31355
31356
31357
31358
31359
31360  gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
31361
31362
31363
31364
31365
31366
31367
31368
31369
31370  gl_LIBOBJS="$gl_LIBOBJS globfree.$ac_objext"
31371
31372
31373
31374
31375
31376
31377  fi
31378  if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then
31379
31380
31381
31382
31383
31384
31385
31386
31387  gl_LIBOBJS="$gl_LIBOBJS glob_pattern_p.$ac_objext"
31388
31389  fi
31390
31391
31392
31393
31394
31395          GNULIB_GLOB=1
31396
31397
31398
31399
31400
31401printf "%s\n" "#define GNULIB_TEST_GLOB 1" >>confdefs.h
31402
31403
31404
31405
31406  # Autoconf 2.61a.99 and earlier don't support linking a file only
31407  # in VPATH builds.  But since GNUmakefile is for maintainer use
31408  # only, it does not matter if we skip the link with older autoconf.
31409  # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
31410  # builds, so use a shell variable to bypass this.
31411  GNUmakefile=GNUmakefile
31412  ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
31413
31414
31415  LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
31416
31417
31418
31419                  HOSTENT_LIB=
31420  gl_saved_libs="$LIBS"
31421  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
31422printf %s "checking for library containing gethostbyname... " >&6; }
31423if test ${ac_cv_search_gethostbyname+y}
31424then :
31425  printf %s "(cached) " >&6
31426else $as_nop
31427  ac_func_search_save_LIBS=$LIBS
31428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31429/* end confdefs.h.  */
31430
31431/* Override any GCC internal prototype to avoid an error.
31432   Use char because int might match the return type of a GCC
31433   builtin and then its argument prototype would still apply.  */
31434char gethostbyname ();
31435int
31436main (void)
31437{
31438return gethostbyname ();
31439  ;
31440  return 0;
31441}
31442_ACEOF
31443for ac_lib in '' nsl network net
31444do
31445  if test -z "$ac_lib"; then
31446    ac_res="none required"
31447  else
31448    ac_res=-l$ac_lib
31449    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
31450  fi
31451  if ac_fn_c_try_link "$LINENO"
31452then :
31453  ac_cv_search_gethostbyname=$ac_res
31454fi
31455rm -f core conftest.err conftest.$ac_objext conftest.beam \
31456    conftest$ac_exeext
31457  if test ${ac_cv_search_gethostbyname+y}
31458then :
31459  break
31460fi
31461done
31462if test ${ac_cv_search_gethostbyname+y}
31463then :
31464
31465else $as_nop
31466  ac_cv_search_gethostbyname=no
31467fi
31468rm conftest.$ac_ext
31469LIBS=$ac_func_search_save_LIBS
31470fi
31471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
31472printf "%s\n" "$ac_cv_search_gethostbyname" >&6; }
31473ac_res=$ac_cv_search_gethostbyname
31474if test "$ac_res" != no
31475then :
31476  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
31477  if test "$ac_cv_search_gethostbyname" != "none required"; then
31478       HOSTENT_LIB="$ac_cv_search_gethostbyname"
31479     fi
31480fi
31481
31482  LIBS="$gl_saved_libs"
31483  if test -z "$HOSTENT_LIB"; then
31484
31485  for ac_func in gethostbyname
31486do :
31487  ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
31488if test "x$ac_cv_func_gethostbyname" = xyes
31489then :
31490  printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h
31491
31492else $as_nop
31493
31494      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in winsock2.h and -lws2_32" >&5
31495printf %s "checking for gethostbyname in winsock2.h and -lws2_32... " >&6; }
31496if test ${gl_cv_w32_gethostbyname+y}
31497then :
31498  printf %s "(cached) " >&6
31499else $as_nop
31500  gl_cv_w32_gethostbyname=no
31501         gl_save_LIBS="$LIBS"
31502         LIBS="$LIBS -lws2_32"
31503         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31504/* end confdefs.h.  */
31505
31506#ifdef HAVE_WINSOCK2_H
31507#include <winsock2.h>
31508#endif
31509#include <stddef.h>
31510
31511int
31512main (void)
31513{
31514gethostbyname(NULL);
31515  ;
31516  return 0;
31517}
31518_ACEOF
31519if ac_fn_c_try_link "$LINENO"
31520then :
31521  gl_cv_w32_gethostbyname=yes
31522fi
31523rm -f core conftest.err conftest.$ac_objext conftest.beam \
31524    conftest$ac_exeext conftest.$ac_ext
31525         LIBS="$gl_save_LIBS"
31526
31527fi
31528{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_gethostbyname" >&5
31529printf "%s\n" "$gl_cv_w32_gethostbyname" >&6; }
31530      if test "$gl_cv_w32_gethostbyname" = "yes"; then
31531        HOSTENT_LIB="-lws2_32"
31532      fi
31533
31534fi
31535
31536done
31537  fi
31538
31539
31540
31541
31542
31543
31544
31545
31546
31547
31548
31549                HAVE_INET_NTOP=1
31550  INET_NTOP_LIB=
31551
31552
31553
31554
31555  if test $ac_cv_header_sys_socket_h != yes; then
31556                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
31557if test "x$ac_cv_header_winsock2_h" = xyes
31558then :
31559  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
31560
31561fi
31562
31563  fi
31564  if test "$ac_cv_header_winsock2_h" = yes; then
31565    HAVE_WINSOCK2_H=1
31566    UNISTD_H_HAVE_WINSOCK2_H=1
31567    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
31568  else
31569    HAVE_WINSOCK2_H=0
31570  fi
31571
31572
31573  if test $HAVE_WINSOCK2_H = 1; then
31574                    REPLACE_INET_NTOP=1
31575    ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
31576" "$ac_c_undeclared_builtin_options" "CFLAGS"
31577if test "x$ac_cv_have_decl_inet_ntop" = xyes
31578then :
31579  ac_have_decl=1
31580else $as_nop
31581  ac_have_decl=0
31582fi
31583printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
31584
31585    if test $ac_cv_have_decl_inet_ntop = yes; then
31586      INET_NTOP_LIB="-lws2_32"
31587    else
31588      HAVE_DECL_INET_NTOP=0
31589    fi
31590  else
31591    gl_save_LIBS=$LIBS
31592    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
31593printf %s "checking for library containing inet_ntop... " >&6; }
31594if test ${ac_cv_search_inet_ntop+y}
31595then :
31596  printf %s "(cached) " >&6
31597else $as_nop
31598  ac_func_search_save_LIBS=$LIBS
31599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31600/* end confdefs.h.  */
31601
31602/* Override any GCC internal prototype to avoid an error.
31603   Use char because int might match the return type of a GCC
31604   builtin and then its argument prototype would still apply.  */
31605char inet_ntop ();
31606int
31607main (void)
31608{
31609return inet_ntop ();
31610  ;
31611  return 0;
31612}
31613_ACEOF
31614for ac_lib in '' nsl resolv network
31615do
31616  if test -z "$ac_lib"; then
31617    ac_res="none required"
31618  else
31619    ac_res=-l$ac_lib
31620    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
31621  fi
31622  if ac_fn_c_try_link "$LINENO"
31623then :
31624  ac_cv_search_inet_ntop=$ac_res
31625fi
31626rm -f core conftest.err conftest.$ac_objext conftest.beam \
31627    conftest$ac_exeext
31628  if test ${ac_cv_search_inet_ntop+y}
31629then :
31630  break
31631fi
31632done
31633if test ${ac_cv_search_inet_ntop+y}
31634then :
31635
31636else $as_nop
31637  ac_cv_search_inet_ntop=no
31638fi
31639rm conftest.$ac_ext
31640LIBS=$ac_func_search_save_LIBS
31641fi
31642{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
31643printf "%s\n" "$ac_cv_search_inet_ntop" >&6; }
31644ac_res=$ac_cv_search_inet_ntop
31645if test "$ac_res" != no
31646then :
31647  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
31648
31649else $as_nop
31650  ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
31651if test "x$ac_cv_func_inet_ntop" = xyes
31652then :
31653  printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
31654
31655fi
31656
31657       if test $ac_cv_func_inet_ntop = no; then
31658         HAVE_INET_NTOP=0
31659       fi
31660
31661fi
31662
31663    LIBS=$gl_save_LIBS
31664
31665    if test "$ac_cv_search_inet_ntop" != "no" \
31666       && test "$ac_cv_search_inet_ntop" != "none required"; then
31667      INET_NTOP_LIB="$ac_cv_search_inet_ntop"
31668    fi
31669
31670
31671    ac_fn_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
31672        #if HAVE_NETDB_H
31673        # include <netdb.h>
31674        #endif
31675
31676" "$ac_c_undeclared_builtin_options" "CFLAGS"
31677if test "x$ac_cv_have_decl_inet_ntop" = xyes
31678then :
31679  ac_have_decl=1
31680else $as_nop
31681  ac_have_decl=0
31682fi
31683printf "%s\n" "#define HAVE_DECL_INET_NTOP $ac_have_decl" >>confdefs.h
31684
31685    if test $ac_cv_have_decl_inet_ntop = no; then
31686      HAVE_DECL_INET_NTOP=0
31687    fi
31688  fi
31689
31690
31691  if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
31692
31693
31694
31695
31696
31697
31698
31699
31700  gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
31701
31702
31703
31704
31705  fi
31706
31707
31708
31709
31710
31711          GNULIB_INET_NTOP=1
31712
31713
31714
31715
31716
31717
31718
31719
31720
31721
31722
31723                HAVE_INET_PTON=1
31724  INET_PTON_LIB=
31725
31726
31727
31728
31729  if test $ac_cv_header_sys_socket_h != yes; then
31730                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
31731if test "x$ac_cv_header_winsock2_h" = xyes
31732then :
31733  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
31734
31735fi
31736
31737  fi
31738  if test "$ac_cv_header_winsock2_h" = yes; then
31739    HAVE_WINSOCK2_H=1
31740    UNISTD_H_HAVE_WINSOCK2_H=1
31741    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
31742  else
31743    HAVE_WINSOCK2_H=0
31744  fi
31745
31746
31747  if test $HAVE_WINSOCK2_H = 1; then
31748                    REPLACE_INET_PTON=1
31749    ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
31750" "$ac_c_undeclared_builtin_options" "CFLAGS"
31751if test "x$ac_cv_have_decl_inet_pton" = xyes
31752then :
31753  ac_have_decl=1
31754else $as_nop
31755  ac_have_decl=0
31756fi
31757printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
31758
31759    if test $ac_cv_have_decl_inet_pton = yes; then
31760      INET_PTON_LIB="-lws2_32"
31761    else
31762      HAVE_DECL_INET_PTON=0
31763    fi
31764  else
31765    gl_save_LIBS=$LIBS
31766    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
31767printf %s "checking for library containing inet_pton... " >&6; }
31768if test ${ac_cv_search_inet_pton+y}
31769then :
31770  printf %s "(cached) " >&6
31771else $as_nop
31772  ac_func_search_save_LIBS=$LIBS
31773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31774/* end confdefs.h.  */
31775
31776/* Override any GCC internal prototype to avoid an error.
31777   Use char because int might match the return type of a GCC
31778   builtin and then its argument prototype would still apply.  */
31779char inet_pton ();
31780int
31781main (void)
31782{
31783return inet_pton ();
31784  ;
31785  return 0;
31786}
31787_ACEOF
31788for ac_lib in '' nsl resolv network
31789do
31790  if test -z "$ac_lib"; then
31791    ac_res="none required"
31792  else
31793    ac_res=-l$ac_lib
31794    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
31795  fi
31796  if ac_fn_c_try_link "$LINENO"
31797then :
31798  ac_cv_search_inet_pton=$ac_res
31799fi
31800rm -f core conftest.err conftest.$ac_objext conftest.beam \
31801    conftest$ac_exeext
31802  if test ${ac_cv_search_inet_pton+y}
31803then :
31804  break
31805fi
31806done
31807if test ${ac_cv_search_inet_pton+y}
31808then :
31809
31810else $as_nop
31811  ac_cv_search_inet_pton=no
31812fi
31813rm conftest.$ac_ext
31814LIBS=$ac_func_search_save_LIBS
31815fi
31816{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
31817printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
31818ac_res=$ac_cv_search_inet_pton
31819if test "$ac_res" != no
31820then :
31821  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
31822
31823else $as_nop
31824  ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
31825if test "x$ac_cv_func_inet_pton" = xyes
31826then :
31827  printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
31828
31829fi
31830
31831       if test $ac_cv_func_inet_pton = no; then
31832         HAVE_INET_PTON=0
31833       fi
31834
31835fi
31836
31837    LIBS=$gl_save_LIBS
31838
31839    if test "$ac_cv_search_inet_pton" != "no" \
31840       && test "$ac_cv_search_inet_pton" != "none required"; then
31841      INET_PTON_LIB="$ac_cv_search_inet_pton"
31842    fi
31843
31844
31845    ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
31846        #if HAVE_NETDB_H
31847        # include <netdb.h>
31848        #endif
31849
31850" "$ac_c_undeclared_builtin_options" "CFLAGS"
31851if test "x$ac_cv_have_decl_inet_pton" = xyes
31852then :
31853  ac_have_decl=1
31854else $as_nop
31855  ac_have_decl=0
31856fi
31857printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
31858
31859    if test $ac_cv_have_decl_inet_pton = no; then
31860      HAVE_DECL_INET_PTON=0
31861    fi
31862  fi
31863
31864
31865  if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1; then
31866
31867
31868
31869
31870
31871
31872
31873
31874  gl_LIBOBJS="$gl_LIBOBJS inet_pton.$ac_objext"
31875
31876
31877
31878
31879  fi
31880
31881
31882
31883
31884
31885          GNULIB_INET_PTON=1
31886
31887
31888
31889
31890
31891
31892  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
31893printf %s "checking whether the compiler generally respects inline... " >&6; }
31894if test ${gl_cv_c_inline_effective+y}
31895then :
31896  printf %s "(cached) " >&6
31897else $as_nop
31898  if test $ac_cv_c_inline = no; then
31899       gl_cv_c_inline_effective=no
31900     else
31901                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31902/* end confdefs.h.  */
31903
31904int
31905main (void)
31906{
31907#ifdef __NO_INLINE__
31908               #error "inline is not effective"
31909             #endif
31910  ;
31911  return 0;
31912}
31913_ACEOF
31914if ac_fn_c_try_compile "$LINENO"
31915then :
31916  gl_cv_c_inline_effective=yes
31917else $as_nop
31918  gl_cv_c_inline_effective=no
31919fi
31920rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31921     fi
31922
31923fi
31924{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
31925printf "%s\n" "$gl_cv_c_inline_effective" >&6; }
31926  if test $gl_cv_c_inline_effective = yes; then
31927
31928printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
31929
31930  fi
31931
31932
31933
31934
31935  PRIPTR_PREFIX=
31936  if test -n "$STDINT_H"; then
31937            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31938/* end confdefs.h.  */
31939
31940         #ifdef _WIN64
31941         LLP64
31942         #endif
31943
31944int
31945main (void)
31946{
31947
31948  ;
31949  return 0;
31950}
31951
31952_ACEOF
31953if ac_fn_c_try_compile "$LINENO"
31954then :
31955  PRIPTR_PREFIX='"l"'
31956else $as_nop
31957  PRIPTR_PREFIX='"ll"'
31958fi
31959rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31960  else
31961        for glpfx in '' l ll I64; do
31962      case $glpfx in
31963        '')  gltype1='int';;
31964        l)   gltype1='long int';;
31965        ll)  gltype1='long long int';;
31966        I64) gltype1='__int64';;
31967      esac
31968      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31969/* end confdefs.h.  */
31970#include <stdint.h>
31971           extern intptr_t foo;
31972           extern $gltype1 foo;
31973int
31974main (void)
31975{
31976
31977  ;
31978  return 0;
31979}
31980_ACEOF
31981if ac_fn_c_try_compile "$LINENO"
31982then :
31983  PRIPTR_PREFIX='"'$glpfx'"'
31984fi
31985rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31986      test -n "$PRIPTR_PREFIX" && break
31987    done
31988  fi
31989
31990
31991
31992  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
31993printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
31994if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y}
31995then :
31996  printf %s "(cached) " >&6
31997else $as_nop
31998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31999/* end confdefs.h.  */
32000/* Work also in C++ mode.  */
32001            #define __STDC_LIMIT_MACROS 1
32002
32003            /* Work if build is not clean.  */
32004            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
32005
32006            #include <limits.h>
32007            #if HAVE_STDINT_H
32008             #include <stdint.h>
32009            #endif
32010
32011            #if defined INT32_MAX && defined INTMAX_MAX
32012             #define CONDITION (INT32_MAX < INTMAX_MAX)
32013            #else
32014             #define CONDITION (sizeof (int) < sizeof (long long int))
32015            #endif
32016            int test[CONDITION ? 1 : -1];
32017int
32018main (void)
32019{
32020
32021  ;
32022  return 0;
32023}
32024_ACEOF
32025if ac_fn_c_try_compile "$LINENO"
32026then :
32027  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
32028else $as_nop
32029  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
32030fi
32031rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32032fi
32033{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
32034printf "%s\n" "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
32035  if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
32036    INT32_MAX_LT_INTMAX_MAX=1;
32037  else
32038    INT32_MAX_LT_INTMAX_MAX=0;
32039  fi
32040
32041
32042  if test $APPLE_UNIVERSAL_BUILD = 0; then
32043
32044  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
32045printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; }
32046if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y}
32047then :
32048  printf %s "(cached) " >&6
32049else $as_nop
32050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32051/* end confdefs.h.  */
32052/* Work also in C++ mode.  */
32053            #define __STDC_LIMIT_MACROS 1
32054
32055            /* Work if build is not clean.  */
32056            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
32057
32058            #include <limits.h>
32059            #if HAVE_STDINT_H
32060             #include <stdint.h>
32061            #endif
32062
32063            #if defined INT64_MAX
32064             #define CONDITION (INT64_MAX == LONG_MAX)
32065            #else
32066             #define CONDITION (sizeof (long long int) == sizeof (long int))
32067            #endif
32068            int test[CONDITION ? 1 : -1];
32069int
32070main (void)
32071{
32072
32073  ;
32074  return 0;
32075}
32076_ACEOF
32077if ac_fn_c_try_compile "$LINENO"
32078then :
32079  gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
32080else $as_nop
32081  gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
32082fi
32083rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32084fi
32085{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
32086printf "%s\n" "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
32087  if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
32088    INT64_MAX_EQ_LONG_MAX=1;
32089  else
32090    INT64_MAX_EQ_LONG_MAX=0;
32091  fi
32092
32093
32094  else
32095    INT64_MAX_EQ_LONG_MAX=-1
32096  fi
32097
32098  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
32099printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
32100if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y}
32101then :
32102  printf %s "(cached) " >&6
32103else $as_nop
32104  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32105/* end confdefs.h.  */
32106/* Work also in C++ mode.  */
32107            #define __STDC_LIMIT_MACROS 1
32108
32109            /* Work if build is not clean.  */
32110            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
32111
32112            #include <limits.h>
32113            #if HAVE_STDINT_H
32114             #include <stdint.h>
32115            #endif
32116
32117            #if defined UINT32_MAX && defined UINTMAX_MAX
32118             #define CONDITION (UINT32_MAX < UINTMAX_MAX)
32119            #else
32120             #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
32121            #endif
32122            int test[CONDITION ? 1 : -1];
32123int
32124main (void)
32125{
32126
32127  ;
32128  return 0;
32129}
32130_ACEOF
32131if ac_fn_c_try_compile "$LINENO"
32132then :
32133  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
32134else $as_nop
32135  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
32136fi
32137rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32138fi
32139{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
32140printf "%s\n" "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
32141  if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
32142    UINT32_MAX_LT_UINTMAX_MAX=1;
32143  else
32144    UINT32_MAX_LT_UINTMAX_MAX=0;
32145  fi
32146
32147
32148  if test $APPLE_UNIVERSAL_BUILD = 0; then
32149
32150  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
32151printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
32152if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y}
32153then :
32154  printf %s "(cached) " >&6
32155else $as_nop
32156  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32157/* end confdefs.h.  */
32158/* Work also in C++ mode.  */
32159            #define __STDC_LIMIT_MACROS 1
32160
32161            /* Work if build is not clean.  */
32162            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
32163
32164            #include <limits.h>
32165            #if HAVE_STDINT_H
32166             #include <stdint.h>
32167            #endif
32168
32169            #if defined UINT64_MAX
32170             #define CONDITION (UINT64_MAX == ULONG_MAX)
32171            #else
32172             #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
32173            #endif
32174            int test[CONDITION ? 1 : -1];
32175int
32176main (void)
32177{
32178
32179  ;
32180  return 0;
32181}
32182_ACEOF
32183if ac_fn_c_try_compile "$LINENO"
32184then :
32185  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
32186else $as_nop
32187  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
32188fi
32189rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32190fi
32191{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
32192printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
32193  if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
32194    UINT64_MAX_EQ_ULONG_MAX=1;
32195  else
32196    UINT64_MAX_EQ_ULONG_MAX=0;
32197  fi
32198
32199
32200  else
32201    UINT64_MAX_EQ_ULONG_MAX=-1
32202  fi
32203
32204
32205
32206
32207
32208
32209  HAVE_IOCTL=1
32210  if test "$ac_cv_header_winsock2_h" = yes; then
32211                HAVE_IOCTL=0
32212  else
32213    ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
32214if test "x$ac_cv_func_ioctl" = xyes
32215then :
32216  printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h
32217
32218fi
32219
32220                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
32221printf %s "checking for ioctl with POSIX signature... " >&6; }
32222if test ${gl_cv_func_ioctl_posix_signature+y}
32223then :
32224  printf %s "(cached) " >&6
32225else $as_nop
32226  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32227/* end confdefs.h.  */
32228#include <sys/ioctl.h>
32229              /* On some platforms, ioctl() is declared in <unistd.h>.  */
32230              #include <unistd.h>
32231
32232int
32233main (void)
32234{
32235extern
32236              #ifdef __cplusplus
32237              "C"
32238              #endif
32239              int ioctl (int, int, ...);
32240
32241  ;
32242  return 0;
32243}
32244
32245_ACEOF
32246if ac_fn_c_try_compile "$LINENO"
32247then :
32248  gl_cv_func_ioctl_posix_signature=yes
32249else $as_nop
32250  gl_cv_func_ioctl_posix_signature=no
32251fi
32252rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32253
32254fi
32255{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
32256printf "%s\n" "$gl_cv_func_ioctl_posix_signature" >&6; }
32257    if test $gl_cv_func_ioctl_posix_signature != yes; then
32258      REPLACE_IOCTL=1
32259    fi
32260  fi
32261
32262  if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
32263
32264
32265
32266
32267
32268
32269
32270
32271  gl_LIBOBJS="$gl_LIBOBJS ioctl.$ac_objext"
32272
32273  fi
32274
32275
32276
32277
32278
32279          GNULIB_IOCTL=1
32280
32281
32282
32283
32284
32285printf "%s\n" "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
32286
32287
32288
32289
32290
32291         case $host_os in
32292    mingw*) REPLACE_ISATTY=1 ;;
32293  esac
32294
32295  if test $REPLACE_ISATTY = 1; then
32296
32297
32298
32299
32300
32301
32302
32303
32304  gl_LIBOBJS="$gl_LIBOBJS isatty.$ac_objext"
32305
32306    :
32307  fi
32308
32309
32310
32311
32312
32313          GNULIB_ISATTY=1
32314
32315
32316
32317
32318
32319printf "%s\n" "#define GNULIB_TEST_ISATTY 1" >>confdefs.h
32320
32321
32322
32323
32324
32325
32326
32327
32328  if test $ac_cv_func_isblank = no; then
32329    HAVE_ISBLANK=0
32330  fi
32331
32332  if test $HAVE_ISBLANK = 0; then
32333
32334
32335
32336
32337
32338
32339
32340
32341  gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
32342
32343  fi
32344
32345
32346printf "%s\n" "#define GNULIB_ISBLANK 1" >>confdefs.h
32347
32348
32349
32350
32351
32352
32353
32354          GNULIB_ISBLANK=1
32355
32356
32357
32358
32359
32360
32361
32362
32363
32364
32365
32366
32367
32368
32369
32370
32371
32372
32373     if test $gl_cv_have_include_next = yes; then
32374       gl_cv_next_langinfo_h='<'langinfo.h'>'
32375     else
32376       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
32377printf %s "checking absolute name of <langinfo.h>... " >&6; }
32378if test ${gl_cv_next_langinfo_h+y}
32379then :
32380  printf %s "(cached) " >&6
32381else $as_nop
32382
32383             if test $ac_cv_header_langinfo_h = yes; then
32384
32385
32386
32387
32388  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32389/* end confdefs.h.  */
32390#include <langinfo.h>
32391_ACEOF
32392                case "$host_os" in
32393    aix*) gl_absname_cpp="$ac_cpp -C" ;;
32394    *)    gl_absname_cpp="$ac_cpp" ;;
32395  esac
32396
32397  case "$host_os" in
32398    mingw*)
32399                                          gl_dirsep_regex='[/\\]'
32400      ;;
32401    *)
32402      gl_dirsep_regex='\/'
32403      ;;
32404  esac
32405      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32406  gl_header_literal_regex=`echo 'langinfo.h' \
32407                           | sed -e "$gl_make_literal_regex_sed"`
32408  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32409      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32410      s|^/[^/]|//&|
32411      p
32412      q
32413    }'
32414
32415        gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32416  sed -n "$gl_absolute_header_sed"`
32417
32418           gl_header=$gl_cv_absolute_langinfo_h
32419           gl_cv_next_langinfo_h='"'$gl_header'"'
32420          else
32421               gl_cv_next_langinfo_h='<'langinfo.h'>'
32422             fi
32423
32424
32425fi
32426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
32427printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
32428     fi
32429     NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
32430
32431     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32432       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32433       gl_next_as_first_directive='<'langinfo.h'>'
32434     else
32435       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32436       gl_next_as_first_directive=$gl_cv_next_langinfo_h
32437     fi
32438     NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
32439
32440
32441
32442
32443
32444    HAVE_LANGINFO_CODESET=0
32445  HAVE_LANGINFO_T_FMT_AMPM=0
32446  HAVE_LANGINFO_ALTMON=0
32447  HAVE_LANGINFO_ERA=0
32448  HAVE_LANGINFO_YESEXPR=0
32449
32450  if test $ac_cv_header_langinfo_h = yes; then
32451    HAVE_LANGINFO_H=1
32452                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
32453printf %s "checking whether langinfo.h defines CODESET... " >&6; }
32454if test ${gl_cv_header_langinfo_codeset+y}
32455then :
32456  printf %s "(cached) " >&6
32457else $as_nop
32458  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32459/* end confdefs.h.  */
32460#include <langinfo.h>
32461int a = CODESET;
32462
32463int
32464main (void)
32465{
32466
32467  ;
32468  return 0;
32469}
32470_ACEOF
32471if ac_fn_c_try_compile "$LINENO"
32472then :
32473  gl_cv_header_langinfo_codeset=yes
32474else $as_nop
32475  gl_cv_header_langinfo_codeset=no
32476fi
32477rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32478
32479fi
32480{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
32481printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
32482    if test $gl_cv_header_langinfo_codeset = yes; then
32483      HAVE_LANGINFO_CODESET=1
32484    fi
32485    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
32486printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
32487if test ${gl_cv_header_langinfo_t_fmt_ampm+y}
32488then :
32489  printf %s "(cached) " >&6
32490else $as_nop
32491  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32492/* end confdefs.h.  */
32493#include <langinfo.h>
32494int a = T_FMT_AMPM;
32495
32496int
32497main (void)
32498{
32499
32500  ;
32501  return 0;
32502}
32503_ACEOF
32504if ac_fn_c_try_compile "$LINENO"
32505then :
32506  gl_cv_header_langinfo_t_fmt_ampm=yes
32507else $as_nop
32508  gl_cv_header_langinfo_t_fmt_ampm=no
32509fi
32510rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32511
32512fi
32513{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
32514printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
32515    if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
32516      HAVE_LANGINFO_T_FMT_AMPM=1
32517    fi
32518    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
32519printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; }
32520if test ${gl_cv_header_langinfo_altmon+y}
32521then :
32522  printf %s "(cached) " >&6
32523else $as_nop
32524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32525/* end confdefs.h.  */
32526#include <langinfo.h>
32527int a = ALTMON_1;
32528
32529int
32530main (void)
32531{
32532
32533  ;
32534  return 0;
32535}
32536_ACEOF
32537if ac_fn_c_try_compile "$LINENO"
32538then :
32539  gl_cv_header_langinfo_altmon=yes
32540else $as_nop
32541  gl_cv_header_langinfo_altmon=no
32542fi
32543rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32544
32545fi
32546{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
32547printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; }
32548    if test $gl_cv_header_langinfo_altmon = yes; then
32549      HAVE_LANGINFO_ALTMON=1
32550    fi
32551    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
32552printf %s "checking whether langinfo.h defines ERA... " >&6; }
32553if test ${gl_cv_header_langinfo_era+y}
32554then :
32555  printf %s "(cached) " >&6
32556else $as_nop
32557  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32558/* end confdefs.h.  */
32559#include <langinfo.h>
32560int a = ERA;
32561
32562int
32563main (void)
32564{
32565
32566  ;
32567  return 0;
32568}
32569_ACEOF
32570if ac_fn_c_try_compile "$LINENO"
32571then :
32572  gl_cv_header_langinfo_era=yes
32573else $as_nop
32574  gl_cv_header_langinfo_era=no
32575fi
32576rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32577
32578fi
32579{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
32580printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
32581    if test $gl_cv_header_langinfo_era = yes; then
32582      HAVE_LANGINFO_ERA=1
32583    fi
32584    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
32585printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
32586if test ${gl_cv_header_langinfo_yesexpr+y}
32587then :
32588  printf %s "(cached) " >&6
32589else $as_nop
32590  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32591/* end confdefs.h.  */
32592#include <langinfo.h>
32593int a = YESEXPR;
32594
32595int
32596main (void)
32597{
32598
32599  ;
32600  return 0;
32601}
32602_ACEOF
32603if ac_fn_c_try_compile "$LINENO"
32604then :
32605  gl_cv_header_langinfo_yesexpr=yes
32606else $as_nop
32607  gl_cv_header_langinfo_yesexpr=no
32608fi
32609rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32610
32611fi
32612{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
32613printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
32614    if test $gl_cv_header_langinfo_yesexpr = yes; then
32615      HAVE_LANGINFO_YESEXPR=1
32616    fi
32617  else
32618    HAVE_LANGINFO_H=0
32619  fi
32620
32621
32622
32623
32624
32625
32626
32627
32628
32629
32630
32631
32632
32633
32634  CFLAG_VISIBILITY=
32635  HAVE_VISIBILITY=0
32636  if test -n "$GCC"; then
32637                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
32638printf %s "checking whether the -Werror option is usable... " >&6; }
32639if test ${gl_cv_cc_vis_werror+y}
32640then :
32641  printf %s "(cached) " >&6
32642else $as_nop
32643  gl_save_CFLAGS="$CFLAGS"
32644       CFLAGS="$CFLAGS -Werror"
32645       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32646/* end confdefs.h.  */
32647
32648int
32649main (void)
32650{
32651
32652  ;
32653  return 0;
32654}
32655_ACEOF
32656if ac_fn_c_try_compile "$LINENO"
32657then :
32658  gl_cv_cc_vis_werror=yes
32659else $as_nop
32660  gl_cv_cc_vis_werror=no
32661fi
32662rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32663       CFLAGS="$gl_save_CFLAGS"
32664
32665fi
32666{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
32667printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
32668        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
32669printf %s "checking for simple visibility declarations... " >&6; }
32670if test ${gl_cv_cc_visibility+y}
32671then :
32672  printf %s "(cached) " >&6
32673else $as_nop
32674  gl_save_CFLAGS="$CFLAGS"
32675       CFLAGS="$CFLAGS -fvisibility=hidden"
32676                                          if test $gl_cv_cc_vis_werror = yes; then
32677         CFLAGS="$CFLAGS -Werror"
32678       fi
32679       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32680/* end confdefs.h.  */
32681extern __attribute__((__visibility__("hidden"))) int hiddenvar;
32682              extern __attribute__((__visibility__("default"))) int exportedvar;
32683              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
32684              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
32685              void dummyfunc (void) {}
32686
32687int
32688main (void)
32689{
32690
32691  ;
32692  return 0;
32693}
32694_ACEOF
32695if ac_fn_c_try_compile "$LINENO"
32696then :
32697  gl_cv_cc_visibility=yes
32698else $as_nop
32699  gl_cv_cc_visibility=no
32700fi
32701rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32702       CFLAGS="$gl_save_CFLAGS"
32703
32704fi
32705{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
32706printf "%s\n" "$gl_cv_cc_visibility" >&6; }
32707    if test $gl_cv_cc_visibility = yes; then
32708      CFLAG_VISIBILITY="-fvisibility=hidden"
32709      HAVE_VISIBILITY=1
32710    fi
32711  fi
32712
32713
32714
32715printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
32716
32717
32718
32719  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
32720printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
32721if test ${gl_cv_c___inline+y}
32722then :
32723  printf %s "(cached) " >&6
32724else $as_nop
32725  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32726/* end confdefs.h.  */
32727typedef int foo_t;
32728           static __inline foo_t foo (void) { return 0; }
32729int
32730main (void)
32731{
32732return foo ();
32733  ;
32734  return 0;
32735}
32736_ACEOF
32737if ac_fn_c_try_compile "$LINENO"
32738then :
32739  gl_cv_c___inline=yes
32740else $as_nop
32741  gl_cv_c___inline=no
32742fi
32743rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32744fi
32745{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
32746printf "%s\n" "$gl_cv_c___inline" >&6; }
32747  if test $gl_cv_c___inline = yes; then
32748
32749printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h
32750
32751  fi
32752
32753
32754
32755
32756
32757  if test $ac_cv_func_link = no; then
32758    HAVE_LINK=0
32759  else
32760    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
32761printf %s "checking whether link obeys POSIX... " >&6; }
32762if test ${gl_cv_func_link_works+y}
32763then :
32764  printf %s "(cached) " >&6
32765else $as_nop
32766  touch conftest.a
32767       # Assume that if we have lstat, we can also check symlinks.
32768       if test $ac_cv_func_lstat = yes; then
32769         ln -s conftest.a conftest.lnk
32770       fi
32771       if test "$cross_compiling" = yes
32772then :
32773  case "$host_os" in
32774                             # Guess yes on Linux systems.
32775            linux-* | linux) gl_cv_func_link_works="guessing yes" ;;
32776                             # Guess yes on glibc systems.
32777            *-gnu* | gnu*)   gl_cv_func_link_works="guessing yes" ;;
32778                             # If we don't know, obey --enable-cross-guesses.
32779            *)               gl_cv_func_link_works="$gl_cross_guess_normal" ;;
32780          esac
32781
32782else $as_nop
32783  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32784/* end confdefs.h.  */
32785#include <unistd.h>
32786             #include <stdio.h>
32787
32788int
32789main (void)
32790{
32791int result = 0;
32792             if (!link ("conftest.a", "conftest.b/"))
32793               result |= 1;
32794#if HAVE_LSTAT
32795             if (!link ("conftest.lnk/", "conftest.b"))
32796               result |= 2;
32797             if (rename ("conftest.a", "conftest.b"))
32798               result |= 4;
32799             if (!link ("conftest.b", "conftest.lnk"))
32800               result |= 8;
32801#endif
32802             return result;
32803
32804  ;
32805  return 0;
32806}
32807_ACEOF
32808if ac_fn_c_try_run "$LINENO"
32809then :
32810  gl_cv_func_link_works=yes
32811else $as_nop
32812  gl_cv_func_link_works=no
32813fi
32814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32815  conftest.$ac_objext conftest.beam conftest.$ac_ext
32816fi
32817
32818       rm -f conftest.a conftest.b conftest.lnk
32819fi
32820{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
32821printf "%s\n" "$gl_cv_func_link_works" >&6; }
32822    case "$gl_cv_func_link_works" in
32823      *yes) ;;
32824      *)
32825        REPLACE_LINK=1
32826        ;;
32827    esac
32828  fi
32829
32830  if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
32831
32832
32833
32834
32835
32836
32837
32838
32839  gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext"
32840
32841  fi
32842
32843
32844
32845
32846
32847          GNULIB_LINK=1
32848
32849
32850
32851
32852
32853printf "%s\n" "#define GNULIB_TEST_LINK 1" >>confdefs.h
32854
32855
32856
32857
32858  if test "$ac_cv_header_winsock2_h" = yes; then
32859
32860
32861
32862
32863
32864
32865
32866
32867  gl_LIBOBJS="$gl_LIBOBJS listen.$ac_objext"
32868
32869  fi
32870
32871
32872
32873
32874
32875          GNULIB_LISTEN=1
32876
32877
32878
32879
32880
32881printf "%s\n" "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
32882
32883
32884
32885
32886
32887
32888    LOCALCHARSET_TESTS_ENVIRONMENT=
32889
32890
32891
32892
32893
32894
32895
32896
32897
32898
32899
32900  case "$host_os" in
32901    solaris*)
32902
32903printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
32904
32905      ;;
32906  esac
32907
32908  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
32909printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
32910if test ${gl_cv_header_locale_h_posix2001+y}
32911then :
32912  printf %s "(cached) " >&6
32913else $as_nop
32914  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32915/* end confdefs.h.  */
32916#include <locale.h>
32917            int x = LC_MESSAGES;
32918            int y = sizeof (((struct lconv *) 0)->decimal_point);
32919int
32920main (void)
32921{
32922
32923  ;
32924  return 0;
32925}
32926_ACEOF
32927if ac_fn_c_try_compile "$LINENO"
32928then :
32929  gl_cv_header_locale_h_posix2001=yes
32930else $as_nop
32931  gl_cv_header_locale_h_posix2001=no
32932fi
32933rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32934fi
32935{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
32936printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
32937
32938          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
32939printf %s "checking whether struct lconv is properly defined... " >&6; }
32940if test ${gl_cv_sys_struct_lconv_ok+y}
32941then :
32942  printf %s "(cached) " >&6
32943else $as_nop
32944  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32945/* end confdefs.h.  */
32946#include <locale.h>
32947            struct lconv l;
32948            int x = sizeof (l.decimal_point);
32949            int y = sizeof (l.int_p_cs_precedes);
32950int
32951main (void)
32952{
32953
32954  ;
32955  return 0;
32956}
32957_ACEOF
32958if ac_fn_c_try_compile "$LINENO"
32959then :
32960  gl_cv_sys_struct_lconv_ok=yes
32961else $as_nop
32962  gl_cv_sys_struct_lconv_ok=no
32963fi
32964rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32965
32966fi
32967{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
32968printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
32969  if test $gl_cv_sys_struct_lconv_ok = no; then
32970            case "$host_os" in
32971      mingw*)
32972        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32973/* end confdefs.h.  */
32974
32975#ifdef _MSC_VER
32976 Special
32977#endif
32978
32979_ACEOF
32980if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32981  $EGREP "Special" >/dev/null 2>&1
32982then :
32983
32984else $as_nop
32985  REPLACE_STRUCT_LCONV=1
32986fi
32987rm -rf conftest*
32988
32989        ;;
32990      *) REPLACE_STRUCT_LCONV=1 ;;
32991    esac
32992  fi
32993
32994
32995
32996
32997
32998
32999
33000
33001
33002     if test $gl_cv_have_include_next = yes; then
33003       gl_cv_next_locale_h='<'locale.h'>'
33004     else
33005       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
33006printf %s "checking absolute name of <locale.h>... " >&6; }
33007if test ${gl_cv_next_locale_h+y}
33008then :
33009  printf %s "(cached) " >&6
33010else $as_nop
33011
33012
33013
33014  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33015/* end confdefs.h.  */
33016#include <locale.h>
33017_ACEOF
33018                case "$host_os" in
33019    aix*) gl_absname_cpp="$ac_cpp -C" ;;
33020    *)    gl_absname_cpp="$ac_cpp" ;;
33021  esac
33022
33023  case "$host_os" in
33024    mingw*)
33025                                          gl_dirsep_regex='[/\\]'
33026      ;;
33027    *)
33028      gl_dirsep_regex='\/'
33029      ;;
33030  esac
33031      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33032  gl_header_literal_regex=`echo 'locale.h' \
33033                           | sed -e "$gl_make_literal_regex_sed"`
33034  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33035      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33036      s|^/[^/]|//&|
33037      p
33038      q
33039    }'
33040
33041        gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33042  sed -n "$gl_absolute_header_sed"`
33043
33044           gl_header=$gl_cv_absolute_locale_h
33045           gl_cv_next_locale_h='"'$gl_header'"'
33046
33047
33048fi
33049{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
33050printf "%s\n" "$gl_cv_next_locale_h" >&6; }
33051     fi
33052     NEXT_LOCALE_H=$gl_cv_next_locale_h
33053
33054     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33055       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33056       gl_next_as_first_directive='<'locale.h'>'
33057     else
33058       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33059       gl_next_as_first_directive=$gl_cv_next_locale_h
33060     fi
33061     NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
33062
33063
33064
33065
33066
33067
33068
33069
33070
33071
33072
33073
33074
33075  if test $REPLACE_STRUCT_LCONV = 1; then
33076    REPLACE_LOCALECONV=1
33077  fi
33078
33079  if test $REPLACE_LOCALECONV = 1; then
33080
33081
33082
33083
33084
33085
33086
33087
33088  gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
33089
33090
33091  ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
33092"
33093if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
33094then :
33095
33096printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
33097
33098
33099fi
33100
33101
33102  fi
33103
33104
33105
33106
33107
33108          GNULIB_LOCALECONV=1
33109
33110
33111
33112
33113
33114printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
33115
33116
33117
33118
33119
33120
33121
33122
33123
33124
33125  if test $HAVE_LOCALE_T = 1; then
33126
33127    gl_func_newlocale="$ac_cv_func_newlocale"
33128    gl_func_duplocale="$ac_cv_func_duplocale"
33129    gl_func_freelocale="$ac_cv_func_freelocale"
33130  else
33131            gl_func_newlocale=no
33132    gl_func_duplocale=no
33133    gl_func_freelocale=no
33134  fi
33135  if test $gl_func_newlocale != yes; then
33136    HAVE_NEWLOCALE=0
33137  fi
33138  if test $gl_func_duplocale != yes; then
33139    HAVE_DUPLOCALE=0
33140  fi
33141  if test $gl_func_freelocale != yes; then
33142    HAVE_FREELOCALE=0
33143  fi
33144  if test $gt_localename_enhances_locale_funcs = yes; then
33145    REPLACE_NEWLOCALE=1
33146    REPLACE_DUPLOCALE=1
33147    REPLACE_FREELOCALE=1
33148  fi
33149
33150
33151
33152
33153
33154
33155          GNULIB_LOCALENAME=1
33156
33157
33158
33159
33160
33161printf "%s\n" "#define GNULIB_TEST_LOCALENAME 1" >>confdefs.h
33162
33163
33164
33165
33166
33167  if test "$gl_threads_api" = posix; then
33168    # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
33169    # pthread_rwlock_* functions.
33170    has_rwlock=false
33171    ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
33172"
33173if test "x$ac_cv_type_pthread_rwlock_t" = xyes
33174then :
33175  has_rwlock=true
33176
33177printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
33178
33179fi
33180
33181    if $has_rwlock; then
33182
33183
33184     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
33185printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
33186if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
33187then :
33188  printf %s "(cached) " >&6
33189else $as_nop
33190  save_LIBS="$LIBS"
33191     LIBS="$LIBS $LIBMULTITHREAD"
33192     if test "$cross_compiling" = yes
33193then :
33194  case "$host_os" in
33195                         # Guess no on glibc systems.
33196          *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
33197                         # Guess no on musl systems.
33198          *-musl*)       gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
33199                         # Guess no on bionic systems.
33200          *-android*)    gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
33201                         # Guess yes on native Windows with the mingw-w64 winpthreads library.
33202                         # Guess no on native Windows with the gnulib windows-rwlock module.
33203          mingw*)        if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
33204                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
33205                         else
33206                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
33207                         fi
33208                         ;;
33209                         # If we don't know, obey --enable-cross-guesses.
33210          *)             gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
33211         esac
33212
33213else $as_nop
33214  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33215/* end confdefs.h.  */
33216
33217#include <errno.h>
33218#include <pthread.h>
33219#include <stdlib.h>
33220#include <unistd.h>
33221
33222#define SUCCEED() exit (0)
33223#define FAILURE() exit (1)
33224#define UNEXPECTED(n) (exit (10 + (n)))
33225
33226/* The main thread creates the waiting writer and the requesting reader threads
33227   in the default way; this guarantees that they have the same priority.
33228   We can reuse the main thread as first reader thread.  */
33229
33230static pthread_rwlock_t lock;
33231static pthread_t reader1;
33232static pthread_t writer;
33233static pthread_t reader2;
33234static pthread_t timer;
33235/* Used to pass control from writer to reader2 and from reader2 to timer,
33236   as in a relay race.
33237   Passing control from one running thread to another running thread
33238   is most likely faster than to create the second thread.  */
33239static pthread_mutex_t baton;
33240
33241static void *
33242timer_func (void *ignored)
33243{
33244  /* Step 13 (can be before or after step 12):
33245     The timer thread takes the baton, then waits a moment to make sure
33246     it can tell whether the second reader thread is blocked at step 12.  */
33247  if (pthread_mutex_lock (&baton))
33248    UNEXPECTED (13);
33249  usleep (100000);
33250  /* By the time we get here, it's clear that the second reader thread is
33251     blocked at step 12.  This is the desired behaviour.  */
33252  SUCCEED ();
33253}
33254
33255static void *
33256reader2_func (void *ignored)
33257{
33258  int err;
33259
33260  /* Step 8 (can be before or after step 7):
33261     The second reader thread takes the baton, then waits a moment to make sure
33262     the writer thread has reached step 7.  */
33263  if (pthread_mutex_lock (&baton))
33264    UNEXPECTED (8);
33265  usleep (100000);
33266  /* Step 9: The second reader thread requests the lock.  */
33267  err = pthread_rwlock_tryrdlock (&lock);
33268  if (err == 0)
33269    FAILURE ();
33270  else if (err != EBUSY)
33271    UNEXPECTED (9);
33272  /* Step 10: Launch a timer, to test whether the next call blocks.  */
33273  if (pthread_create (&timer, NULL, timer_func, NULL))
33274    UNEXPECTED (10);
33275  /* Step 11: Release the baton.  */
33276  if (pthread_mutex_unlock (&baton))
33277    UNEXPECTED (11);
33278  /* Step 12: The second reader thread requests the lock.  */
33279  err = pthread_rwlock_rdlock (&lock);
33280  if (err == 0)
33281    FAILURE ();
33282  else
33283    UNEXPECTED (12);
33284}
33285
33286static void *
33287writer_func (void *ignored)
33288{
33289  /* Step 4: Take the baton, so that the second reader thread does not go ahead
33290     too early.  */
33291  if (pthread_mutex_lock (&baton))
33292    UNEXPECTED (4);
33293  /* Step 5: Create the second reader thread.  */
33294  if (pthread_create (&reader2, NULL, reader2_func, NULL))
33295    UNEXPECTED (5);
33296  /* Step 6: Release the baton.  */
33297  if (pthread_mutex_unlock (&baton))
33298    UNEXPECTED (6);
33299  /* Step 7: The writer thread requests the lock.  */
33300  if (pthread_rwlock_wrlock (&lock))
33301    UNEXPECTED (7);
33302  return NULL;
33303}
33304
33305int
33306main ()
33307{
33308  reader1 = pthread_self ();
33309
33310  /* Step 1: The main thread initializes the lock and the baton.  */
33311  if (pthread_rwlock_init (&lock, NULL))
33312    UNEXPECTED (1);
33313  if (pthread_mutex_init (&baton, NULL))
33314    UNEXPECTED (1);
33315  /* Step 2: The main thread acquires the lock as a reader.  */
33316  if (pthread_rwlock_rdlock (&lock))
33317    UNEXPECTED (2);
33318  /* Step 3: Create the writer thread.  */
33319  if (pthread_create (&writer, NULL, writer_func, NULL))
33320    UNEXPECTED (3);
33321  /* Job done.  Go to sleep.  */
33322  for (;;)
33323    {
33324      sleep (1);
33325    }
33326}
33327
33328_ACEOF
33329if ac_fn_c_try_run "$LINENO"
33330then :
33331  gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
33332else $as_nop
33333  gl_cv_pthread_rwlock_rdlock_prefer_writer=no
33334fi
33335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33336  conftest.$ac_objext conftest.beam conftest.$ac_ext
33337fi
33338
33339     LIBS="$save_LIBS"
33340
33341fi
33342{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
33343printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
33344  case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
33345    *yes)
33346
33347printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
33348
33349      ;;
33350  esac
33351
33352    fi
33353    # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
33354    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33355/* end confdefs.h.  */
33356
33357      #include <pthread.h>
33358int
33359main (void)
33360{
33361
33362#if __FreeBSD__ == 4
33363error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
33364#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
33365       && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
33366error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
33367#else
33368int x = (int)PTHREAD_MUTEX_RECURSIVE;
33369return !x;
33370#endif
33371
33372  ;
33373  return 0;
33374}
33375_ACEOF
33376if ac_fn_c_try_compile "$LINENO"
33377then :
33378
33379printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
33380
33381fi
33382rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33383  fi
33384  :
33385
33386
33387
33388printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
33389
33390
33391
33392
33393
33394
33395
33396
33397  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
33398printf %s "checking whether lseek detects pipes... " >&6; }
33399if test ${gl_cv_func_lseek_pipe+y}
33400then :
33401  printf %s "(cached) " >&6
33402else $as_nop
33403  case "$host_os" in
33404       mingw*)
33405                                                               gl_cv_func_lseek_pipe=no
33406         ;;
33407       *)
33408         if test $cross_compiling = no; then
33409           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33410/* end confdefs.h.  */
33411
33412#include <sys/types.h> /* for off_t */
33413#include <stdio.h> /* for SEEK_CUR */
33414#if HAVE_UNISTD_H
33415# include <unistd.h>
33416#else /* on Windows with MSVC */
33417# include <io.h>
33418#endif
33419
33420
33421$gl_mda_defines
33422
33423int
33424main (void)
33425{
33426
33427  /* Exit with success only if stdin is seekable.  */
33428  return lseek (0, (off_t)0, SEEK_CUR) < 0;
33429
33430  ;
33431  return 0;
33432}
33433_ACEOF
33434if ac_fn_c_try_link "$LINENO"
33435then :
33436  if test -s conftest$ac_exeext \
33437                 && ./conftest$ac_exeext < conftest.$ac_ext \
33438                 && test 1 = "`echo hi \
33439                   | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
33440                gl_cv_func_lseek_pipe=yes
33441              else
33442                gl_cv_func_lseek_pipe=no
33443              fi
33444
33445else $as_nop
33446  gl_cv_func_lseek_pipe=no
33447fi
33448rm -f core conftest.err conftest.$ac_objext conftest.beam \
33449    conftest$ac_exeext conftest.$ac_ext
33450         else
33451           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33452/* end confdefs.h.  */
33453
33454#if defined __BEOS__
33455/* BeOS mistakenly return 0 when trying to seek on pipes.  */
33456  Choke me.
33457#endif
33458_ACEOF
33459if ac_fn_c_try_compile "$LINENO"
33460then :
33461  gl_cv_func_lseek_pipe=yes
33462else $as_nop
33463  gl_cv_func_lseek_pipe=no
33464fi
33465rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33466         fi
33467         ;;
33468     esac
33469
33470fi
33471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
33472printf "%s\n" "$gl_cv_func_lseek_pipe" >&6; }
33473  if test $gl_cv_func_lseek_pipe = no; then
33474    REPLACE_LSEEK=1
33475
33476printf "%s\n" "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
33477
33478  fi
33479
33480
33481  if test $WINDOWS_64_BIT_OFF_T = 1; then
33482    REPLACE_LSEEK=1
33483  fi
33484
33485  if test $REPLACE_LSEEK = 1; then
33486
33487
33488
33489
33490
33491
33492
33493
33494  gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
33495
33496  fi
33497
33498
33499
33500
33501
33502          GNULIB_LSEEK=1
33503
33504
33505
33506
33507
33508printf "%s\n" "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
33509
33510
33511
33512
33513
33514
33515
33516  if test $ac_cv_func_lstat = yes; then
33517
33518    case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
33519      solaris* | *no)
33520        REPLACE_LSTAT=1
33521        ;;
33522    esac
33523  else
33524    HAVE_LSTAT=0
33525  fi
33526
33527  if test $REPLACE_LSTAT = 1; then
33528
33529
33530
33531
33532
33533
33534
33535
33536  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
33537
33538    :
33539  fi
33540
33541
33542
33543
33544
33545          GNULIB_LSTAT=1
33546
33547
33548
33549
33550
33551printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
33552
33553
33554
33555
33556
33557
33558
33559
33560
33561  if test $gl_cv_func_malloc_posix = yes; then
33562
33563printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
33564
33565  else
33566    REPLACE_MALLOC=1
33567  fi
33568
33569  if test $REPLACE_MALLOC = 1; then
33570
33571
33572
33573
33574
33575
33576
33577
33578  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
33579
33580  fi
33581
33582
33583
33584
33585
33586          GNULIB_MALLOC_POSIX=1
33587
33588
33589
33590
33591
33592printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
33593
33594
33595
33596
33597
33598printf "%s\n" "#define GNULIB_MALLOC_POSIX 1" >>confdefs.h
33599
33600
33601
33602
33603
33604
33605
33606
33607
33608
33609
33610
33611
33612
33613
33614
33615
33616
33617        if case "$host_os" in
33618       mingw*) true ;;
33619       *) test $ac_cv_func_mbsinit = yes ;;
33620     esac \
33621    && test $ac_cv_func_mbrtowc = yes; then
33622
33623
33624
33625
33626     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
33627printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
33628if test ${gl_cv_func_mbrtowc_incomplete_state+y}
33629then :
33630  printf %s "(cached) " >&6
33631else $as_nop
33632
33633                  case "$host_os" in
33634                     # Guess no on AIX and OSF/1.
33635        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
33636                     # Guess yes otherwise.
33637        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
33638      esac
33639      if test $LOCALE_JA != none; then
33640        if test "$cross_compiling" = yes
33641then :
33642  :
33643else $as_nop
33644  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33645/* end confdefs.h.  */
33646
33647#include <locale.h>
33648#include <string.h>
33649#include <wchar.h>
33650int main ()
33651{
33652  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
33653    {
33654      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
33655      mbstate_t state;
33656      wchar_t wc;
33657
33658      memset (&state, '\0', sizeof (mbstate_t));
33659      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
33660        if (mbsinit (&state))
33661          return 2;
33662    }
33663  return 0;
33664}
33665_ACEOF
33666if ac_fn_c_try_run "$LINENO"
33667then :
33668  gl_cv_func_mbrtowc_incomplete_state=yes
33669else $as_nop
33670  gl_cv_func_mbrtowc_incomplete_state=no
33671fi
33672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33673  conftest.$ac_objext conftest.beam conftest.$ac_ext
33674fi
33675
33676      else
33677        if test $LOCALE_FR_UTF8 != none; then
33678          if test "$cross_compiling" = yes
33679then :
33680  :
33681else $as_nop
33682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33683/* end confdefs.h.  */
33684
33685#include <locale.h>
33686#include <string.h>
33687#include <wchar.h>
33688int main ()
33689{
33690  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33691    {
33692      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
33693      mbstate_t state;
33694      wchar_t wc;
33695
33696      memset (&state, '\0', sizeof (mbstate_t));
33697      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
33698        if (mbsinit (&state))
33699          return 2;
33700    }
33701  return 0;
33702}
33703_ACEOF
33704if ac_fn_c_try_run "$LINENO"
33705then :
33706  gl_cv_func_mbrtowc_incomplete_state=yes
33707else $as_nop
33708  gl_cv_func_mbrtowc_incomplete_state=no
33709fi
33710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33711  conftest.$ac_objext conftest.beam conftest.$ac_ext
33712fi
33713
33714        fi
33715      fi
33716
33717fi
33718{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
33719printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
33720
33721
33722
33723
33724     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
33725printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
33726if test ${gl_cv_func_mbrtowc_sanitycheck+y}
33727then :
33728  printf %s "(cached) " >&6
33729else $as_nop
33730
33731                  case "$host_os" in
33732                    # Guess no on Solaris 8.
33733        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
33734                    # Guess yes otherwise.
33735        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
33736      esac
33737      if test $LOCALE_ZH_CN != none; then
33738        if test "$cross_compiling" = yes
33739then :
33740  :
33741else $as_nop
33742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33743/* end confdefs.h.  */
33744
33745#include <locale.h>
33746#include <stdlib.h>
33747#include <string.h>
33748#include <wchar.h>
33749int main ()
33750{
33751  /* This fails on Solaris 8:
33752     mbrtowc returns 2, and sets wc to 0x00F0.
33753     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
33754  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
33755    {
33756      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
33757      mbstate_t state;
33758      wchar_t wc;
33759
33760      memset (&state, '\0', sizeof (mbstate_t));
33761      if (mbrtowc (&wc, input + 3, 6, &state) != 4
33762          && mbtowc (&wc, input + 3, 6) == 4)
33763        return 2;
33764    }
33765  return 0;
33766}
33767_ACEOF
33768if ac_fn_c_try_run "$LINENO"
33769then :
33770  gl_cv_func_mbrtowc_sanitycheck=yes
33771else $as_nop
33772  gl_cv_func_mbrtowc_sanitycheck=no
33773fi
33774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33775  conftest.$ac_objext conftest.beam conftest.$ac_ext
33776fi
33777
33778      fi
33779
33780fi
33781{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
33782printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
33783
33784    REPLACE_MBSTATE_T=0
33785    case "$gl_cv_func_mbrtowc_incomplete_state" in
33786      *yes) ;;
33787      *) REPLACE_MBSTATE_T=1 ;;
33788    esac
33789    case "$gl_cv_func_mbrtowc_sanitycheck" in
33790      *yes) ;;
33791      *) REPLACE_MBSTATE_T=1 ;;
33792    esac
33793  else
33794    REPLACE_MBSTATE_T=1
33795  fi
33796
33797
33798
33799  if test $ac_cv_func_mbrtowc = no; then
33800    HAVE_MBRTOWC=0
33801    ac_fn_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
33802      #include <wchar.h>
33803
33804" "$ac_c_undeclared_builtin_options" "CFLAGS"
33805if test "x$ac_cv_have_decl_mbrtowc" = xyes
33806then :
33807  ac_have_decl=1
33808else $as_nop
33809  ac_have_decl=0
33810fi
33811printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
33812
33813    if test $ac_cv_have_decl_mbrtowc = yes; then
33814                        REPLACE_MBRTOWC=1
33815    fi
33816  else
33817    if test $REPLACE_MBSTATE_T = 1; then
33818      REPLACE_MBRTOWC=1
33819    else
33820
33821
33822
33823     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
33824printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
33825if test ${gl_cv_func_mbrtowc_null_arg1+y}
33826then :
33827  printf %s "(cached) " >&6
33828else $as_nop
33829
33830                  case "$host_os" in
33831                  # Guess no on Solaris.
33832        solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
33833                  # Guess yes otherwise.
33834        *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
33835      esac
33836      if test $LOCALE_FR_UTF8 != none; then
33837        if test "$cross_compiling" = yes
33838then :
33839  :
33840else $as_nop
33841  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33842/* end confdefs.h.  */
33843
33844#include <locale.h>
33845#include <stdlib.h>
33846#include <string.h>
33847#include <wchar.h>
33848int main ()
33849{
33850  int result = 0;
33851
33852  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33853    {
33854      char input[] = "\303\237er";
33855      mbstate_t state;
33856      wchar_t wc;
33857      size_t ret;
33858
33859      memset (&state, '\0', sizeof (mbstate_t));
33860      wc = (wchar_t) 0xBADFACE;
33861      ret = mbrtowc (&wc, input, 5, &state);
33862      if (ret != 2)
33863        result |= 1;
33864      if (!mbsinit (&state))
33865        result |= 2;
33866
33867      memset (&state, '\0', sizeof (mbstate_t));
33868      ret = mbrtowc (NULL, input, 5, &state);
33869      if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
33870        result |= 4;
33871      if (!mbsinit (&state))
33872        result |= 8;
33873    }
33874  return result;
33875}
33876_ACEOF
33877if ac_fn_c_try_run "$LINENO"
33878then :
33879  gl_cv_func_mbrtowc_null_arg1=yes
33880else $as_nop
33881  gl_cv_func_mbrtowc_null_arg1=no
33882fi
33883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33884  conftest.$ac_objext conftest.beam conftest.$ac_ext
33885fi
33886
33887      fi
33888
33889fi
33890{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
33891printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
33892
33893
33894
33895
33896     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
33897printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
33898if test ${gl_cv_func_mbrtowc_null_arg2+y}
33899then :
33900  printf %s "(cached) " >&6
33901else $as_nop
33902
33903                  case "$host_os" in
33904              # Guess no on OSF/1.
33905        osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
33906              # Guess yes otherwise.
33907        *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
33908      esac
33909      if test $LOCALE_FR_UTF8 != none; then
33910        if test "$cross_compiling" = yes
33911then :
33912  :
33913else $as_nop
33914  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33915/* end confdefs.h.  */
33916
33917#include <locale.h>
33918#include <string.h>
33919#include <wchar.h>
33920int main ()
33921{
33922  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33923    {
33924      mbstate_t state;
33925      wchar_t wc;
33926      int ret;
33927
33928      memset (&state, '\0', sizeof (mbstate_t));
33929      wc = (wchar_t) 0xBADFACE;
33930      mbrtowc (&wc, NULL, 5, &state);
33931      /* Check that wc was not modified.  */
33932      if (wc != (wchar_t) 0xBADFACE)
33933        return 2;
33934    }
33935  return 0;
33936}
33937_ACEOF
33938if ac_fn_c_try_run "$LINENO"
33939then :
33940  gl_cv_func_mbrtowc_null_arg2=yes
33941else $as_nop
33942  gl_cv_func_mbrtowc_null_arg2=no
33943fi
33944rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33945  conftest.$ac_objext conftest.beam conftest.$ac_ext
33946fi
33947
33948      fi
33949
33950fi
33951{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
33952printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
33953
33954
33955
33956
33957
33958
33959  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
33960printf %s "checking whether mbrtowc has a correct return value... " >&6; }
33961if test ${gl_cv_func_mbrtowc_retval+y}
33962then :
33963  printf %s "(cached) " >&6
33964else $as_nop
33965
33966                  case "$host_os" in
33967                                   # Guess no on HP-UX, Solaris, native Windows.
33968        hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
33969                                   # Guess yes otherwise.
33970        *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
33971      esac
33972      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
33973         || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
33974        if test "$cross_compiling" = yes
33975then :
33976  :
33977else $as_nop
33978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33979/* end confdefs.h.  */
33980
33981#include <locale.h>
33982#include <string.h>
33983#include <wchar.h>
33984int main ()
33985{
33986  int result = 0;
33987  int found_some_locale = 0;
33988  /* This fails on Solaris.  */
33989  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33990    {
33991      char input[] = "B\303\274\303\237er"; /* "Büßer" */
33992      mbstate_t state;
33993      wchar_t wc;
33994
33995      memset (&state, '\0', sizeof (mbstate_t));
33996      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
33997        {
33998          input[1] = '\0';
33999          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
34000            result |= 1;
34001        }
34002      found_some_locale = 1;
34003    }
34004  /* This fails on HP-UX 11.11.  */
34005  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
34006    {
34007      char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
34008      mbstate_t state;
34009      wchar_t wc;
34010
34011      memset (&state, '\0', sizeof (mbstate_t));
34012      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
34013        {
34014          input[1] = '\0';
34015          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
34016            result |= 2;
34017        }
34018      found_some_locale = 1;
34019    }
34020  /* This fails on native Windows.  */
34021  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
34022    {
34023      char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
34024      mbstate_t state;
34025      wchar_t wc;
34026
34027      memset (&state, '\0', sizeof (mbstate_t));
34028      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
34029        {
34030          input[3] = '\0';
34031          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
34032            result |= 4;
34033        }
34034      found_some_locale = 1;
34035    }
34036  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
34037    {
34038      char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
34039      mbstate_t state;
34040      wchar_t wc;
34041
34042      memset (&state, '\0', sizeof (mbstate_t));
34043      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
34044        {
34045          input[3] = '\0';
34046          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
34047            result |= 8;
34048        }
34049      found_some_locale = 1;
34050    }
34051  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
34052    {
34053      char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
34054      mbstate_t state;
34055      wchar_t wc;
34056
34057      memset (&state, '\0', sizeof (mbstate_t));
34058      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
34059        {
34060          input[3] = '\0';
34061          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
34062            result |= 16;
34063        }
34064      found_some_locale = 1;
34065    }
34066  return (found_some_locale ? result : 77);
34067}
34068_ACEOF
34069if ac_fn_c_try_run "$LINENO"
34070then :
34071  gl_cv_func_mbrtowc_retval=yes
34072else $as_nop
34073  if test $? != 77; then
34074             gl_cv_func_mbrtowc_retval=no
34075           fi
34076
34077fi
34078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34079  conftest.$ac_objext conftest.beam conftest.$ac_ext
34080fi
34081
34082      fi
34083
34084fi
34085{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
34086printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
34087
34088
34089
34090
34091     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
34092printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
34093if test ${gl_cv_func_mbrtowc_nul_retval+y}
34094then :
34095  printf %s "(cached) " >&6
34096else $as_nop
34097
34098                  case "$host_os" in
34099                       # Guess no on Solaris 8 and 9.
34100        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
34101                       # Guess yes otherwise.
34102        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
34103      esac
34104      if test $LOCALE_ZH_CN != none; then
34105        if test "$cross_compiling" = yes
34106then :
34107  :
34108else $as_nop
34109  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34110/* end confdefs.h.  */
34111
34112#include <locale.h>
34113#include <string.h>
34114#include <wchar.h>
34115int main ()
34116{
34117  /* This fails on Solaris 8 and 9.  */
34118  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
34119    {
34120      mbstate_t state;
34121      wchar_t wc;
34122
34123      memset (&state, '\0', sizeof (mbstate_t));
34124      if (mbrtowc (&wc, "", 1, &state) != 0)
34125        return 2;
34126    }
34127  return 0;
34128}
34129_ACEOF
34130if ac_fn_c_try_run "$LINENO"
34131then :
34132  gl_cv_func_mbrtowc_nul_retval=yes
34133else $as_nop
34134  gl_cv_func_mbrtowc_nul_retval=no
34135fi
34136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34137  conftest.$ac_objext conftest.beam conftest.$ac_ext
34138fi
34139
34140      fi
34141
34142fi
34143{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
34144printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
34145
34146
34147
34148     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
34149printf %s "checking whether mbrtowc stores incomplete characters... " >&6; }
34150if test ${gl_cv_func_mbrtowc_stores_incomplete+y}
34151then :
34152  printf %s "(cached) " >&6
34153else $as_nop
34154
34155               case "$host_os" in
34156               # Guess yes on native Windows.
34157       mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
34158       *)      gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
34159     esac
34160     case "$host_os" in
34161       mingw*)
34162         if test "$cross_compiling" = yes
34163then :
34164  :
34165else $as_nop
34166  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34167/* end confdefs.h.  */
34168
34169#include <locale.h>
34170#include <string.h>
34171#include <wchar.h>
34172int main ()
34173{
34174  int result = 0;
34175  if (setlocale (LC_ALL, "French_France.65001") != NULL)
34176    {
34177      wchar_t wc = (wchar_t) 0xBADFACE;
34178      mbstate_t state;
34179
34180      memset (&state, '\0', sizeof (mbstate_t));
34181      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
34182          && wc != (wchar_t) 0xBADFACE)
34183        result |= 1;
34184    }
34185  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
34186    {
34187      wchar_t wc = (wchar_t) 0xBADFACE;
34188      mbstate_t state;
34189
34190      memset (&state, '\0', sizeof (mbstate_t));
34191      if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
34192          && wc != (wchar_t) 0xBADFACE)
34193        result |= 2;
34194    }
34195  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
34196    {
34197      wchar_t wc = (wchar_t) 0xBADFACE;
34198      mbstate_t state;
34199
34200      memset (&state, '\0', sizeof (mbstate_t));
34201      if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
34202          && wc != (wchar_t) 0xBADFACE)
34203        result |= 4;
34204    }
34205  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
34206    {
34207      wchar_t wc = (wchar_t) 0xBADFACE;
34208      mbstate_t state;
34209
34210      memset (&state, '\0', sizeof (mbstate_t));
34211      if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
34212          && wc != (wchar_t) 0xBADFACE)
34213        result |= 8;
34214    }
34215  return result;
34216}
34217_ACEOF
34218if ac_fn_c_try_run "$LINENO"
34219then :
34220  gl_cv_func_mbrtowc_stores_incomplete=no
34221else $as_nop
34222  gl_cv_func_mbrtowc_stores_incomplete=yes
34223fi
34224rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34225  conftest.$ac_objext conftest.beam conftest.$ac_ext
34226fi
34227
34228         ;;
34229       *)
34230
34231         if test $LOCALE_FR_UTF8 != none; then
34232           if test "$cross_compiling" = yes
34233then :
34234  :
34235else $as_nop
34236  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34237/* end confdefs.h.  */
34238
34239#include <locale.h>
34240#include <string.h>
34241#include <wchar.h>
34242int main ()
34243{
34244  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
34245    {
34246      wchar_t wc = (wchar_t) 0xBADFACE;
34247      mbstate_t state;
34248
34249      memset (&state, '\0', sizeof (mbstate_t));
34250      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
34251          && wc != (wchar_t) 0xBADFACE)
34252        return 1;
34253    }
34254  return 0;
34255}
34256_ACEOF
34257if ac_fn_c_try_run "$LINENO"
34258then :
34259  gl_cv_func_mbrtowc_stores_incomplete=no
34260else $as_nop
34261  gl_cv_func_mbrtowc_stores_incomplete=yes
34262fi
34263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34264  conftest.$ac_objext conftest.beam conftest.$ac_ext
34265fi
34266
34267         fi
34268         ;;
34269     esac
34270
34271fi
34272{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
34273printf "%s\n" "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
34274
34275
34276
34277     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
34278printf %s "checking whether mbrtowc works on empty input... " >&6; }
34279if test ${gl_cv_func_mbrtowc_empty_input+y}
34280then :
34281  printf %s "(cached) " >&6
34282else $as_nop
34283
34284                  case "$host_os" in
34285                              # Guess no on AIX and glibc systems.
34286        aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
34287                              # Guess yes on native Windows.
34288        mingw*)               gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
34289        *)                    gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
34290      esac
34291      if test "$cross_compiling" = yes
34292then :
34293  :
34294else $as_nop
34295  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34296/* end confdefs.h.  */
34297
34298           #include <wchar.h>
34299           static wchar_t wc;
34300           static mbstate_t mbs;
34301           int
34302           main (void)
34303           {
34304             return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
34305           }
34306_ACEOF
34307if ac_fn_c_try_run "$LINENO"
34308then :
34309  gl_cv_func_mbrtowc_empty_input=yes
34310else $as_nop
34311  gl_cv_func_mbrtowc_empty_input=no
34312fi
34313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34314  conftest.$ac_objext conftest.beam conftest.$ac_ext
34315fi
34316
34317
34318fi
34319{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
34320printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
34321
34322
34323     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
34324printf %s "checking whether the C locale is free of encoding errors... " >&6; }
34325if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
34326then :
34327  printf %s "(cached) " >&6
34328else $as_nop
34329
34330               gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
34331
34332     if test "$cross_compiling" = yes
34333then :
34334  case "$host_os" in
34335                 # Guess yes on native Windows.
34336         mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
34337       esac
34338
34339else $as_nop
34340  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34341/* end confdefs.h.  */
34342#include <limits.h>
34343            #include <locale.h>
34344            #include <wchar.h>
34345
34346int
34347main (void)
34348{
34349
34350            int i;
34351            char *locale = setlocale (LC_ALL, "C");
34352            if (! locale)
34353              return 2;
34354            for (i = CHAR_MIN; i <= CHAR_MAX; i++)
34355              {
34356                char c = i;
34357                wchar_t wc;
34358                mbstate_t mbs = { 0, };
34359                size_t ss = mbrtowc (&wc, &c, 1, &mbs);
34360                if (1 < ss)
34361                  return 3;
34362              }
34363            return 0;
34364
34365  ;
34366  return 0;
34367}
34368_ACEOF
34369if ac_fn_c_try_run "$LINENO"
34370then :
34371  gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
34372else $as_nop
34373  gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
34374fi
34375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34376  conftest.$ac_objext conftest.beam conftest.$ac_ext
34377fi
34378
34379
34380fi
34381{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
34382printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
34383
34384      case "$gl_cv_func_mbrtowc_null_arg1" in
34385        *yes) ;;
34386        *)
34387printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
34388
34389           REPLACE_MBRTOWC=1
34390           ;;
34391      esac
34392      case "$gl_cv_func_mbrtowc_null_arg2" in
34393        *yes) ;;
34394        *)
34395printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
34396
34397           REPLACE_MBRTOWC=1
34398           ;;
34399      esac
34400      case "$gl_cv_func_mbrtowc_retval" in
34401        *yes) ;;
34402        *)
34403printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
34404
34405           REPLACE_MBRTOWC=1
34406           ;;
34407      esac
34408      case "$gl_cv_func_mbrtowc_nul_retval" in
34409        *yes) ;;
34410        *)
34411printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
34412
34413           REPLACE_MBRTOWC=1
34414           ;;
34415      esac
34416      case "$gl_cv_func_mbrtowc_stores_incomplete" in
34417        *no) ;;
34418        *)
34419printf "%s\n" "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
34420
34421           REPLACE_MBRTOWC=1
34422           ;;
34423      esac
34424      case "$gl_cv_func_mbrtowc_empty_input" in
34425        *yes) ;;
34426        *)
34427printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
34428
34429           REPLACE_MBRTOWC=1
34430           ;;
34431      esac
34432      case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
34433        *yes) ;;
34434        *)
34435printf "%s\n" "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
34436
34437           REPLACE_MBRTOWC=1
34438           ;;
34439      esac
34440    fi
34441  fi
34442  if test $REPLACE_MBSTATE_T = 1; then
34443    case "$host_os" in
34444      mingw*) LIB_MBRTOWC= ;;
34445      *)
34446
34447
34448  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
34449printf %s "checking whether imported symbols can be declared weak... " >&6; }
34450if test ${gl_cv_have_weak+y}
34451then :
34452  printf %s "(cached) " >&6
34453else $as_nop
34454  gl_cv_have_weak=no
34455          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34456/* end confdefs.h.  */
34457extern void xyzzy ();
34458#pragma weak xyzzy
34459int
34460main (void)
34461{
34462xyzzy();
34463  ;
34464  return 0;
34465}
34466_ACEOF
34467if ac_fn_c_try_link "$LINENO"
34468then :
34469  gl_cv_have_weak=maybe
34470fi
34471rm -f core conftest.err conftest.$ac_objext conftest.beam \
34472    conftest$ac_exeext conftest.$ac_ext
34473     if test $gl_cv_have_weak = maybe; then
34474                     if test "$cross_compiling" = yes
34475then :
34476                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34477/* end confdefs.h.  */
34478#ifdef __ELF__
34479             Extensible Linking Format
34480             #endif
34481
34482_ACEOF
34483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34484  $EGREP "Extensible Linking Format" >/dev/null 2>&1
34485then :
34486  gl_cv_have_weak="guessing yes"
34487else $as_nop
34488  gl_cv_have_weak="guessing no"
34489fi
34490rm -rf conftest*
34491
34492
34493else $as_nop
34494  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34495/* end confdefs.h.  */
34496
34497#include <stdio.h>
34498#pragma weak fputs
34499int main ()
34500{
34501  return (fputs == NULL);
34502}
34503_ACEOF
34504if ac_fn_c_try_run "$LINENO"
34505then :
34506  gl_cv_have_weak=yes
34507else $as_nop
34508  gl_cv_have_weak=no
34509fi
34510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34511  conftest.$ac_objext conftest.beam conftest.$ac_ext
34512fi
34513
34514     fi
34515          case " $LDFLAGS " in
34516       *" -static "*) gl_cv_have_weak=no ;;
34517     esac
34518                    case "$gl_cv_have_weak" in
34519       *yes)
34520         case "$host_os" in
34521           freebsd* | dragonfly*)
34522             : > conftest1.c
34523             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
34524             cat <<EOF > conftest2.c
34525#include <pthread.h>
34526#pragma weak pthread_mutexattr_gettype
34527int main ()
34528{
34529  return (pthread_mutexattr_gettype != NULL);
34530}
34531EOF
34532             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
34533               || gl_cv_have_weak=no
34534             rm -f conftest1.c libempty.so conftest2.c conftest
34535             ;;
34536         esac
34537         ;;
34538     esac
34539
34540fi
34541{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
34542printf "%s\n" "$gl_cv_have_weak" >&6; }
34543  case "$gl_cv_have_weak" in
34544    *yes)
34545
34546printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
34547
34548      ;;
34549  esac
34550
34551        case "$gl_cv_have_weak" in
34552          *yes) LIB_MBRTOWC= ;;
34553          *)    LIB_MBRTOWC="$LIBPTHREAD" ;;
34554        esac
34555        ;;
34556    esac
34557  else
34558    LIB_MBRTOWC=
34559  fi
34560
34561
34562  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
34563
34564
34565
34566
34567
34568
34569
34570
34571  gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
34572
34573    if test $REPLACE_MBSTATE_T = 1; then
34574
34575
34576
34577
34578
34579
34580
34581
34582  gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
34583
34584
34585
34586
34587
34588
34589
34590
34591
34592  gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
34593
34594
34595
34596
34597  CFLAG_VISIBILITY=
34598  HAVE_VISIBILITY=0
34599  if test -n "$GCC"; then
34600                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
34601printf %s "checking whether the -Werror option is usable... " >&6; }
34602if test ${gl_cv_cc_vis_werror+y}
34603then :
34604  printf %s "(cached) " >&6
34605else $as_nop
34606  gl_save_CFLAGS="$CFLAGS"
34607       CFLAGS="$CFLAGS -Werror"
34608       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34609/* end confdefs.h.  */
34610
34611int
34612main (void)
34613{
34614
34615  ;
34616  return 0;
34617}
34618_ACEOF
34619if ac_fn_c_try_compile "$LINENO"
34620then :
34621  gl_cv_cc_vis_werror=yes
34622else $as_nop
34623  gl_cv_cc_vis_werror=no
34624fi
34625rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34626       CFLAGS="$gl_save_CFLAGS"
34627
34628fi
34629{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
34630printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
34631        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
34632printf %s "checking for simple visibility declarations... " >&6; }
34633if test ${gl_cv_cc_visibility+y}
34634then :
34635  printf %s "(cached) " >&6
34636else $as_nop
34637  gl_save_CFLAGS="$CFLAGS"
34638       CFLAGS="$CFLAGS -fvisibility=hidden"
34639                                          if test $gl_cv_cc_vis_werror = yes; then
34640         CFLAGS="$CFLAGS -Werror"
34641       fi
34642       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34643/* end confdefs.h.  */
34644extern __attribute__((__visibility__("hidden"))) int hiddenvar;
34645              extern __attribute__((__visibility__("default"))) int exportedvar;
34646              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
34647              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
34648              void dummyfunc (void) {}
34649
34650int
34651main (void)
34652{
34653
34654  ;
34655  return 0;
34656}
34657_ACEOF
34658if ac_fn_c_try_compile "$LINENO"
34659then :
34660  gl_cv_cc_visibility=yes
34661else $as_nop
34662  gl_cv_cc_visibility=no
34663fi
34664rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34665       CFLAGS="$gl_save_CFLAGS"
34666
34667fi
34668{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
34669printf "%s\n" "$gl_cv_cc_visibility" >&6; }
34670    if test $gl_cv_cc_visibility = yes; then
34671      CFLAG_VISIBILITY="-fvisibility=hidden"
34672      HAVE_VISIBILITY=1
34673    fi
34674  fi
34675
34676
34677
34678printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
34679
34680
34681
34682    fi
34683
34684
34685  :
34686
34687  fi
34688
34689
34690
34691
34692
34693          GNULIB_MBRTOWC=1
34694
34695
34696
34697
34698
34699printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
34700
34701
34702
34703
34704
34705
34706
34707
34708
34709
34710
34711
34712
34713
34714
34715        if case "$host_os" in
34716       mingw*) true ;;
34717       *) test $ac_cv_func_mbsinit = yes ;;
34718     esac \
34719    && test $ac_cv_func_mbrtowc = yes; then
34720
34721
34722
34723
34724     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
34725printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
34726if test ${gl_cv_func_mbrtowc_incomplete_state+y}
34727then :
34728  printf %s "(cached) " >&6
34729else $as_nop
34730
34731                  case "$host_os" in
34732                     # Guess no on AIX and OSF/1.
34733        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
34734                     # Guess yes otherwise.
34735        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
34736      esac
34737      if test $LOCALE_JA != none; then
34738        if test "$cross_compiling" = yes
34739then :
34740  :
34741else $as_nop
34742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34743/* end confdefs.h.  */
34744
34745#include <locale.h>
34746#include <string.h>
34747#include <wchar.h>
34748int main ()
34749{
34750  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
34751    {
34752      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
34753      mbstate_t state;
34754      wchar_t wc;
34755
34756      memset (&state, '\0', sizeof (mbstate_t));
34757      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
34758        if (mbsinit (&state))
34759          return 2;
34760    }
34761  return 0;
34762}
34763_ACEOF
34764if ac_fn_c_try_run "$LINENO"
34765then :
34766  gl_cv_func_mbrtowc_incomplete_state=yes
34767else $as_nop
34768  gl_cv_func_mbrtowc_incomplete_state=no
34769fi
34770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34771  conftest.$ac_objext conftest.beam conftest.$ac_ext
34772fi
34773
34774      else
34775        if test $LOCALE_FR_UTF8 != none; then
34776          if test "$cross_compiling" = yes
34777then :
34778  :
34779else $as_nop
34780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34781/* end confdefs.h.  */
34782
34783#include <locale.h>
34784#include <string.h>
34785#include <wchar.h>
34786int main ()
34787{
34788  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
34789    {
34790      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
34791      mbstate_t state;
34792      wchar_t wc;
34793
34794      memset (&state, '\0', sizeof (mbstate_t));
34795      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
34796        if (mbsinit (&state))
34797          return 2;
34798    }
34799  return 0;
34800}
34801_ACEOF
34802if ac_fn_c_try_run "$LINENO"
34803then :
34804  gl_cv_func_mbrtowc_incomplete_state=yes
34805else $as_nop
34806  gl_cv_func_mbrtowc_incomplete_state=no
34807fi
34808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34809  conftest.$ac_objext conftest.beam conftest.$ac_ext
34810fi
34811
34812        fi
34813      fi
34814
34815fi
34816{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
34817printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
34818
34819
34820
34821
34822     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
34823printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
34824if test ${gl_cv_func_mbrtowc_sanitycheck+y}
34825then :
34826  printf %s "(cached) " >&6
34827else $as_nop
34828
34829                  case "$host_os" in
34830                    # Guess no on Solaris 8.
34831        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
34832                    # Guess yes otherwise.
34833        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
34834      esac
34835      if test $LOCALE_ZH_CN != none; then
34836        if test "$cross_compiling" = yes
34837then :
34838  :
34839else $as_nop
34840  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34841/* end confdefs.h.  */
34842
34843#include <locale.h>
34844#include <stdlib.h>
34845#include <string.h>
34846#include <wchar.h>
34847int main ()
34848{
34849  /* This fails on Solaris 8:
34850     mbrtowc returns 2, and sets wc to 0x00F0.
34851     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
34852  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
34853    {
34854      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
34855      mbstate_t state;
34856      wchar_t wc;
34857
34858      memset (&state, '\0', sizeof (mbstate_t));
34859      if (mbrtowc (&wc, input + 3, 6, &state) != 4
34860          && mbtowc (&wc, input + 3, 6) == 4)
34861        return 2;
34862    }
34863  return 0;
34864}
34865_ACEOF
34866if ac_fn_c_try_run "$LINENO"
34867then :
34868  gl_cv_func_mbrtowc_sanitycheck=yes
34869else $as_nop
34870  gl_cv_func_mbrtowc_sanitycheck=no
34871fi
34872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34873  conftest.$ac_objext conftest.beam conftest.$ac_ext
34874fi
34875
34876      fi
34877
34878fi
34879{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
34880printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
34881
34882    REPLACE_MBSTATE_T=0
34883    case "$gl_cv_func_mbrtowc_incomplete_state" in
34884      *yes) ;;
34885      *) REPLACE_MBSTATE_T=1 ;;
34886    esac
34887    case "$gl_cv_func_mbrtowc_sanitycheck" in
34888      *yes) ;;
34889      *) REPLACE_MBSTATE_T=1 ;;
34890    esac
34891  else
34892    REPLACE_MBSTATE_T=1
34893  fi
34894
34895
34896
34897  if test $ac_cv_func_mbsinit = no; then
34898    HAVE_MBSINIT=0
34899    ac_fn_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
34900      #include <wchar.h>
34901
34902" "$ac_c_undeclared_builtin_options" "CFLAGS"
34903if test "x$ac_cv_have_decl_mbsinit" = xyes
34904then :
34905  ac_have_decl=1
34906else $as_nop
34907  ac_have_decl=0
34908fi
34909printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
34910
34911    if test $ac_cv_have_decl_mbsinit = yes; then
34912                        REPLACE_MBSINIT=1
34913    fi
34914  else
34915    if test $REPLACE_MBSTATE_T = 1; then
34916      REPLACE_MBSINIT=1
34917    else
34918                        case "$host_os" in
34919        mingw*) REPLACE_MBSINIT=1 ;;
34920      esac
34921    fi
34922  fi
34923
34924  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
34925
34926
34927
34928
34929
34930
34931
34932
34933  gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
34934
34935
34936  :
34937
34938  fi
34939
34940
34941
34942
34943
34944          GNULIB_MBSINIT=1
34945
34946
34947
34948
34949
34950printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
34951
34952
34953
34954
34955
34956
34957
34958
34959
34960
34961
34962
34963
34964
34965        if case "$host_os" in
34966       mingw*) true ;;
34967       *) test $ac_cv_func_mbsinit = yes ;;
34968     esac \
34969    && test $ac_cv_func_mbrtowc = yes; then
34970
34971
34972
34973
34974     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
34975printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
34976if test ${gl_cv_func_mbrtowc_incomplete_state+y}
34977then :
34978  printf %s "(cached) " >&6
34979else $as_nop
34980
34981                  case "$host_os" in
34982                     # Guess no on AIX and OSF/1.
34983        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
34984                     # Guess yes otherwise.
34985        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
34986      esac
34987      if test $LOCALE_JA != none; then
34988        if test "$cross_compiling" = yes
34989then :
34990  :
34991else $as_nop
34992  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34993/* end confdefs.h.  */
34994
34995#include <locale.h>
34996#include <string.h>
34997#include <wchar.h>
34998int main ()
34999{
35000  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
35001    {
35002      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
35003      mbstate_t state;
35004      wchar_t wc;
35005
35006      memset (&state, '\0', sizeof (mbstate_t));
35007      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
35008        if (mbsinit (&state))
35009          return 2;
35010    }
35011  return 0;
35012}
35013_ACEOF
35014if ac_fn_c_try_run "$LINENO"
35015then :
35016  gl_cv_func_mbrtowc_incomplete_state=yes
35017else $as_nop
35018  gl_cv_func_mbrtowc_incomplete_state=no
35019fi
35020rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35021  conftest.$ac_objext conftest.beam conftest.$ac_ext
35022fi
35023
35024      else
35025        if test $LOCALE_FR_UTF8 != none; then
35026          if test "$cross_compiling" = yes
35027then :
35028  :
35029else $as_nop
35030  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35031/* end confdefs.h.  */
35032
35033#include <locale.h>
35034#include <string.h>
35035#include <wchar.h>
35036int main ()
35037{
35038  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
35039    {
35040      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
35041      mbstate_t state;
35042      wchar_t wc;
35043
35044      memset (&state, '\0', sizeof (mbstate_t));
35045      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
35046        if (mbsinit (&state))
35047          return 2;
35048    }
35049  return 0;
35050}
35051_ACEOF
35052if ac_fn_c_try_run "$LINENO"
35053then :
35054  gl_cv_func_mbrtowc_incomplete_state=yes
35055else $as_nop
35056  gl_cv_func_mbrtowc_incomplete_state=no
35057fi
35058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35059  conftest.$ac_objext conftest.beam conftest.$ac_ext
35060fi
35061
35062        fi
35063      fi
35064
35065fi
35066{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
35067printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
35068
35069
35070
35071
35072     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
35073printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
35074if test ${gl_cv_func_mbrtowc_sanitycheck+y}
35075then :
35076  printf %s "(cached) " >&6
35077else $as_nop
35078
35079                  case "$host_os" in
35080                    # Guess no on Solaris 8.
35081        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
35082                    # Guess yes otherwise.
35083        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
35084      esac
35085      if test $LOCALE_ZH_CN != none; then
35086        if test "$cross_compiling" = yes
35087then :
35088  :
35089else $as_nop
35090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35091/* end confdefs.h.  */
35092
35093#include <locale.h>
35094#include <stdlib.h>
35095#include <string.h>
35096#include <wchar.h>
35097int main ()
35098{
35099  /* This fails on Solaris 8:
35100     mbrtowc returns 2, and sets wc to 0x00F0.
35101     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
35102  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
35103    {
35104      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
35105      mbstate_t state;
35106      wchar_t wc;
35107
35108      memset (&state, '\0', sizeof (mbstate_t));
35109      if (mbrtowc (&wc, input + 3, 6, &state) != 4
35110          && mbtowc (&wc, input + 3, 6) == 4)
35111        return 2;
35112    }
35113  return 0;
35114}
35115_ACEOF
35116if ac_fn_c_try_run "$LINENO"
35117then :
35118  gl_cv_func_mbrtowc_sanitycheck=yes
35119else $as_nop
35120  gl_cv_func_mbrtowc_sanitycheck=no
35121fi
35122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35123  conftest.$ac_objext conftest.beam conftest.$ac_ext
35124fi
35125
35126      fi
35127
35128fi
35129{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
35130printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
35131
35132    REPLACE_MBSTATE_T=0
35133    case "$gl_cv_func_mbrtowc_incomplete_state" in
35134      *yes) ;;
35135      *) REPLACE_MBSTATE_T=1 ;;
35136    esac
35137    case "$gl_cv_func_mbrtowc_sanitycheck" in
35138      *yes) ;;
35139      *) REPLACE_MBSTATE_T=1 ;;
35140    esac
35141  else
35142    REPLACE_MBSTATE_T=1
35143  fi
35144
35145
35146
35147  if test $ac_cv_func_mbsrtowcs = no; then
35148    HAVE_MBSRTOWCS=0
35149    ac_fn_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
35150      #include <wchar.h>
35151
35152" "$ac_c_undeclared_builtin_options" "CFLAGS"
35153if test "x$ac_cv_have_decl_mbsrtowcs" = xyes
35154then :
35155  ac_have_decl=1
35156else $as_nop
35157  ac_have_decl=0
35158fi
35159printf "%s\n" "#define HAVE_DECL_MBSRTOWCS $ac_have_decl" >>confdefs.h
35160
35161    if test $ac_cv_have_decl_mbsrtowcs = yes; then
35162                        REPLACE_MBSRTOWCS=1
35163    fi
35164  else
35165    if test $REPLACE_MBSTATE_T = 1; then
35166      REPLACE_MBSRTOWCS=1
35167    else
35168
35169
35170
35171
35172
35173
35174     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
35175printf %s "checking whether mbsrtowcs works... " >&6; }
35176if test ${gl_cv_func_mbsrtowcs_works+y}
35177then :
35178  printf %s "(cached) " >&6
35179else $as_nop
35180
35181                  case "$host_os" in
35182                                   # Guess no on HP-UX, Solaris, mingw.
35183        hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
35184                                   # Guess yes otherwise.
35185        *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
35186      esac
35187      if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
35188        if test "$cross_compiling" = yes
35189then :
35190  :
35191else $as_nop
35192  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35193/* end confdefs.h.  */
35194
35195#include <locale.h>
35196#include <string.h>
35197#include <wchar.h>
35198int main ()
35199{
35200  int result = 0;
35201  /* Test whether the function supports a NULL destination argument.
35202     This fails on native Windows.  */
35203  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
35204    {
35205      const char input[] = "\337er";
35206      const char *src = input;
35207      mbstate_t state;
35208
35209      memset (&state, '\0', sizeof (mbstate_t));
35210      if (mbsrtowcs (NULL, &src, 1, &state) != 3
35211          || src != input)
35212        result |= 1;
35213    }
35214  /* Test whether the function works when started with a conversion state
35215     in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
35216  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
35217    {
35218      const char input[] = "B\303\274\303\237er";
35219      mbstate_t state;
35220
35221      memset (&state, '\0', sizeof (mbstate_t));
35222      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
35223        if (!mbsinit (&state))
35224          {
35225            const char *src = input + 2;
35226            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
35227              result |= 2;
35228          }
35229    }
35230  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
35231    {
35232      const char input[] = "<\306\374\313\334\270\354>";
35233      mbstate_t state;
35234
35235      memset (&state, '\0', sizeof (mbstate_t));
35236      if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
35237        if (!mbsinit (&state))
35238          {
35239            const char *src = input + 4;
35240            if (mbsrtowcs (NULL, &src, 10, &state) != 3)
35241              result |= 4;
35242          }
35243    }
35244  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
35245    {
35246      const char input[] = "B\250\271\201\060\211\070er";
35247      mbstate_t state;
35248
35249      memset (&state, '\0', sizeof (mbstate_t));
35250      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
35251        if (!mbsinit (&state))
35252          {
35253            const char *src = input + 2;
35254            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
35255              result |= 8;
35256          }
35257    }
35258  return result;
35259}
35260_ACEOF
35261if ac_fn_c_try_run "$LINENO"
35262then :
35263  gl_cv_func_mbsrtowcs_works=yes
35264else $as_nop
35265  gl_cv_func_mbsrtowcs_works=no
35266fi
35267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35268  conftest.$ac_objext conftest.beam conftest.$ac_ext
35269fi
35270
35271      fi
35272
35273fi
35274{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
35275printf "%s\n" "$gl_cv_func_mbsrtowcs_works" >&6; }
35276
35277      case "$gl_cv_func_mbsrtowcs_works" in
35278        *yes) ;;
35279        *) REPLACE_MBSRTOWCS=1 ;;
35280      esac
35281    fi
35282  fi
35283
35284  if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
35285
35286
35287
35288
35289
35290
35291
35292
35293  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
35304
35305
35306  :
35307
35308  fi
35309
35310
35311
35312
35313
35314          GNULIB_MBSRTOWCS=1
35315
35316
35317
35318
35319
35320printf "%s\n" "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
35321
35322
35323
35324
35325
35326
35327  ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
35328if test "x$ac_cv_func_mbtowc" = xyes
35329then :
35330  printf "%s\n" "#define HAVE_MBTOWC 1" >>confdefs.h
35331
35332fi
35333
35334  if test $ac_cv_func_mbtowc = no; then
35335    HAVE_MBTOWC=0
35336  else
35337    if false; then
35338      REPLACE_MBTOWC=1
35339    fi
35340  fi
35341
35342  if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
35343
35344
35345
35346
35347
35348
35349
35350
35351  gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
35352
35353
35354  :
35355
35356  fi
35357
35358
35359
35360
35361
35362          GNULIB_MBTOWC=1
35363
35364
35365
35366
35367
35368printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
35369
35370
35371
35372
35373  if test $REPLACE_MEMCHR = 1; then
35374
35375
35376
35377
35378
35379
35380
35381
35382  gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
35383
35384
35385  ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
35386if test "x$ac_cv_header_bp_sym_h" = xyes
35387then :
35388  printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
35389
35390fi
35391
35392
35393  fi
35394
35395
35396
35397
35398
35399          GNULIB_MEMCHR=1
35400
35401
35402
35403
35404
35405printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
35406
35407
35408
35409
35410
35411
35412
35413
35414
35415  ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
35416if test "x$ac_cv_func_mempcpy" = xyes
35417then :
35418  printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
35419
35420fi
35421
35422  if test $ac_cv_func_mempcpy = no; then
35423    HAVE_MEMPCPY=0
35424  fi
35425
35426  if test $HAVE_MEMPCPY = 0; then
35427
35428
35429
35430
35431
35432
35433
35434
35435  gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
35436
35437
35438  :
35439
35440  fi
35441
35442
35443
35444
35445
35446          GNULIB_MEMPCPY=1
35447
35448
35449
35450
35451
35452printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
35453
35454
35455
35456
35457
35458
35459
35460
35461  if test $ac_cv_have_decl_memrchr = no; then
35462    HAVE_DECL_MEMRCHR=0
35463  fi
35464
35465  ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
35466if test "x$ac_cv_func_memrchr" = xyes
35467then :
35468  printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
35469
35470fi
35471
35472
35473  if test $ac_cv_func_memrchr = no; then
35474
35475
35476
35477
35478
35479
35480
35481
35482  gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
35483
35484    :
35485  fi
35486
35487
35488
35489
35490
35491          GNULIB_MEMRCHR=1
35492
35493
35494
35495
35496
35497printf "%s\n" "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
35498
35499
35500
35501
35502
35503
35504
35505
35506  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
35507printf %s "checking whether mkdir handles trailing slash... " >&6; }
35508if test ${gl_cv_func_mkdir_trailing_slash_works+y}
35509then :
35510  printf %s "(cached) " >&6
35511else $as_nop
35512  rm -rf conftest.dir
35513     if test "$cross_compiling" = yes
35514then :
35515  case "$host_os" in
35516                           # Guess yes on Linux systems.
35517          linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
35518                           # Guess yes on glibc systems.
35519          *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
35520                           # Guess yes on MSVC, no on mingw.
35521          mingw*)          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35522/* end confdefs.h.  */
35523
35524#ifdef _MSC_VER
35525 Known
35526#endif
35527
35528_ACEOF
35529if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35530  $EGREP "Known" >/dev/null 2>&1
35531then :
35532  gl_cv_func_mkdir_trailing_slash_works="guessing yes"
35533else $as_nop
35534  gl_cv_func_mkdir_trailing_slash_works="guessing no"
35535fi
35536rm -rf conftest*
35537
35538                           ;;
35539                           # If we don't know, obey --enable-cross-guesses.
35540          *)               gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
35541        esac
35542
35543else $as_nop
35544  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35545/* end confdefs.h.  */
35546
35547          #include <sys/types.h>
35548          #include <sys/stat.h>
35549
35550
35551$gl_mda_defines
35552
35553int
35554main (void)
35555{
35556return mkdir ("conftest.dir/", 0700);
35557  ;
35558  return 0;
35559}
35560_ACEOF
35561if ac_fn_c_try_run "$LINENO"
35562then :
35563  gl_cv_func_mkdir_trailing_slash_works=yes
35564else $as_nop
35565  gl_cv_func_mkdir_trailing_slash_works=no
35566fi
35567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35568  conftest.$ac_objext conftest.beam conftest.$ac_ext
35569fi
35570
35571     rm -rf conftest.dir
35572
35573fi
35574{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
35575printf "%s\n" "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
35576  case "$gl_cv_func_mkdir_trailing_slash_works" in
35577    *yes) ;;
35578    *)
35579      REPLACE_MKDIR=1
35580      ;;
35581  esac
35582
35583  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
35584printf %s "checking whether mkdir handles trailing dot... " >&6; }
35585if test ${gl_cv_func_mkdir_trailing_dot_works+y}
35586then :
35587  printf %s "(cached) " >&6
35588else $as_nop
35589  rm -rf conftest.dir
35590     if test "$cross_compiling" = yes
35591then :
35592  case "$host_os" in
35593                         # Guess yes on glibc systems.
35594          *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
35595                         # Guess yes on musl systems.
35596          *-musl*)       gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
35597                         # Guess no on native Windows.
35598          mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
35599                         # If we don't know, obey --enable-cross-guesses.
35600          *)             gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
35601        esac
35602
35603else $as_nop
35604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35605/* end confdefs.h.  */
35606
35607          #include <sys/types.h>
35608          #include <sys/stat.h>
35609
35610
35611$gl_mda_defines
35612
35613int
35614main (void)
35615{
35616return !mkdir ("conftest.dir/./", 0700);
35617  ;
35618  return 0;
35619}
35620_ACEOF
35621if ac_fn_c_try_run "$LINENO"
35622then :
35623  gl_cv_func_mkdir_trailing_dot_works=yes
35624else $as_nop
35625  gl_cv_func_mkdir_trailing_dot_works=no
35626fi
35627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35628  conftest.$ac_objext conftest.beam conftest.$ac_ext
35629fi
35630
35631     rm -rf conftest.dir
35632
35633
35634fi
35635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
35636printf "%s\n" "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
35637  case "$gl_cv_func_mkdir_trailing_dot_works" in
35638    *yes) ;;
35639    *)
35640      REPLACE_MKDIR=1
35641
35642printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
35643
35644      ;;
35645  esac
35646
35647  if test $REPLACE_MKDIR = 1; then
35648
35649
35650
35651
35652
35653
35654
35655
35656  gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
35657
35658  fi
35659
35660
35661
35662
35663
35664          GNULIB_MKDIR=1
35665
35666
35667
35668
35669
35670printf "%s\n" "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
35671
35672
35673
35674
35675
35676
35677
35678  if test $ac_cv_func_mkstemp = yes; then
35679    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
35680printf %s "checking for working mkstemp... " >&6; }
35681if test ${gl_cv_func_working_mkstemp+y}
35682then :
35683  printf %s "(cached) " >&6
35684else $as_nop
35685
35686        mkdir conftest.mkstemp
35687        if test "$cross_compiling" = yes
35688then :
35689  case "$host_os" in
35690                            # Guess yes on glibc systems.
35691             *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
35692                            # Guess yes on musl systems.
35693             *-musl*)       gl_cv_func_working_mkstemp="guessing yes" ;;
35694                            # Guess no on native Windows.
35695             mingw*)        gl_cv_func_working_mkstemp="guessing no" ;;
35696                            # If we don't know, obey --enable-cross-guesses.
35697             *)             gl_cv_func_working_mkstemp="$gl_cross_guess_normal" ;;
35698           esac
35699
35700else $as_nop
35701  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35702/* end confdefs.h.  */
35703$ac_includes_default
35704
35705
35706$gl_mda_defines
35707
35708int
35709main (void)
35710{
35711int result = 0;
35712              int i;
35713              off_t large = (off_t) 4294967295u;
35714              if (large < 0)
35715                large = 2147483647;
35716              umask (0);
35717              for (i = 0; i < 70; i++)
35718                {
35719                  char templ[] = "conftest.mkstemp/coXXXXXX";
35720                  int (*mkstemp_function) (char *) = mkstemp;
35721                  int fd = mkstemp_function (templ);
35722                  if (fd < 0)
35723                    result |= 1;
35724                  else
35725                    {
35726                      struct stat st;
35727                      if (lseek (fd, large, SEEK_SET) != large)
35728                        result |= 2;
35729                      if (fstat (fd, &st) < 0)
35730                        result |= 4;
35731                      else if (st.st_mode & 0077)
35732                        result |= 8;
35733                      if (close (fd))
35734                        result |= 16;
35735                    }
35736                }
35737              return result;
35738  ;
35739  return 0;
35740}
35741_ACEOF
35742if ac_fn_c_try_run "$LINENO"
35743then :
35744  gl_cv_func_working_mkstemp=yes
35745else $as_nop
35746  gl_cv_func_working_mkstemp=no
35747fi
35748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35749  conftest.$ac_objext conftest.beam conftest.$ac_ext
35750fi
35751
35752        rm -rf conftest.mkstemp
35753
35754fi
35755{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
35756printf "%s\n" "$gl_cv_func_working_mkstemp" >&6; }
35757    case "$gl_cv_func_working_mkstemp" in
35758      *yes) ;;
35759      *)
35760        REPLACE_MKSTEMP=1
35761        ;;
35762    esac
35763  else
35764    HAVE_MKSTEMP=0
35765  fi
35766
35767  if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
35768
35769
35770
35771
35772
35773
35774
35775
35776  gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
35777
35778
35779
35780  fi
35781
35782
35783
35784
35785
35786          GNULIB_MKSTEMP=1
35787
35788
35789
35790
35791
35792printf "%s\n" "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
35793
35794
35795
35796
35797  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
35798
35799
35800
35801
35802
35803
35804
35805
35806  gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
35807
35808  fi
35809
35810  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
35811
35812
35813
35814
35815
35816
35817
35818
35819  gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
35820
35821  fi
35822
35823
35824printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
35825
35826
35827
35828
35829
35830
35831
35832
35833
35834
35835
35836
35837
35838 nanosleep_save_libs=$LIBS
35839
35840 # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
35841 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
35842 LIB_NANOSLEEP=
35843
35844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
35845printf %s "checking for library containing nanosleep... " >&6; }
35846if test ${ac_cv_search_nanosleep+y}
35847then :
35848  printf %s "(cached) " >&6
35849else $as_nop
35850  ac_func_search_save_LIBS=$LIBS
35851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35852/* end confdefs.h.  */
35853
35854/* Override any GCC internal prototype to avoid an error.
35855   Use char because int might match the return type of a GCC
35856   builtin and then its argument prototype would still apply.  */
35857char nanosleep ();
35858int
35859main (void)
35860{
35861return nanosleep ();
35862  ;
35863  return 0;
35864}
35865_ACEOF
35866for ac_lib in '' rt posix4
35867do
35868  if test -z "$ac_lib"; then
35869    ac_res="none required"
35870  else
35871    ac_res=-l$ac_lib
35872    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
35873  fi
35874  if ac_fn_c_try_link "$LINENO"
35875then :
35876  ac_cv_search_nanosleep=$ac_res
35877fi
35878rm -f core conftest.err conftest.$ac_objext conftest.beam \
35879    conftest$ac_exeext
35880  if test ${ac_cv_search_nanosleep+y}
35881then :
35882  break
35883fi
35884done
35885if test ${ac_cv_search_nanosleep+y}
35886then :
35887
35888else $as_nop
35889  ac_cv_search_nanosleep=no
35890fi
35891rm conftest.$ac_ext
35892LIBS=$ac_func_search_save_LIBS
35893fi
35894{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
35895printf "%s\n" "$ac_cv_search_nanosleep" >&6; }
35896ac_res=$ac_cv_search_nanosleep
35897if test "$ac_res" != no
35898then :
35899  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
35900  test "$ac_cv_search_nanosleep" = "none required" ||
35901                 LIB_NANOSLEEP=$ac_cv_search_nanosleep
35902fi
35903
35904 if test "x$ac_cv_search_nanosleep" != xno; then
35905
35906
35907   if test $APPLE_UNIVERSAL_BUILD = 1; then
35908     # A universal build on Apple Mac OS X platforms.
35909     # The test result would be 'no (mishandles large arguments)' in 64-bit
35910     # mode but 'yes' in 32-bit mode. But we need a configuration result that
35911     # is valid in both modes.
35912     gl_cv_func_nanosleep='no (mishandles large arguments)'
35913   fi
35914
35915   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
35916printf %s "checking for working nanosleep... " >&6; }
35917if test ${gl_cv_func_nanosleep+y}
35918then :
35919  printf %s "(cached) " >&6
35920else $as_nop
35921
35922     if test "$cross_compiling" = yes
35923then :
35924  case "$host_os" in           linux*) # Guess it halfway works when the kernel is Linux.
35925            gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
35926          mingw*) # Guess no on native Windows.
35927            gl_cv_func_nanosleep='guessing no' ;;
35928          *)      # If we don't know, obey --enable-cross-guesses.
35929            gl_cv_func_nanosleep="$gl_cross_guess_normal" ;;
35930        esac
35931
35932else $as_nop
35933  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35934/* end confdefs.h.  */
35935
35936          #include <errno.h>
35937          #include <limits.h>
35938          #include <signal.h>
35939          #if HAVE_SYS_TIME_H
35940           #include <sys/time.h>
35941          #endif
35942          #include <time.h>
35943          #include <unistd.h>
35944          #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
35945          #define TYPE_MAXIMUM(t) \
35946            ((t) (! TYPE_SIGNED (t) \
35947                  ? (t) -1 \
35948                  : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
35949
35950          #if HAVE_DECL_ALARM
35951          static void
35952          check_for_SIGALRM (int sig)
35953          {
35954            if (sig != SIGALRM)
35955              _exit (1);
35956          }
35957          #endif
35958
35959          int
35960          main ()
35961          {
35962            static struct timespec ts_sleep;
35963            static struct timespec ts_remaining;
35964            /* Test for major problems first.  */
35965            if (! nanosleep)
35966              return 2;
35967            ts_sleep.tv_sec = 0;
35968            ts_sleep.tv_nsec = 1;
35969            #if HAVE_DECL_ALARM
35970            {
35971              static struct sigaction act;
35972              act.sa_handler = check_for_SIGALRM;
35973              sigemptyset (&act.sa_mask);
35974              sigaction (SIGALRM, &act, NULL);
35975              alarm (1);
35976              if (nanosleep (&ts_sleep, NULL) != 0)
35977                return 3;
35978              /* Test for a minor problem: the handling of large arguments.  */
35979              ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
35980              ts_sleep.tv_nsec = 999999999;
35981              alarm (1);
35982              if (nanosleep (&ts_sleep, &ts_remaining) != -1)
35983                return 4;
35984              if (errno != EINTR)
35985                return 5;
35986              if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
35987                return 6;
35988            }
35989            #else /* A simpler test for native Windows.  */
35990            if (nanosleep (&ts_sleep, &ts_remaining) < 0)
35991              return 3;
35992            #endif
35993            return 0;
35994          }
35995_ACEOF
35996if ac_fn_c_try_run "$LINENO"
35997then :
35998  gl_cv_func_nanosleep=yes
35999else $as_nop
36000  case $? in         4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';;         *)   gl_cv_func_nanosleep=no;;
36001        esac
36002fi
36003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36004  conftest.$ac_objext conftest.beam conftest.$ac_ext
36005fi
36006
36007
36008fi
36009{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
36010printf "%s\n" "$gl_cv_func_nanosleep" >&6; }
36011   case "$gl_cv_func_nanosleep" in
36012     *yes)
36013       REPLACE_NANOSLEEP=0
36014       ;;
36015     *)
36016       REPLACE_NANOSLEEP=1
36017       case "$gl_cv_func_nanosleep" in
36018         *"mishandles large arguments"*)
36019
36020printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
36021
36022           ;;
36023         *)
36024           # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP.
36025           for ac_lib in $LIBSOCKET; do
36026             case " $LIB_NANOSLEEP " in
36027               *" $ac_lib "*) ;;
36028               *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
36029             esac
36030           done
36031           ;;
36032       esac
36033       ;;
36034   esac
36035 else
36036   HAVE_NANOSLEEP=0
36037 fi
36038 LIBS=$nanosleep_save_libs
36039
36040  if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
36041
36042
36043
36044
36045
36046
36047
36048
36049  gl_LIBOBJS="$gl_LIBOBJS nanosleep.$ac_objext"
36050
36051
36052
36053  :
36054
36055  fi
36056
36057
36058
36059
36060
36061          GNULIB_NANOSLEEP=1
36062
36063
36064
36065
36066
36067printf "%s\n" "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h
36068
36069
36070
36071
36072
36073
36074
36075
36076
36077
36078
36079
36080
36081
36082     if test $gl_cv_have_include_next = yes; then
36083       gl_cv_next_netdb_h='<'netdb.h'>'
36084     else
36085       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
36086printf %s "checking absolute name of <netdb.h>... " >&6; }
36087if test ${gl_cv_next_netdb_h+y}
36088then :
36089  printf %s "(cached) " >&6
36090else $as_nop
36091
36092             if test $ac_cv_header_netdb_h = yes; then
36093
36094
36095
36096
36097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36098/* end confdefs.h.  */
36099#include <netdb.h>
36100_ACEOF
36101                case "$host_os" in
36102    aix*) gl_absname_cpp="$ac_cpp -C" ;;
36103    *)    gl_absname_cpp="$ac_cpp" ;;
36104  esac
36105
36106  case "$host_os" in
36107    mingw*)
36108                                          gl_dirsep_regex='[/\\]'
36109      ;;
36110    *)
36111      gl_dirsep_regex='\/'
36112      ;;
36113  esac
36114      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36115  gl_header_literal_regex=`echo 'netdb.h' \
36116                           | sed -e "$gl_make_literal_regex_sed"`
36117  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36118      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36119      s|^/[^/]|//&|
36120      p
36121      q
36122    }'
36123
36124        gl_cv_absolute_netdb_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36125  sed -n "$gl_absolute_header_sed"`
36126
36127           gl_header=$gl_cv_absolute_netdb_h
36128           gl_cv_next_netdb_h='"'$gl_header'"'
36129          else
36130               gl_cv_next_netdb_h='<'netdb.h'>'
36131             fi
36132
36133
36134fi
36135{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
36136printf "%s\n" "$gl_cv_next_netdb_h" >&6; }
36137     fi
36138     NEXT_NETDB_H=$gl_cv_next_netdb_h
36139
36140     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36141       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36142       gl_next_as_first_directive='<'netdb.h'>'
36143     else
36144       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36145       gl_next_as_first_directive=$gl_cv_next_netdb_h
36146     fi
36147     NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
36148
36149
36150
36151
36152  if test $ac_cv_header_netdb_h = yes; then
36153    HAVE_NETDB_H=1
36154  else
36155    HAVE_NETDB_H=0
36156  fi
36157
36158
36159
36160
36161
36162
36163
36164  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
36165printf %s "checking whether <netinet/in.h> is self-contained... " >&6; }
36166if test ${gl_cv_header_netinet_in_h_selfcontained+y}
36167then :
36168  printf %s "(cached) " >&6
36169else $as_nop
36170
36171      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36172/* end confdefs.h.  */
36173#include <netinet/in.h>
36174int
36175main (void)
36176{
36177
36178  ;
36179  return 0;
36180}
36181_ACEOF
36182if ac_fn_c_try_compile "$LINENO"
36183then :
36184  gl_cv_header_netinet_in_h_selfcontained=yes
36185else $as_nop
36186  gl_cv_header_netinet_in_h_selfcontained=no
36187fi
36188rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
36189
36190fi
36191{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
36192printf "%s\n" "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
36193  if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
36194    NETINET_IN_H=''
36195  else
36196    NETINET_IN_H='netinet/in.h'
36197    ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
36198if test "x$ac_cv_header_netinet_in_h" = xyes
36199then :
36200  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
36201
36202fi
36203
36204
36205
36206
36207
36208
36209
36210
36211
36212
36213     if test $gl_cv_have_include_next = yes; then
36214       gl_cv_next_netinet_in_h='<'netinet/in.h'>'
36215     else
36216       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
36217printf %s "checking absolute name of <netinet/in.h>... " >&6; }
36218if test ${gl_cv_next_netinet_in_h+y}
36219then :
36220  printf %s "(cached) " >&6
36221else $as_nop
36222
36223             if test $ac_cv_header_netinet_in_h = yes; then
36224
36225
36226
36227
36228  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36229/* end confdefs.h.  */
36230#include <netinet/in.h>
36231_ACEOF
36232                case "$host_os" in
36233    aix*) gl_absname_cpp="$ac_cpp -C" ;;
36234    *)    gl_absname_cpp="$ac_cpp" ;;
36235  esac
36236
36237  case "$host_os" in
36238    mingw*)
36239                                          gl_dirsep_regex='[/\\]'
36240      ;;
36241    *)
36242      gl_dirsep_regex='\/'
36243      ;;
36244  esac
36245      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36246  gl_header_literal_regex=`echo 'netinet/in.h' \
36247                           | sed -e "$gl_make_literal_regex_sed"`
36248  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36249      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36250      s|^/[^/]|//&|
36251      p
36252      q
36253    }'
36254
36255        gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36256  sed -n "$gl_absolute_header_sed"`
36257
36258           gl_header=$gl_cv_absolute_netinet_in_h
36259           gl_cv_next_netinet_in_h='"'$gl_header'"'
36260          else
36261               gl_cv_next_netinet_in_h='<'netinet/in.h'>'
36262             fi
36263
36264
36265fi
36266{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
36267printf "%s\n" "$gl_cv_next_netinet_in_h" >&6; }
36268     fi
36269     NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
36270
36271     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36272       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36273       gl_next_as_first_directive='<'netinet/in.h'>'
36274     else
36275       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36276       gl_next_as_first_directive=$gl_cv_next_netinet_in_h
36277     fi
36278     NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
36279
36280
36281
36282
36283    if test $ac_cv_header_netinet_in_h = yes; then
36284      HAVE_NETINET_IN_H=1
36285    else
36286      HAVE_NETINET_IN_H=0
36287    fi
36288
36289  fi
36290
36291   if test -n "$NETINET_IN_H"; then
36292  GL_GENERATE_NETINET_IN_H_TRUE=
36293  GL_GENERATE_NETINET_IN_H_FALSE='#'
36294else
36295  GL_GENERATE_NETINET_IN_H_TRUE='#'
36296  GL_GENERATE_NETINET_IN_H_FALSE=
36297fi
36298
36299
36300
36301
36302
36303
36304
36305
36306
36307
36308
36309  if test $ac_cv_func_nl_langinfo = yes; then
36310    # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
36311    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
36312printf %s "checking whether YESEXPR works... " >&6; }
36313if test ${gl_cv_func_nl_langinfo_yesexpr_works+y}
36314then :
36315  printf %s "(cached) " >&6
36316else $as_nop
36317  if test "$cross_compiling" = yes
36318then :
36319
36320         case "$host_os" in
36321                   # Guess no on irix systems.
36322           irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
36323                   # Guess yes elsewhere.
36324           *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
36325         esac
36326
36327else $as_nop
36328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36329/* end confdefs.h.  */
36330#include <langinfo.h>
36331
36332int
36333main (void)
36334{
36335return !*nl_langinfo(YESEXPR);
36336
36337  ;
36338  return 0;
36339}
36340_ACEOF
36341if ac_fn_c_try_run "$LINENO"
36342then :
36343  gl_cv_func_nl_langinfo_yesexpr_works=yes
36344else $as_nop
36345  gl_cv_func_nl_langinfo_yesexpr_works=no
36346fi
36347rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36348  conftest.$ac_objext conftest.beam conftest.$ac_ext
36349fi
36350
36351
36352fi
36353{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
36354printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
36355    case $gl_cv_func_nl_langinfo_yesexpr_works in
36356      *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
36357      *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
36358    esac
36359
36360printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h
36361
36362    # On Solaris 10 and Solaris 11.3, nl_langinfo is not multithread-safe.
36363    case "$host_os" in
36364      solaris*) NL_LANGINFO_MTSAFE=0 ;;
36365      *)        NL_LANGINFO_MTSAFE=1 ;;
36366    esac
36367
36368printf "%s\n" "#define NL_LANGINFO_MTSAFE $NL_LANGINFO_MTSAFE" >>confdefs.h
36369
36370    if test $HAVE_LANGINFO_CODESET = 1 \
36371       && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
36372       && test $HAVE_LANGINFO_ALTMON = 1 \
36373       && test $HAVE_LANGINFO_ERA = 1 \
36374       && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1 \
36375       && test $NL_LANGINFO_MTSAFE = 1; then
36376      :
36377    else
36378      REPLACE_NL_LANGINFO=1
36379
36380printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
36381
36382    fi
36383  else
36384    HAVE_NL_LANGINFO=0
36385  fi
36386  if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
36387    LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL"
36388  else
36389    LIB_NL_LANGINFO=
36390  fi
36391
36392
36393  if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
36394
36395
36396
36397
36398
36399
36400
36401
36402  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
36403
36404  fi
36405  if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
36406
36407
36408
36409
36410
36411
36412
36413
36414  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo-lock.$ac_objext"
36415
36416
36417
36418
36419  CFLAG_VISIBILITY=
36420  HAVE_VISIBILITY=0
36421  if test -n "$GCC"; then
36422                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
36423printf %s "checking whether the -Werror option is usable... " >&6; }
36424if test ${gl_cv_cc_vis_werror+y}
36425then :
36426  printf %s "(cached) " >&6
36427else $as_nop
36428  gl_save_CFLAGS="$CFLAGS"
36429       CFLAGS="$CFLAGS -Werror"
36430       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36431/* end confdefs.h.  */
36432
36433int
36434main (void)
36435{
36436
36437  ;
36438  return 0;
36439}
36440_ACEOF
36441if ac_fn_c_try_compile "$LINENO"
36442then :
36443  gl_cv_cc_vis_werror=yes
36444else $as_nop
36445  gl_cv_cc_vis_werror=no
36446fi
36447rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
36448       CFLAGS="$gl_save_CFLAGS"
36449
36450fi
36451{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
36452printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
36453        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
36454printf %s "checking for simple visibility declarations... " >&6; }
36455if test ${gl_cv_cc_visibility+y}
36456then :
36457  printf %s "(cached) " >&6
36458else $as_nop
36459  gl_save_CFLAGS="$CFLAGS"
36460       CFLAGS="$CFLAGS -fvisibility=hidden"
36461                                          if test $gl_cv_cc_vis_werror = yes; then
36462         CFLAGS="$CFLAGS -Werror"
36463       fi
36464       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36465/* end confdefs.h.  */
36466extern __attribute__((__visibility__("hidden"))) int hiddenvar;
36467              extern __attribute__((__visibility__("default"))) int exportedvar;
36468              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
36469              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
36470              void dummyfunc (void) {}
36471
36472int
36473main (void)
36474{
36475
36476  ;
36477  return 0;
36478}
36479_ACEOF
36480if ac_fn_c_try_compile "$LINENO"
36481then :
36482  gl_cv_cc_visibility=yes
36483else $as_nop
36484  gl_cv_cc_visibility=no
36485fi
36486rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
36487       CFLAGS="$gl_save_CFLAGS"
36488
36489fi
36490{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
36491printf "%s\n" "$gl_cv_cc_visibility" >&6; }
36492    if test $gl_cv_cc_visibility = yes; then
36493      CFLAG_VISIBILITY="-fvisibility=hidden"
36494      HAVE_VISIBILITY=1
36495    fi
36496  fi
36497
36498
36499
36500printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
36501
36502
36503
36504  fi
36505
36506
36507
36508
36509
36510          GNULIB_NL_LANGINFO=1
36511
36512
36513
36514
36515
36516printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
36517
36518
36519
36520
36521
36522
36523  case "$host_os" in
36524    mingw* | pw*)
36525      REPLACE_OPEN=1
36526      ;;
36527    *)
36528
36529      if test "$gl_cv_macro_O_CLOEXEC" != yes; then
36530        REPLACE_OPEN=1
36531      fi
36532
36533
36534  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
36535printf %s "checking whether open recognizes a trailing slash... " >&6; }
36536if test ${gl_cv_func_open_slash+y}
36537then :
36538  printf %s "(cached) " >&6
36539else $as_nop
36540  # Assume that if we have lstat, we can also check symlinks.
36541     if test $ac_cv_func_lstat = yes; then
36542       touch conftest.tmp
36543       ln -s conftest.tmp conftest.lnk
36544     fi
36545     if test "$cross_compiling" = yes
36546then :
36547
36548        case "$host_os" in
36549          freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
36550            gl_cv_func_open_slash="guessing no" ;;
36551          *)
36552            gl_cv_func_open_slash="guessing yes" ;;
36553        esac
36554
36555else $as_nop
36556  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36557/* end confdefs.h.  */
36558
36559#include <fcntl.h>
36560#if HAVE_UNISTD_H
36561# include <unistd.h>
36562#endif
36563
36564
36565$gl_mda_defines
36566
36567int main ()
36568{
36569  int result = 0;
36570#if HAVE_LSTAT
36571  if (open ("conftest.lnk/", O_RDONLY) != -1)
36572    result |= 1;
36573#endif
36574  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
36575    result |= 2;
36576  return result;
36577}
36578_ACEOF
36579if ac_fn_c_try_run "$LINENO"
36580then :
36581  gl_cv_func_open_slash=yes
36582else $as_nop
36583  gl_cv_func_open_slash=no
36584fi
36585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36586  conftest.$ac_objext conftest.beam conftest.$ac_ext
36587fi
36588
36589     rm -f conftest.sl conftest.tmp conftest.lnk
36590
36591fi
36592{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
36593printf "%s\n" "$gl_cv_func_open_slash" >&6; }
36594  case "$gl_cv_func_open_slash" in
36595    *no)
36596
36597printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
36598
36599      ;;
36600  esac
36601
36602      case "$gl_cv_func_open_slash" in
36603        *no)
36604          REPLACE_OPEN=1
36605          ;;
36606      esac
36607      ;;
36608  esac
36609
36610    if test $REPLACE_OPEN = 0; then
36611
36612
36613
36614  if test $ac_cv_func_fchdir = no; then
36615    HAVE_FCHDIR=0
36616  fi
36617
36618      if test $HAVE_FCHDIR = 0; then
36619        REPLACE_OPEN=1
36620      fi
36621    fi
36622
36623
36624
36625  if test $REPLACE_OPEN = 1; then
36626
36627
36628
36629
36630
36631
36632
36633
36634  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
36635
36636
36637
36638  :
36639
36640  fi
36641
36642
36643
36644
36645
36646          GNULIB_OPEN=1
36647
36648
36649
36650
36651
36652printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
36653
36654
36655
36656
36657
36658
36659
36660
36661
36662  case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
36663  yes+*yes+yes)
36664    ;;
36665  yes+*)
36666    # Solaris 10 lacks O_CLOEXEC.
36667    # Solaris 9 has *at functions, but uniformly mishandles trailing
36668    # slash in all of them.
36669    REPLACE_OPENAT=1
36670    ;;
36671  *)
36672    HAVE_OPENAT=0
36673    ;;
36674  esac
36675
36676  if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
36677
36678
36679
36680
36681
36682
36683
36684
36685  gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
36686
36687
36688
36689  :
36690
36691  fi
36692
36693
36694printf "%s\n" "#define GNULIB_OPENAT 1" >>confdefs.h
36695
36696
36697
36698
36699
36700
36701          GNULIB_OPENAT=1
36702
36703
36704
36705
36706
36707printf "%s\n" "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
36708
36709
36710
36711
36712
36713
36714  ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
36715if test "x$ac_cv_func_opendir" = xyes
36716then :
36717  printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
36718
36719fi
36720
36721  if test $ac_cv_func_opendir = no; then
36722    HAVE_OPENDIR=0
36723  fi
36724
36725
36726
36727
36728  if test $ac_cv_func_fchdir = no; then
36729    HAVE_FCHDIR=0
36730  fi
36731
36732    if test $HAVE_FCHDIR = 0; then
36733      if test $HAVE_OPENDIR = 1; then
36734        REPLACE_OPENDIR=1
36735      fi
36736    fi
36737
36738      case $host_os,$HAVE_OPENDIR in
36739    os2*,1)
36740      REPLACE_OPENDIR=1;;
36741  esac
36742
36743  if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
36744
36745
36746
36747
36748
36749
36750
36751
36752  gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
36753
36754  fi
36755
36756
36757
36758
36759
36760          GNULIB_OPENDIR=1
36761
36762
36763
36764
36765
36766printf "%s\n" "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
36767
36768
36769
36770
36771
36772
36773
36774
36775
36776  if test $ac_cv_func_pclose = no; then
36777    HAVE_PCLOSE=0
36778  fi
36779
36780  if test $HAVE_PCLOSE = 0; then
36781
36782
36783
36784
36785
36786
36787
36788
36789  gl_LIBOBJS="$gl_LIBOBJS pclose.$ac_objext"
36790
36791
36792  :
36793
36794  fi
36795
36796
36797
36798
36799
36800          GNULIB_PCLOSE=1
36801
36802
36803
36804
36805
36806printf "%s\n" "#define GNULIB_TEST_PCLOSE 1" >>confdefs.h
36807
36808
36809
36810
36811
36812
36813
36814  if test $ac_cv_func_pipe != yes; then
36815    HAVE_PIPE=0
36816  fi
36817
36818  if test $HAVE_PIPE = 0; then
36819
36820
36821
36822
36823
36824
36825
36826
36827  gl_LIBOBJS="$gl_LIBOBJS pipe.$ac_objext"
36828
36829  fi
36830
36831
36832
36833
36834
36835          GNULIB_PIPE=1
36836
36837
36838
36839
36840
36841printf "%s\n" "#define GNULIB_TEST_PIPE 1" >>confdefs.h
36842
36843
36844
36845
36846
36847
36848
36849
36850
36851  if test $ac_cv_func_pipe2 != yes; then
36852    HAVE_PIPE2=0
36853  fi
36854
36855
36856
36857
36858
36859
36860          GNULIB_PIPE2=1
36861
36862
36863
36864
36865
36866printf "%s\n" "#define GNULIB_TEST_PIPE2 1" >>confdefs.h
36867
36868
36869
36870
36871
36872printf "%s\n" "#define GNULIB_PIPE2_SAFER 1" >>confdefs.h
36873
36874
36875
36876
36877
36878     if test $ac_cv_header_poll_h = no; then
36879    ac_cv_func_poll=no
36880    gl_cv_func_poll=no
36881  else
36882    ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
36883if test "x$ac_cv_func_poll" = xyes
36884then :
36885  # Check whether poll() works on special files (like /dev/null) and
36886       # and ttys (like /dev/tty). On Mac OS X 10.4.0 and AIX 5.3, it doesn't.
36887       if test "$cross_compiling" = yes
36888then :
36889  # When cross-compiling, assume that poll() works everywhere except on
36890          # Mac OS X or AIX, regardless of its version.
36891          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36892/* end confdefs.h.  */
36893
36894#if (defined(__APPLE__) && defined(__MACH__)) || defined(_AIX)
36895This is MacOSX or AIX
36896#endif
36897
36898_ACEOF
36899if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36900  $EGREP "MacOSX" >/dev/null 2>&1
36901then :
36902  gl_cv_func_poll="guessing no"
36903else $as_nop
36904  gl_cv_func_poll="guessing yes"
36905fi
36906rm -rf conftest*
36907
36908else $as_nop
36909  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36910/* end confdefs.h.  */
36911
36912#include <fcntl.h>
36913#include <poll.h>
36914
36915
36916$gl_mda_defines
36917
36918         int main()
36919         {
36920           int result = 0;
36921           struct pollfd ufd;
36922           /* Try /dev/null for reading.  */
36923           ufd.fd = open ("/dev/null", O_RDONLY);
36924           /* If /dev/null does not exist, it's not Mac OS X nor AIX. */
36925           if (ufd.fd >= 0)
36926             {
36927               ufd.events = POLLIN;
36928               ufd.revents = 0;
36929               if (!(poll (&ufd, 1, 0) == 1 && ufd.revents == POLLIN))
36930                 result |= 1;
36931             }
36932           /* Try /dev/null for writing.  */
36933           ufd.fd = open ("/dev/null", O_WRONLY);
36934           /* If /dev/null does not exist, it's not Mac OS X nor AIX. */
36935           if (ufd.fd >= 0)
36936             {
36937               ufd.events = POLLOUT;
36938               ufd.revents = 0;
36939               if (!(poll (&ufd, 1, 0) == 1 && ufd.revents == POLLOUT))
36940                 result |= 2;
36941             }
36942           /* Trying /dev/tty may be too environment dependent.  */
36943           return result;
36944         }
36945_ACEOF
36946if ac_fn_c_try_run "$LINENO"
36947then :
36948  gl_cv_func_poll=yes
36949else $as_nop
36950  gl_cv_func_poll=no
36951fi
36952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36953  conftest.$ac_objext conftest.beam conftest.$ac_ext
36954fi
36955
36956fi
36957
36958  fi
36959  case "$gl_cv_func_poll" in
36960    *yes) ;;
36961    *)
36962      ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
36963if test "x$ac_cv_func_poll" = xyes
36964then :
36965  ac_cv_func_poll=yes
36966else $as_nop
36967  ac_cv_func_poll=no
36968fi
36969
36970      if test $ac_cv_func_poll = no; then
36971        HAVE_POLL=0
36972      else
36973        REPLACE_POLL=1
36974      fi
36975      ;;
36976  esac
36977  if test $HAVE_POLL = 0 || test $REPLACE_POLL = 1; then
36978    :
36979  else
36980
36981printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h
36982
36983  fi
36984
36985    LIB_POLL="$LIBSOCKET"
36986  if test $HAVE_POLL = 0 || test $REPLACE_POLL = 1; then
36987    case "$host_os" in
36988      mingw*)
36989                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36990/* end confdefs.h.  */
36991
36992#define WIN32_LEAN_AND_MEAN
36993#include <windows.h>
36994int
36995main ()
36996{
36997  MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
36998  return 0;
36999}
37000_ACEOF
37001if ac_fn_c_try_link "$LINENO"
37002then :
37003
37004else $as_nop
37005  LIB_POLL="$LIB_POLL -luser32"
37006fi
37007rm -f core conftest.err conftest.$ac_objext conftest.beam \
37008    conftest$ac_exeext conftest.$ac_ext
37009        ;;
37010    esac
37011  fi
37012
37013
37014  if test $HAVE_POLL = 0 || test $REPLACE_POLL = 1; then
37015
37016
37017
37018
37019
37020
37021
37022
37023  gl_LIBOBJS="$gl_LIBOBJS poll.$ac_objext"
37024
37025
37026
37027
37028  fi
37029
37030
37031
37032
37033
37034          GNULIB_POLL=1
37035
37036
37037
37038
37039
37040printf "%s\n" "#define GNULIB_TEST_POLL 1" >>confdefs.h
37041
37042
37043
37044
37045
37046
37047
37048  if test $ac_cv_header_poll_h = yes; then
37049    HAVE_POLL_H=1
37050  else
37051    HAVE_POLL_H=0
37052  fi
37053
37054
37055
37056
37057
37058
37059
37060
37061
37062
37063
37064     if test $gl_cv_have_include_next = yes; then
37065       gl_cv_next_poll_h='<'poll.h'>'
37066     else
37067       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <poll.h>" >&5
37068printf %s "checking absolute name of <poll.h>... " >&6; }
37069if test ${gl_cv_next_poll_h+y}
37070then :
37071  printf %s "(cached) " >&6
37072else $as_nop
37073
37074             if test $ac_cv_header_poll_h = yes; then
37075
37076
37077
37078
37079  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37080/* end confdefs.h.  */
37081#include <poll.h>
37082_ACEOF
37083                case "$host_os" in
37084    aix*) gl_absname_cpp="$ac_cpp -C" ;;
37085    *)    gl_absname_cpp="$ac_cpp" ;;
37086  esac
37087
37088  case "$host_os" in
37089    mingw*)
37090                                          gl_dirsep_regex='[/\\]'
37091      ;;
37092    *)
37093      gl_dirsep_regex='\/'
37094      ;;
37095  esac
37096      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
37097  gl_header_literal_regex=`echo 'poll.h' \
37098                           | sed -e "$gl_make_literal_regex_sed"`
37099  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
37100      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
37101      s|^/[^/]|//&|
37102      p
37103      q
37104    }'
37105
37106        gl_cv_absolute_poll_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37107  sed -n "$gl_absolute_header_sed"`
37108
37109           gl_header=$gl_cv_absolute_poll_h
37110           gl_cv_next_poll_h='"'$gl_header'"'
37111          else
37112               gl_cv_next_poll_h='<'poll.h'>'
37113             fi
37114
37115
37116fi
37117{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_poll_h" >&5
37118printf "%s\n" "$gl_cv_next_poll_h" >&6; }
37119     fi
37120     NEXT_POLL_H=$gl_cv_next_poll_h
37121
37122     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37123       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37124       gl_next_as_first_directive='<'poll.h'>'
37125     else
37126       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37127       gl_next_as_first_directive=$gl_cv_next_poll_h
37128     fi
37129     NEXT_AS_FIRST_DIRECTIVE_POLL_H=$gl_next_as_first_directive
37130
37131
37132
37133
37134
37135
37136
37137
37138
37139  if test $ac_cv_header_sys_socket_h != yes; then
37140                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
37141if test "x$ac_cv_header_winsock2_h" = xyes
37142then :
37143  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
37144
37145fi
37146
37147  fi
37148  if test "$ac_cv_header_winsock2_h" = yes; then
37149    HAVE_WINSOCK2_H=1
37150    UNISTD_H_HAVE_WINSOCK2_H=1
37151    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
37152  else
37153    HAVE_WINSOCK2_H=0
37154  fi
37155
37156
37157
37158
37159
37160
37161
37162
37163
37164  if test $ac_cv_func_popen = no; then
37165    HAVE_POPEN=0
37166  else
37167    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether popen works with closed stdin" >&5
37168printf %s "checking whether popen works with closed stdin... " >&6; }
37169if test ${gl_cv_func_popen_works+y}
37170then :
37171  printf %s "(cached) " >&6
37172else $as_nop
37173
37174        if test "$cross_compiling" = yes
37175then :
37176  case "$host_os" in
37177                      # For now, only cygwin 1.5 or older is known to be broken.
37178             cygwin*) gl_cv_func_popen_works="guessing no" ;;
37179                      # Guess yes on native Windows.
37180             mingw*)  gl_cv_func_popen_works="guessing yes" ;;
37181             *)       gl_cv_func_popen_works="guessing yes" ;;
37182           esac
37183
37184else $as_nop
37185  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37186/* end confdefs.h.  */
37187#include <stdio.h>
37188int
37189main (void)
37190{
37191int result = 0;
37192               FILE *child;
37193               fclose (stdin);
37194               fclose (stdout);
37195               child = popen ("echo a", "r");
37196               if (fgetc (child) != 'a')
37197                 result |= 1;
37198               if (pclose (child) != 0)
37199                 result |= 2;
37200               return result;
37201
37202  ;
37203  return 0;
37204}
37205_ACEOF
37206if ac_fn_c_try_run "$LINENO"
37207then :
37208  gl_cv_func_popen_works=yes
37209else $as_nop
37210  gl_cv_func_popen_works=no
37211fi
37212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37213  conftest.$ac_objext conftest.beam conftest.$ac_ext
37214fi
37215
37216
37217fi
37218{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_popen_works" >&5
37219printf "%s\n" "$gl_cv_func_popen_works" >&6; }
37220    case "$gl_cv_func_popen_works" in
37221      *yes) ;;
37222      *) REPLACE_POPEN=1 ;;
37223    esac
37224  fi
37225
37226  if test $HAVE_POPEN = 0 || test $REPLACE_POPEN = 1; then
37227
37228
37229
37230
37231
37232
37233
37234
37235  gl_LIBOBJS="$gl_LIBOBJS popen.$ac_objext"
37236
37237
37238  :
37239
37240  fi
37241
37242
37243
37244
37245
37246          GNULIB_POPEN=1
37247
37248
37249
37250
37251
37252printf "%s\n" "#define GNULIB_TEST_POPEN 1" >>confdefs.h
37253
37254
37255
37256
37257
37258
37259  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
37260
37261
37262
37263
37264
37265
37266
37267
37268  gl_LIBOBJS="$gl_LIBOBJS spawn.$ac_objext"
37269
37270  fi
37271
37272
37273
37274
37275
37276          GNULIB_POSIX_SPAWN=1
37277
37278
37279
37280
37281
37282printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN 1" >>confdefs.h
37283
37284
37285
37286
37287
37288
37289  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
37290
37291
37292
37293
37294
37295
37296
37297
37298  gl_LIBOBJS="$gl_LIBOBJS spawni.$ac_objext"
37299
37300
37301  ac_fn_c_check_header_compile "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
37302if test "x$ac_cv_header_paths_h" = xyes
37303then :
37304  printf "%s\n" "#define HAVE_PATHS_H 1" >>confdefs.h
37305
37306fi
37307
37308  ac_fn_c_check_func "$LINENO" "confstr" "ac_cv_func_confstr"
37309if test "x$ac_cv_func_confstr" = xyes
37310then :
37311  printf "%s\n" "#define HAVE_CONFSTR 1" >>confdefs.h
37312
37313fi
37314ac_fn_c_check_func "$LINENO" "sched_setparam" "ac_cv_func_sched_setparam"
37315if test "x$ac_cv_func_sched_setparam" = xyes
37316then :
37317  printf "%s\n" "#define HAVE_SCHED_SETPARAM 1" >>confdefs.h
37318
37319fi
37320ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler"
37321if test "x$ac_cv_func_sched_setscheduler" = xyes
37322then :
37323  printf "%s\n" "#define HAVE_SCHED_SETSCHEDULER 1" >>confdefs.h
37324
37325fi
37326ac_fn_c_check_func "$LINENO" "setegid" "ac_cv_func_setegid"
37327if test "x$ac_cv_func_setegid" = xyes
37328then :
37329  printf "%s\n" "#define HAVE_SETEGID 1" >>confdefs.h
37330
37331fi
37332ac_fn_c_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid"
37333if test "x$ac_cv_func_seteuid" = xyes
37334then :
37335  printf "%s\n" "#define HAVE_SETEUID 1" >>confdefs.h
37336
37337fi
37338ac_fn_c_check_func "$LINENO" "vfork" "ac_cv_func_vfork"
37339if test "x$ac_cv_func_vfork" = xyes
37340then :
37341  printf "%s\n" "#define HAVE_VFORK 1" >>confdefs.h
37342
37343fi
37344
37345
37346  fi
37347
37348
37349
37350
37351
37352
37353
37354  if test $ac_cv_func_posix_spawn_file_actions_addchdir = yes; then
37355            REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1
37356  else
37357    HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0
37358  fi
37359
37360  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
37361
37362
37363
37364
37365
37366
37367
37368
37369  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addchdir.$ac_objext"
37370
37371  fi
37372
37373
37374
37375
37376
37377          GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1
37378
37379
37380
37381
37382
37383printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR 1" >>confdefs.h
37384
37385
37386
37387
37388
37389
37390
37391
37392
37393  if test $REPLACE_POSIX_SPAWN = 1; then
37394    REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
37395  else
37396            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addclose works" >&5
37397printf %s "checking whether posix_spawn_file_actions_addclose works... " >&6; }
37398if test ${gl_cv_func_posix_spawn_file_actions_addclose_works+y}
37399then :
37400  printf %s "(cached) " >&6
37401else $as_nop
37402  if test "$cross_compiling" = yes
37403then :
37404  # Guess no on musl libc and Solaris, yes otherwise.
37405          case "$host_os" in
37406            *-musl*)  gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
37407            solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
37408                      # Guess no on native Windows.
37409            mingw*)   gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no" ;;
37410            *)        gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes" ;;
37411          esac
37412
37413else $as_nop
37414  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37415/* end confdefs.h.  */
37416
37417#include <spawn.h>
37418int main ()
37419{
37420  posix_spawn_file_actions_t actions;
37421  if (posix_spawn_file_actions_init (&actions) != 0)
37422    return 1;
37423  if (posix_spawn_file_actions_addclose (&actions, -5) == 0)
37424    return 2;
37425  return 0;
37426}
37427_ACEOF
37428if ac_fn_c_try_run "$LINENO"
37429then :
37430  gl_cv_func_posix_spawn_file_actions_addclose_works=yes
37431else $as_nop
37432  gl_cv_func_posix_spawn_file_actions_addclose_works=no
37433fi
37434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37435  conftest.$ac_objext conftest.beam conftest.$ac_ext
37436fi
37437
37438
37439fi
37440{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addclose_works" >&5
37441printf "%s\n" "$gl_cv_func_posix_spawn_file_actions_addclose_works" >&6; }
37442    case "$gl_cv_func_posix_spawn_file_actions_addclose_works" in
37443      *yes) ;;
37444      *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;;
37445    esac
37446  fi
37447
37448  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then
37449
37450
37451
37452
37453
37454
37455
37456
37457  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addclose.$ac_objext"
37458
37459  fi
37460
37461
37462
37463
37464
37465          GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
37466
37467
37468
37469
37470
37471printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
37472
37473
37474
37475
37476
37477
37478
37479
37480
37481  if test $REPLACE_POSIX_SPAWN = 1; then
37482    REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
37483  else
37484            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_adddup2 works" >&5
37485printf %s "checking whether posix_spawn_file_actions_adddup2 works... " >&6; }
37486if test ${gl_cv_func_posix_spawn_file_actions_adddup2_works+y}
37487then :
37488  printf %s "(cached) " >&6
37489else $as_nop
37490  if test "$cross_compiling" = yes
37491then :
37492  # Guess no on musl libc and Solaris, yes otherwise.
37493          case "$host_os" in
37494            *-musl*)  gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
37495            solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
37496                      # Guess no on native Windows.
37497            mingw*)   gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no" ;;
37498            *)        gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";;
37499          esac
37500
37501else $as_nop
37502  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37503/* end confdefs.h.  */
37504
37505#include <spawn.h>
37506int main ()
37507{
37508  posix_spawn_file_actions_t actions;
37509  if (posix_spawn_file_actions_init (&actions) != 0)
37510    return 1;
37511  if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0)
37512    return 2;
37513  return 0;
37514}
37515_ACEOF
37516if ac_fn_c_try_run "$LINENO"
37517then :
37518  gl_cv_func_posix_spawn_file_actions_adddup2_works=yes
37519else $as_nop
37520  gl_cv_func_posix_spawn_file_actions_adddup2_works=no
37521fi
37522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37523  conftest.$ac_objext conftest.beam conftest.$ac_ext
37524fi
37525
37526
37527fi
37528{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_adddup2_works" >&5
37529printf "%s\n" "$gl_cv_func_posix_spawn_file_actions_adddup2_works" >&6; }
37530    case "$gl_cv_func_posix_spawn_file_actions_adddup2_works" in
37531      *yes) ;;
37532      *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;;
37533    esac
37534  fi
37535
37536  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then
37537
37538
37539
37540
37541
37542
37543
37544
37545  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_adddup2.$ac_objext"
37546
37547  fi
37548
37549
37550
37551
37552
37553          GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
37554
37555
37556
37557
37558
37559printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
37560
37561
37562
37563
37564
37565
37566
37567
37568
37569  if test $REPLACE_POSIX_SPAWN = 1; then
37570    REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
37571  else
37572            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addopen works" >&5
37573printf %s "checking whether posix_spawn_file_actions_addopen works... " >&6; }
37574if test ${gl_cv_func_posix_spawn_file_actions_addopen_works+y}
37575then :
37576  printf %s "(cached) " >&6
37577else $as_nop
37578  if test "$cross_compiling" = yes
37579then :
37580  # Guess no on musl libc and Solaris, yes otherwise.
37581          case "$host_os" in
37582            *-musl*)  gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
37583            solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
37584                      # Guess no on native Windows.
37585            mingw*)   gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no" ;;
37586            *)        gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";;
37587          esac
37588
37589else $as_nop
37590  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37591/* end confdefs.h.  */
37592
37593#include <spawn.h>
37594#include <fcntl.h>
37595int main ()
37596{
37597  posix_spawn_file_actions_t actions;
37598  if (posix_spawn_file_actions_init (&actions) != 0)
37599    return 1;
37600  if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY)
37601      == 0)
37602    return 2;
37603  return 0;
37604}
37605_ACEOF
37606if ac_fn_c_try_run "$LINENO"
37607then :
37608  gl_cv_func_posix_spawn_file_actions_addopen_works=yes
37609else $as_nop
37610  gl_cv_func_posix_spawn_file_actions_addopen_works=no
37611fi
37612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37613  conftest.$ac_objext conftest.beam conftest.$ac_ext
37614fi
37615
37616
37617fi
37618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addopen_works" >&5
37619printf "%s\n" "$gl_cv_func_posix_spawn_file_actions_addopen_works" >&6; }
37620    case "$gl_cv_func_posix_spawn_file_actions_addopen_works" in
37621      *yes) ;;
37622      *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;;
37623    esac
37624  fi
37625
37626  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then
37627
37628
37629
37630
37631
37632
37633
37634
37635  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addopen.$ac_objext"
37636
37637  fi
37638
37639
37640
37641
37642
37643          GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
37644
37645
37646
37647
37648
37649printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
37650
37651
37652
37653
37654
37655
37656  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
37657
37658
37659
37660
37661
37662
37663
37664
37665  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_destroy.$ac_objext"
37666
37667  fi
37668
37669
37670
37671
37672
37673          GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
37674
37675
37676
37677
37678
37679printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
37680
37681
37682
37683
37684
37685
37686  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
37687
37688
37689
37690
37691
37692
37693
37694
37695  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_init.$ac_objext"
37696
37697  fi
37698
37699
37700
37701
37702
37703          GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
37704
37705
37706
37707
37708
37709printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
37710
37711
37712
37713
37714
37715
37716  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
37717
37718
37719
37720
37721
37722
37723
37724
37725  gl_LIBOBJS="$gl_LIBOBJS spawnattr_destroy.$ac_objext"
37726
37727  fi
37728
37729
37730
37731
37732
37733          GNULIB_POSIX_SPAWNATTR_DESTROY=1
37734
37735
37736
37737
37738
37739printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
37740
37741
37742
37743
37744
37745
37746  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
37747
37748
37749
37750
37751
37752
37753
37754
37755  gl_LIBOBJS="$gl_LIBOBJS spawnattr_init.$ac_objext"
37756
37757  fi
37758
37759
37760
37761
37762
37763          GNULIB_POSIX_SPAWNATTR_INIT=1
37764
37765
37766
37767
37768
37769printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
37770
37771
37772
37773
37774
37775
37776  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
37777
37778
37779
37780
37781
37782
37783
37784
37785  gl_LIBOBJS="$gl_LIBOBJS spawnattr_setflags.$ac_objext"
37786
37787  fi
37788
37789
37790
37791
37792
37793          GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
37794
37795
37796
37797
37798
37799printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
37800
37801
37802
37803
37804
37805
37806  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
37807
37808
37809
37810
37811
37812
37813
37814
37815  gl_LIBOBJS="$gl_LIBOBJS spawnattr_setpgroup.$ac_objext"
37816
37817  fi
37818
37819
37820
37821
37822
37823          GNULIB_POSIX_SPAWNATTR_SETPGROUP=1
37824
37825
37826
37827
37828
37829printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_SETPGROUP 1" >>confdefs.h
37830
37831
37832
37833
37834
37835
37836  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
37837
37838
37839
37840
37841
37842
37843
37844
37845  gl_LIBOBJS="$gl_LIBOBJS spawnattr_setsigmask.$ac_objext"
37846
37847  fi
37848
37849
37850
37851
37852
37853          GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
37854
37855
37856
37857
37858
37859printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
37860
37861
37862
37863
37864
37865
37866  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
37867
37868
37869
37870
37871
37872
37873
37874
37875  gl_LIBOBJS="$gl_LIBOBJS spawnp.$ac_objext"
37876
37877  fi
37878
37879
37880
37881
37882
37883          GNULIB_POSIX_SPAWNP=1
37884
37885
37886
37887
37888
37889printf "%s\n" "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
37890
37891
37892
37893  ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
37894" "$ac_c_undeclared_builtin_options" "CFLAGS"
37895if test "x$ac_cv_have_decl_program_invocation_name" = xyes
37896then :
37897  ac_have_decl=1
37898else $as_nop
37899  ac_have_decl=0
37900fi
37901printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
37902
37903  ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
37904" "$ac_c_undeclared_builtin_options" "CFLAGS"
37905if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
37906then :
37907  ac_have_decl=1
37908else $as_nop
37909  ac_have_decl=0
37910fi
37911printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
37912
37913
37914
37915
37916
37917
37918      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask is a macro" >&5
37919printf %s "checking whether pthread_sigmask is a macro... " >&6; }
37920if test ${gl_cv_func_pthread_sigmask_macro+y}
37921then :
37922  printf %s "(cached) " >&6
37923else $as_nop
37924  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37925/* end confdefs.h.  */
37926
37927#include <pthread.h>
37928#include <signal.h>
37929#ifdef pthread_sigmask
37930 headers_define_pthread_sigmask
37931#endif
37932_ACEOF
37933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37934  $EGREP "headers_define_pthread_sigmask" >/dev/null 2>&1
37935then :
37936  gl_cv_func_pthread_sigmask_macro=yes
37937else $as_nop
37938  gl_cv_func_pthread_sigmask_macro=no
37939fi
37940rm -rf conftest*
37941
37942
37943fi
37944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_macro" >&5
37945printf "%s\n" "$gl_cv_func_pthread_sigmask_macro" >&6; }
37946
37947  LIB_PTHREAD_SIGMASK=
37948
37949  if test $gl_cv_func_pthread_sigmask_macro = yes; then
37950        HAVE_PTHREAD_SIGMASK=0
37951        REPLACE_PTHREAD_SIGMASK=1
37952  else
37953
37954
37955
37956      if test "$gl_threads_api" = posix; then
37957        if test $ac_cv_func_pthread_sigmask = yes; then
37958                    :
37959        else
37960          if test -n "$LIBMULTITHREAD"; then
37961            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
37962printf %s "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
37963if test ${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+y}
37964then :
37965  printf %s "(cached) " >&6
37966else $as_nop
37967  gl_save_LIBS="$LIBS"
37968               LIBS="$LIBS $LIBMULTITHREAD"
37969               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37970/* end confdefs.h.  */
37971#include <pthread.h>
37972                      #include <signal.h>
37973
37974int
37975main (void)
37976{
37977return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
37978  ;
37979  return 0;
37980}
37981
37982_ACEOF
37983if ac_fn_c_try_link "$LINENO"
37984then :
37985  gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
37986else $as_nop
37987  gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
37988fi
37989rm -f core conftest.err conftest.$ac_objext conftest.beam \
37990    conftest$ac_exeext conftest.$ac_ext
37991               LIBS="$gl_save_LIBS"
37992
37993fi
37994{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
37995printf "%s\n" "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
37996            if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
37997                            LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
37998            else
37999                            HAVE_PTHREAD_SIGMASK=0
38000            fi
38001          else
38002                        HAVE_PTHREAD_SIGMASK=0
38003          fi
38004        fi
38005      else
38006                        if test $ac_cv_func_pthread_sigmask = yes; then
38007          REPLACE_PTHREAD_SIGMASK=1
38008        else
38009          HAVE_PTHREAD_SIGMASK=0
38010        fi
38011      fi
38012
38013  fi
38014
38015
38016
38017    if test $HAVE_PTHREAD_SIGMASK = 1; then
38018
38019
38020                if test -z "$LIB_PTHREAD_SIGMASK"; then
38021      case " $LIBS " in
38022        *' -pthread '*) ;;
38023        *' -lpthread '*) ;;
38024        *)
38025          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
38026printf %s "checking whether pthread_sigmask works without -lpthread... " >&6; }
38027if test ${gl_cv_func_pthread_sigmask_in_libc_works+y}
38028then :
38029  printf %s "(cached) " >&6
38030else $as_nop
38031
38032              if test "$cross_compiling" = yes
38033then :
38034
38035                                  case "$host_os" in
38036                   freebsd* | hpux* | solaris | solaris2.[2-9]*)
38037                     gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
38038                   *)
38039                     gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
38040                 esac
38041
38042else $as_nop
38043  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38044/* end confdefs.h.  */
38045
38046                   #include <pthread.h>
38047                   #include <signal.h>
38048                   #include <stddef.h>
38049                   int main ()
38050                   {
38051                     sigset_t set;
38052                     sigemptyset (&set);
38053                     return pthread_sigmask (1729, &set, NULL) != 0;
38054                   }
38055_ACEOF
38056if ac_fn_c_try_run "$LINENO"
38057then :
38058  gl_cv_func_pthread_sigmask_in_libc_works=no
38059else $as_nop
38060  gl_cv_func_pthread_sigmask_in_libc_works=yes
38061fi
38062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38063  conftest.$ac_objext conftest.beam conftest.$ac_ext
38064fi
38065
38066
38067fi
38068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
38069printf "%s\n" "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
38070          case "$gl_cv_func_pthread_sigmask_in_libc_works" in
38071            *no)
38072              REPLACE_PTHREAD_SIGMASK=1
38073
38074printf "%s\n" "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
38075
38076              ;;
38077          esac;;
38078      esac
38079    fi
38080
38081            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
38082printf %s "checking whether pthread_sigmask returns error numbers... " >&6; }
38083if test ${gl_cv_func_pthread_sigmask_return_works+y}
38084then :
38085  printf %s "(cached) " >&6
38086else $as_nop
38087
38088        gl_save_LIBS="$LIBS"
38089        LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
38090        if test "$cross_compiling" = yes
38091then :
38092  case "$host_os" in
38093             cygwin*)
38094               gl_cv_func_pthread_sigmask_return_works="guessing no";;
38095             *)
38096               gl_cv_func_pthread_sigmask_return_works="guessing yes";;
38097           esac
38098
38099else $as_nop
38100  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38101/* end confdefs.h.  */
38102
38103#include <pthread.h>
38104#include <signal.h>
38105#include <stddef.h>
38106int main ()
38107{
38108  sigset_t set;
38109  sigemptyset (&set);
38110  if (pthread_sigmask (1729, &set, NULL) == -1)
38111    return 1;
38112  return 0;
38113}
38114_ACEOF
38115if ac_fn_c_try_run "$LINENO"
38116then :
38117  gl_cv_func_pthread_sigmask_return_works=yes
38118else $as_nop
38119  gl_cv_func_pthread_sigmask_return_works=no
38120fi
38121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38122  conftest.$ac_objext conftest.beam conftest.$ac_ext
38123fi
38124
38125        LIBS="$gl_save_LIBS"
38126
38127fi
38128{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
38129printf "%s\n" "$gl_cv_func_pthread_sigmask_return_works" >&6; }
38130    case "$gl_cv_func_pthread_sigmask_return_works" in
38131      *no)
38132        REPLACE_PTHREAD_SIGMASK=1
38133
38134printf "%s\n" "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
38135
38136        ;;
38137    esac
38138
38139                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
38140printf %s "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
38141if test ${gl_cv_func_pthread_sigmask_unblock_works+y}
38142then :
38143  printf %s "(cached) " >&6
38144else $as_nop
38145
38146        case "$host_os" in
38147          irix*)
38148            gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
38149          *)
38150            gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
38151        esac
38152                                         gl_save_LIBS=$LIBS
38153           LIBS="$LIBS $LIBMULTITHREAD"
38154        if test "$cross_compiling" = yes
38155then :
38156  :
38157else $as_nop
38158  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38159/* end confdefs.h.  */
38160
38161#include <pthread.h>
38162#include <signal.h>
38163#include <stdio.h>
38164#include <stdlib.h>
38165#include <unistd.h>
38166
38167
38168$gl_mda_defines
38169
38170static volatile int sigint_occurred;
38171static void
38172sigint_handler (int sig)
38173{
38174  sigint_occurred++;
38175}
38176int main ()
38177{
38178  sigset_t set;
38179  int pid = getpid ();
38180  char command[80];
38181  signal (SIGINT, sigint_handler);
38182  sigemptyset (&set);
38183  sigaddset (&set, SIGINT);
38184  if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
38185    return 1;
38186  sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
38187  if (!(system (command) == 0))
38188    return 2;
38189  sleep (2);
38190  if (!(sigint_occurred == 0))
38191    return 3;
38192  if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
38193    return 4;
38194  if (!(sigint_occurred == 1)) /* This fails on IRIX.  */
38195    return 5;
38196  return 0;
38197}
38198_ACEOF
38199if ac_fn_c_try_run "$LINENO"
38200then :
38201  :
38202else $as_nop
38203  gl_cv_func_pthread_sigmask_unblock_works=no
38204fi
38205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38206  conftest.$ac_objext conftest.beam conftest.$ac_ext
38207fi
38208
38209        LIBS=$gl_save_LIBS
38210
38211fi
38212{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
38213printf "%s\n" "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
38214    case "$gl_cv_func_pthread_sigmask_unblock_works" in
38215      *no)
38216        REPLACE_PTHREAD_SIGMASK=1
38217
38218printf "%s\n" "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
38219
38220        ;;
38221    esac
38222  fi
38223
38224  if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
38225
38226
38227
38228
38229
38230
38231
38232
38233  gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
38234
38235
38236  if test $HAVE_PTHREAD_SIGMASK = 1; then
38237
38238printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
38239
38240  fi
38241
38242  fi
38243
38244
38245
38246
38247
38248          GNULIB_PTHREAD_SIGMASK=1
38249
38250
38251
38252
38253
38254printf "%s\n" "#define GNULIB_TEST_PTHREAD_SIGMASK 1" >>confdefs.h
38255
38256
38257
38258
38259
38260
38261
38262
38263
38264  if test $ac_cv_func_pwrite = yes; then
38265                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pwrite works" >&5
38266printf %s "checking whether pwrite works... " >&6; }
38267if test ${gl_cv_func_pwrite_works+y}
38268then :
38269  printf %s "(cached) " >&6
38270else $as_nop
38271
38272                case "$host_os" in
38273                 # Guess no on HP-UX.
38274          hpux*) gl_cv_func_pwrite_works="guessing no" ;;
38275                 # Guess yes otherwise.
38276          *)     gl_cv_func_pwrite_works="guessing yes" ;;
38277        esac
38278        gl_save_CPPFLAGS="$CPPFLAGS"
38279        CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
38280        rm -f conftest.out
38281        if test "$cross_compiling" = yes
38282then :
38283  :
38284else $as_nop
38285  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38286/* end confdefs.h.  */
38287
38288#include <sys/types.h>
38289#include <unistd.h>
38290#include <fcntl.h>
38291
38292
38293$gl_mda_defines
38294
38295int
38296main (void)
38297{
38298
38299{
38300  /* This test fails on HP-UX 11.00..11.11.  */
38301  {
38302    int fd = open ("conftest.out", O_RDWR | O_CREAT | O_TRUNC, 0600);
38303    if (fd < 0)
38304      return 1;
38305    if (pwrite (fd, "b", 1, (off_t) -1) >= 0)
38306      return 2;
38307  }
38308  /* This test fails on HP-UX 11.00..11.11.  */
38309  {
38310    int fd;
38311    char buf[] = "01";
38312
38313    fd = open ("conftest.out", O_WRONLY | O_CREAT | O_TRUNC, 0600);
38314    if (fd < 0)
38315      return 3;
38316    if (write (fd, buf, 2) < 2)
38317      return 4;
38318    if (close (fd) < 0)
38319      return 5;
38320
38321    fd = open ("conftest.out", O_WRONLY, 0600);
38322    if (fd < 0)
38323      return 6;
38324    if (pwrite (fd, "W", 1, (off_t) 0) != 1)
38325      return 7;
38326    if (close (fd) < 0)
38327      return 8;
38328
38329    fd = open ("conftest.out", O_RDONLY);
38330    if (fd < 0)
38331      return 9;
38332    if (read (fd, buf, 2) < 2)
38333      return 10;
38334    if (close (fd) < 0)
38335      return 11;
38336    if (buf[0] != 'W')
38337      return 12;
38338    if (buf[1] != '1')
38339      return 13;
38340  }
38341  return 0;
38342}
38343  ;
38344  return 0;
38345}
38346_ACEOF
38347if ac_fn_c_try_run "$LINENO"
38348then :
38349  gl_cv_func_pwrite_works=yes
38350else $as_nop
38351  gl_cv_func_pwrite_works=no
38352fi
38353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38354  conftest.$ac_objext conftest.beam conftest.$ac_ext
38355fi
38356
38357        rm -f conftest.out
38358        CPPFLAGS="$gl_save_CPPFLAGS"
38359
38360fi
38361{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pwrite_works" >&5
38362printf "%s\n" "$gl_cv_func_pwrite_works" >&6; }
38363    case "$gl_cv_func_pwrite_works" in
38364      *yes) ;;
38365      *) REPLACE_PWRITE=1 ;;
38366    esac
38367  else
38368    HAVE_PWRITE=0
38369  fi
38370
38371  if test $HAVE_PWRITE = 0 || test $REPLACE_PWRITE = 1; then
38372
38373
38374
38375
38376
38377
38378
38379
38380  gl_LIBOBJS="$gl_LIBOBJS pwrite.$ac_objext"
38381
38382  fi
38383
38384
38385
38386
38387
38388          GNULIB_PWRITE=1
38389
38390
38391
38392
38393
38394printf "%s\n" "#define GNULIB_TEST_PWRITE 1" >>confdefs.h
38395
38396
38397
38398
38399
38400
38401
38402
38403
38404  if test $ac_cv_func_qsort_r = yes; then
38405    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for qsort_r signature" >&5
38406printf %s "checking for qsort_r signature... " >&6; }
38407if test ${gl_cv_qsort_r_signature+y}
38408then :
38409  printf %s "(cached) " >&6
38410else $as_nop
38411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38412/* end confdefs.h.  */
38413#include <stdlib.h>
38414                            void qsort_r (void *, size_t, size_t,
38415                                          int (*) (void const *, void const *,
38416                                                   void *),
38417                                          void *);
38418                            void (*p) (void *, size_t, size_t,
38419                                       int (*) (void const *, void const *,
38420                                                void *),
38421                                       void *) = qsort_r;
38422
38423int
38424main (void)
38425{
38426
38427  ;
38428  return 0;
38429}
38430_ACEOF
38431if ac_fn_c_try_link "$LINENO"
38432then :
38433  gl_cv_qsort_r_signature=GNU
38434else $as_nop
38435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38436/* end confdefs.h.  */
38437#include <stdlib.h>
38438                               void qsort_r (void *, size_t, size_t, void *,
38439                                             int (*) (void *,
38440                                                      void const *,
38441                                                      void const *));
38442                               void (*p) (void *, size_t, size_t, void *,
38443                                          int (*) (void *, void const *,
38444                                                   void const *)) = qsort_r;
38445
38446int
38447main (void)
38448{
38449
38450  ;
38451  return 0;
38452}
38453_ACEOF
38454if ac_fn_c_try_link "$LINENO"
38455then :
38456  gl_cv_qsort_r_signature=BSD
38457else $as_nop
38458  gl_cv_qsort_r_signature=unknown
38459fi
38460rm -f core conftest.err conftest.$ac_objext conftest.beam \
38461    conftest$ac_exeext conftest.$ac_ext
38462fi
38463rm -f core conftest.err conftest.$ac_objext conftest.beam \
38464    conftest$ac_exeext conftest.$ac_ext
38465fi
38466{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_qsort_r_signature" >&5
38467printf "%s\n" "$gl_cv_qsort_r_signature" >&6; }
38468    case $gl_cv_qsort_r_signature in
38469      GNU)     ;;
38470      BSD)     REPLACE_QSORT_R=1 ;;
38471      unknown) HAVE_QSORT_R=0 REPLACE_QSORT_R=1 ;;
38472    esac
38473  else
38474    HAVE_QSORT_R=0
38475  fi
38476
38477  if test $HAVE_QSORT_R = 0; then
38478    # The function is missing from the system or has an unknown signature.
38479
38480
38481
38482
38483
38484
38485
38486
38487  gl_LIBOBJS="$gl_LIBOBJS qsort.$ac_objext"
38488
38489  elif test $REPLACE_QSORT_R = 1; then
38490    # The function exists, but it has the BSD signature.
38491
38492
38493
38494
38495
38496
38497
38498
38499  gl_LIBOBJS="$gl_LIBOBJS qsort_r.$ac_objext"
38500
38501  fi
38502
38503
38504
38505
38506
38507          GNULIB_QSORT_R=1
38508
38509
38510
38511
38512
38513printf "%s\n" "#define GNULIB_TEST_QSORT_R 1" >>confdefs.h
38514
38515
38516
38517
38518
38519
38520  ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
38521if test "x$ac_cv_func_raise" = xyes
38522then :
38523  printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
38524
38525fi
38526
38527  if test $ac_cv_func_raise = no; then
38528    HAVE_RAISE=0
38529  else
38530
38531
38532      if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
38533        REPLACE_RAISE=1
38534      fi
38535
38536
38537
38538
38539
38540  HAVE_POSIX_SIGNALBLOCKING=0
38541  if test "$gl_cv_type_sigset_t" = yes; then
38542    ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
38543if test "x$ac_cv_func_sigprocmask" = xyes
38544then :
38545  HAVE_POSIX_SIGNALBLOCKING=1
38546fi
38547
38548  fi
38549
38550      if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
38551        :
38552      fi
38553
38554  fi
38555
38556  if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
38557
38558
38559
38560
38561
38562
38563
38564
38565  gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
38566
38567    :
38568  fi
38569
38570
38571
38572
38573
38574          GNULIB_RAISE=1
38575
38576
38577
38578
38579
38580printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
38581
38582
38583
38584
38585
38586
38587
38588  ac_fn_c_check_header_compile "$LINENO" "random.h" "ac_cv_header_random_h" "$ac_includes_default
38589"
38590if test "x$ac_cv_header_random_h" = xyes
38591then :
38592  printf "%s\n" "#define HAVE_RANDOM_H 1" >>confdefs.h
38593
38594fi
38595
38596  if test $ac_cv_header_random_h = no; then
38597    HAVE_RANDOM_H=0
38598  fi
38599
38600  ac_fn_c_check_type "$LINENO" "struct random_data" "ac_cv_type_struct_random_data" "#include <stdlib.h>
38601      #if HAVE_RANDOM_H
38602      # include <random.h>
38603      #endif
38604
38605"
38606if test "x$ac_cv_type_struct_random_data" = xyes
38607then :
38608
38609printf "%s\n" "#define HAVE_STRUCT_RANDOM_DATA 1" >>confdefs.h
38610
38611
38612else $as_nop
38613  HAVE_STRUCT_RANDOM_DATA=0
38614fi
38615
38616
38617      case "$host_os" in
38618    aix* | osf*)
38619      REPLACE_RANDOM_R=1
38620      ;;
38621    *)
38622      ac_fn_c_check_func "$LINENO" "random_r" "ac_cv_func_random_r"
38623if test "x$ac_cv_func_random_r" = xyes
38624then :
38625  printf "%s\n" "#define HAVE_RANDOM_R 1" >>confdefs.h
38626
38627fi
38628
38629      if test $ac_cv_func_random_r = no; then
38630        HAVE_RANDOM_R=0
38631      fi
38632      ;;
38633  esac
38634
38635  if test $HAVE_RANDOM_R = 0 || test $REPLACE_RANDOM_R = 1; then
38636
38637
38638
38639
38640
38641
38642
38643
38644  gl_LIBOBJS="$gl_LIBOBJS random_r.$ac_objext"
38645
38646
38647  :
38648
38649  fi
38650
38651
38652
38653
38654
38655          GNULIB_RANDOM_R=1
38656
38657
38658
38659
38660
38661printf "%s\n" "#define GNULIB_TEST_RANDOM_R 1" >>confdefs.h
38662
38663
38664
38665
38666
38667
38668
38669  ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
38670if test "x$ac_cv_func_rawmemchr" = xyes
38671then :
38672  printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h
38673
38674fi
38675
38676  if test $ac_cv_func_rawmemchr = no; then
38677    HAVE_RAWMEMCHR=0
38678  fi
38679
38680  if test $HAVE_RAWMEMCHR = 0; then
38681
38682
38683
38684
38685
38686
38687
38688
38689  gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
38690
38691    :
38692  fi
38693
38694
38695
38696
38697
38698          GNULIB_RAWMEMCHR=1
38699
38700
38701
38702
38703
38704printf "%s\n" "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
38705
38706
38707
38708
38709
38710
38711
38712    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
38713      REPLACE_READ=1
38714    fi
38715
38716
38717
38718  if test $REPLACE_READ = 1; then
38719
38720
38721
38722
38723
38724
38725
38726
38727  gl_LIBOBJS="$gl_LIBOBJS read.$ac_objext"
38728
38729    :
38730  fi
38731
38732
38733
38734
38735
38736          GNULIB_READ=1
38737
38738
38739
38740
38741
38742printf "%s\n" "#define GNULIB_TEST_READ 1" >>confdefs.h
38743
38744
38745
38746
38747
38748
38749  ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
38750if test "x$ac_cv_func_readdir" = xyes
38751then :
38752  printf "%s\n" "#define HAVE_READDIR 1" >>confdefs.h
38753
38754fi
38755
38756  if test $ac_cv_func_readdir = no; then
38757    HAVE_READDIR=0
38758  fi
38759
38760  if test $HAVE_READDIR = 0; then
38761
38762
38763
38764
38765
38766
38767
38768
38769  gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
38770
38771  fi
38772
38773
38774
38775
38776
38777          GNULIB_READDIR=1
38778
38779
38780
38781
38782
38783printf "%s\n" "#define GNULIB_TEST_READDIR 1" >>confdefs.h
38784
38785
38786
38787
38788
38789
38790  if test $ac_cv_func_readlink = no; then
38791    HAVE_READLINK=0
38792  else
38793    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
38794printf %s "checking whether readlink signature is correct... " >&6; }
38795if test ${gl_cv_decl_readlink_works+y}
38796then :
38797  printf %s "(cached) " >&6
38798else $as_nop
38799  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38800/* end confdefs.h.  */
38801#include <unistd.h>
38802      /* Cause compilation failure if original declaration has wrong type.  */
38803      ssize_t readlink (const char *, char *, size_t);
38804int
38805main (void)
38806{
38807
38808  ;
38809  return 0;
38810}
38811_ACEOF
38812if ac_fn_c_try_compile "$LINENO"
38813then :
38814  gl_cv_decl_readlink_works=yes
38815else $as_nop
38816  gl_cv_decl_readlink_works=no
38817fi
38818rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38819fi
38820{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
38821printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }
38822            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
38823printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
38824if test ${gl_cv_func_readlink_trailing_slash+y}
38825then :
38826  printf %s "(cached) " >&6
38827else $as_nop
38828  # We have readlink, so assume ln -s works.
38829       ln -s conftest.no-such conftest.link
38830       ln -s conftest.link conftest.lnk2
38831       if test "$cross_compiling" = yes
38832then :
38833  case "$host_os" in
38834            # Guess yes on Linux or glibc systems.
38835            linux-* | linux | *-gnu* | gnu*)
38836              gl_cv_func_readlink_trailing_slash="guessing yes" ;;
38837            # Guess no on AIX or HP-UX.
38838            aix* | hpux*)
38839              gl_cv_func_readlink_trailing_slash="guessing no" ;;
38840            # If we don't know, obey --enable-cross-guesses.
38841            *)
38842              gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
38843          esac
38844
38845else $as_nop
38846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38847/* end confdefs.h.  */
38848#include <unistd.h>
38849
38850int
38851main (void)
38852{
38853char buf[20];
38854      return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
38855  ;
38856  return 0;
38857}
38858_ACEOF
38859if ac_fn_c_try_run "$LINENO"
38860then :
38861  gl_cv_func_readlink_trailing_slash=yes
38862else $as_nop
38863  gl_cv_func_readlink_trailing_slash=no
38864fi
38865rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38866  conftest.$ac_objext conftest.beam conftest.$ac_ext
38867fi
38868
38869      rm -f conftest.link conftest.lnk2
38870fi
38871{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
38872printf "%s\n" "$gl_cv_func_readlink_trailing_slash" >&6; }
38873    case "$gl_cv_func_readlink_trailing_slash" in
38874      *yes)
38875        if test "$gl_cv_decl_readlink_works" != yes; then
38876          REPLACE_READLINK=1
38877        fi
38878        ;;
38879      *)
38880
38881printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
38882
38883        REPLACE_READLINK=1
38884        ;;
38885    esac
38886
38887    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
38888printf %s "checking whether readlink truncates results correctly... " >&6; }
38889if test ${gl_cv_func_readlink_truncate+y}
38890then :
38891  printf %s "(cached) " >&6
38892else $as_nop
38893  # We have readlink, so assume ln -s works.
38894       ln -s ab conftest.link
38895       if test "$cross_compiling" = yes
38896then :
38897  case "$host_os" in
38898            # Guess yes on Linux or glibc systems.
38899            linux-* | linux | *-gnu* | gnu*)
38900              gl_cv_func_readlink_truncate="guessing yes" ;;
38901            # Guess no on AIX or HP-UX.
38902            aix* | hpux*)
38903              gl_cv_func_readlink_truncate="guessing no" ;;
38904            # If we don't know, obey --enable-cross-guesses.
38905            *)
38906              gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
38907          esac
38908
38909else $as_nop
38910  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38911/* end confdefs.h.  */
38912#include <unistd.h>
38913
38914int
38915main (void)
38916{
38917char c;
38918      return readlink ("conftest.link", &c, 1) != 1;
38919  ;
38920  return 0;
38921}
38922_ACEOF
38923if ac_fn_c_try_run "$LINENO"
38924then :
38925  gl_cv_func_readlink_truncate=yes
38926else $as_nop
38927  gl_cv_func_readlink_truncate=no
38928fi
38929rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38930  conftest.$ac_objext conftest.beam conftest.$ac_ext
38931fi
38932
38933      rm -f conftest.link conftest.lnk2
38934fi
38935{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
38936printf "%s\n" "$gl_cv_func_readlink_truncate" >&6; }
38937    case $gl_cv_func_readlink_truncate in
38938      *yes)
38939        if test "$gl_cv_decl_readlink_works" != yes; then
38940          REPLACE_READLINK=1
38941        fi
38942        ;;
38943      *)
38944
38945printf "%s\n" "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
38946
38947        REPLACE_READLINK=1
38948        ;;
38949    esac
38950  fi
38951
38952  if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
38953
38954
38955
38956
38957
38958
38959
38960
38961  gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
38962
38963
38964  :
38965
38966  fi
38967
38968
38969
38970
38971
38972          GNULIB_READLINK=1
38973
38974
38975
38976
38977
38978printf "%s\n" "#define GNULIB_TEST_READLINK 1" >>confdefs.h
38979
38980
38981
38982
38983
38984
38985  if test $gl_cv_func_malloc_posix = yes; then
38986
38987printf "%s\n" "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
38988
38989  else
38990    REPLACE_REALLOC=1
38991  fi
38992
38993  if test $REPLACE_REALLOC = 1; then
38994
38995
38996
38997
38998
38999
39000
39001
39002  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
39003
39004  fi
39005
39006
39007
39008
39009
39010          GNULIB_REALLOC_POSIX=1
39011
39012
39013
39014
39015
39016printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
39017
39018
39019
39020
39021
39022printf "%s\n" "#define GNULIB_REALLOC_POSIX 1" >>confdefs.h
39023
39024
39025
39026  if test "$ac_cv_header_winsock2_h" = yes; then
39027
39028
39029
39030
39031
39032
39033
39034
39035  gl_LIBOBJS="$gl_LIBOBJS recv.$ac_objext"
39036
39037  fi
39038
39039
39040
39041
39042
39043          GNULIB_RECV=1
39044
39045
39046
39047
39048
39049printf "%s\n" "#define GNULIB_TEST_RECV 1" >>confdefs.h
39050
39051
39052
39053
39054  if test "$ac_cv_header_winsock2_h" = yes; then
39055
39056
39057
39058
39059
39060
39061
39062
39063  gl_LIBOBJS="$gl_LIBOBJS recvfrom.$ac_objext"
39064
39065  fi
39066
39067
39068
39069
39070
39071          GNULIB_RECVFROM=1
39072
39073
39074
39075
39076
39077printf "%s\n" "#define GNULIB_TEST_RECVFROM 1" >>confdefs.h
39078
39079
39080
39081
39082
39083# Check whether --with-included-regex was given.
39084if test ${with_included_regex+y}
39085then :
39086  withval=$with_included_regex;
39087fi
39088
39089
39090  case $with_included_regex in #(
39091  yes|no) ac_use_included_regex=$with_included_regex
39092        ;;
39093  '')
39094    # If the system regex support is good enough that it passes the
39095    # following run test, then default to *not* using the included regex.c.
39096    # If cross compiling, assume the test would fail and use the included
39097    # regex.c.
39098
39099
39100    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
39101printf %s "checking for working re_compile_pattern... " >&6; }
39102if test ${gl_cv_func_re_compile_pattern_working+y}
39103then :
39104  printf %s "(cached) " >&6
39105else $as_nop
39106  if test "$cross_compiling" = yes
39107then :
39108  case "$host_os" in
39109                   # Guess no on native Windows.
39110           mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
39111                   # Otherwise obey --enable-cross-guesses.
39112           *)      gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
39113         esac
39114
39115else $as_nop
39116  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39117/* end confdefs.h.  */
39118#include <regex.h>
39119
39120            #include <locale.h>
39121            #include <limits.h>
39122            #include <string.h>
39123
39124            #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
39125            # include <signal.h>
39126            # include <unistd.h>
39127            #endif
39128
39129            #if HAVE_MALLOC_H
39130            # include <malloc.h>
39131            #endif
39132
39133            #ifdef M_CHECK_ACTION
39134            /* Exit with distinguishable exit code.  */
39135            static void sigabrt_no_core (int sig) { raise (SIGTERM); }
39136            #endif
39137
39138int
39139main (void)
39140{
39141int result = 0;
39142            static struct re_pattern_buffer regex;
39143            unsigned char folded_chars[UCHAR_MAX + 1];
39144            int i;
39145            const char *s;
39146            struct re_registers regs;
39147
39148            /* Some builds of glibc go into an infinite loop on this
39149               test.  Use alarm to force death, and mallopt to avoid
39150               malloc recursion in diagnosing the corrupted heap. */
39151#if HAVE_DECL_ALARM
39152            signal (SIGALRM, SIG_DFL);
39153            alarm (2);
39154#endif
39155#ifdef M_CHECK_ACTION
39156            signal (SIGABRT, sigabrt_no_core);
39157            mallopt (M_CHECK_ACTION, 2);
39158#endif
39159
39160            if (setlocale (LC_ALL, "en_US.UTF-8"))
39161              {
39162                {
39163                  /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
39164                     This test needs valgrind to catch the bug on Debian
39165                     GNU/Linux 3.1 x86, but it might catch the bug better
39166                     on other platforms and it shouldn't hurt to try the
39167                     test here.  */
39168                  static char const pat[] = "insert into";
39169                  static char const data[] =
39170                    "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
39171                  re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
39172                                 | RE_ICASE);
39173                  memset (&regex, 0, sizeof regex);
39174                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
39175                  if (s)
39176                    result |= 1;
39177                  else
39178                    {
39179                      if (re_search (&regex, data, sizeof data - 1,
39180                                     0, sizeof data - 1, &regs)
39181                          != -1)
39182                        result |= 1;
39183                      regfree (&regex);
39184                    }
39185                }
39186
39187                {
39188                  /* This test is from glibc bug 15078.
39189                     The test case is from Andreas Schwab in
39190                     <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
39191                     */
39192                  static char const pat[] = "[^x]x";
39193                  static char const data[] =
39194                    /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
39195                    "\xe1\x80\x80"
39196                    "\xe1\x80\xbb"
39197                    "\xe1\x80\xbd"
39198                    "\xe1\x80\x94"
39199                    "\xe1\x80\xba"
39200                    "\xe1\x80\xaf"
39201                    "\xe1\x80\x95"
39202                    "\xe1\x80\xba"
39203                    "x";
39204                  re_set_syntax (0);
39205                  memset (&regex, 0, sizeof regex);
39206                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
39207                  if (s)
39208                    result |= 1;
39209                  else
39210                    {
39211                      i = re_search (&regex, data, sizeof data - 1,
39212                                     0, sizeof data - 1, 0);
39213                      if (i != 0 && i != 21)
39214                        result |= 1;
39215                      regfree (&regex);
39216                    }
39217                }
39218
39219                if (! setlocale (LC_ALL, "C"))
39220                  return 1;
39221              }
39222
39223            /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
39224            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
39225            memset (&regex, 0, sizeof regex);
39226            s = re_compile_pattern ("a[^x]b", 6, &regex);
39227            if (s)
39228              result |= 2;
39229            else
39230              {
39231                /* This should fail, but succeeds for glibc-2.5.  */
39232                if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
39233                  result |= 2;
39234                regfree (&regex);
39235              }
39236
39237            /* This regular expression is from Spencer ere test number 75
39238               in grep-2.3.  */
39239            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
39240            memset (&regex, 0, sizeof regex);
39241            for (i = 0; i <= UCHAR_MAX; i++)
39242              folded_chars[i] = i;
39243            regex.translate = folded_chars;
39244            s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
39245            /* This should fail with _Invalid character class name_ error.  */
39246            if (!s)
39247              {
39248                result |= 4;
39249                regfree (&regex);
39250              }
39251
39252            /* Ensure that [b-a] is diagnosed as invalid, when
39253               using RE_NO_EMPTY_RANGES. */
39254            re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
39255            memset (&regex, 0, sizeof regex);
39256            s = re_compile_pattern ("a[b-a]", 6, &regex);
39257            if (s == 0)
39258              {
39259                result |= 8;
39260                regfree (&regex);
39261              }
39262
39263            /* This should succeed, but does not for glibc-2.1.3.  */
39264            memset (&regex, 0, sizeof regex);
39265            s = re_compile_pattern ("{1", 2, &regex);
39266            if (s)
39267              result |= 8;
39268            else
39269              regfree (&regex);
39270
39271            /* The following example is derived from a problem report
39272               against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
39273            memset (&regex, 0, sizeof regex);
39274            s = re_compile_pattern ("[an\371]*n", 7, &regex);
39275            if (s)
39276              result |= 8;
39277            else
39278              {
39279                /* This should match, but does not for glibc-2.2.1.  */
39280                if (re_match (&regex, "an", 2, 0, &regs) != 2)
39281                  result |= 8;
39282                else
39283                  {
39284                    free (regs.start);
39285                    free (regs.end);
39286                  }
39287                regfree (&regex);
39288              }
39289
39290            memset (&regex, 0, sizeof regex);
39291            s = re_compile_pattern ("x", 1, &regex);
39292            if (s)
39293              result |= 8;
39294            else
39295              {
39296                /* glibc-2.2.93 does not work with a negative RANGE argument.  */
39297                if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
39298                  result |= 8;
39299                else
39300                  {
39301                    free (regs.start);
39302                    free (regs.end);
39303                  }
39304                regfree (&regex);
39305              }
39306
39307            /* The version of regex.c in older versions of gnulib
39308               ignored RE_ICASE.  Detect that problem too.  */
39309            re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
39310            memset (&regex, 0, sizeof regex);
39311            s = re_compile_pattern ("x", 1, &regex);
39312            if (s)
39313              result |= 16;
39314            else
39315              {
39316                if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
39317                  result |= 16;
39318                else
39319                  {
39320                    free (regs.start);
39321                    free (regs.end);
39322                  }
39323                regfree (&regex);
39324              }
39325
39326            /* Catch a bug reported by Vin Shelton in
39327               https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
39328               */
39329            re_set_syntax (RE_SYNTAX_POSIX_BASIC
39330                           & ~RE_CONTEXT_INVALID_DUP
39331                           & ~RE_NO_EMPTY_RANGES);
39332            memset (&regex, 0, sizeof regex);
39333            s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
39334            if (s)
39335              result |= 32;
39336            else
39337              regfree (&regex);
39338
39339            /* REG_STARTEND was added to glibc on 2004-01-15.
39340               Reject older versions.  */
39341            if (! REG_STARTEND)
39342              result |= 64;
39343
39344            /* Matching with the compiled form of this regexp would provoke
39345               an assertion failure prior to glibc-2.28:
39346                 regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
39347               With glibc-2.28, compilation fails and reports the invalid
39348               back reference.  */
39349            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
39350            memset (&regex, 0, sizeof regex);
39351            s = re_compile_pattern ("0|()0|\\1|0", 10, &regex);
39352            if (!s)
39353              result |= 64;
39354            else
39355              {
39356                if (strcmp (s, "Invalid back reference"))
39357                  result |= 64;
39358                regfree (&regex);
39359              }
39360
39361#if 0
39362            /* It would be nice to reject hosts whose regoff_t values are too
39363               narrow (including glibc on hosts with 64-bit ptrdiff_t and
39364               32-bit int), but we should wait until glibc implements this
39365               feature.  Otherwise, support for equivalence classes and
39366               multibyte collation symbols would always be broken except
39367               when compiling --without-included-regex.   */
39368            if (sizeof (regoff_t) < sizeof (ptrdiff_t)
39369                || sizeof (regoff_t) < sizeof (ssize_t))
39370              result |= 64;
39371#endif
39372
39373            return result;
39374
39375  ;
39376  return 0;
39377}
39378_ACEOF
39379if ac_fn_c_try_run "$LINENO"
39380then :
39381  gl_cv_func_re_compile_pattern_working=yes
39382else $as_nop
39383  gl_cv_func_re_compile_pattern_working=no
39384fi
39385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39386  conftest.$ac_objext conftest.beam conftest.$ac_ext
39387fi
39388
39389
39390fi
39391{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
39392printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
39393    case "$gl_cv_func_re_compile_pattern_working" in #(
39394      *yes) ac_use_included_regex=no;; #(
39395      *no) ac_use_included_regex=yes;;
39396    esac
39397    ;;
39398  *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
39399    ;;
39400  esac
39401
39402  if test $ac_use_included_regex = yes; then
39403
39404printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
39405
39406
39407printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
39408
39409
39410printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
39411
39412
39413printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
39414
39415
39416printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
39417
39418
39419printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
39420
39421
39422printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
39423
39424
39425printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
39426
39427
39428printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h
39429
39430
39431printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h
39432
39433
39434printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
39435
39436
39437printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h
39438
39439
39440printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
39441
39442
39443printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h
39444
39445
39446printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
39447
39448
39449printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h
39450
39451
39452printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
39453
39454  fi
39455
39456  if test $ac_use_included_regex = yes; then
39457
39458
39459
39460
39461
39462
39463
39464
39465  gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
39466
39467
39468
39469
39470
39471
39472
39473  ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
39474if test "x$ac_cv_header_libintl_h" = xyes
39475then :
39476  printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
39477
39478fi
39479
39480
39481  ac_fn_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
39482" "$ac_c_undeclared_builtin_options" "CFLAGS"
39483if test "x$ac_cv_have_decl_isblank" = xyes
39484then :
39485  ac_have_decl=1
39486else $as_nop
39487  ac_have_decl=0
39488fi
39489printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
39490
39491
39492  fi
39493
39494
39495
39496
39497
39498                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
39499printf %s "checking whether rename honors trailing slash on destination... " >&6; }
39500if test ${gl_cv_func_rename_slash_dst_works+y}
39501then :
39502  printf %s "(cached) " >&6
39503else $as_nop
39504  rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
39505    touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
39506      as_fn_error $? "cannot create temporary files" "$LINENO" 5
39507    # Assume that if we have lstat, we can also check symlinks.
39508    if test $ac_cv_func_lstat = yes; then
39509      ln -s conftest.f conftest.lnk
39510    fi
39511    if test "$cross_compiling" = yes
39512then :
39513        case "$host_os" in
39514                          # Guess yes on Linux systems.
39515         linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
39516                          # Guess yes on glibc systems.
39517         *-gnu*)          gl_cv_func_rename_slash_dst_works="guessing yes" ;;
39518                          # Guess no on native Windows.
39519         mingw*)          gl_cv_func_rename_slash_dst_works="guessing no" ;;
39520                          # If we don't know, obey --enable-cross-guesses.
39521         *)               gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
39522       esac
39523
39524else $as_nop
39525  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39526/* end confdefs.h.  */
39527
39528#        include <stdio.h>
39529#        include <stdlib.h>
39530
39531int
39532main (void)
39533{
39534int result = 0;
39535           if (rename ("conftest.f1", "conftest.f2/") == 0)
39536             result |= 1;
39537           if (rename ("conftest.d1", "conftest.d2/") != 0)
39538             result |= 2;
39539#if HAVE_LSTAT
39540           if (rename ("conftest.f", "conftest.lnk/") == 0)
39541             result |= 4;
39542#endif
39543           return result;
39544
39545  ;
39546  return 0;
39547}
39548_ACEOF
39549if ac_fn_c_try_run "$LINENO"
39550then :
39551  gl_cv_func_rename_slash_dst_works=yes
39552else $as_nop
39553  gl_cv_func_rename_slash_dst_works=no
39554fi
39555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39556  conftest.$ac_objext conftest.beam conftest.$ac_ext
39557fi
39558
39559    rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
39560
39561fi
39562{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
39563printf "%s\n" "$gl_cv_func_rename_slash_dst_works" >&6; }
39564  case "$gl_cv_func_rename_slash_dst_works" in
39565    *yes) ;;
39566    *)
39567      REPLACE_RENAME=1
39568
39569printf "%s\n" "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
39570
39571      ;;
39572  esac
39573
39574            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
39575printf %s "checking whether rename honors trailing slash on source... " >&6; }
39576if test ${gl_cv_func_rename_slash_src_works+y}
39577then :
39578  printf %s "(cached) " >&6
39579else $as_nop
39580  rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
39581    touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
39582      as_fn_error $? "cannot create temporary files" "$LINENO" 5
39583    # Assume that if we have lstat, we can also check symlinks.
39584    if test $ac_cv_func_lstat = yes; then
39585      ln -s conftest.f conftest.lnk
39586    fi
39587    if test "$cross_compiling" = yes
39588then :
39589        case "$host_os" in
39590                          # Guess yes on Linux systems.
39591         linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
39592                          # Guess yes on glibc systems.
39593         *-gnu*)          gl_cv_func_rename_slash_src_works="guessing yes" ;;
39594                          # Guess yes on native Windows.
39595         mingw*)          gl_cv_func_rename_slash_src_works="guessing yes" ;;
39596                          # If we don't know, obey --enable-cross-guesses.
39597         *)               gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
39598       esac
39599
39600else $as_nop
39601  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39602/* end confdefs.h.  */
39603
39604#        include <stdio.h>
39605#        include <stdlib.h>
39606
39607int
39608main (void)
39609{
39610int result = 0;
39611           if (rename ("conftest.f1/", "conftest.d3") == 0)
39612             result |= 1;
39613           if (rename ("conftest.d1/", "conftest.d2") != 0)
39614             result |= 2;
39615#if HAVE_LSTAT
39616           if (rename ("conftest.lnk/", "conftest.f") == 0)
39617             result |= 4;
39618#endif
39619           return result;
39620
39621  ;
39622  return 0;
39623}
39624_ACEOF
39625if ac_fn_c_try_run "$LINENO"
39626then :
39627  gl_cv_func_rename_slash_src_works=yes
39628else $as_nop
39629  gl_cv_func_rename_slash_src_works=no
39630fi
39631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39632  conftest.$ac_objext conftest.beam conftest.$ac_ext
39633fi
39634
39635    rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
39636
39637fi
39638{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
39639printf "%s\n" "$gl_cv_func_rename_slash_src_works" >&6; }
39640  case "$gl_cv_func_rename_slash_src_works" in
39641    *yes) ;;
39642    *)
39643      REPLACE_RENAME=1
39644
39645printf "%s\n" "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
39646
39647      ;;
39648  esac
39649
39650
39651  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
39652printf %s "checking whether rename manages hard links correctly... " >&6; }
39653if test ${gl_cv_func_rename_link_works+y}
39654then :
39655  printf %s "(cached) " >&6
39656else $as_nop
39657  if test $ac_cv_func_link = yes; then
39658       if test $cross_compiling != yes; then
39659         rm -rf conftest.f conftest.f1 conftest.f2
39660         if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
39661             set x `ls -i conftest.f conftest.f1` && test "" = ""; then
39662           if test "$cross_compiling" = yes
39663then :
39664                :
39665
39666else $as_nop
39667  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39668/* end confdefs.h.  */
39669
39670#               include <errno.h>
39671#               include <stdio.h>
39672#               include <stdlib.h>
39673#               include <unistd.h>
39674
39675
39676$gl_mda_defines
39677
39678int
39679main (void)
39680{
39681int result = 0;
39682                  if (rename ("conftest.f", "conftest.f1"))
39683                    result |= 1;
39684                  if (unlink ("conftest.f1"))
39685                    result |= 2;
39686
39687                  /* Allow either the POSIX-required behavior, where the
39688                     previous rename kept conftest.f, or the (better) NetBSD
39689                     behavior, where it removed conftest.f.  */
39690                  if (rename ("conftest.f", "conftest.f") != 0
39691                      && errno != ENOENT)
39692                    result |= 4;
39693
39694                  if (rename ("conftest.f1", "conftest.f1") == 0)
39695                    result |= 8;
39696                  if (rename ("conftest.f2", "conftest.f2") != 0)
39697                    result |= 16;
39698                  return result;
39699
39700  ;
39701  return 0;
39702}
39703_ACEOF
39704if ac_fn_c_try_run "$LINENO"
39705then :
39706  gl_cv_func_rename_link_works=yes
39707else $as_nop
39708  gl_cv_func_rename_link_works=no
39709fi
39710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39711  conftest.$ac_objext conftest.beam conftest.$ac_ext
39712fi
39713
39714         else
39715           gl_cv_func_rename_link_works="guessing no"
39716         fi
39717         rm -rf conftest.f conftest.f1 conftest.f2
39718       else
39719                  case "$host_os" in
39720                            # Guess yes on Linux systems.
39721           linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
39722                            # Guess yes on glibc systems.
39723           *-gnu*)          gl_cv_func_rename_link_works="guessing yes" ;;
39724                            # Guess yes on native Windows.
39725           mingw*)          gl_cv_func_rename_link_works="guessing yes" ;;
39726                            # If we don't know, obey --enable-cross-guesses.
39727           *)               gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
39728         esac
39729       fi
39730     else
39731       gl_cv_func_rename_link_works=yes
39732     fi
39733
39734fi
39735{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
39736printf "%s\n" "$gl_cv_func_rename_link_works" >&6; }
39737  case "$gl_cv_func_rename_link_works" in
39738    *yes) ;;
39739    *)
39740      REPLACE_RENAME=1
39741
39742printf "%s\n" "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
39743
39744      ;;
39745  esac
39746
39747          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
39748printf %s "checking whether rename manages existing destinations correctly... " >&6; }
39749if test ${gl_cv_func_rename_dest_works+y}
39750then :
39751  printf %s "(cached) " >&6
39752else $as_nop
39753  rm -rf conftest.f conftest.d1 conftest.d2
39754    touch conftest.f && mkdir conftest.d1 conftest.d2 ||
39755      as_fn_error $? "cannot create temporary files" "$LINENO" 5
39756    if test "$cross_compiling" = yes
39757then :
39758        case "$host_os" in
39759                          # Guess yes on Linux systems.
39760         linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
39761                          # Guess yes on glibc systems.
39762         *-gnu*)          gl_cv_func_rename_dest_works="guessing yes" ;;
39763                          # Guess no on native Windows.
39764         mingw*)          gl_cv_func_rename_dest_works="guessing no" ;;
39765                          # If we don't know, obey --enable-cross-guesses.
39766         *)               gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
39767       esac
39768
39769else $as_nop
39770  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39771/* end confdefs.h.  */
39772
39773#        include <stdio.h>
39774#        include <stdlib.h>
39775
39776int
39777main (void)
39778{
39779int result = 0;
39780           if (rename ("conftest.d1", "conftest.d2") != 0)
39781             result |= 1;
39782           if (rename ("conftest.d2", "conftest.f") == 0)
39783             result |= 2;
39784           return result;
39785
39786  ;
39787  return 0;
39788}
39789_ACEOF
39790if ac_fn_c_try_run "$LINENO"
39791then :
39792  gl_cv_func_rename_dest_works=yes
39793else $as_nop
39794  gl_cv_func_rename_dest_works=no
39795fi
39796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39797  conftest.$ac_objext conftest.beam conftest.$ac_ext
39798fi
39799
39800    rm -rf conftest.f conftest.d1 conftest.d2
39801
39802fi
39803{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
39804printf "%s\n" "$gl_cv_func_rename_dest_works" >&6; }
39805  case "$gl_cv_func_rename_dest_works" in
39806    *yes) ;;
39807    *)
39808      REPLACE_RENAME=1
39809
39810printf "%s\n" "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
39811
39812      ;;
39813  esac
39814
39815  if test $REPLACE_RENAME = 1; then
39816
39817
39818
39819
39820
39821
39822
39823
39824  gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
39825
39826  fi
39827
39828
39829
39830
39831
39832          GNULIB_RENAME=1
39833
39834
39835
39836
39837
39838printf "%s\n" "#define GNULIB_TEST_RENAME 1" >>confdefs.h
39839
39840
39841
39842
39843
39844
39845  ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
39846if test "x$ac_cv_func_rewinddir" = xyes
39847then :
39848  printf "%s\n" "#define HAVE_REWINDDIR 1" >>confdefs.h
39849
39850fi
39851
39852  if test $ac_cv_func_rewinddir = no; then
39853    HAVE_REWINDDIR=0
39854  fi
39855
39856  if test $HAVE_REWINDDIR = 0; then
39857
39858
39859
39860
39861
39862
39863
39864
39865  gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
39866
39867  fi
39868
39869
39870
39871
39872
39873          GNULIB_REWINDDIR=1
39874
39875
39876
39877
39878
39879printf "%s\n" "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
39880
39881
39882
39883
39884
39885
39886  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
39887printf %s "checking whether rmdir works... " >&6; }
39888if test ${gl_cv_func_rmdir_works+y}
39889then :
39890  printf %s "(cached) " >&6
39891else $as_nop
39892  mkdir conftest.dir
39893     touch conftest.file
39894     if test "$cross_compiling" = yes
39895then :
39896  case "$host_os" in
39897                           # Guess yes on Linux systems.
39898          linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
39899                           # Guess yes on glibc systems.
39900          *-gnu* | gnu*)   gl_cv_func_rmdir_works="guessing yes" ;;
39901                           # Guess no on native Windows.
39902          mingw*)          gl_cv_func_rmdir_works="guessing no" ;;
39903                           # If we don't know, obey --enable-cross-guesses.
39904          *)               gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
39905        esac
39906
39907else $as_nop
39908  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39909/* end confdefs.h.  */
39910#include <stdio.h>
39911           #include <errno.h>
39912           #if HAVE_UNISTD_H
39913           # include <unistd.h>
39914           #else /* on Windows with MSVC */
39915           # include <direct.h>
39916           #endif
39917
39918
39919$gl_mda_defines
39920
39921int
39922main (void)
39923{
39924int result = 0;
39925           if (!rmdir ("conftest.file/"))
39926             result |= 1;
39927           else if (errno != ENOTDIR)
39928             result |= 2;
39929           if (!rmdir ("conftest.dir/./"))
39930             result |= 4;
39931           return result;
39932
39933  ;
39934  return 0;
39935}
39936_ACEOF
39937if ac_fn_c_try_run "$LINENO"
39938then :
39939  gl_cv_func_rmdir_works=yes
39940else $as_nop
39941  gl_cv_func_rmdir_works=no
39942fi
39943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39944  conftest.$ac_objext conftest.beam conftest.$ac_ext
39945fi
39946
39947     rm -rf conftest.dir conftest.file
39948fi
39949{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
39950printf "%s\n" "$gl_cv_func_rmdir_works" >&6; }
39951  case "$gl_cv_func_rmdir_works" in
39952    *yes) ;;
39953    *)
39954      REPLACE_RMDIR=1
39955      ;;
39956  esac
39957
39958  if test $REPLACE_RMDIR = 1; then
39959
39960
39961
39962
39963
39964
39965
39966
39967  gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
39968
39969  fi
39970
39971
39972
39973
39974
39975          GNULIB_RMDIR=1
39976
39977
39978
39979
39980
39981printf "%s\n" "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
39982
39983
39984
39985
39986
39987
39988
39989
39990
39991
39992
39993
39994
39995
39996
39997
39998
39999
40000
40001
40002  ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "#if HAVE_SYS_CDEFS_H
40003       #include <sys/cdefs.h>
40004      #endif
40005
40006"
40007if test "x$ac_cv_header_sched_h" = xyes
40008then :
40009  printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
40010
40011fi
40012
40013
40014
40015
40016
40017
40018
40019
40020
40021     if test $gl_cv_have_include_next = yes; then
40022       gl_cv_next_sched_h='<'sched.h'>'
40023     else
40024       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
40025printf %s "checking absolute name of <sched.h>... " >&6; }
40026if test ${gl_cv_next_sched_h+y}
40027then :
40028  printf %s "(cached) " >&6
40029else $as_nop
40030
40031
40032
40033  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40034/* end confdefs.h.  */
40035#include <sched.h>
40036_ACEOF
40037                case "$host_os" in
40038    aix*) gl_absname_cpp="$ac_cpp -C" ;;
40039    *)    gl_absname_cpp="$ac_cpp" ;;
40040  esac
40041
40042  case "$host_os" in
40043    mingw*)
40044                                          gl_dirsep_regex='[/\\]'
40045      ;;
40046    *)
40047      gl_dirsep_regex='\/'
40048      ;;
40049  esac
40050      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
40051  gl_header_literal_regex=`echo 'sched.h' \
40052                           | sed -e "$gl_make_literal_regex_sed"`
40053  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
40054      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
40055      s|^/[^/]|//&|
40056      p
40057      q
40058    }'
40059
40060        gl_cv_absolute_sched_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
40061  sed -n "$gl_absolute_header_sed"`
40062
40063           gl_header=$gl_cv_absolute_sched_h
40064           gl_cv_next_sched_h='"'$gl_header'"'
40065
40066
40067fi
40068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
40069printf "%s\n" "$gl_cv_next_sched_h" >&6; }
40070     fi
40071     NEXT_SCHED_H=$gl_cv_next_sched_h
40072
40073     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
40074       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
40075       gl_next_as_first_directive='<'sched.h'>'
40076     else
40077       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
40078       gl_next_as_first_directive=$gl_cv_next_sched_h
40079     fi
40080     NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
40081
40082
40083
40084
40085
40086  if test "$ac_cv_header_sched_h" = yes; then
40087    HAVE_SCHED_H=1
40088  else
40089    HAVE_SCHED_H=0
40090  fi
40091
40092
40093  if test "$HAVE_SCHED_H" = 1; then
40094    ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#if HAVE_SYS_CDEFS_H
40095         #include <sys/cdefs.h>
40096        #endif
40097        #include <sched.h>
40098
40099"
40100if test "x$ac_cv_type_struct_sched_param" = xyes
40101then :
40102  HAVE_STRUCT_SCHED_PARAM=1
40103else $as_nop
40104  HAVE_STRUCT_SCHED_PARAM=0
40105fi
40106
40107  else
40108    HAVE_STRUCT_SCHED_PARAM=0
40109    case "$host_os" in
40110      os2*)
40111                ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <spawn.h>
40112"
40113if test "x$ac_cv_type_struct_sched_param" = xyes
40114then :
40115  HAVE_STRUCT_SCHED_PARAM=1
40116fi
40117
40118        ;;
40119      vms)
40120                ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <pthread.h>
40121"
40122if test "x$ac_cv_type_struct_sched_param" = xyes
40123then :
40124  HAVE_STRUCT_SCHED_PARAM=1
40125fi
40126
40127        ;;
40128    esac
40129  fi
40130
40131
40132  if test "$ac_cv_header_sys_cdefs_h" = yes; then
40133    HAVE_SYS_CDEFS_H=1
40134  else
40135    HAVE_SYS_CDEFS_H=0
40136  fi
40137
40138
40139
40140
40141
40142
40143
40144
40145
40146
40147
40148
40149  if test "$ac_cv_header_winsock2_h" = yes; then
40150    REPLACE_SELECT=1
40151  else
40152
40153    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
40154printf %s "checking whether select supports a 0 argument... " >&6; }
40155if test ${gl_cv_func_select_supports0+y}
40156then :
40157  printf %s "(cached) " >&6
40158else $as_nop
40159
40160        if test "$cross_compiling" = yes
40161then :
40162
40163           case "$host_os" in
40164                       # Guess no on Interix.
40165             interix*) gl_cv_func_select_supports0="guessing no";;
40166                       # Guess yes otherwise.
40167             *)        gl_cv_func_select_supports0="guessing yes";;
40168           esac
40169
40170else $as_nop
40171  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40172/* end confdefs.h.  */
40173
40174#include <sys/types.h>
40175#include <sys/time.h>
40176#if HAVE_SYS_SELECT_H
40177#include <sys/select.h>
40178#endif
40179int main ()
40180{
40181  struct timeval timeout;
40182  timeout.tv_sec = 0;
40183  timeout.tv_usec = 5;
40184  return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
40185}
40186_ACEOF
40187if ac_fn_c_try_run "$LINENO"
40188then :
40189  gl_cv_func_select_supports0=yes
40190else $as_nop
40191  gl_cv_func_select_supports0=no
40192fi
40193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40194  conftest.$ac_objext conftest.beam conftest.$ac_ext
40195fi
40196
40197
40198fi
40199{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
40200printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
40201    case "$gl_cv_func_select_supports0" in
40202      *yes) ;;
40203      *) REPLACE_SELECT=1 ;;
40204    esac
40205
40206        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
40207printf %s "checking whether select detects invalid fds... " >&6; }
40208if test ${gl_cv_func_select_detects_ebadf+y}
40209then :
40210  printf %s "(cached) " >&6
40211else $as_nop
40212
40213        if test "$cross_compiling" = yes
40214then :
40215
40216           case "$host_os" in
40217                             # Guess yes on Linux systems.
40218            linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
40219                             # Guess yes on glibc systems.
40220            *-gnu* | gnu*)   gl_cv_func_select_detects_ebadf="guessing yes" ;;
40221                             # If we don't know, obey --enable-cross-guesses.
40222            *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
40223           esac
40224
40225else $as_nop
40226  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40227/* end confdefs.h.  */
40228
40229#include <sys/types.h>
40230#include <sys/time.h>
40231#if HAVE_SYS_SELECT_H
40232# include <sys/select.h>
40233#endif
40234#include <unistd.h>
40235#include <errno.h>
40236
40237
40238$gl_mda_defines
40239
40240int
40241main (void)
40242{
40243
40244  fd_set set;
40245  dup2(0, 16);
40246  FD_ZERO(&set);
40247  FD_SET(16, &set);
40248  close(16);
40249  struct timeval timeout;
40250  timeout.tv_sec = 0;
40251  timeout.tv_usec = 5;
40252  return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
40253
40254  ;
40255  return 0;
40256}
40257_ACEOF
40258if ac_fn_c_try_run "$LINENO"
40259then :
40260  gl_cv_func_select_detects_ebadf=yes
40261else $as_nop
40262  gl_cv_func_select_detects_ebadf=no
40263fi
40264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40265  conftest.$ac_objext conftest.beam conftest.$ac_ext
40266fi
40267
40268
40269fi
40270{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
40271printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
40272    case $gl_cv_func_select_detects_ebadf in
40273      *yes) ;;
40274      *) REPLACE_SELECT=1 ;;
40275    esac
40276  fi
40277
40278    LIB_SELECT="$LIBSOCKET"
40279  if test $REPLACE_SELECT = 1; then
40280    case "$host_os" in
40281      mingw*)
40282                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40283/* end confdefs.h.  */
40284
40285#define WIN32_LEAN_AND_MEAN
40286#include <windows.h>
40287int
40288main ()
40289{
40290  MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
40291  return 0;
40292}
40293_ACEOF
40294if ac_fn_c_try_link "$LINENO"
40295then :
40296
40297else $as_nop
40298  LIB_SELECT="$LIB_SELECT -luser32"
40299fi
40300rm -f core conftest.err conftest.$ac_objext conftest.beam \
40301    conftest$ac_exeext conftest.$ac_ext
40302        ;;
40303    esac
40304  fi
40305
40306
40307  if test $REPLACE_SELECT = 1; then
40308
40309
40310
40311
40312
40313
40314
40315
40316  gl_LIBOBJS="$gl_LIBOBJS select.$ac_objext"
40317
40318  fi
40319
40320
40321
40322
40323
40324          GNULIB_SELECT=1
40325
40326
40327
40328
40329
40330printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
40331
40332
40333
40334
40335  if test "$ac_cv_header_winsock2_h" = yes; then
40336
40337
40338
40339
40340
40341
40342
40343
40344  gl_LIBOBJS="$gl_LIBOBJS send.$ac_objext"
40345
40346  fi
40347
40348
40349
40350
40351
40352          GNULIB_SEND=1
40353
40354
40355
40356
40357
40358printf "%s\n" "#define GNULIB_TEST_SEND 1" >>confdefs.h
40359
40360
40361
40362
40363  if test "$ac_cv_header_winsock2_h" = yes; then
40364
40365
40366
40367
40368
40369
40370
40371
40372  gl_LIBOBJS="$gl_LIBOBJS sendto.$ac_objext"
40373
40374  fi
40375
40376
40377
40378
40379
40380          GNULIB_SENDTO=1
40381
40382
40383
40384
40385
40386printf "%s\n" "#define GNULIB_TEST_SENDTO 1" >>confdefs.h
40387
40388
40389
40390
40391                      SERVENT_LIB=
40392  gl_saved_libs="$LIBS"
40393  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getservbyname" >&5
40394printf %s "checking for library containing getservbyname... " >&6; }
40395if test ${ac_cv_search_getservbyname+y}
40396then :
40397  printf %s "(cached) " >&6
40398else $as_nop
40399  ac_func_search_save_LIBS=$LIBS
40400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40401/* end confdefs.h.  */
40402
40403/* Override any GCC internal prototype to avoid an error.
40404   Use char because int might match the return type of a GCC
40405   builtin and then its argument prototype would still apply.  */
40406char getservbyname ();
40407int
40408main (void)
40409{
40410return getservbyname ();
40411  ;
40412  return 0;
40413}
40414_ACEOF
40415for ac_lib in '' socket network net
40416do
40417  if test -z "$ac_lib"; then
40418    ac_res="none required"
40419  else
40420    ac_res=-l$ac_lib
40421    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
40422  fi
40423  if ac_fn_c_try_link "$LINENO"
40424then :
40425  ac_cv_search_getservbyname=$ac_res
40426fi
40427rm -f core conftest.err conftest.$ac_objext conftest.beam \
40428    conftest$ac_exeext
40429  if test ${ac_cv_search_getservbyname+y}
40430then :
40431  break
40432fi
40433done
40434if test ${ac_cv_search_getservbyname+y}
40435then :
40436
40437else $as_nop
40438  ac_cv_search_getservbyname=no
40439fi
40440rm conftest.$ac_ext
40441LIBS=$ac_func_search_save_LIBS
40442fi
40443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getservbyname" >&5
40444printf "%s\n" "$ac_cv_search_getservbyname" >&6; }
40445ac_res=$ac_cv_search_getservbyname
40446if test "$ac_res" != no
40447then :
40448  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
40449  if test "$ac_cv_search_getservbyname" != "none required"; then
40450       SERVENT_LIB="$ac_cv_search_getservbyname"
40451     fi
40452fi
40453
40454  LIBS="$gl_saved_libs"
40455  if test -z "$SERVENT_LIB"; then
40456
40457  for ac_func in getservbyname
40458do :
40459  ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname"
40460if test "x$ac_cv_func_getservbyname" = xyes
40461then :
40462  printf "%s\n" "#define HAVE_GETSERVBYNAME 1" >>confdefs.h
40463
40464else $as_nop
40465
40466      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getservbyname in winsock2.h and -lws2_32" >&5
40467printf %s "checking for getservbyname in winsock2.h and -lws2_32... " >&6; }
40468if test ${gl_cv_w32_getservbyname+y}
40469then :
40470  printf %s "(cached) " >&6
40471else $as_nop
40472  gl_cv_w32_getservbyname=no
40473         gl_save_LIBS="$LIBS"
40474         LIBS="$LIBS -lws2_32"
40475         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40476/* end confdefs.h.  */
40477
40478#ifdef HAVE_WINSOCK2_H
40479#include <winsock2.h>
40480#endif
40481#include <stddef.h>
40482
40483int
40484main (void)
40485{
40486getservbyname(NULL,NULL);
40487  ;
40488  return 0;
40489}
40490_ACEOF
40491if ac_fn_c_try_link "$LINENO"
40492then :
40493  gl_cv_w32_getservbyname=yes
40494fi
40495rm -f core conftest.err conftest.$ac_objext conftest.beam \
40496    conftest$ac_exeext conftest.$ac_ext
40497         LIBS="$gl_save_LIBS"
40498
40499fi
40500{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_getservbyname" >&5
40501printf "%s\n" "$gl_cv_w32_getservbyname" >&6; }
40502      if test "$gl_cv_w32_getservbyname" = "yes"; then
40503        SERVENT_LIB="-lws2_32"
40504      fi
40505
40506fi
40507
40508done
40509  fi
40510
40511
40512
40513
40514
40515
40516
40517    NEED_SETLOCALE_IMPROVED=0
40518  case "$host_os" in
40519            mingw*) NEED_SETLOCALE_IMPROVED=1 ;;
40520            cygwin*)
40521      case `uname -r` in
40522        1.5.*) NEED_SETLOCALE_IMPROVED=1 ;;
40523      esac
40524      ;;
40525        *)
40526      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale supports the C locale" >&5
40527printf %s "checking whether setlocale supports the C locale... " >&6; }
40528if test ${gl_cv_func_setlocale_works+y}
40529then :
40530  printf %s "(cached) " >&6
40531else $as_nop
40532  if test "$cross_compiling" = yes
40533then :
40534  case "$host_os" in
40535                               # Guess no on Android.
40536              linux*-android*) gl_cv_func_setlocale_works="guessing no";;
40537                               # Guess yes otherwise.
40538              *)               gl_cv_func_setlocale_works="guessing yes";;
40539            esac
40540
40541else $as_nop
40542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40543/* end confdefs.h.  */
40544
40545#include <locale.h>
40546int main ()
40547{
40548  return setlocale (LC_ALL, "C") == NULL;
40549}
40550_ACEOF
40551if ac_fn_c_try_run "$LINENO"
40552then :
40553  gl_cv_func_setlocale_works=yes
40554else $as_nop
40555  gl_cv_func_setlocale_works=no
40556fi
40557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40558  conftest.$ac_objext conftest.beam conftest.$ac_ext
40559fi
40560
40561
40562fi
40563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_works" >&5
40564printf "%s\n" "$gl_cv_func_setlocale_works" >&6; }
40565      case "$gl_cv_func_setlocale_works" in
40566        *yes) ;;
40567        *) NEED_SETLOCALE_IMPROVED=1 ;;
40568      esac
40569      ;;
40570  esac
40571
40572printf "%s\n" "#define NEED_SETLOCALE_IMPROVED $NEED_SETLOCALE_IMPROVED" >>confdefs.h
40573
40574
40575    NEED_SETLOCALE_MTSAFE=0
40576  if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
40577    NEED_SETLOCALE_MTSAFE=1
40578  fi
40579
40580printf "%s\n" "#define NEED_SETLOCALE_MTSAFE $NEED_SETLOCALE_MTSAFE" >>confdefs.h
40581
40582
40583  if test $NEED_SETLOCALE_IMPROVED = 1 || test $NEED_SETLOCALE_MTSAFE = 1; then
40584    REPLACE_SETLOCALE=1
40585  fi
40586
40587  if test $NEED_SETLOCALE_MTSAFE = 1; then
40588    LIB_SETLOCALE="$LIB_SETLOCALE_NULL"
40589  else
40590    LIB_SETLOCALE=
40591  fi
40592
40593
40594  if test $REPLACE_SETLOCALE = 1; then
40595
40596
40597
40598
40599
40600
40601
40602
40603  gl_LIBOBJS="$gl_LIBOBJS setlocale.$ac_objext"
40604
40605
40606        :
40607
40608  fi
40609
40610
40611
40612
40613
40614          GNULIB_SETLOCALE=1
40615
40616
40617
40618
40619
40620printf "%s\n" "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
40621
40622
40623
40624
40625
40626
40627
40628
40629  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
40630printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
40631if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
40632then :
40633  printf %s "(cached) " >&6
40634else $as_nop
40635  case "$host_os" in
40636       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
40637       *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
40638         gl_cv_func_setlocale_null_all_mtsafe=no ;;
40639       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
40640       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
40641         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
40642       # If we don't know, obey --enable-cross-guesses.
40643       *)
40644         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
40645     esac
40646
40647fi
40648{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
40649printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
40650    case "$host_os" in
40651    mingw*) ;;
40652    *)
40653      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
40654        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
40655      fi
40656      ;;
40657  esac
40658  case "$gl_cv_func_setlocale_null_all_mtsafe" in
40659    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
40660    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
40661  esac
40662
40663printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
40664
40665
40666    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
40667printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
40668if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
40669then :
40670  printf %s "(cached) " >&6
40671else $as_nop
40672  case "$host_os" in
40673       # Guess no on OpenBSD, AIX.
40674       openbsd* | aix*)
40675         gl_cv_func_setlocale_null_one_mtsafe=no ;;
40676       # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
40677       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
40678         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
40679       # If we don't know, obey --enable-cross-guesses.
40680       *)
40681         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
40682     esac
40683
40684fi
40685{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
40686printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
40687    case "$host_os" in
40688    mingw*) ;;
40689    *)
40690      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
40691        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
40692      fi
40693      ;;
40694  esac
40695  case "$gl_cv_func_setlocale_null_one_mtsafe" in
40696    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
40697    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
40698  esac
40699
40700printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
40701
40702
40703    if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
40704    case "$host_os" in
40705      mingw*) LIB_SETLOCALE_NULL= ;;
40706      *)
40707
40708
40709  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
40710printf %s "checking whether imported symbols can be declared weak... " >&6; }
40711if test ${gl_cv_have_weak+y}
40712then :
40713  printf %s "(cached) " >&6
40714else $as_nop
40715  gl_cv_have_weak=no
40716          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40717/* end confdefs.h.  */
40718extern void xyzzy ();
40719#pragma weak xyzzy
40720int
40721main (void)
40722{
40723xyzzy();
40724  ;
40725  return 0;
40726}
40727_ACEOF
40728if ac_fn_c_try_link "$LINENO"
40729then :
40730  gl_cv_have_weak=maybe
40731fi
40732rm -f core conftest.err conftest.$ac_objext conftest.beam \
40733    conftest$ac_exeext conftest.$ac_ext
40734     if test $gl_cv_have_weak = maybe; then
40735                     if test "$cross_compiling" = yes
40736then :
40737                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40738/* end confdefs.h.  */
40739#ifdef __ELF__
40740             Extensible Linking Format
40741             #endif
40742
40743_ACEOF
40744if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40745  $EGREP "Extensible Linking Format" >/dev/null 2>&1
40746then :
40747  gl_cv_have_weak="guessing yes"
40748else $as_nop
40749  gl_cv_have_weak="guessing no"
40750fi
40751rm -rf conftest*
40752
40753
40754else $as_nop
40755  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40756/* end confdefs.h.  */
40757
40758#include <stdio.h>
40759#pragma weak fputs
40760int main ()
40761{
40762  return (fputs == NULL);
40763}
40764_ACEOF
40765if ac_fn_c_try_run "$LINENO"
40766then :
40767  gl_cv_have_weak=yes
40768else $as_nop
40769  gl_cv_have_weak=no
40770fi
40771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40772  conftest.$ac_objext conftest.beam conftest.$ac_ext
40773fi
40774
40775     fi
40776          case " $LDFLAGS " in
40777       *" -static "*) gl_cv_have_weak=no ;;
40778     esac
40779                    case "$gl_cv_have_weak" in
40780       *yes)
40781         case "$host_os" in
40782           freebsd* | dragonfly*)
40783             : > conftest1.c
40784             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
40785             cat <<EOF > conftest2.c
40786#include <pthread.h>
40787#pragma weak pthread_mutexattr_gettype
40788int main ()
40789{
40790  return (pthread_mutexattr_gettype != NULL);
40791}
40792EOF
40793             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
40794               || gl_cv_have_weak=no
40795             rm -f conftest1.c libempty.so conftest2.c conftest
40796             ;;
40797         esac
40798         ;;
40799     esac
40800
40801fi
40802{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
40803printf "%s\n" "$gl_cv_have_weak" >&6; }
40804  case "$gl_cv_have_weak" in
40805    *yes)
40806
40807printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
40808
40809      ;;
40810  esac
40811
40812        case "$gl_cv_have_weak" in
40813          *yes) LIB_SETLOCALE_NULL= ;;
40814          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
40815        esac
40816        ;;
40817    esac
40818  else
40819    LIB_SETLOCALE_NULL=
40820  fi
40821
40822
40823  if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
40824
40825
40826
40827
40828
40829
40830
40831
40832  gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
40833
40834
40835
40836
40837  CFLAG_VISIBILITY=
40838  HAVE_VISIBILITY=0
40839  if test -n "$GCC"; then
40840                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
40841printf %s "checking whether the -Werror option is usable... " >&6; }
40842if test ${gl_cv_cc_vis_werror+y}
40843then :
40844  printf %s "(cached) " >&6
40845else $as_nop
40846  gl_save_CFLAGS="$CFLAGS"
40847       CFLAGS="$CFLAGS -Werror"
40848       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40849/* end confdefs.h.  */
40850
40851int
40852main (void)
40853{
40854
40855  ;
40856  return 0;
40857}
40858_ACEOF
40859if ac_fn_c_try_compile "$LINENO"
40860then :
40861  gl_cv_cc_vis_werror=yes
40862else $as_nop
40863  gl_cv_cc_vis_werror=no
40864fi
40865rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
40866       CFLAGS="$gl_save_CFLAGS"
40867
40868fi
40869{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
40870printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
40871        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
40872printf %s "checking for simple visibility declarations... " >&6; }
40873if test ${gl_cv_cc_visibility+y}
40874then :
40875  printf %s "(cached) " >&6
40876else $as_nop
40877  gl_save_CFLAGS="$CFLAGS"
40878       CFLAGS="$CFLAGS -fvisibility=hidden"
40879                                          if test $gl_cv_cc_vis_werror = yes; then
40880         CFLAGS="$CFLAGS -Werror"
40881       fi
40882       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40883/* end confdefs.h.  */
40884extern __attribute__((__visibility__("hidden"))) int hiddenvar;
40885              extern __attribute__((__visibility__("default"))) int exportedvar;
40886              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
40887              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
40888              void dummyfunc (void) {}
40889
40890int
40891main (void)
40892{
40893
40894  ;
40895  return 0;
40896}
40897_ACEOF
40898if ac_fn_c_try_compile "$LINENO"
40899then :
40900  gl_cv_cc_visibility=yes
40901else $as_nop
40902  gl_cv_cc_visibility=no
40903fi
40904rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
40905       CFLAGS="$gl_save_CFLAGS"
40906
40907fi
40908{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
40909printf "%s\n" "$gl_cv_cc_visibility" >&6; }
40910    if test $gl_cv_cc_visibility = yes; then
40911      CFLAG_VISIBILITY="-fvisibility=hidden"
40912      HAVE_VISIBILITY=1
40913    fi
40914  fi
40915
40916
40917
40918printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
40919
40920
40921
40922  fi
40923
40924
40925
40926
40927
40928          GNULIB_SETLOCALE_NULL=1
40929
40930
40931
40932
40933
40934printf "%s\n" "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
40935
40936
40937
40938
40939  if test "$ac_cv_header_winsock2_h" = yes; then
40940
40941
40942
40943
40944
40945
40946
40947
40948  gl_LIBOBJS="$gl_LIBOBJS setsockopt.$ac_objext"
40949
40950  fi
40951
40952
40953
40954
40955
40956          GNULIB_SETSOCKOPT=1
40957
40958
40959
40960
40961
40962printf "%s\n" "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
40963
40964
40965
40966
40967
40968
40969
40970
40971
40972  if test $ac_cv_func_sigaction = yes; then
40973    ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
40974"
40975if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes
40976then :
40977
40978printf "%s\n" "#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1" >>confdefs.h
40979
40980
40981fi
40982
40983    if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
40984      HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
40985    fi
40986  else
40987    HAVE_SIGACTION=0
40988  fi
40989
40990  if test $HAVE_SIGACTION = 0; then
40991
40992
40993
40994
40995
40996
40997
40998
40999  gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext"
41000
41001
41002
41003
41004
41005
41006
41007  ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
41008#include <signal.h>
41009
41010"
41011if test "x$ac_cv_type_siginfo_t" = xyes
41012then :
41013
41014printf "%s\n" "#define HAVE_SIGINFO_T 1" >>confdefs.h
41015
41016
41017fi
41018
41019  if test $ac_cv_type_siginfo_t = no; then
41020    HAVE_SIGINFO_T=0
41021  fi
41022
41023  fi
41024
41025
41026
41027
41028
41029          GNULIB_SIGACTION=1
41030
41031
41032
41033
41034
41035printf "%s\n" "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
41036
41037
41038
41039
41040
41041
41042
41043
41044
41045
41046
41047
41048
41049
41050     if test $gl_cv_have_include_next = yes; then
41051       gl_cv_next_signal_h='<'signal.h'>'
41052     else
41053       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
41054printf %s "checking absolute name of <signal.h>... " >&6; }
41055if test ${gl_cv_next_signal_h+y}
41056then :
41057  printf %s "(cached) " >&6
41058else $as_nop
41059
41060
41061
41062  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41063/* end confdefs.h.  */
41064#include <signal.h>
41065_ACEOF
41066                case "$host_os" in
41067    aix*) gl_absname_cpp="$ac_cpp -C" ;;
41068    *)    gl_absname_cpp="$ac_cpp" ;;
41069  esac
41070
41071  case "$host_os" in
41072    mingw*)
41073                                          gl_dirsep_regex='[/\\]'
41074      ;;
41075    *)
41076      gl_dirsep_regex='\/'
41077      ;;
41078  esac
41079      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
41080  gl_header_literal_regex=`echo 'signal.h' \
41081                           | sed -e "$gl_make_literal_regex_sed"`
41082  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
41083      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
41084      s|^/[^/]|//&|
41085      p
41086      q
41087    }'
41088
41089        gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
41090  sed -n "$gl_absolute_header_sed"`
41091
41092           gl_header=$gl_cv_absolute_signal_h
41093           gl_cv_next_signal_h='"'$gl_header'"'
41094
41095
41096fi
41097{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
41098printf "%s\n" "$gl_cv_next_signal_h" >&6; }
41099     fi
41100     NEXT_SIGNAL_H=$gl_cv_next_signal_h
41101
41102     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
41103       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
41104       gl_next_as_first_directive='<'signal.h'>'
41105     else
41106       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
41107       gl_next_as_first_directive=$gl_cv_next_signal_h
41108     fi
41109     NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
41110
41111
41112
41113
41114
41115# AIX declares sig_atomic_t to already include volatile, and C89 compilers
41116# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
41117  ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
41118#include <signal.h>
41119
41120"
41121if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
41122then :
41123
41124else $as_nop
41125  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
41126fi
41127
41128
41129
41130
41131
41132
41133
41134  ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
41135#include <signal.h>
41136
41137"
41138if test "x$ac_cv_type_sighandler_t" = xyes
41139then :
41140
41141else $as_nop
41142  HAVE_SIGHANDLER_T=0
41143fi
41144
41145
41146
41147
41148
41149
41150
41151
41152
41153
41154
41155  HAVE_POSIX_SIGNALBLOCKING=0
41156  if test "$gl_cv_type_sigset_t" = yes; then
41157    ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
41158if test "x$ac_cv_func_sigprocmask" = xyes
41159then :
41160  HAVE_POSIX_SIGNALBLOCKING=1
41161fi
41162
41163  fi
41164
41165  if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
41166
41167
41168
41169
41170
41171
41172
41173
41174  gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
41175
41176    :
41177  fi
41178
41179
41180
41181
41182
41183          GNULIB_SIGPROCMASK=1
41184
41185
41186
41187
41188
41189printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
41190
41191
41192
41193
41194  ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
41195if test "x$ac_cv_header_stdint_h" = xyes
41196then :
41197  printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
41198
41199fi
41200
41201    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
41202printf %s "checking for SIZE_MAX... " >&6; }
41203if test ${gl_cv_size_max+y}
41204then :
41205  printf %s "(cached) " >&6
41206else $as_nop
41207
41208    gl_cv_size_max=no
41209    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41210/* end confdefs.h.  */
41211
41212#include <limits.h>
41213#if HAVE_STDINT_H
41214#include <stdint.h>
41215#endif
41216#ifdef SIZE_MAX
41217Found it
41218#endif
41219
41220_ACEOF
41221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41222  $EGREP "Found it" >/dev/null 2>&1
41223then :
41224  gl_cv_size_max=yes
41225fi
41226rm -rf conftest*
41227
41228    if test $gl_cv_size_max != yes; then
41229                        if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
41230#include <limits.h>"
41231then :
41232
41233else $as_nop
41234  size_t_bits_minus_1=
41235fi
41236
41237      if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"
41238then :
41239
41240else $as_nop
41241  fits_in_uint=
41242fi
41243
41244      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
41245        if test $fits_in_uint = 1; then
41246                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41247/* end confdefs.h.  */
41248#include <stddef.h>
41249                 extern size_t foo;
41250                 extern unsigned long foo;
41251
41252int
41253main (void)
41254{
41255
41256  ;
41257  return 0;
41258}
41259_ACEOF
41260if ac_fn_c_try_compile "$LINENO"
41261then :
41262  fits_in_uint=0
41263fi
41264rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41265        fi
41266                                if test $fits_in_uint = 1; then
41267          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
41268        else
41269          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
41270        fi
41271      else
41272                gl_cv_size_max='((size_t)~(size_t)0)'
41273      fi
41274    fi
41275
41276fi
41277{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
41278printf "%s\n" "$gl_cv_size_max" >&6; }
41279  if test "$gl_cv_size_max" != yes; then
41280
41281printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
41282
41283  fi
41284
41285
41286
41287
41288  gl_cv_func_snprintf_usable=no
41289  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
41290if test "x$ac_cv_func_snprintf" = xyes
41291then :
41292  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
41293
41294fi
41295
41296  if test $ac_cv_func_snprintf = yes; then
41297
41298
41299
41300  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
41301printf %s "checking whether snprintf respects a size of 1... " >&6; }
41302if test ${gl_cv_func_snprintf_size1+y}
41303then :
41304  printf %s "(cached) " >&6
41305else $as_nop
41306
41307      if test "$cross_compiling" = yes
41308then :
41309  case "$host_os" in
41310                            # Guess yes on Android.
41311           linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
41312                            # Guess yes on native Windows.
41313           mingw*)          gl_cv_func_snprintf_size1="guessing yes" ;;
41314           *)               gl_cv_func_snprintf_size1="guessing yes" ;;
41315         esac
41316
41317else $as_nop
41318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41319/* end confdefs.h.  */
41320
41321#include <stdio.h>
41322#if HAVE_SNPRINTF
41323# define my_snprintf snprintf
41324#else
41325# include <stdarg.h>
41326static int my_snprintf (char *buf, int size, const char *format, ...)
41327{
41328  va_list args;
41329  int ret;
41330  va_start (args, format);
41331  ret = vsnprintf (buf, size, format, args);
41332  va_end (args);
41333  return ret;
41334}
41335#endif
41336int main()
41337{
41338  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
41339  my_snprintf (buf, 1, "%d", 12345);
41340  return buf[1] != 'E';
41341}
41342_ACEOF
41343if ac_fn_c_try_run "$LINENO"
41344then :
41345  gl_cv_func_snprintf_size1=yes
41346else $as_nop
41347  gl_cv_func_snprintf_size1=no
41348fi
41349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41350  conftest.$ac_objext conftest.beam conftest.$ac_ext
41351fi
41352
41353
41354fi
41355{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
41356printf "%s\n" "$gl_cv_func_snprintf_size1" >&6; }
41357
41358    case "$gl_cv_func_snprintf_size1" in
41359      *yes)
41360
41361        case "$gl_cv_func_snprintf_retval_c99" in
41362          *yes)
41363
41364
41365     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
41366printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
41367if test ${gl_cv_func_printf_positions+y}
41368then :
41369  printf %s "(cached) " >&6
41370else $as_nop
41371
41372      if test "$cross_compiling" = yes
41373then :
41374
41375         case "$host_os" in
41376           netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
41377                            gl_cv_func_printf_positions="guessing no";;
41378           beos*)           gl_cv_func_printf_positions="guessing no";;
41379                            # Guess yes on Android.
41380           linux*-android*) gl_cv_func_printf_positions="guessing yes";;
41381                            # Guess no on native Windows.
41382           mingw* | pw*)    gl_cv_func_printf_positions="guessing no";;
41383           *)               gl_cv_func_printf_positions="guessing yes";;
41384         esac
41385
41386else $as_nop
41387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41388/* end confdefs.h.  */
41389
41390#include <stdio.h>
41391#include <string.h>
41392/* The string "%2$d %1$d", with dollar characters protected from the shell's
41393   dollar expansion (possibly an autoconf bug).  */
41394static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
41395static char buf[100];
41396int main ()
41397{
41398  sprintf (buf, format, 33, 55);
41399  return (strcmp (buf, "55 33") != 0);
41400}
41401_ACEOF
41402if ac_fn_c_try_run "$LINENO"
41403then :
41404  gl_cv_func_printf_positions=yes
41405else $as_nop
41406  gl_cv_func_printf_positions=no
41407fi
41408rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41409  conftest.$ac_objext conftest.beam conftest.$ac_ext
41410fi
41411
41412
41413fi
41414{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
41415printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
41416
41417            case "$gl_cv_func_printf_positions" in
41418              *yes)
41419                gl_cv_func_snprintf_usable=yes
41420                ;;
41421            esac
41422            ;;
41423        esac
41424        ;;
41425    esac
41426  fi
41427  if test $gl_cv_func_snprintf_usable = no; then
41428
41429
41430
41431
41432
41433
41434
41435
41436
41437
41438  gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
41439
41440  if test $ac_cv_func_snprintf = yes; then
41441    REPLACE_SNPRINTF=1
41442  else
41443
41444    if test $ac_cv_have_decl_snprintf = yes; then
41445                        REPLACE_SNPRINTF=1
41446    fi
41447  fi
41448  :
41449
41450  fi
41451
41452  if test $ac_cv_have_decl_snprintf = no; then
41453    HAVE_DECL_SNPRINTF=0
41454  fi
41455
41456
41457
41458
41459
41460
41461          GNULIB_SNPRINTF=1
41462
41463
41464
41465
41466
41467printf "%s\n" "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
41468
41469
41470
41471
41472
41473printf "%s\n" "#define GNULIB_SNPRINTF 1" >>confdefs.h
41474
41475
41476
41477  if test "$ac_cv_header_winsock2_h" = yes; then
41478
41479
41480
41481
41482
41483
41484
41485
41486  gl_LIBOBJS="$gl_LIBOBJS socket.$ac_objext"
41487
41488  fi
41489  # When this module is used, sockets may actually occur as file descriptors,
41490  # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
41491
41492
41493
41494  if test "$ac_cv_header_winsock2_h" = yes; then
41495    UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
41496    SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
41497  fi
41498
41499
41500
41501
41502
41503          GNULIB_SOCKET=1
41504
41505
41506
41507
41508
41509printf "%s\n" "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
41510
41511
41512
41513
41514
41515     ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
41516/* <sys/types.h> is not needed according to POSIX, but the
41517   <sys/socket.h> in i386-unknown-freebsd4.10 and
41518   powerpc-apple-darwin5.5 required it. */
41519#include <sys/types.h>
41520#if HAVE_SYS_SOCKET_H
41521# include <sys/socket.h>
41522#elif HAVE_WS2TCPIP_H
41523# include <ws2tcpip.h>
41524#endif
41525
41526"
41527if test "x$ac_cv_type_socklen_t" = xyes
41528then :
41529
41530else $as_nop
41531  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
41532printf %s "checking for socklen_t equivalent... " >&6; }
41533if test ${gl_cv_socklen_t_equiv+y}
41534then :
41535  printf %s "(cached) " >&6
41536else $as_nop
41537  # Systems have either "struct sockaddr *" or
41538         # "void *" as the second argument to getpeername
41539         gl_cv_socklen_t_equiv=
41540         for arg2 in "struct sockaddr" void; do
41541           for t in int size_t "unsigned int" "long int" "unsigned long int"; do
41542             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41543/* end confdefs.h.  */
41544#include <sys/types.h>
41545                   #include <sys/socket.h>
41546
41547                   int getpeername (int, $arg2 *, $t *);
41548int
41549main (void)
41550{
41551$t len;
41552                  getpeername (0, 0, &len);
41553  ;
41554  return 0;
41555}
41556_ACEOF
41557if ac_fn_c_try_compile "$LINENO"
41558then :
41559  gl_cv_socklen_t_equiv="$t"
41560fi
41561rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41562             test "$gl_cv_socklen_t_equiv" != "" && break
41563           done
41564           test "$gl_cv_socklen_t_equiv" != "" && break
41565         done
41566         if test "$gl_cv_socklen_t_equiv" = ""; then
41567           as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
41568         fi
41569
41570fi
41571{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
41572printf "%s\n" "$gl_cv_socklen_t_equiv" >&6; }
41573
41574printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h
41575
41576fi
41577
41578
41579
41580
41581
41582
41583
41584
41585
41586
41587
41588
41589
41590     if test $gl_cv_have_include_next = yes; then
41591       gl_cv_next_spawn_h='<'spawn.h'>'
41592     else
41593       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
41594printf %s "checking absolute name of <spawn.h>... " >&6; }
41595if test ${gl_cv_next_spawn_h+y}
41596then :
41597  printf %s "(cached) " >&6
41598else $as_nop
41599
41600             if test $ac_cv_header_spawn_h = yes; then
41601
41602
41603
41604
41605  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41606/* end confdefs.h.  */
41607#include <spawn.h>
41608_ACEOF
41609                case "$host_os" in
41610    aix*) gl_absname_cpp="$ac_cpp -C" ;;
41611    *)    gl_absname_cpp="$ac_cpp" ;;
41612  esac
41613
41614  case "$host_os" in
41615    mingw*)
41616                                          gl_dirsep_regex='[/\\]'
41617      ;;
41618    *)
41619      gl_dirsep_regex='\/'
41620      ;;
41621  esac
41622      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
41623  gl_header_literal_regex=`echo 'spawn.h' \
41624                           | sed -e "$gl_make_literal_regex_sed"`
41625  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
41626      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
41627      s|^/[^/]|//&|
41628      p
41629      q
41630    }'
41631
41632        gl_cv_absolute_spawn_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
41633  sed -n "$gl_absolute_header_sed"`
41634
41635           gl_header=$gl_cv_absolute_spawn_h
41636           gl_cv_next_spawn_h='"'$gl_header'"'
41637          else
41638               gl_cv_next_spawn_h='<'spawn.h'>'
41639             fi
41640
41641
41642fi
41643{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
41644printf "%s\n" "$gl_cv_next_spawn_h" >&6; }
41645     fi
41646     NEXT_SPAWN_H=$gl_cv_next_spawn_h
41647
41648     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
41649       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
41650       gl_next_as_first_directive='<'spawn.h'>'
41651     else
41652       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
41653       gl_next_as_first_directive=$gl_cv_next_spawn_h
41654     fi
41655     NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
41656
41657
41658
41659
41660
41661  if test $ac_cv_header_spawn_h = yes; then
41662    HAVE_SPAWN_H=1
41663    ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
41664#include <spawn.h>
41665
41666"
41667if test "x$ac_cv_type_posix_spawnattr_t" = xyes
41668then :
41669
41670printf "%s\n" "#define HAVE_POSIX_SPAWNATTR_T 1" >>confdefs.h
41671
41672
41673else $as_nop
41674  HAVE_POSIX_SPAWNATTR_T=0
41675fi
41676
41677    ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
41678#include <spawn.h>
41679
41680"
41681if test "x$ac_cv_type_posix_spawn_file_actions_t" = xyes
41682then :
41683
41684printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1" >>confdefs.h
41685
41686
41687else $as_nop
41688  HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
41689fi
41690
41691  else
41692    HAVE_SPAWN_H=0
41693    HAVE_POSIX_SPAWNATTR_T=0
41694    HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
41695  fi
41696
41697
41698
41699
41700
41701
41702
41703
41704
41705
41706
41707
41708
41709
41710
41711
41712
41713
41714  case "$host_os" in
41715    os2*)
41716
41717
41718
41719
41720
41721
41722
41723
41724  gl_LIBOBJS="$gl_LIBOBJS os2-spawn.$ac_objext"
41725
41726      ;;
41727  esac
41728
41729  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
41730printf %s "checking for ssize_t... " >&6; }
41731if test ${gt_cv_ssize_t+y}
41732then :
41733  printf %s "(cached) " >&6
41734else $as_nop
41735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41736/* end confdefs.h.  */
41737#include <sys/types.h>
41738int
41739main (void)
41740{
41741int x = sizeof (ssize_t *) + sizeof (ssize_t);
41742            return !x;
41743  ;
41744  return 0;
41745}
41746_ACEOF
41747if ac_fn_c_try_compile "$LINENO"
41748then :
41749  gt_cv_ssize_t=yes
41750else $as_nop
41751  gt_cv_ssize_t=no
41752fi
41753rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41754fi
41755{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
41756printf "%s\n" "$gt_cv_ssize_t" >&6; }
41757  if test $gt_cv_ssize_t = no; then
41758
41759printf "%s\n" "#define ssize_t int" >>confdefs.h
41760
41761  fi
41762
41763
41764
41765
41766
41767  case "$host_os" in
41768    mingw*)
41769                  REPLACE_STAT=1
41770      ;;
41771    *)
41772                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
41773printf %s "checking whether stat handles trailing slashes on files... " >&6; }
41774if test ${gl_cv_func_stat_file_slash+y}
41775then :
41776  printf %s "(cached) " >&6
41777else $as_nop
41778  touch conftest.tmp
41779         # Assume that if we have lstat, we can also check symlinks.
41780         if test $ac_cv_func_lstat = yes; then
41781           ln -s conftest.tmp conftest.lnk
41782         fi
41783         if test "$cross_compiling" = yes
41784then :
41785  case "$host_os" in
41786                               # Guess yes on Linux systems.
41787              linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
41788                               # Guess yes on glibc systems.
41789              *-gnu* | gnu*)   gl_cv_func_stat_file_slash="guessing yes" ;;
41790                               # If we don't know, obey --enable-cross-guesses.
41791              *)               gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
41792            esac
41793
41794else $as_nop
41795  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41796/* end confdefs.h.  */
41797#include <sys/stat.h>
41798
41799int
41800main (void)
41801{
41802int result = 0;
41803               struct stat st;
41804               if (!stat ("conftest.tmp/", &st))
41805                 result |= 1;
41806#if HAVE_LSTAT
41807               if (!stat ("conftest.lnk/", &st))
41808                 result |= 2;
41809#endif
41810               return result;
41811
41812  ;
41813  return 0;
41814}
41815_ACEOF
41816if ac_fn_c_try_run "$LINENO"
41817then :
41818  gl_cv_func_stat_file_slash=yes
41819else $as_nop
41820  gl_cv_func_stat_file_slash=no
41821fi
41822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41823  conftest.$ac_objext conftest.beam conftest.$ac_ext
41824fi
41825
41826         rm -f conftest.tmp conftest.lnk
41827fi
41828{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
41829printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
41830      case $gl_cv_func_stat_file_slash in
41831        *no)
41832          REPLACE_STAT=1
41833
41834printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
41835;;
41836      esac
41837      case $host_os in
41838                solaris*)
41839          REPLACE_FSTAT=1 ;;
41840      esac
41841      ;;
41842  esac
41843
41844  if test $REPLACE_STAT = 1; then
41845
41846
41847
41848
41849
41850
41851
41852
41853  gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
41854
41855    case "$host_os" in
41856      mingw*)
41857
41858
41859
41860
41861
41862
41863
41864
41865  gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
41866
41867        ;;
41868    esac
41869
41870
41871
41872  :
41873
41874  fi
41875
41876
41877
41878
41879
41880          GNULIB_STAT=1
41881
41882
41883
41884
41885
41886printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
41887
41888
41889
41890
41891
41892
41893
41894  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>
41895     #include <sys/stat.h>
41896"
41897if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
41898then :
41899
41900printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
41901
41902{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
41903printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
41904if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
41905then :
41906  printf %s "(cached) " >&6
41907else $as_nop
41908  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41909/* end confdefs.h.  */
41910
41911            #include <sys/types.h>
41912            #include <sys/stat.h>
41913            #if HAVE_SYS_TIME_H
41914            # include <sys/time.h>
41915            #endif
41916            #include <time.h>
41917            struct timespec ts;
41918            struct stat st;
41919
41920int
41921main (void)
41922{
41923
41924            st.st_atim = ts;
41925
41926  ;
41927  return 0;
41928}
41929_ACEOF
41930if ac_fn_c_try_compile "$LINENO"
41931then :
41932  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
41933else $as_nop
41934  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
41935fi
41936rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41937fi
41938{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
41939printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
41940     if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
41941
41942printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
41943
41944     fi
41945else $as_nop
41946  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>
41947        #include <sys/stat.h>
41948"
41949if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
41950then :
41951
41952printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
41953
41954
41955else $as_nop
41956  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
41957           #include <sys/stat.h>
41958"
41959if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
41960then :
41961
41962printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
41963
41964
41965else $as_nop
41966  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>
41967              #include <sys/stat.h>
41968"
41969if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
41970then :
41971
41972printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
41973
41974
41975fi
41976
41977fi
41978
41979fi
41980
41981fi
41982
41983
41984
41985
41986
41987  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>
41988     #include <sys/stat.h>
41989"
41990if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
41991then :
41992
41993printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
41994
41995
41996else $as_nop
41997  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
41998        #include <sys/stat.h>
41999"
42000if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
42001then :
42002
42003printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
42004
42005
42006else $as_nop
42007  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>
42008          #include <sys/stat.h>
42009"
42010if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
42011then :
42012
42013printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
42014
42015
42016fi
42017
42018fi
42019
42020fi
42021
42022
42023
42024  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
42025printf %s "checking for working stdalign.h... " >&6; }
42026if test ${gl_cv_header_working_stdalign_h+y}
42027then :
42028  printf %s "(cached) " >&6
42029else $as_nop
42030  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42031/* end confdefs.h.  */
42032#include <stdalign.h>
42033            #include <stddef.h>
42034
42035            /* Test that alignof yields a result consistent with offsetof.
42036               This catches GCC bug 52023
42037               <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
42038            #ifdef __cplusplus
42039               template <class t> struct alignof_helper { char a; t b; };
42040            # define ao(type) offsetof (alignof_helper<type>, b)
42041            #else
42042            # define ao(type) offsetof (struct { char a; type b; }, b)
42043            #endif
42044            char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
42045            char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
42046            char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
42047
42048            /* Test _Alignas only on platforms where gnulib can help.  */
42049            #if \
42050                ((defined __cplusplus && 201103 <= __cplusplus) \
42051                 || (defined __APPLE__ && defined __MACH__ \
42052                     ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
42053                     : __GNUC__) \
42054                 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
42055                 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
42056                 || 1300 <= _MSC_VER)
42057              struct alignas_test { char c; char alignas (8) alignas_8; };
42058              char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
42059                                ? 1 : -1];
42060            #endif
42061
42062int
42063main (void)
42064{
42065
42066  ;
42067  return 0;
42068}
42069_ACEOF
42070if ac_fn_c_try_compile "$LINENO"
42071then :
42072  gl_cv_header_working_stdalign_h=yes
42073else $as_nop
42074  gl_cv_header_working_stdalign_h=no
42075fi
42076rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42077fi
42078{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
42079printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }
42080
42081  if test $gl_cv_header_working_stdalign_h = yes; then
42082    STDALIGN_H=''
42083  else
42084    STDALIGN_H='stdalign.h'
42085  fi
42086
42087
42088   if test -n "$STDALIGN_H"; then
42089  GL_GENERATE_STDALIGN_H_TRUE=
42090  GL_GENERATE_STDALIGN_H_FALSE='#'
42091else
42092  GL_GENERATE_STDALIGN_H_TRUE='#'
42093  GL_GENERATE_STDALIGN_H_FALSE=
42094fi
42095
42096
42097
42098  STDARG_H=''
42099  NEXT_STDARG_H='<stdarg.h>'
42100  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
42101printf %s "checking for va_copy... " >&6; }
42102if test ${gl_cv_func_va_copy+y}
42103then :
42104  printf %s "(cached) " >&6
42105else $as_nop
42106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42107/* end confdefs.h.  */
42108#include <stdarg.h>
42109int
42110main (void)
42111{
42112
42113#ifndef va_copy
42114void (*func) (va_list, va_list) = va_copy;
42115#endif
42116
42117  ;
42118  return 0;
42119}
42120_ACEOF
42121if ac_fn_c_try_compile "$LINENO"
42122then :
42123  gl_cv_func_va_copy=yes
42124else $as_nop
42125  gl_cv_func_va_copy=no
42126fi
42127rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42128
42129fi
42130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
42131printf "%s\n" "$gl_cv_func_va_copy" >&6; }
42132  if test $gl_cv_func_va_copy = no; then
42133                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42134/* end confdefs.h.  */
42135#if defined _AIX && !defined __GNUC__
42136        AIX vaccine
42137       #endif
42138
42139_ACEOF
42140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42141  $EGREP "vaccine" >/dev/null 2>&1
42142then :
42143  gl_aixcc=yes
42144else $as_nop
42145  gl_aixcc=no
42146fi
42147rm -rf conftest*
42148
42149    if test $gl_aixcc = yes; then
42150            STDARG_H=stdarg.h
42151
42152
42153
42154
42155
42156
42157
42158
42159     if test $gl_cv_have_include_next = yes; then
42160       gl_cv_next_stdarg_h='<'stdarg.h'>'
42161     else
42162       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
42163printf %s "checking absolute name of <stdarg.h>... " >&6; }
42164if test ${gl_cv_next_stdarg_h+y}
42165then :
42166  printf %s "(cached) " >&6
42167else $as_nop
42168
42169
42170
42171  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42172/* end confdefs.h.  */
42173#include <stdarg.h>
42174_ACEOF
42175                case "$host_os" in
42176    aix*) gl_absname_cpp="$ac_cpp -C" ;;
42177    *)    gl_absname_cpp="$ac_cpp" ;;
42178  esac
42179
42180  case "$host_os" in
42181    mingw*)
42182                                          gl_dirsep_regex='[/\\]'
42183      ;;
42184    *)
42185      gl_dirsep_regex='\/'
42186      ;;
42187  esac
42188      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
42189  gl_header_literal_regex=`echo 'stdarg.h' \
42190                           | sed -e "$gl_make_literal_regex_sed"`
42191  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
42192      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
42193      s|^/[^/]|//&|
42194      p
42195      q
42196    }'
42197
42198        gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
42199  sed -n "$gl_absolute_header_sed"`
42200
42201           gl_header=$gl_cv_absolute_stdarg_h
42202           gl_cv_next_stdarg_h='"'$gl_header'"'
42203
42204
42205fi
42206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
42207printf "%s\n" "$gl_cv_next_stdarg_h" >&6; }
42208     fi
42209     NEXT_STDARG_H=$gl_cv_next_stdarg_h
42210
42211     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
42212       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
42213       gl_next_as_first_directive='<'stdarg.h'>'
42214     else
42215       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
42216       gl_next_as_first_directive=$gl_cv_next_stdarg_h
42217     fi
42218     NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
42219
42220
42221
42222
42223            if test "$gl_cv_next_stdarg_h" = '""'; then
42224        gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
42225        NEXT_STDARG_H="$gl_cv_next_stdarg_h"
42226      fi
42227    else
42228
42229
42230  exec 9>&6 6>/dev/null
42231
42232    if test ${gl_cv_func___va_copy+y}
42233then :
42234  printf %s "(cached) " >&6
42235else $as_nop
42236
42237        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42238/* end confdefs.h.  */
42239#include <stdarg.h>
42240int
42241main (void)
42242{
42243
42244#ifndef __va_copy
42245error, bail out
42246#endif
42247
42248  ;
42249  return 0;
42250}
42251_ACEOF
42252if ac_fn_c_try_compile "$LINENO"
42253then :
42254  gl_cv_func___va_copy=yes
42255else $as_nop
42256  gl_cv_func___va_copy=no
42257fi
42258rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42259fi
42260
42261
42262  exec 6>&9 9>&-
42263
42264
42265      if test $gl_cv_func___va_copy = yes; then
42266
42267printf "%s\n" "#define va_copy __va_copy" >>confdefs.h
42268
42269      else
42270
42271
42272printf "%s\n" "#define va_copy gl_va_copy" >>confdefs.h
42273
42274      fi
42275    fi
42276  fi
42277
42278   if test -n "$STDARG_H"; then
42279  GL_GENERATE_STDARG_H_TRUE=
42280  GL_GENERATE_STDARG_H_FALSE='#'
42281else
42282  GL_GENERATE_STDARG_H_TRUE='#'
42283  GL_GENERATE_STDARG_H_FALSE=
42284fi
42285
42286
42287
42288
42289
42290
42291
42292          if test "$ac_cv_header_stdbool_h" = yes; then
42293    case "$host_os" in
42294      solaris*)
42295        if test -z "$GCC"; then
42296          STDBOOL_H='stdbool.h'
42297        else
42298          STDBOOL_H=''
42299        fi
42300        ;;
42301      *)
42302        STDBOOL_H=''
42303        ;;
42304    esac
42305  else
42306    STDBOOL_H='stdbool.h'
42307  fi
42308
42309   if test -n "$STDBOOL_H"; then
42310  GL_GENERATE_STDBOOL_H_TRUE=
42311  GL_GENERATE_STDBOOL_H_FALSE='#'
42312else
42313  GL_GENERATE_STDBOOL_H_TRUE='#'
42314  GL_GENERATE_STDBOOL_H_FALSE=
42315fi
42316
42317
42318  if test "$ac_cv_type__Bool" = yes; then
42319    HAVE__BOOL=1
42320  else
42321    HAVE__BOOL=0
42322  fi
42323
42324
42325
42326
42327
42328
42329
42330
42331  STDDEF_H=
42332
42333      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
42334printf %s "checking for good max_align_t... " >&6; }
42335if test ${gl_cv_type_max_align_t+y}
42336then :
42337  printf %s "(cached) " >&6
42338else $as_nop
42339  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42340/* end confdefs.h.  */
42341#include <stddef.h>
42342            unsigned int s = sizeof (max_align_t);
42343            #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
42344            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
42345            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
42346            #endif
42347            typedef struct { char a; max_align_t b; } max_helper;
42348            typedef struct { char a; long b; } long_helper;
42349            typedef struct { char a; double b; } double_helper;
42350            typedef struct { char a; long double b; } long_double_helper;
42351            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
42352            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
42353            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
42354
42355int
42356main (void)
42357{
42358
42359  ;
42360  return 0;
42361}
42362_ACEOF
42363if ac_fn_c_try_compile "$LINENO"
42364then :
42365  gl_cv_type_max_align_t=yes
42366else $as_nop
42367  gl_cv_type_max_align_t=no
42368fi
42369rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42370
42371fi
42372{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
42373printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
42374  if test $gl_cv_type_max_align_t = no; then
42375    HAVE_MAX_ALIGN_T=0
42376    STDDEF_H=stddef.h
42377  fi
42378
42379  if test $gt_cv_c_wchar_t = no; then
42380    HAVE_WCHAR_T=0
42381    STDDEF_H=stddef.h
42382  fi
42383
42384  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
42385printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
42386if test ${gl_cv_decl_null_works+y}
42387then :
42388  printf %s "(cached) " >&6
42389else $as_nop
42390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42391/* end confdefs.h.  */
42392#include <stddef.h>
42393      int test[2 * (sizeof NULL == sizeof (void *)) -1];
42394
42395int
42396main (void)
42397{
42398
42399  ;
42400  return 0;
42401}
42402_ACEOF
42403if ac_fn_c_try_compile "$LINENO"
42404then :
42405  gl_cv_decl_null_works=yes
42406else $as_nop
42407  gl_cv_decl_null_works=no
42408fi
42409rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42410fi
42411{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
42412printf "%s\n" "$gl_cv_decl_null_works" >&6; }
42413  if test $gl_cv_decl_null_works = no; then
42414    REPLACE_NULL=1
42415    STDDEF_H=stddef.h
42416  fi
42417
42418
42419   if test -n "$STDDEF_H"; then
42420  GL_GENERATE_STDDEF_H_TRUE=
42421  GL_GENERATE_STDDEF_H_FALSE='#'
42422else
42423  GL_GENERATE_STDDEF_H_TRUE='#'
42424  GL_GENERATE_STDDEF_H_FALSE=
42425fi
42426
42427  if test -n "$STDDEF_H"; then
42428
42429
42430
42431
42432
42433
42434
42435
42436     if test $gl_cv_have_include_next = yes; then
42437       gl_cv_next_stddef_h='<'stddef.h'>'
42438     else
42439       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
42440printf %s "checking absolute name of <stddef.h>... " >&6; }
42441if test ${gl_cv_next_stddef_h+y}
42442then :
42443  printf %s "(cached) " >&6
42444else $as_nop
42445
42446
42447
42448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42449/* end confdefs.h.  */
42450#include <stddef.h>
42451_ACEOF
42452                case "$host_os" in
42453    aix*) gl_absname_cpp="$ac_cpp -C" ;;
42454    *)    gl_absname_cpp="$ac_cpp" ;;
42455  esac
42456
42457  case "$host_os" in
42458    mingw*)
42459                                          gl_dirsep_regex='[/\\]'
42460      ;;
42461    *)
42462      gl_dirsep_regex='\/'
42463      ;;
42464  esac
42465      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
42466  gl_header_literal_regex=`echo 'stddef.h' \
42467                           | sed -e "$gl_make_literal_regex_sed"`
42468  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
42469      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
42470      s|^/[^/]|//&|
42471      p
42472      q
42473    }'
42474
42475        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
42476  sed -n "$gl_absolute_header_sed"`
42477
42478           gl_header=$gl_cv_absolute_stddef_h
42479           gl_cv_next_stddef_h='"'$gl_header'"'
42480
42481
42482fi
42483{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
42484printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
42485     fi
42486     NEXT_STDDEF_H=$gl_cv_next_stddef_h
42487
42488     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
42489       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
42490       gl_next_as_first_directive='<'stddef.h'>'
42491     else
42492       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
42493       gl_next_as_first_directive=$gl_cv_next_stddef_h
42494     fi
42495     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
42496
42497
42498
42499
42500  fi
42501
42502
42503
42504
42505  printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
42506
42507
42508
42509
42510
42511
42512
42513
42514
42515
42516     if test $gl_cv_have_include_next = yes; then
42517       gl_cv_next_stdio_h='<'stdio.h'>'
42518     else
42519       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
42520printf %s "checking absolute name of <stdio.h>... " >&6; }
42521if test ${gl_cv_next_stdio_h+y}
42522then :
42523  printf %s "(cached) " >&6
42524else $as_nop
42525
42526
42527
42528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42529/* end confdefs.h.  */
42530#include <stdio.h>
42531_ACEOF
42532                case "$host_os" in
42533    aix*) gl_absname_cpp="$ac_cpp -C" ;;
42534    *)    gl_absname_cpp="$ac_cpp" ;;
42535  esac
42536
42537  case "$host_os" in
42538    mingw*)
42539                                          gl_dirsep_regex='[/\\]'
42540      ;;
42541    *)
42542      gl_dirsep_regex='\/'
42543      ;;
42544  esac
42545      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
42546  gl_header_literal_regex=`echo 'stdio.h' \
42547                           | sed -e "$gl_make_literal_regex_sed"`
42548  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
42549      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
42550      s|^/[^/]|//&|
42551      p
42552      q
42553    }'
42554
42555        gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
42556  sed -n "$gl_absolute_header_sed"`
42557
42558           gl_header=$gl_cv_absolute_stdio_h
42559           gl_cv_next_stdio_h='"'$gl_header'"'
42560
42561
42562fi
42563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
42564printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
42565     fi
42566     NEXT_STDIO_H=$gl_cv_next_stdio_h
42567
42568     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
42569       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
42570       gl_next_as_first_directive='<'stdio.h'>'
42571     else
42572       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
42573       gl_next_as_first_directive=$gl_cv_next_stdio_h
42574     fi
42575     NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
42576
42577
42578
42579
42580
42581        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
42582printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
42583if test ${gl_cv_func_printf_attribute_flavor+y}
42584then :
42585  printf %s "(cached) " >&6
42586else $as_nop
42587  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42588/* end confdefs.h.  */
42589
42590       #define __STDC_FORMAT_MACROS 1
42591       #include <stdio.h>
42592       #include <inttypes.h>
42593       /* For non-mingw systems, compilation will trivially succeed.
42594          For mingw, compilation will succeed for older mingw (system
42595          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
42596       #if (defined _WIN32 && ! defined __CYGWIN__) && \
42597         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
42598       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
42599       #endif
42600
42601int
42602main (void)
42603{
42604
42605  ;
42606  return 0;
42607}
42608_ACEOF
42609if ac_fn_c_try_compile "$LINENO"
42610then :
42611  gl_cv_func_printf_attribute_flavor=system
42612else $as_nop
42613  gl_cv_func_printf_attribute_flavor=gnu
42614fi
42615rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42616fi
42617{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
42618printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
42619  if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
42620
42621printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
42622
42623  fi
42624
42625      GNULIB_FSCANF=1
42626
42627
42628printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
42629
42630
42631  GNULIB_SCANF=1
42632
42633
42634printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
42635
42636
42637  GNULIB_FGETC=1
42638  GNULIB_GETC=1
42639  GNULIB_GETCHAR=1
42640  GNULIB_FGETS=1
42641  GNULIB_FREAD=1
42642
42643
42644      GNULIB_FPRINTF=1
42645  GNULIB_PRINTF=1
42646  GNULIB_VFPRINTF=1
42647  GNULIB_VPRINTF=1
42648  GNULIB_FPUTC=1
42649  GNULIB_PUTC=1
42650  GNULIB_PUTCHAR=1
42651  GNULIB_FPUTS=1
42652  GNULIB_PUTS=1
42653  GNULIB_FWRITE=1
42654
42655
42656
42657
42658
42659
42660
42661
42662
42663
42664  if test $ac_cv_have_decl_fcloseall = no; then
42665    HAVE_DECL_FCLOSEALL=0
42666  fi
42667
42668
42669
42670
42671
42672
42673
42674
42675
42676
42677
42678     if test $gl_cv_have_include_next = yes; then
42679       gl_cv_next_stdlib_h='<'stdlib.h'>'
42680     else
42681       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
42682printf %s "checking absolute name of <stdlib.h>... " >&6; }
42683if test ${gl_cv_next_stdlib_h+y}
42684then :
42685  printf %s "(cached) " >&6
42686else $as_nop
42687
42688
42689
42690  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42691/* end confdefs.h.  */
42692#include <stdlib.h>
42693_ACEOF
42694                case "$host_os" in
42695    aix*) gl_absname_cpp="$ac_cpp -C" ;;
42696    *)    gl_absname_cpp="$ac_cpp" ;;
42697  esac
42698
42699  case "$host_os" in
42700    mingw*)
42701                                          gl_dirsep_regex='[/\\]'
42702      ;;
42703    *)
42704      gl_dirsep_regex='\/'
42705      ;;
42706  esac
42707      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
42708  gl_header_literal_regex=`echo 'stdlib.h' \
42709                           | sed -e "$gl_make_literal_regex_sed"`
42710  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
42711      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
42712      s|^/[^/]|//&|
42713      p
42714      q
42715    }'
42716
42717        gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
42718  sed -n "$gl_absolute_header_sed"`
42719
42720           gl_header=$gl_cv_absolute_stdlib_h
42721           gl_cv_next_stdlib_h='"'$gl_header'"'
42722
42723
42724fi
42725{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
42726printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
42727     fi
42728     NEXT_STDLIB_H=$gl_cv_next_stdlib_h
42729
42730     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
42731       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
42732       gl_next_as_first_directive='<'stdlib.h'>'
42733     else
42734       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
42735       gl_next_as_first_directive=$gl_cv_next_stdlib_h
42736     fi
42737     NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
42738
42739
42740
42741
42742
42743
42744
42745
42746
42747
42748
42749
42750  if test $ac_cv_have_decl_ecvt = no; then
42751    HAVE_DECL_ECVT=0
42752  fi
42753
42754  if test $ac_cv_have_decl_fcvt = no; then
42755    HAVE_DECL_FCVT=0
42756  fi
42757
42758  if test $ac_cv_have_decl_gcvt = no; then
42759    HAVE_DECL_GCVT=0
42760  fi
42761
42762
42763
42764
42765
42766
42767
42768  ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
42769if test "x$ac_cv_func_stpcpy" = xyes
42770then :
42771  printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h
42772
42773fi
42774
42775  if test $ac_cv_func_stpcpy = no; then
42776    HAVE_STPCPY=0
42777  fi
42778
42779  if test $HAVE_STPCPY = 0; then
42780
42781
42782
42783
42784
42785
42786
42787
42788  gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
42789
42790
42791  :
42792
42793  fi
42794
42795
42796
42797
42798
42799          GNULIB_STPCPY=1
42800
42801
42802
42803
42804
42805printf "%s\n" "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
42806
42807
42808
42809
42810
42811
42812  ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
42813if test "x$ac_cv_func_strcasecmp" = xyes
42814then :
42815  printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
42816
42817fi
42818
42819  if test $ac_cv_func_strcasecmp = no; then
42820    HAVE_STRCASECMP=0
42821  fi
42822
42823
42824
42825  ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
42826if test "x$ac_cv_func_strncasecmp" = xyes
42827then :
42828  printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
42829
42830fi
42831
42832  if test $ac_cv_func_strncasecmp = yes; then
42833    HAVE_STRNCASECMP=1
42834  else
42835    HAVE_STRNCASECMP=0
42836  fi
42837  ac_fn_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
42838if test "x$ac_cv_have_decl_strncasecmp" = xyes
42839then :
42840  ac_have_decl=1
42841else $as_nop
42842  ac_have_decl=0
42843fi
42844printf "%s\n" "#define HAVE_DECL_STRNCASECMP $ac_have_decl" >>confdefs.h
42845
42846  if test $ac_cv_have_decl_strncasecmp = no; then
42847    HAVE_DECL_STRNCASECMP=0
42848  fi
42849
42850
42851  if test $HAVE_STRCASECMP = 0; then
42852
42853
42854
42855
42856
42857
42858
42859
42860  gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
42861
42862
42863  :
42864
42865  fi
42866  if test $HAVE_STRNCASECMP = 0; then
42867
42868
42869
42870
42871
42872
42873
42874
42875  gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
42876
42877
42878  :
42879
42880  fi
42881
42882
42883
42884
42885  ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
42886if test "x$ac_cv_func_strchrnul" = xyes
42887then :
42888  printf "%s\n" "#define HAVE_STRCHRNUL 1" >>confdefs.h
42889
42890fi
42891
42892  if test $ac_cv_func_strchrnul = no; then
42893    HAVE_STRCHRNUL=0
42894  else
42895    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
42896printf %s "checking whether strchrnul works... " >&6; }
42897if test ${gl_cv_func_strchrnul_works+y}
42898then :
42899  printf %s "(cached) " >&6
42900else $as_nop
42901  if test "$cross_compiling" = yes
42902then :
42903           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42904/* end confdefs.h.  */
42905
42906#if defined __CYGWIN__
42907 #include <cygwin/version.h>
42908 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
42909  Lucky user
42910 #endif
42911#else
42912  Lucky user
42913#endif
42914
42915_ACEOF
42916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42917  $EGREP "Lucky user" >/dev/null 2>&1
42918then :
42919  gl_cv_func_strchrnul_works="guessing yes"
42920else $as_nop
42921  gl_cv_func_strchrnul_works="guessing no"
42922fi
42923rm -rf conftest*
42924
42925
42926else $as_nop
42927  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42928/* end confdefs.h.  */
42929
42930#include <string.h> /* for strchrnul */
42931
42932int
42933main (void)
42934{
42935const char *buf = "a";
42936      return strchrnul (buf, 'b') != buf + 1;
42937
42938  ;
42939  return 0;
42940}
42941_ACEOF
42942if ac_fn_c_try_run "$LINENO"
42943then :
42944  gl_cv_func_strchrnul_works=yes
42945else $as_nop
42946  gl_cv_func_strchrnul_works=no
42947fi
42948rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42949  conftest.$ac_objext conftest.beam conftest.$ac_ext
42950fi
42951
42952
42953fi
42954{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
42955printf "%s\n" "$gl_cv_func_strchrnul_works" >&6; }
42956    case "$gl_cv_func_strchrnul_works" in
42957      *yes) ;;
42958      *) REPLACE_STRCHRNUL=1 ;;
42959    esac
42960  fi
42961
42962  if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
42963
42964
42965
42966
42967
42968
42969
42970
42971  gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
42972
42973    :
42974  fi
42975
42976
42977
42978
42979
42980          GNULIB_STRCHRNUL=1
42981
42982
42983
42984
42985
42986printf "%s\n" "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
42987
42988
42989
42990
42991
42992
42993  if test $gl_cv_func_malloc_posix != yes; then
42994    REPLACE_STRDUP=1
42995  fi
42996
42997  if test $ac_cv_have_decl_strdup = no; then
42998    HAVE_DECL_STRDUP=0
42999  fi
43000
43001  if test $REPLACE_STRDUP = 1; then
43002
43003
43004
43005
43006
43007
43008
43009
43010  gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
43011
43012    :
43013  fi
43014
43015
43016
43017
43018
43019          GNULIB_STRDUP=1
43020
43021
43022
43023
43024
43025printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
43026
43027
43028
43029
43030
43031
43032
43033
43034
43035
43036  if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
43037    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
43038printf %s "checking for working strerror function... " >&6; }
43039if test ${gl_cv_func_working_strerror+y}
43040then :
43041  printf %s "(cached) " >&6
43042else $as_nop
43043  if test "$cross_compiling" = yes
43044then :
43045  case "$host_os" in
43046                          # Guess yes on glibc systems.
43047           *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
43048                          # Guess yes on musl systems.
43049           *-musl*)       gl_cv_func_working_strerror="guessing yes" ;;
43050                          # If we don't know, obey --enable-cross-guesses.
43051           *)             gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
43052         esac
43053
43054else $as_nop
43055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43056/* end confdefs.h.  */
43057#include <string.h>
43058
43059int
43060main (void)
43061{
43062if (!*strerror (-2)) return 1;
43063  ;
43064  return 0;
43065}
43066_ACEOF
43067if ac_fn_c_try_run "$LINENO"
43068then :
43069  gl_cv_func_working_strerror=yes
43070else $as_nop
43071  gl_cv_func_working_strerror=no
43072fi
43073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43074  conftest.$ac_objext conftest.beam conftest.$ac_ext
43075fi
43076
43077
43078fi
43079{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
43080printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
43081    case "$gl_cv_func_working_strerror" in
43082      *yes) ;;
43083      *)
43084                        REPLACE_STRERROR=1
43085        ;;
43086    esac
43087
43088                  case "$gl_cv_func_strerror_r_works" in
43089        *no) REPLACE_STRERROR=1 ;;
43090      esac
43091
43092  else
43093            REPLACE_STRERROR=1
43094  fi
43095
43096  if test $REPLACE_STRERROR = 1; then
43097
43098
43099
43100
43101
43102
43103
43104
43105  gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
43106
43107  fi
43108
43109
43110printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
43111
43112
43113
43114
43115
43116
43117
43118          GNULIB_STRERROR=1
43119
43120
43121
43122
43123
43124printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
43125
43126
43127
43128
43129
43130  if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
43131
43132
43133
43134
43135
43136
43137
43138
43139  gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
43140
43141
43142
43143
43144
43145  if test $ac_cv_header_sys_socket_h != yes; then
43146                    ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
43147if test "x$ac_cv_header_winsock2_h" = xyes
43148then :
43149  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
43150
43151fi
43152
43153  fi
43154  if test "$ac_cv_header_winsock2_h" = yes; then
43155    HAVE_WINSOCK2_H=1
43156    UNISTD_H_HAVE_WINSOCK2_H=1
43157    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
43158  else
43159    HAVE_WINSOCK2_H=0
43160  fi
43161
43162
43163  fi
43164
43165
43166
43167
43168
43169
43170
43171
43172
43173
43174
43175
43176  if test $ac_cv_have_decl_strndup = no; then
43177    HAVE_DECL_STRNDUP=0
43178  fi
43179
43180  if test $ac_cv_func_strndup = yes; then
43181    HAVE_STRNDUP=1
43182    # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
43183    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
43184printf %s "checking for working strndup... " >&6; }
43185if test ${gl_cv_func_strndup_works+y}
43186then :
43187  printf %s "(cached) " >&6
43188else $as_nop
43189  if test "$cross_compiling" = yes
43190then :
43191
43192          case $host_os in
43193            aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
43194            *)               gl_cv_func_strndup_works="guessing yes";;
43195          esac
43196
43197else $as_nop
43198  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43199/* end confdefs.h.  */
43200
43201         #include <string.h>
43202                           #include <stdlib.h>
43203int
43204main (void)
43205{
43206
43207#if !HAVE_DECL_STRNDUP
43208  extern
43209  #ifdef __cplusplus
43210  "C"
43211  #endif
43212  char *strndup (const char *, size_t);
43213#endif
43214  int result;
43215  char *s;
43216  s = strndup ("some longer string", 15);
43217  free (s);
43218  s = strndup ("shorter string", 13);
43219  result = s[13] != '\0';
43220  free (s);
43221  return result;
43222  ;
43223  return 0;
43224}
43225_ACEOF
43226if ac_fn_c_try_run "$LINENO"
43227then :
43228  gl_cv_func_strndup_works=yes
43229else $as_nop
43230  gl_cv_func_strndup_works=no
43231fi
43232rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43233  conftest.$ac_objext conftest.beam conftest.$ac_ext
43234fi
43235
43236fi
43237{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
43238printf "%s\n" "$gl_cv_func_strndup_works" >&6; }
43239    case $gl_cv_func_strndup_works in
43240      *no) REPLACE_STRNDUP=1 ;;
43241    esac
43242  else
43243    HAVE_STRNDUP=0
43244  fi
43245
43246  if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
43247
43248
43249
43250
43251
43252
43253
43254
43255  gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
43256
43257  fi
43258
43259
43260
43261
43262
43263          GNULIB_STRNDUP=1
43264
43265
43266
43267
43268
43269printf "%s\n" "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
43270
43271
43272
43273
43274
43275
43276
43277
43278
43279  if test $ac_cv_have_decl_strnlen = no; then
43280    HAVE_DECL_STRNLEN=0
43281  else
43282
43283         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
43284printf %s "checking for working strnlen... " >&6; }
43285if test ${ac_cv_func_strnlen_working+y}
43286then :
43287  printf %s "(cached) " >&6
43288else $as_nop
43289  if test "$cross_compiling" = yes
43290then :
43291  # Guess no on AIX systems, yes otherwise.
43292		case "$host_os" in
43293		  aix*) ac_cv_func_strnlen_working=no;;
43294		  *)    ac_cv_func_strnlen_working=yes;;
43295		esac
43296else $as_nop
43297  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43298/* end confdefs.h.  */
43299$ac_includes_default
43300int
43301main (void)
43302{
43303
43304#define S "foobar"
43305#define S_LEN (sizeof S - 1)
43306
43307  /* At least one implementation is buggy: that of AIX 4.3 would
43308     give strnlen (S, 1) == 3.  */
43309
43310  int i;
43311  for (i = 0; i < S_LEN + 1; ++i)
43312    {
43313      int expected = i <= S_LEN ? i : S_LEN;
43314      if (strnlen (S, i) != expected)
43315	return 1;
43316    }
43317  return 0;
43318
43319  ;
43320  return 0;
43321}
43322_ACEOF
43323if ac_fn_c_try_run "$LINENO"
43324then :
43325  ac_cv_func_strnlen_working=yes
43326else $as_nop
43327  ac_cv_func_strnlen_working=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
43333fi
43334{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
43335printf "%s\n" "$ac_cv_func_strnlen_working" >&6; }
43336test $ac_cv_func_strnlen_working = no && :
43337
43338
43339    if test $ac_cv_func_strnlen_working = no; then
43340      REPLACE_STRNLEN=1
43341    fi
43342  fi
43343
43344  if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
43345
43346
43347
43348
43349
43350
43351
43352
43353  gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
43354
43355    :
43356  fi
43357
43358
43359
43360
43361
43362          GNULIB_STRNLEN=1
43363
43364
43365
43366
43367
43368printf "%s\n" "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
43369
43370
43371
43372
43373
43374  ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
43375if test "x$ac_cv_func_strpbrk" = xyes
43376then :
43377  printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
43378
43379fi
43380
43381  if test $ac_cv_func_strpbrk = no; then
43382    HAVE_STRPBRK=0
43383  fi
43384
43385  if test $HAVE_STRPBRK = 0; then
43386
43387
43388
43389
43390
43391
43392
43393
43394  gl_LIBOBJS="$gl_LIBOBJS strpbrk.$ac_objext"
43395
43396    :
43397  fi
43398
43399
43400
43401
43402
43403          GNULIB_STRPBRK=1
43404
43405
43406
43407
43408
43409printf "%s\n" "#define GNULIB_TEST_STRPBRK 1" >>confdefs.h
43410
43411
43412
43413
43414
43415  if test $REPLACE_STRSTR = 0; then
43416    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
43417printf %s "checking whether strstr works in linear time... " >&6; }
43418if test ${gl_cv_func_strstr_linear+y}
43419then :
43420  printf %s "(cached) " >&6
43421else $as_nop
43422  if test "$cross_compiling" = yes
43423then :
43424                             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43425/* end confdefs.h.  */
43426
43427#include <features.h>
43428#ifdef __GNU_LIBRARY__
43429 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
43430     && !(defined __i386__ || defined __x86_64__) \
43431     && !defined __UCLIBC__
43432  Lucky user
43433 #endif
43434#endif
43435#ifdef __CYGWIN__
43436 #include <cygwin/version.h>
43437 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
43438  Lucky user
43439 #endif
43440#endif
43441
43442_ACEOF
43443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43444  $EGREP "Lucky user" >/dev/null 2>&1
43445then :
43446  gl_cv_func_strstr_linear="guessing yes"
43447else $as_nop
43448  gl_cv_func_strstr_linear="$gl_cross_guess_normal"
43449fi
43450rm -rf conftest*
43451
43452
43453else $as_nop
43454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43455/* end confdefs.h.  */
43456
43457#ifdef __MVS__
43458/* z/OS does not deliver signals while strstr() is running (thanks to
43459   restrictions on its LE runtime), which prevents us from limiting the
43460   running time of this test.  */
43461# error "This test does not work properly on z/OS"
43462#endif
43463#include <signal.h> /* for signal */
43464#include <string.h> /* for strstr */
43465#include <stdlib.h> /* for malloc */
43466#include <unistd.h> /* for alarm */
43467static void quit (int sig) { _exit (sig + 128); }
43468
43469int
43470main (void)
43471{
43472
43473    int result = 0;
43474    size_t m = 1000000;
43475    char *haystack = (char *) malloc (2 * m + 2);
43476    char *needle = (char *) malloc (m + 2);
43477    /* Failure to compile this test due to missing alarm is okay,
43478       since all such platforms (mingw) also have quadratic strstr.  */
43479    signal (SIGALRM, quit);
43480    alarm (5);
43481    /* Check for quadratic performance.  */
43482    if (haystack && needle)
43483      {
43484        memset (haystack, 'A', 2 * m);
43485        haystack[2 * m] = 'B';
43486        haystack[2 * m + 1] = 0;
43487        memset (needle, 'A', m);
43488        needle[m] = 'B';
43489        needle[m + 1] = 0;
43490        if (!strstr (haystack, needle))
43491          result |= 1;
43492      }
43493    /* Free allocated memory, in case some sanitizer is watching.  */
43494    free (haystack);
43495    free (needle);
43496    return result;
43497
43498  ;
43499  return 0;
43500}
43501_ACEOF
43502if ac_fn_c_try_run "$LINENO"
43503then :
43504  gl_cv_func_strstr_linear=yes
43505else $as_nop
43506  gl_cv_func_strstr_linear=no
43507fi
43508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43509  conftest.$ac_objext conftest.beam conftest.$ac_ext
43510fi
43511
43512
43513fi
43514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
43515printf "%s\n" "$gl_cv_func_strstr_linear" >&6; }
43516    case "$gl_cv_func_strstr_linear" in
43517      *yes) ;;
43518      *)
43519        REPLACE_STRSTR=1
43520        ;;
43521    esac
43522  fi
43523
43524  if test $REPLACE_STRSTR = 1; then
43525
43526
43527
43528
43529
43530
43531
43532
43533  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
43534
43535  fi
43536
43537
43538
43539  if test $REPLACE_MEMCHR = 1; then
43540    REPLACE_STRSTR=1
43541  else
43542            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
43543printf %s "checking whether strstr works... " >&6; }
43544if test ${gl_cv_func_strstr_works_always+y}
43545then :
43546  printf %s "(cached) " >&6
43547else $as_nop
43548  if test "$cross_compiling" = yes
43549then :
43550                                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43551/* end confdefs.h.  */
43552
43553#ifdef __GNU_LIBRARY__
43554 #include <features.h>
43555 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
43556     || defined __UCLIBC__
43557  Lucky user
43558 #endif
43559#elif defined __CYGWIN__
43560 #include <cygwin/version.h>
43561 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
43562  Lucky user
43563 #endif
43564#else
43565  Lucky user
43566#endif
43567
43568_ACEOF
43569if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43570  $EGREP "Lucky user" >/dev/null 2>&1
43571then :
43572  gl_cv_func_strstr_works_always="guessing yes"
43573else $as_nop
43574  gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
43575fi
43576rm -rf conftest*
43577
43578
43579else $as_nop
43580  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43581/* end confdefs.h.  */
43582
43583#include <string.h> /* for strstr */
43584#ifdef __GNU_LIBRARY__
43585 #include <features.h>
43586 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
43587  Unlucky user
43588 #endif
43589#endif
43590#define P "_EF_BF_BD"
43591#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
43592#define NEEDLE P P P P P
43593
43594int
43595main (void)
43596{
43597return !!strstr (HAYSTACK, NEEDLE);
43598
43599  ;
43600  return 0;
43601}
43602_ACEOF
43603if ac_fn_c_try_run "$LINENO"
43604then :
43605  gl_cv_func_strstr_works_always=yes
43606else $as_nop
43607  gl_cv_func_strstr_works_always=no
43608fi
43609rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43610  conftest.$ac_objext conftest.beam conftest.$ac_ext
43611fi
43612
43613
43614fi
43615{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
43616printf "%s\n" "$gl_cv_func_strstr_works_always" >&6; }
43617    case "$gl_cv_func_strstr_works_always" in
43618      *yes) ;;
43619      *)
43620        REPLACE_STRSTR=1
43621        ;;
43622    esac
43623  fi
43624
43625  if test $REPLACE_STRSTR = 1; then
43626
43627
43628
43629
43630
43631
43632
43633
43634  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
43635
43636  fi
43637
43638
43639
43640
43641
43642          GNULIB_STRSTR=1
43643
43644
43645
43646
43647
43648printf "%s\n" "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
43649
43650
43651
43652
43653
43654  ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
43655if test "x$ac_cv_func_strtoll" = xyes
43656then :
43657  printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h
43658
43659fi
43660
43661  if test $ac_cv_func_strtoll = no; then
43662    HAVE_STRTOLL=0
43663  fi
43664
43665  if test $HAVE_STRTOLL = 0; then
43666
43667
43668
43669
43670
43671
43672
43673
43674  gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
43675
43676
43677  :
43678
43679  fi
43680
43681
43682
43683
43684
43685          GNULIB_STRTOLL=1
43686
43687
43688
43689
43690
43691printf "%s\n" "#define GNULIB_TEST_STRTOLL 1" >>confdefs.h
43692
43693
43694
43695
43696
43697
43698
43699
43700
43701
43702
43703
43704
43705
43706
43707     if test $gl_cv_have_include_next = yes; then
43708       gl_cv_next_sys_file_h='<'sys/file.h'>'
43709     else
43710       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/file.h>" >&5
43711printf %s "checking absolute name of <sys/file.h>... " >&6; }
43712if test ${gl_cv_next_sys_file_h+y}
43713then :
43714  printf %s "(cached) " >&6
43715else $as_nop
43716
43717             if test $ac_cv_header_sys_file_h = yes; then
43718
43719
43720
43721
43722  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43723/* end confdefs.h.  */
43724#include <sys/file.h>
43725_ACEOF
43726                case "$host_os" in
43727    aix*) gl_absname_cpp="$ac_cpp -C" ;;
43728    *)    gl_absname_cpp="$ac_cpp" ;;
43729  esac
43730
43731  case "$host_os" in
43732    mingw*)
43733                                          gl_dirsep_regex='[/\\]'
43734      ;;
43735    *)
43736      gl_dirsep_regex='\/'
43737      ;;
43738  esac
43739      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
43740  gl_header_literal_regex=`echo 'sys/file.h' \
43741                           | sed -e "$gl_make_literal_regex_sed"`
43742  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
43743      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
43744      s|^/[^/]|//&|
43745      p
43746      q
43747    }'
43748
43749        gl_cv_absolute_sys_file_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
43750  sed -n "$gl_absolute_header_sed"`
43751
43752           gl_header=$gl_cv_absolute_sys_file_h
43753           gl_cv_next_sys_file_h='"'$gl_header'"'
43754          else
43755               gl_cv_next_sys_file_h='<'sys/file.h'>'
43756             fi
43757
43758
43759fi
43760{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_file_h" >&5
43761printf "%s\n" "$gl_cv_next_sys_file_h" >&6; }
43762     fi
43763     NEXT_SYS_FILE_H=$gl_cv_next_sys_file_h
43764
43765     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
43766       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
43767       gl_next_as_first_directive='<'sys/file.h'>'
43768     else
43769       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
43770       gl_next_as_first_directive=$gl_cv_next_sys_file_h
43771     fi
43772     NEXT_AS_FIRST_DIRECTIVE_SYS_FILE_H=$gl_next_as_first_directive
43773
43774
43775
43776
43777
43778  if test $ac_cv_header_sys_file_h = yes; then
43779    HAVE_SYS_FILE_H=1
43780  else
43781    HAVE_SYS_FILE_H=0
43782  fi
43783
43784
43785
43786
43787
43788
43789
43790
43791
43792
43793
43794  if test $ac_cv_header_sys_ioctl_h = yes; then
43795    HAVE_SYS_IOCTL_H=1
43796            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
43797printf %s "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
43798if test ${gl_cv_decl_ioctl_in_sys_ioctl_h+y}
43799then :
43800  printf %s "(cached) " >&6
43801else $as_nop
43802         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43803/* end confdefs.h.  */
43804#include <sys/ioctl.h>
43805int
43806main (void)
43807{
43808(void) ioctl;
43809  ;
43810  return 0;
43811}
43812_ACEOF
43813if ac_fn_c_try_compile "$LINENO"
43814then :
43815  gl_cv_decl_ioctl_in_sys_ioctl_h=yes
43816else $as_nop
43817  gl_cv_decl_ioctl_in_sys_ioctl_h=no
43818fi
43819rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
43820
43821fi
43822{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
43823printf "%s\n" "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
43824  else
43825    HAVE_SYS_IOCTL_H=0
43826  fi
43827
43828
43829
43830
43831
43832
43833
43834
43835
43836
43837     if test $gl_cv_have_include_next = yes; then
43838       gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
43839     else
43840       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
43841printf %s "checking absolute name of <sys/ioctl.h>... " >&6; }
43842if test ${gl_cv_next_sys_ioctl_h+y}
43843then :
43844  printf %s "(cached) " >&6
43845else $as_nop
43846
43847             if test $ac_cv_header_sys_ioctl_h = yes; then
43848
43849
43850
43851
43852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43853/* end confdefs.h.  */
43854#include <sys/ioctl.h>
43855_ACEOF
43856                case "$host_os" in
43857    aix*) gl_absname_cpp="$ac_cpp -C" ;;
43858    *)    gl_absname_cpp="$ac_cpp" ;;
43859  esac
43860
43861  case "$host_os" in
43862    mingw*)
43863                                          gl_dirsep_regex='[/\\]'
43864      ;;
43865    *)
43866      gl_dirsep_regex='\/'
43867      ;;
43868  esac
43869      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
43870  gl_header_literal_regex=`echo 'sys/ioctl.h' \
43871                           | sed -e "$gl_make_literal_regex_sed"`
43872  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
43873      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
43874      s|^/[^/]|//&|
43875      p
43876      q
43877    }'
43878
43879        gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
43880  sed -n "$gl_absolute_header_sed"`
43881
43882           gl_header=$gl_cv_absolute_sys_ioctl_h
43883           gl_cv_next_sys_ioctl_h='"'$gl_header'"'
43884          else
43885               gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
43886             fi
43887
43888
43889fi
43890{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
43891printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
43892     fi
43893     NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
43894
43895     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
43896       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
43897       gl_next_as_first_directive='<'sys/ioctl.h'>'
43898     else
43899       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
43900       gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
43901     fi
43902     NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
43903
43904
43905
43906
43907
43908
43909
43910
43911
43912
43913
43914
43915
43916
43917
43918
43919
43920
43921
43922
43923
43924     if test $gl_cv_have_include_next = yes; then
43925       gl_cv_next_sys_random_h='<'sys/random.h'>'
43926     else
43927       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
43928printf %s "checking absolute name of <sys/random.h>... " >&6; }
43929if test ${gl_cv_next_sys_random_h+y}
43930then :
43931  printf %s "(cached) " >&6
43932else $as_nop
43933
43934             if test $ac_cv_header_sys_random_h = yes; then
43935
43936
43937
43938
43939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43940/* end confdefs.h.  */
43941#include <sys/random.h>
43942_ACEOF
43943                case "$host_os" in
43944    aix*) gl_absname_cpp="$ac_cpp -C" ;;
43945    *)    gl_absname_cpp="$ac_cpp" ;;
43946  esac
43947
43948  case "$host_os" in
43949    mingw*)
43950                                          gl_dirsep_regex='[/\\]'
43951      ;;
43952    *)
43953      gl_dirsep_regex='\/'
43954      ;;
43955  esac
43956      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
43957  gl_header_literal_regex=`echo 'sys/random.h' \
43958                           | sed -e "$gl_make_literal_regex_sed"`
43959  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
43960      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
43961      s|^/[^/]|//&|
43962      p
43963      q
43964    }'
43965
43966        gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
43967  sed -n "$gl_absolute_header_sed"`
43968
43969           gl_header=$gl_cv_absolute_sys_random_h
43970           gl_cv_next_sys_random_h='"'$gl_header'"'
43971          else
43972               gl_cv_next_sys_random_h='<'sys/random.h'>'
43973             fi
43974
43975
43976fi
43977{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
43978printf "%s\n" "$gl_cv_next_sys_random_h" >&6; }
43979     fi
43980     NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
43981
43982     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
43983       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
43984       gl_next_as_first_directive='<'sys/random.h'>'
43985     else
43986       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
43987       gl_next_as_first_directive=$gl_cv_next_sys_random_h
43988     fi
43989     NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
43990
43991
43992
43993
43994  if test $ac_cv_header_sys_random_h = yes; then
43995    HAVE_SYS_RANDOM_H=1
43996  else
43997    HAVE_SYS_RANDOM_H=0
43998  fi
43999
44000
44001
44002  if test $ac_cv_header_sys_random_h = yes; then
44003    UNISTD_H_HAVE_SYS_RANDOM_H=1
44004  fi
44005
44006
44007
44008
44009
44010
44011
44012
44013
44014
44015
44016
44017
44018
44019
44020
44021
44022
44023
44024
44025
44026
44027
44028
44029     if test $gl_cv_have_include_next = yes; then
44030       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
44031     else
44032       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
44033printf %s "checking absolute name of <sys/stat.h>... " >&6; }
44034if test ${gl_cv_next_sys_stat_h+y}
44035then :
44036  printf %s "(cached) " >&6
44037else $as_nop
44038
44039             if test $ac_cv_header_sys_stat_h = yes; then
44040
44041
44042
44043
44044  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44045/* end confdefs.h.  */
44046#include <sys/stat.h>
44047_ACEOF
44048                case "$host_os" in
44049    aix*) gl_absname_cpp="$ac_cpp -C" ;;
44050    *)    gl_absname_cpp="$ac_cpp" ;;
44051  esac
44052
44053  case "$host_os" in
44054    mingw*)
44055                                          gl_dirsep_regex='[/\\]'
44056      ;;
44057    *)
44058      gl_dirsep_regex='\/'
44059      ;;
44060  esac
44061      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
44062  gl_header_literal_regex=`echo 'sys/stat.h' \
44063                           | sed -e "$gl_make_literal_regex_sed"`
44064  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
44065      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
44066      s|^/[^/]|//&|
44067      p
44068      q
44069    }'
44070
44071        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
44072  sed -n "$gl_absolute_header_sed"`
44073
44074           gl_header=$gl_cv_absolute_sys_stat_h
44075           gl_cv_next_sys_stat_h='"'$gl_header'"'
44076          else
44077               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
44078             fi
44079
44080
44081fi
44082{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
44083printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
44084     fi
44085     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
44086
44087     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
44088       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
44089       gl_next_as_first_directive='<'sys/stat.h'>'
44090     else
44091       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
44092       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
44093     fi
44094     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
44095
44096
44097
44098
44099
44100
44101
44102
44103    WINDOWS_STAT_TIMESPEC=0
44104
44105
44106
44107
44108
44109
44110
44111
44112      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
44113     #include <sys/stat.h>
44114"
44115if test "x$ac_cv_type_nlink_t" = xyes
44116then :
44117
44118else $as_nop
44119
44120printf "%s\n" "#define nlink_t int" >>confdefs.h
44121
44122fi
44123
44124
44125
44126
44127
44128
44129
44130
44131
44132
44133
44134
44135
44136
44137
44138
44139
44140
44141
44142
44143
44144
44145
44146
44147
44148
44149     if test $gl_cv_have_include_next = yes; then
44150       gl_cv_next_sys_uio_h='<'sys/uio.h'>'
44151     else
44152       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
44153printf %s "checking absolute name of <sys/uio.h>... " >&6; }
44154if test ${gl_cv_next_sys_uio_h+y}
44155then :
44156  printf %s "(cached) " >&6
44157else $as_nop
44158
44159             if test $ac_cv_header_sys_uio_h = yes; then
44160
44161
44162
44163
44164  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44165/* end confdefs.h.  */
44166#include <sys/uio.h>
44167_ACEOF
44168                case "$host_os" in
44169    aix*) gl_absname_cpp="$ac_cpp -C" ;;
44170    *)    gl_absname_cpp="$ac_cpp" ;;
44171  esac
44172
44173  case "$host_os" in
44174    mingw*)
44175                                          gl_dirsep_regex='[/\\]'
44176      ;;
44177    *)
44178      gl_dirsep_regex='\/'
44179      ;;
44180  esac
44181      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
44182  gl_header_literal_regex=`echo 'sys/uio.h' \
44183                           | sed -e "$gl_make_literal_regex_sed"`
44184  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
44185      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
44186      s|^/[^/]|//&|
44187      p
44188      q
44189    }'
44190
44191        gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
44192  sed -n "$gl_absolute_header_sed"`
44193
44194           gl_header=$gl_cv_absolute_sys_uio_h
44195           gl_cv_next_sys_uio_h='"'$gl_header'"'
44196          else
44197               gl_cv_next_sys_uio_h='<'sys/uio.h'>'
44198             fi
44199
44200
44201fi
44202{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
44203printf "%s\n" "$gl_cv_next_sys_uio_h" >&6; }
44204     fi
44205     NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
44206
44207     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
44208       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
44209       gl_next_as_first_directive='<'sys/uio.h'>'
44210     else
44211       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
44212       gl_next_as_first_directive=$gl_cv_next_sys_uio_h
44213     fi
44214     NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
44215
44216
44217
44218
44219  if test $ac_cv_header_sys_uio_h = yes; then
44220    HAVE_SYS_UIO_H=1
44221  else
44222    HAVE_SYS_UIO_H=0
44223  fi
44224
44225
44226
44227
44228
44229
44230
44231
44232
44233
44234
44235
44236
44237
44238
44239     if test $gl_cv_have_include_next = yes; then
44240       gl_cv_next_sys_wait_h='<'sys/wait.h'>'
44241     else
44242       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
44243printf %s "checking absolute name of <sys/wait.h>... " >&6; }
44244if test ${gl_cv_next_sys_wait_h+y}
44245then :
44246  printf %s "(cached) " >&6
44247else $as_nop
44248
44249             if test $ac_cv_header_sys_wait_h = yes; then
44250
44251
44252
44253
44254  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44255/* end confdefs.h.  */
44256#include <sys/wait.h>
44257_ACEOF
44258                case "$host_os" in
44259    aix*) gl_absname_cpp="$ac_cpp -C" ;;
44260    *)    gl_absname_cpp="$ac_cpp" ;;
44261  esac
44262
44263  case "$host_os" in
44264    mingw*)
44265                                          gl_dirsep_regex='[/\\]'
44266      ;;
44267    *)
44268      gl_dirsep_regex='\/'
44269      ;;
44270  esac
44271      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
44272  gl_header_literal_regex=`echo 'sys/wait.h' \
44273                           | sed -e "$gl_make_literal_regex_sed"`
44274  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
44275      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
44276      s|^/[^/]|//&|
44277      p
44278      q
44279    }'
44280
44281        gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
44282  sed -n "$gl_absolute_header_sed"`
44283
44284           gl_header=$gl_cv_absolute_sys_wait_h
44285           gl_cv_next_sys_wait_h='"'$gl_header'"'
44286          else
44287               gl_cv_next_sys_wait_h='<'sys/wait.h'>'
44288             fi
44289
44290
44291fi
44292{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
44293printf "%s\n" "$gl_cv_next_sys_wait_h" >&6; }
44294     fi
44295     NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
44296
44297     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
44298       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
44299       gl_next_as_first_directive='<'sys/wait.h'>'
44300     else
44301       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
44302       gl_next_as_first_directive=$gl_cv_next_sys_wait_h
44303     fi
44304     NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
44305
44306
44307
44308
44309
44310
44311
44312
44313
44314
44315
44316
44317
44318
44319  :
44320
44321
44322
44323
44324printf "%s\n" "#define GNULIB_TEMPNAME 1" >>confdefs.h
44325
44326
44327
44328
44329
44330  if test $gl_threads_api = posix; then
44331    gl_save_LIBS="$LIBS"
44332    LIBS="$LIBS $LIBMULTITHREAD"
44333    ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
44334if test "x$ac_cv_func_pthread_atfork" = xyes
44335then :
44336  printf "%s\n" "#define HAVE_PTHREAD_ATFORK 1" >>confdefs.h
44337
44338fi
44339
44340    LIBS="$gl_save_LIBS"
44341  fi
44342
44343  ac_fn_c_check_header_compile "$LINENO" "sys/single_threaded.h" "ac_cv_header_sys_single_threaded_h" "$ac_includes_default"
44344if test "x$ac_cv_header_sys_single_threaded_h" = xyes
44345then :
44346  printf "%s\n" "#define HAVE_SYS_SINGLE_THREADED_H 1" >>confdefs.h
44347
44348fi
44349
44350
44351
44352
44353
44354
44355
44356
44357
44358
44359
44360      ac_fn_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "/* mingw's <time.h> provides the functions asctime_r, ctime_r,
44361         gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
44362         been included before.  */
44363      #if defined __MINGW32__
44364      # include <unistd.h>
44365      #endif
44366      #include <time.h>
44367
44368" "$ac_c_undeclared_builtin_options" "CFLAGS"
44369if test "x$ac_cv_have_decl_localtime_r" = xyes
44370then :
44371  ac_have_decl=1
44372else $as_nop
44373  ac_have_decl=0
44374fi
44375printf "%s\n" "#define HAVE_DECL_LOCALTIME_R $ac_have_decl" >>confdefs.h
44376
44377  if test $ac_cv_have_decl_localtime_r = no; then
44378    HAVE_DECL_LOCALTIME_R=0
44379  fi
44380
44381
44382  if test $ac_cv_func_localtime_r = yes; then
44383    HAVE_LOCALTIME_R=1
44384    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
44385printf %s "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
44386if test ${gl_cv_time_r_posix+y}
44387then :
44388  printf %s "(cached) " >&6
44389else $as_nop
44390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44391/* end confdefs.h.  */
44392/* mingw's <time.h> provides the functions asctime_r, ctime_r,
44393                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
44394                 been included before.  */
44395              #if defined __MINGW32__
44396              # include <unistd.h>
44397              #endif
44398              #include <time.h>
44399
44400int
44401main (void)
44402{
44403/* We don't need to append 'restrict's to the argument types,
44404                 even though the POSIX signature has the 'restrict's,
44405                 since C99 says they can't affect type compatibility.  */
44406              struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
44407              if (ptr) return 0;
44408              /* Check the return type is a pointer.
44409                 On HP-UX 10 it is 'int'.  */
44410              *localtime_r (0, 0);
44411  ;
44412  return 0;
44413}
44414
44415_ACEOF
44416if ac_fn_c_try_compile "$LINENO"
44417then :
44418  gl_cv_time_r_posix=yes
44419else $as_nop
44420  gl_cv_time_r_posix=no
44421fi
44422rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
44423
44424fi
44425{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
44426printf "%s\n" "$gl_cv_time_r_posix" >&6; }
44427    if test $gl_cv_time_r_posix = yes; then
44428      REPLACE_LOCALTIME_R=0
44429    else
44430      REPLACE_LOCALTIME_R=1
44431    fi
44432  else
44433    HAVE_LOCALTIME_R=0
44434                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
44435printf %s "checking whether localtime_r exists as an inline function... " >&6; }
44436if test ${gl_cv_func_localtime_r_inline+y}
44437then :
44438  printf %s "(cached) " >&6
44439else $as_nop
44440  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44441/* end confdefs.h.  */
44442/* mingw's <time.h> provides the functions asctime_r, ctime_r,
44443                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
44444                 been included before.  */
44445              #if defined __MINGW32__
44446              # include <unistd.h>
44447              #endif
44448              #include <time.h>
44449
44450int
44451main (void)
44452{
44453time_t a;
44454              struct tm r;
44455              localtime_r (&a, &r);
44456
44457  ;
44458  return 0;
44459}
44460
44461_ACEOF
44462if ac_fn_c_try_link "$LINENO"
44463then :
44464  gl_cv_func_localtime_r_inline=yes
44465else $as_nop
44466  gl_cv_func_localtime_r_inline=no
44467fi
44468rm -f core conftest.err conftest.$ac_objext conftest.beam \
44469    conftest$ac_exeext conftest.$ac_ext
44470
44471fi
44472{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
44473printf "%s\n" "$gl_cv_func_localtime_r_inline" >&6; }
44474    if test $gl_cv_func_localtime_r_inline = yes; then
44475      REPLACE_LOCALTIME_R=1
44476    fi
44477  fi
44478
44479  if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
44480
44481
44482
44483
44484
44485
44486
44487
44488  gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
44489
44490
44491  :
44492
44493  fi
44494
44495
44496
44497
44498
44499          GNULIB_TIME_R=1
44500
44501
44502
44503
44504
44505printf "%s\n" "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
44506
44507
44508
44509  :
44510
44511
44512
44513
44514
44515
44516
44517
44518
44519
44520
44521
44522     if test $gl_cv_have_include_next = yes; then
44523       gl_cv_next_unistd_h='<'unistd.h'>'
44524     else
44525       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
44526printf %s "checking absolute name of <unistd.h>... " >&6; }
44527if test ${gl_cv_next_unistd_h+y}
44528then :
44529  printf %s "(cached) " >&6
44530else $as_nop
44531
44532             if test $ac_cv_header_unistd_h = yes; then
44533
44534
44535
44536
44537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44538/* end confdefs.h.  */
44539#include <unistd.h>
44540_ACEOF
44541                case "$host_os" in
44542    aix*) gl_absname_cpp="$ac_cpp -C" ;;
44543    *)    gl_absname_cpp="$ac_cpp" ;;
44544  esac
44545
44546  case "$host_os" in
44547    mingw*)
44548                                          gl_dirsep_regex='[/\\]'
44549      ;;
44550    *)
44551      gl_dirsep_regex='\/'
44552      ;;
44553  esac
44554      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
44555  gl_header_literal_regex=`echo 'unistd.h' \
44556                           | sed -e "$gl_make_literal_regex_sed"`
44557  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
44558      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
44559      s|^/[^/]|//&|
44560      p
44561      q
44562    }'
44563
44564        gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
44565  sed -n "$gl_absolute_header_sed"`
44566
44567           gl_header=$gl_cv_absolute_unistd_h
44568           gl_cv_next_unistd_h='"'$gl_header'"'
44569          else
44570               gl_cv_next_unistd_h='<'unistd.h'>'
44571             fi
44572
44573
44574fi
44575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
44576printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
44577     fi
44578     NEXT_UNISTD_H=$gl_cv_next_unistd_h
44579
44580     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
44581       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
44582       gl_next_as_first_directive='<'unistd.h'>'
44583     else
44584       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
44585       gl_next_as_first_directive=$gl_cv_next_unistd_h
44586     fi
44587     NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
44588
44589
44590
44591
44592  if test $ac_cv_header_unistd_h = yes; then
44593    HAVE_UNISTD_H=1
44594  else
44595    HAVE_UNISTD_H=0
44596  fi
44597
44598
44599
44600
44601
44602
44603
44604
44605
44606
44607
44608
44609
44610  if test $ac_cv_have_decl_execvpe = no; then
44611    HAVE_DECL_EXECVPE=0
44612  fi
44613
44614
44615
44616
44617
44618
44619      if  { test "$HAVE_LIBUNISTRING" != yes \
44620    || {
44621
44622
44623
44624            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
44625            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
44626                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
44627                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
44628                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
44629                         }
44630                    }
44631               }
44632
44633
44634
44635
44636       }
44637  }; then
44638    LIBUNISTRING_UNITYPES_H='unitypes.h'
44639  else
44640    LIBUNISTRING_UNITYPES_H=
44641  fi
44642
44643
44644
44645
44646      if  { test "$HAVE_LIBUNISTRING" != yes \
44647    || {
44648
44649
44650
44651            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
44652            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
44653                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
44654                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
44655                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
44656                         }
44657                    }
44658               }
44659
44660
44661
44662
44663       }
44664  }; then
44665    LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
44666  else
44667    LIBUNISTRING_UNIWIDTH_H=
44668  fi
44669
44670
44671
44672
44673       if  { test "$HAVE_LIBUNISTRING" != yes \
44674    || {
44675
44676
44677
44678            test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
44679            || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
44680                 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
44681                      || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
44682                           && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
44683                         }
44684                    }
44685               }
44686
44687
44688
44689
44690       }
44691  }; then
44692  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
44693  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
44694else
44695  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
44696  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
44697fi
44698
44699
44700
44701
44702
44703
44704
44705    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
44706printf %s "checking whether unlink honors trailing slashes... " >&6; }
44707if test ${gl_cv_func_unlink_honors_slashes+y}
44708then :
44709  printf %s "(cached) " >&6
44710else $as_nop
44711  touch conftest.file
44712     # Assume that if we have lstat, we can also check symlinks.
44713     if test $ac_cv_func_lstat = yes; then
44714       ln -s conftest.file conftest.lnk
44715     fi
44716     if test "$cross_compiling" = yes
44717then :
44718  case "$host_os" in
44719                          # Guess yes on Linux systems.
44720         linux-* | linux) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
44721                          # Guess yes on glibc systems.
44722         *-gnu*)          gl_cv_func_unlink_honors_slashes="guessing yes" ;;
44723                          # Guess no on native Windows.
44724         mingw*)          gl_cv_func_unlink_honors_slashes="guessing no" ;;
44725                          # If we don't know, obey --enable-cross-guesses.
44726         *)               gl_cv_func_unlink_honors_slashes="$gl_cross_guess_normal" ;;
44727       esac
44728
44729else $as_nop
44730  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44731/* end confdefs.h.  */
44732#if HAVE_UNISTD_H
44733           # include <unistd.h>
44734           #else /* on Windows with MSVC */
44735           # include <io.h>
44736           #endif
44737           #include <errno.h>
44738
44739
44740$gl_mda_defines
44741
44742int
44743main (void)
44744{
44745int result = 0;
44746           if (!unlink ("conftest.file/"))
44747             result |= 1;
44748           else if (errno != ENOTDIR)
44749             result |= 2;
44750#if HAVE_LSTAT
44751           if (!unlink ("conftest.lnk/"))
44752             result |= 4;
44753           else if (errno != ENOTDIR)
44754             result |= 8;
44755#endif
44756           return result;
44757
44758  ;
44759  return 0;
44760}
44761_ACEOF
44762if ac_fn_c_try_run "$LINENO"
44763then :
44764  gl_cv_func_unlink_honors_slashes=yes
44765else $as_nop
44766  gl_cv_func_unlink_honors_slashes=no
44767fi
44768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44769  conftest.$ac_objext conftest.beam conftest.$ac_ext
44770fi
44771
44772     rm -f conftest.file conftest.lnk
44773fi
44774{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
44775printf "%s\n" "$gl_cv_func_unlink_honors_slashes" >&6; }
44776  case "$gl_cv_func_unlink_honors_slashes" in
44777    *no)
44778      REPLACE_UNLINK=1
44779      ;;
44780  esac
44781
44782      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
44783printf %s "checking whether unlink of a parent directory fails as it should... " >&6; }
44784if test ${gl_cv_func_unlink_parent_fails+y}
44785then :
44786  printf %s "(cached) " >&6
44787else $as_nop
44788  case "$host_os" in
44789       darwin*)
44790                                                      if {
44791              # Use the mktemp program if available. If not available, hide the error
44792              # message.
44793              tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
44794              test -n "$tmp" && test -d "$tmp"
44795            } ||
44796            {
44797              # Use a simple mkdir command. It is guaranteed to fail if the directory
44798              # already exists.  $RANDOM is bash specific and expands to empty in shells
44799              # other than bash, ksh and zsh.  Its use does not increase security;
44800              # rather, it minimizes the probability of failure in a very cluttered /tmp
44801              # directory.
44802              tmp=/tmp/gt$$-$RANDOM
44803              (umask 077 && mkdir "$tmp")
44804            }; then
44805           mkdir "$tmp/subdir"
44806           GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
44807           export GL_SUBDIR_FOR_UNLINK
44808           if test "$cross_compiling" = yes
44809then :
44810  # If we don't know, obey --enable-cross-guesses.
44811              gl_cv_func_unlink_parent_fails="$gl_cross_guess_normal"
44812
44813else $as_nop
44814  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44815/* end confdefs.h.  */
44816
44817                #include <stdlib.h>
44818                #if HAVE_UNISTD_H
44819                # include <unistd.h>
44820                #else /* on Windows with MSVC */
44821                # include <direct.h>
44822                # include <io.h>
44823                #endif
44824
44825
44826$gl_mda_defines
44827
44828                int main ()
44829                {
44830                  int result = 0;
44831                  if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
44832                    result |= 1;
44833                  else if (unlink ("..") == 0)
44834                    result |= 2;
44835                  return result;
44836                }
44837
44838_ACEOF
44839if ac_fn_c_try_run "$LINENO"
44840then :
44841  gl_cv_func_unlink_parent_fails=yes
44842else $as_nop
44843  gl_cv_func_unlink_parent_fails=no
44844fi
44845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44846  conftest.$ac_objext conftest.beam conftest.$ac_ext
44847fi
44848
44849           unset GL_SUBDIR_FOR_UNLINK
44850           rm -rf "$tmp"
44851         else
44852           gl_cv_func_unlink_parent_fails="guessing no"
44853         fi
44854         ;;
44855       *)
44856         gl_cv_func_unlink_parent_fails="guessing yes"
44857         ;;
44858     esac
44859
44860fi
44861{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
44862printf "%s\n" "$gl_cv_func_unlink_parent_fails" >&6; }
44863  case "$gl_cv_func_unlink_parent_fails" in
44864    *no)
44865      REPLACE_UNLINK=1
44866
44867printf "%s\n" "#define UNLINK_PARENT_BUG 1" >>confdefs.h
44868
44869      ;;
44870  esac
44871
44872  if test $REPLACE_UNLINK = 1; then
44873
44874
44875
44876
44877
44878
44879
44880
44881  gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
44882
44883  fi
44884
44885
44886
44887
44888
44889          GNULIB_UNLINK=1
44890
44891
44892
44893
44894
44895printf "%s\n" "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
44896
44897
44898
44899
44900
44901
44902
44903  case "$host_os" in
44904    mingw*)
44905                                    REPLACE_UTIME=1
44906      ;;
44907    *)
44908      ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
44909if test "x$ac_cv_func_utime" = xyes
44910then :
44911  printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h
44912
44913fi
44914
44915      if test $ac_cv_func_utime = no; then
44916        HAVE_UTIME=0
44917      else
44918                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether utime handles trailing slashes on files" >&5
44919printf %s "checking whether utime handles trailing slashes on files... " >&6; }
44920if test ${gl_cv_func_utime_file_slash+y}
44921then :
44922  printf %s "(cached) " >&6
44923else $as_nop
44924  touch conftest.tmp
44925           # Assume that if we have lstat, we can also check symlinks.
44926           if test $ac_cv_func_lstat = yes; then
44927             ln -s conftest.tmp conftest.lnk
44928           fi
44929           if test "$cross_compiling" = yes
44930then :
44931  case "$host_os" in
44932                                 # Guess yes on Linux systems.
44933                linux-* | linux) gl_cv_func_utime_file_slash="guessing yes" ;;
44934                                 # Guess yes on glibc systems.
44935                *-gnu* | gnu*)   gl_cv_func_utime_file_slash="guessing yes" ;;
44936                                 # Guess no on macOS.
44937                darwin*)         gl_cv_func_utime_file_slash="guessing no" ;;
44938                                 # If we don't know, obey --enable-cross-guesses.
44939                *)               gl_cv_func_utime_file_slash="$gl_cross_guess_normal" ;;
44940              esac
44941
44942else $as_nop
44943  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44944/* end confdefs.h.  */
44945#include <stddef.h>
44946                 #include <utime.h>
44947
44948int
44949main (void)
44950{
44951int result = 0;
44952                 if (!utime ("conftest.tmp/", NULL))
44953                   result |= 1;
44954                 #if HAVE_LSTAT
44955                 if (!utime ("conftest.lnk/", NULL))
44956                   result |= 2;
44957                 #endif
44958                 return result;
44959
44960  ;
44961  return 0;
44962}
44963_ACEOF
44964if ac_fn_c_try_run "$LINENO"
44965then :
44966  gl_cv_func_utime_file_slash=yes
44967else $as_nop
44968  gl_cv_func_utime_file_slash=no
44969fi
44970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
44971  conftest.$ac_objext conftest.beam conftest.$ac_ext
44972fi
44973
44974           rm -f conftest.tmp conftest.lnk
44975
44976fi
44977{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_utime_file_slash" >&5
44978printf "%s\n" "$gl_cv_func_utime_file_slash" >&6; }
44979        case $gl_cv_func_stat_file_slash in
44980          *no)
44981            REPLACE_UTIME=1
44982
44983printf "%s\n" "#define REPLACE_FUNC_UTIME_FILE 1" >>confdefs.h
44984
44985            ;;
44986        esac
44987      fi
44988      ;;
44989  esac
44990
44991  if test $HAVE_UTIME = 0 || test $REPLACE_UTIME = 1; then
44992
44993
44994
44995
44996
44997
44998
44999
45000  gl_LIBOBJS="$gl_LIBOBJS utime.$ac_objext"
45001
45002    :
45003  fi
45004
45005
45006
45007
45008
45009          GNULIB_UTIME=1
45010
45011
45012
45013
45014
45015printf "%s\n" "#define GNULIB_TEST_UTIME 1" >>confdefs.h
45016
45017
45018
45019
45020
45021
45022
45023
45024
45025
45026
45027
45028
45029
45030
45031
45032
45033     if test $gl_cv_have_include_next = yes; then
45034       gl_cv_next_utime_h='<'utime.h'>'
45035     else
45036       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <utime.h>" >&5
45037printf %s "checking absolute name of <utime.h>... " >&6; }
45038if test ${gl_cv_next_utime_h+y}
45039then :
45040  printf %s "(cached) " >&6
45041else $as_nop
45042
45043             if test $ac_cv_header_utime_h = yes; then
45044
45045
45046
45047
45048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45049/* end confdefs.h.  */
45050#include <utime.h>
45051_ACEOF
45052                case "$host_os" in
45053    aix*) gl_absname_cpp="$ac_cpp -C" ;;
45054    *)    gl_absname_cpp="$ac_cpp" ;;
45055  esac
45056
45057  case "$host_os" in
45058    mingw*)
45059                                          gl_dirsep_regex='[/\\]'
45060      ;;
45061    *)
45062      gl_dirsep_regex='\/'
45063      ;;
45064  esac
45065      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
45066  gl_header_literal_regex=`echo 'utime.h' \
45067                           | sed -e "$gl_make_literal_regex_sed"`
45068  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
45069      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
45070      s|^/[^/]|//&|
45071      p
45072      q
45073    }'
45074
45075        gl_cv_absolute_utime_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
45076  sed -n "$gl_absolute_header_sed"`
45077
45078           gl_header=$gl_cv_absolute_utime_h
45079           gl_cv_next_utime_h='"'$gl_header'"'
45080          else
45081               gl_cv_next_utime_h='<'utime.h'>'
45082             fi
45083
45084
45085fi
45086{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_utime_h" >&5
45087printf "%s\n" "$gl_cv_next_utime_h" >&6; }
45088     fi
45089     NEXT_UTIME_H=$gl_cv_next_utime_h
45090
45091     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
45092       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
45093       gl_next_as_first_directive='<'utime.h'>'
45094     else
45095       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
45096       gl_next_as_first_directive=$gl_cv_next_utime_h
45097     fi
45098     NEXT_AS_FIRST_DIRECTIVE_UTIME_H=$gl_next_as_first_directive
45099
45100
45101
45102
45103
45104  if test $ac_cv_header_utime_h = yes; then
45105    HAVE_UTIME_H=1
45106  else
45107    HAVE_UTIME_H=0
45108  fi
45109
45110
45111
45112
45113
45114
45115
45116
45117
45118
45119
45120  if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
45121                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
45122printf %s "checking whether futimesat handles NULL file... " >&6; }
45123if test ${gl_cv_func_futimesat_works+y}
45124then :
45125  printf %s "(cached) " >&6
45126else $as_nop
45127  touch conftest.file
45128       if test "$cross_compiling" = yes
45129then :
45130  case "$host_os" in
45131                            # Guess yes on Linux systems.
45132           linux-* | linux) gl_cv_func_futimesat_works="guessing yes" ;;
45133                            # Guess yes on glibc systems.
45134           *-gnu*)          gl_cv_func_futimesat_works="guessing yes" ;;
45135                            # If we don't know, obey --enable-cross-guesses.
45136           *)               gl_cv_func_futimesat_works="$gl_cross_guess_normal" ;;
45137         esac
45138
45139else $as_nop
45140  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45141/* end confdefs.h.  */
45142
45143#include <stddef.h>
45144#include <sys/times.h>
45145#include <fcntl.h>
45146
45147
45148$gl_mda_defines
45149
45150int
45151main (void)
45152{
45153int fd = open ("conftest.file", O_RDWR);
45154          if (fd < 0) return 1;
45155          if (futimesat (fd, NULL, NULL)) return 2;
45156
45157  ;
45158  return 0;
45159}
45160_ACEOF
45161if ac_fn_c_try_run "$LINENO"
45162then :
45163  gl_cv_func_futimesat_works=yes
45164else $as_nop
45165  gl_cv_func_futimesat_works=no
45166fi
45167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45168  conftest.$ac_objext conftest.beam conftest.$ac_ext
45169fi
45170
45171      rm -f conftest.file
45172fi
45173{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
45174printf "%s\n" "$gl_cv_func_futimesat_works" >&6; }
45175    case "$gl_cv_func_futimesat_works" in
45176      *yes) ;;
45177      *)
45178
45179printf "%s\n" "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
45180
45181        ;;
45182    esac
45183  fi
45184
45185
45186
45187
45188  if test $ac_cv_func_vasnprintf = no; then
45189
45190
45191
45192
45193
45194
45195
45196
45197
45198
45199  gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
45200
45201
45202
45203
45204
45205
45206
45207
45208
45209  gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
45210
45211
45212
45213
45214
45215
45216
45217
45218
45219  gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
45220
45221
45222
45223
45224
45225
45226
45227
45228
45229  gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
45230
45231  if test $ac_cv_func_vasnprintf = yes; then
45232
45233printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
45234
45235  fi
45236
45237
45238
45239
45240
45241
45242
45243
45244
45245  ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
45246if test "x$ac_cv_type_ptrdiff_t" = xyes
45247then :
45248
45249else $as_nop
45250
45251printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
45252
45253
45254fi
45255
45256
45257
45258
45259
45260
45261
45262  fi
45263
45264
45265
45266  ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
45267if test "x$ac_cv_func_waitid" = xyes
45268then :
45269  printf "%s\n" "#define HAVE_WAITID 1" >>confdefs.h
45270
45271fi
45272
45273
45274
45275
45276  HAVE_WAITPID=1
45277  case $host_os in
45278    mingw*) HAVE_WAITPID=0 ;;
45279  esac
45280
45281  if test $HAVE_WAITPID = 0; then
45282
45283
45284
45285
45286
45287
45288
45289
45290  gl_LIBOBJS="$gl_LIBOBJS waitpid.$ac_objext"
45291
45292  fi
45293
45294
45295
45296
45297
45298          GNULIB_WAITPID=1
45299
45300
45301
45302
45303
45304printf "%s\n" "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
45305
45306
45307
45308
45309
45310
45311
45312
45313
45314
45315
45316
45317
45318
45319
45320     if test $gl_cv_have_include_next = yes; then
45321       gl_cv_next_wchar_h='<'wchar.h'>'
45322     else
45323       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
45324printf %s "checking absolute name of <wchar.h>... " >&6; }
45325if test ${gl_cv_next_wchar_h+y}
45326then :
45327  printf %s "(cached) " >&6
45328else $as_nop
45329
45330             if test $ac_cv_header_wchar_h = yes; then
45331
45332
45333
45334
45335  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45336/* end confdefs.h.  */
45337#include <wchar.h>
45338_ACEOF
45339                case "$host_os" in
45340    aix*) gl_absname_cpp="$ac_cpp -C" ;;
45341    *)    gl_absname_cpp="$ac_cpp" ;;
45342  esac
45343
45344  case "$host_os" in
45345    mingw*)
45346                                          gl_dirsep_regex='[/\\]'
45347      ;;
45348    *)
45349      gl_dirsep_regex='\/'
45350      ;;
45351  esac
45352      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
45353  gl_header_literal_regex=`echo 'wchar.h' \
45354                           | sed -e "$gl_make_literal_regex_sed"`
45355  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
45356      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
45357      s|^/[^/]|//&|
45358      p
45359      q
45360    }'
45361
45362        gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
45363  sed -n "$gl_absolute_header_sed"`
45364
45365           gl_header=$gl_cv_absolute_wchar_h
45366           gl_cv_next_wchar_h='"'$gl_header'"'
45367          else
45368               gl_cv_next_wchar_h='<'wchar.h'>'
45369             fi
45370
45371
45372fi
45373{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
45374printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
45375     fi
45376     NEXT_WCHAR_H=$gl_cv_next_wchar_h
45377
45378     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
45379       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
45380       gl_next_as_first_directive='<'wchar.h'>'
45381     else
45382       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
45383       gl_next_as_first_directive=$gl_cv_next_wchar_h
45384     fi
45385     NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
45386
45387
45388
45389
45390  if test $ac_cv_header_wchar_h = yes; then
45391    HAVE_WCHAR_H=1
45392  else
45393    HAVE_WCHAR_H=0
45394  fi
45395
45396
45397
45398
45399
45400  if test $gt_cv_c_wint_t = yes; then
45401    HAVE_WINT_T=1
45402  else
45403    HAVE_WINT_T=0
45404  fi
45405
45406
45407
45408
45409
45410
45411
45412
45413
45414
45415  ac_fn_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
45416      #include <wchar.h>
45417
45418" "$ac_c_undeclared_builtin_options" "CFLAGS"
45419if test "x$ac_cv_have_decl_wcsdup" = xyes
45420then :
45421  ac_have_decl=1
45422else $as_nop
45423  ac_have_decl=0
45424fi
45425printf "%s\n" "#define HAVE_DECL_WCSDUP $ac_have_decl" >>confdefs.h
45426
45427  if test $ac_cv_have_decl_wcsdup = no; then
45428    HAVE_DECL_WCSDUP=0
45429  fi
45430
45431
45432
45433
45434
45435
45436
45437
45438
45439
45440
45441
45442        if case "$host_os" in
45443       mingw*) true ;;
45444       *) test $ac_cv_func_mbsinit = yes ;;
45445     esac \
45446    && test $ac_cv_func_mbrtowc = yes; then
45447
45448
45449
45450
45451     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
45452printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
45453if test ${gl_cv_func_mbrtowc_incomplete_state+y}
45454then :
45455  printf %s "(cached) " >&6
45456else $as_nop
45457
45458                  case "$host_os" in
45459                     # Guess no on AIX and OSF/1.
45460        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
45461                     # Guess yes otherwise.
45462        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
45463      esac
45464      if test $LOCALE_JA != none; then
45465        if test "$cross_compiling" = yes
45466then :
45467  :
45468else $as_nop
45469  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45470/* end confdefs.h.  */
45471
45472#include <locale.h>
45473#include <string.h>
45474#include <wchar.h>
45475int main ()
45476{
45477  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
45478    {
45479      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
45480      mbstate_t state;
45481      wchar_t wc;
45482
45483      memset (&state, '\0', sizeof (mbstate_t));
45484      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
45485        if (mbsinit (&state))
45486          return 2;
45487    }
45488  return 0;
45489}
45490_ACEOF
45491if ac_fn_c_try_run "$LINENO"
45492then :
45493  gl_cv_func_mbrtowc_incomplete_state=yes
45494else $as_nop
45495  gl_cv_func_mbrtowc_incomplete_state=no
45496fi
45497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45498  conftest.$ac_objext conftest.beam conftest.$ac_ext
45499fi
45500
45501      else
45502        if test $LOCALE_FR_UTF8 != none; then
45503          if test "$cross_compiling" = yes
45504then :
45505  :
45506else $as_nop
45507  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45508/* end confdefs.h.  */
45509
45510#include <locale.h>
45511#include <string.h>
45512#include <wchar.h>
45513int main ()
45514{
45515  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
45516    {
45517      const char input[] = "B\303\274\303\237er"; /* "Büßer" */
45518      mbstate_t state;
45519      wchar_t wc;
45520
45521      memset (&state, '\0', sizeof (mbstate_t));
45522      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
45523        if (mbsinit (&state))
45524          return 2;
45525    }
45526  return 0;
45527}
45528_ACEOF
45529if ac_fn_c_try_run "$LINENO"
45530then :
45531  gl_cv_func_mbrtowc_incomplete_state=yes
45532else $as_nop
45533  gl_cv_func_mbrtowc_incomplete_state=no
45534fi
45535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45536  conftest.$ac_objext conftest.beam conftest.$ac_ext
45537fi
45538
45539        fi
45540      fi
45541
45542fi
45543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
45544printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
45545
45546
45547
45548
45549     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
45550printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
45551if test ${gl_cv_func_mbrtowc_sanitycheck+y}
45552then :
45553  printf %s "(cached) " >&6
45554else $as_nop
45555
45556                  case "$host_os" in
45557                    # Guess no on Solaris 8.
45558        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
45559                    # Guess yes otherwise.
45560        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
45561      esac
45562      if test $LOCALE_ZH_CN != none; then
45563        if test "$cross_compiling" = yes
45564then :
45565  :
45566else $as_nop
45567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45568/* end confdefs.h.  */
45569
45570#include <locale.h>
45571#include <stdlib.h>
45572#include <string.h>
45573#include <wchar.h>
45574int main ()
45575{
45576  /* This fails on Solaris 8:
45577     mbrtowc returns 2, and sets wc to 0x00F0.
45578     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
45579  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
45580    {
45581      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
45582      mbstate_t state;
45583      wchar_t wc;
45584
45585      memset (&state, '\0', sizeof (mbstate_t));
45586      if (mbrtowc (&wc, input + 3, 6, &state) != 4
45587          && mbtowc (&wc, input + 3, 6) == 4)
45588        return 2;
45589    }
45590  return 0;
45591}
45592_ACEOF
45593if ac_fn_c_try_run "$LINENO"
45594then :
45595  gl_cv_func_mbrtowc_sanitycheck=yes
45596else $as_nop
45597  gl_cv_func_mbrtowc_sanitycheck=no
45598fi
45599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45600  conftest.$ac_objext conftest.beam conftest.$ac_ext
45601fi
45602
45603      fi
45604
45605fi
45606{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
45607printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
45608
45609    REPLACE_MBSTATE_T=0
45610    case "$gl_cv_func_mbrtowc_incomplete_state" in
45611      *yes) ;;
45612      *) REPLACE_MBSTATE_T=1 ;;
45613    esac
45614    case "$gl_cv_func_mbrtowc_sanitycheck" in
45615      *yes) ;;
45616      *) REPLACE_MBSTATE_T=1 ;;
45617    esac
45618  else
45619    REPLACE_MBSTATE_T=1
45620  fi
45621
45622
45623
45624  if test $ac_cv_func_wcrtomb = no; then
45625    HAVE_WCRTOMB=0
45626    ac_fn_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
45627      #include <wchar.h>
45628
45629" "$ac_c_undeclared_builtin_options" "CFLAGS"
45630if test "x$ac_cv_have_decl_wcrtomb" = xyes
45631then :
45632  ac_have_decl=1
45633else $as_nop
45634  ac_have_decl=0
45635fi
45636printf "%s\n" "#define HAVE_DECL_WCRTOMB $ac_have_decl" >>confdefs.h
45637
45638    if test $ac_cv_have_decl_wcrtomb = yes; then
45639                        REPLACE_WCRTOMB=1
45640    fi
45641  else
45642                        if test $REPLACE_WCRTOMB = 0; then
45643
45644
45645
45646
45647
45648             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb works in the C locale" >&5
45649printf %s "checking whether wcrtomb works in the C locale... " >&6; }
45650if test ${gl_cv_func_wcrtomb_works+y}
45651then :
45652  printf %s "(cached) " >&6
45653else $as_nop
45654  if test "$cross_compiling" = yes
45655then :
45656  case "$host_os" in
45657                               # Guess no on Android.
45658              linux*-android*) gl_cv_func_wcrtomb_works="guessing no";;
45659                               # Guess yes otherwise.
45660              *)               gl_cv_func_wcrtomb_works="guessing yes";;
45661            esac
45662
45663else $as_nop
45664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45665/* end confdefs.h.  */
45666
45667#include <string.h>
45668#include <stdlib.h>
45669#include <wchar.h>
45670int main ()
45671{
45672  mbstate_t state;
45673  char out[64];
45674  int count;
45675  memset (&state, 0, sizeof (state));
45676  out[0] = 'x';
45677  count = wcrtomb (out, L'a', &state);
45678  return !(count == 1 && out[0] == 'a');
45679}
45680_ACEOF
45681if ac_fn_c_try_run "$LINENO"
45682then :
45683  gl_cv_func_wcrtomb_works=yes
45684else $as_nop
45685  gl_cv_func_wcrtomb_works=no
45686fi
45687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45688  conftest.$ac_objext conftest.beam conftest.$ac_ext
45689fi
45690
45691
45692fi
45693{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_works" >&5
45694printf "%s\n" "$gl_cv_func_wcrtomb_works" >&6; }
45695      case "$gl_cv_func_wcrtomb_works" in
45696        *yes) ;;
45697        *)
45698printf "%s\n" "#define WCRTOMB_C_LOCALE_BUG 1" >>confdefs.h
45699
45700           REPLACE_WCRTOMB=1 ;;
45701      esac
45702    fi
45703    if test $REPLACE_WCRTOMB = 0; then
45704      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
45705printf %s "checking whether wcrtomb return value is correct... " >&6; }
45706if test ${gl_cv_func_wcrtomb_retval+y}
45707then :
45708  printf %s "(cached) " >&6
45709else $as_nop
45710
45711                              case "$host_os" in
45712            # Guess no on AIX 4, OSF/1, Solaris, native Windows.
45713            aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;;
45714            # Guess yes otherwise.
45715            *)                                gl_cv_func_wcrtomb_retval="guessing yes" ;;
45716          esac
45717          if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
45718            if test "$cross_compiling" = yes
45719then :
45720  :
45721else $as_nop
45722  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45723/* end confdefs.h.  */
45724
45725#include <locale.h>
45726#include <string.h>
45727#include <wchar.h>
45728#include <stdlib.h>
45729int main ()
45730{
45731  int result = 0;
45732  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
45733    {
45734      if (wcrtomb (NULL, 0, NULL) != 1)
45735        result |= 1;
45736    }
45737  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
45738    {
45739      if (wcrtomb (NULL, 0, NULL) != 1)
45740        result |= 2;
45741      {
45742        wchar_t wc = (wchar_t) 0xBADFACE;
45743        if (mbtowc (&wc, "\303\274", 2) == 2)
45744          if (wcrtomb (NULL, wc, NULL) != 1)
45745            result |= 2;
45746      }
45747    }
45748  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
45749    {
45750      if (wcrtomb (NULL, 0, NULL) != 1)
45751        result |= 4;
45752    }
45753  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
45754    {
45755      if (wcrtomb (NULL, 0, NULL) != 1)
45756        result |= 8;
45757    }
45758  return result;
45759}
45760_ACEOF
45761if ac_fn_c_try_run "$LINENO"
45762then :
45763  gl_cv_func_wcrtomb_retval=yes
45764else $as_nop
45765  gl_cv_func_wcrtomb_retval=no
45766fi
45767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45768  conftest.$ac_objext conftest.beam conftest.$ac_ext
45769fi
45770
45771          fi
45772
45773fi
45774{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
45775printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
45776      case "$gl_cv_func_wcrtomb_retval" in
45777        *yes) ;;
45778        *)
45779printf "%s\n" "#define WCRTOMB_RETVAL_BUG 1" >>confdefs.h
45780
45781           REPLACE_WCRTOMB=1 ;;
45782      esac
45783    fi
45784  fi
45785
45786  if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
45787
45788
45789
45790
45791
45792
45793
45794
45795  gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
45796
45797
45798  :
45799
45800  fi
45801
45802
45803
45804
45805
45806          GNULIB_WCRTOMB=1
45807
45808
45809
45810
45811
45812printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
45813
45814
45815
45816
45817
45818
45819
45820
45821  if test $ac_cv_func_iswcntrl = yes; then
45822    HAVE_ISWCNTRL=1
45823  else
45824    HAVE_ISWCNTRL=0
45825  fi
45826
45827
45828
45829  if test $gt_cv_c_wint_t = yes; then
45830    HAVE_WINT_T=1
45831  else
45832    HAVE_WINT_T=0
45833  fi
45834
45835
45836
45837
45838
45839
45840
45841
45842
45843
45844
45845
45846
45847     if test $gl_cv_have_include_next = yes; then
45848       gl_cv_next_wctype_h='<'wctype.h'>'
45849     else
45850       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
45851printf %s "checking absolute name of <wctype.h>... " >&6; }
45852if test ${gl_cv_next_wctype_h+y}
45853then :
45854  printf %s "(cached) " >&6
45855else $as_nop
45856
45857             if test $ac_cv_header_wctype_h = yes; then
45858
45859
45860
45861
45862  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45863/* end confdefs.h.  */
45864#include <wctype.h>
45865_ACEOF
45866                case "$host_os" in
45867    aix*) gl_absname_cpp="$ac_cpp -C" ;;
45868    *)    gl_absname_cpp="$ac_cpp" ;;
45869  esac
45870
45871  case "$host_os" in
45872    mingw*)
45873                                          gl_dirsep_regex='[/\\]'
45874      ;;
45875    *)
45876      gl_dirsep_regex='\/'
45877      ;;
45878  esac
45879      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
45880  gl_header_literal_regex=`echo 'wctype.h' \
45881                           | sed -e "$gl_make_literal_regex_sed"`
45882  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
45883      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
45884      s|^/[^/]|//&|
45885      p
45886      q
45887    }'
45888
45889        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
45890  sed -n "$gl_absolute_header_sed"`
45891
45892           gl_header=$gl_cv_absolute_wctype_h
45893           gl_cv_next_wctype_h='"'$gl_header'"'
45894          else
45895               gl_cv_next_wctype_h='<'wctype.h'>'
45896             fi
45897
45898
45899fi
45900{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
45901printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
45902     fi
45903     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
45904
45905     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
45906       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
45907       gl_next_as_first_directive='<'wctype.h'>'
45908     else
45909       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
45910       gl_next_as_first_directive=$gl_cv_next_wctype_h
45911     fi
45912     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
45913
45914
45915
45916
45917  if test $ac_cv_header_wctype_h = yes; then
45918    if test $ac_cv_func_iswcntrl = yes; then
45919                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
45920printf %s "checking whether iswcntrl works... " >&6; }
45921if test ${gl_cv_func_iswcntrl_works+y}
45922then :
45923  printf %s "(cached) " >&6
45924else $as_nop
45925
45926          if test "$cross_compiling" = yes
45927then :
45928               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45929/* end confdefs.h.  */
45930#include <stdlib.h>
45931                          #if __GNU_LIBRARY__ == 1
45932                          Linux libc5 i18n is broken.
45933                          #endif
45934int
45935main (void)
45936{
45937
45938  ;
45939  return 0;
45940}
45941_ACEOF
45942if ac_fn_c_try_compile "$LINENO"
45943then :
45944  gl_cv_func_iswcntrl_works="guessing yes"
45945else $as_nop
45946  gl_cv_func_iswcntrl_works="guessing no"
45947fi
45948rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
45949
45950else $as_nop
45951  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45952/* end confdefs.h.  */
45953
45954               #include <wchar.h>
45955               #include <wctype.h>
45956               int main () { return iswprint ('x') == 0; }
45957
45958_ACEOF
45959if ac_fn_c_try_run "$LINENO"
45960then :
45961  gl_cv_func_iswcntrl_works=yes
45962else $as_nop
45963  gl_cv_func_iswcntrl_works=no
45964fi
45965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45966  conftest.$ac_objext conftest.beam conftest.$ac_ext
45967fi
45968
45969
45970fi
45971{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
45972printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
45973    fi
45974    HAVE_WCTYPE_H=1
45975  else
45976    HAVE_WCTYPE_H=0
45977  fi
45978
45979
45980  if test $GNULIB_OVERRIDES_WINT_T = 1; then
45981    REPLACE_ISWCNTRL=1
45982  else
45983    case "$gl_cv_func_iswcntrl_works" in
45984      *yes) REPLACE_ISWCNTRL=0 ;;
45985      *)    REPLACE_ISWCNTRL=1 ;;
45986    esac
45987  fi
45988
45989
45990  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
45991        :
45992  fi
45993
45994  if test $REPLACE_ISWCNTRL = 1; then
45995    REPLACE_TOWLOWER=1
45996  else
45997    ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
45998if test "x$ac_cv_func_towlower" = xyes
45999then :
46000  printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
46001
46002fi
46003
46004    if test $ac_cv_func_towlower = yes; then
46005      REPLACE_TOWLOWER=0
46006    else
46007      ac_fn_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
46008          #if HAVE_WCTYPE_H
46009          # include <wctype.h>
46010          #endif
46011
46012" "$ac_c_undeclared_builtin_options" "CFLAGS"
46013if test "x$ac_cv_have_decl_towlower" = xyes
46014then :
46015  ac_have_decl=1
46016else $as_nop
46017  ac_have_decl=0
46018fi
46019printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
46020
46021      if test $ac_cv_have_decl_towlower = yes; then
46022                                REPLACE_TOWLOWER=1
46023      else
46024        REPLACE_TOWLOWER=0
46025      fi
46026    fi
46027  fi
46028
46029
46030  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
46031        :
46032  fi
46033
46034          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
46035printf %s "checking for wctype_t... " >&6; }
46036if test ${gl_cv_type_wctype_t+y}
46037then :
46038  printf %s "(cached) " >&6
46039else $as_nop
46040  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46041/* end confdefs.h.  */
46042#include <wchar.h>
46043            #if HAVE_WCTYPE_H
46044            # include <wctype.h>
46045            #endif
46046            wctype_t a;
46047
46048int
46049main (void)
46050{
46051
46052  ;
46053  return 0;
46054}
46055_ACEOF
46056if ac_fn_c_try_compile "$LINENO"
46057then :
46058  gl_cv_type_wctype_t=yes
46059else $as_nop
46060  gl_cv_type_wctype_t=no
46061fi
46062rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46063
46064fi
46065{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
46066printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
46067  if test $gl_cv_type_wctype_t = no; then
46068    HAVE_WCTYPE_T=0
46069  fi
46070
46071      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
46072printf %s "checking for wctrans_t... " >&6; }
46073if test ${gl_cv_type_wctrans_t+y}
46074then :
46075  printf %s "(cached) " >&6
46076else $as_nop
46077  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46078/* end confdefs.h.  */
46079#include <wchar.h>
46080            #include <wctype.h>
46081            wctrans_t a;
46082
46083int
46084main (void)
46085{
46086
46087  ;
46088  return 0;
46089}
46090_ACEOF
46091if ac_fn_c_try_compile "$LINENO"
46092then :
46093  gl_cv_type_wctrans_t=yes
46094else $as_nop
46095  gl_cv_type_wctrans_t=no
46096fi
46097rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46098
46099fi
46100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
46101printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
46102  if test $gl_cv_type_wctrans_t = no; then
46103    HAVE_WCTRANS_T=0
46104  fi
46105
46106
46107
46108
46109
46110
46111
46112
46113
46114
46115
46116
46117
46118
46119
46120
46121  ac_fn_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
46122    #include <wchar.h>
46123
46124" "$ac_c_undeclared_builtin_options" "CFLAGS"
46125if test "x$ac_cv_have_decl_wcwidth" = xyes
46126then :
46127  ac_have_decl=1
46128else $as_nop
46129  ac_have_decl=0
46130fi
46131printf "%s\n" "#define HAVE_DECL_WCWIDTH $ac_have_decl" >>confdefs.h
46132
46133  if test $ac_cv_have_decl_wcwidth != yes; then
46134    HAVE_DECL_WCWIDTH=0
46135  fi
46136
46137  if test $ac_cv_func_wcwidth != yes; then
46138    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
46139printf %s "checking whether wcwidth is a macro... " >&6; }
46140if test ${gl_cv_func_wcwidth_macro+y}
46141then :
46142  printf %s "(cached) " >&6
46143else $as_nop
46144  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46145/* end confdefs.h.  */
46146
46147#include <wchar.h>
46148#ifdef wcwidth
46149 wchar_header_defines_wcwidth
46150#endif
46151_ACEOF
46152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46153  $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1
46154then :
46155  gl_cv_func_wcwidth_macro=yes
46156else $as_nop
46157  gl_cv_func_wcwidth_macro=no
46158fi
46159rm -rf conftest*
46160
46161
46162fi
46163{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
46164printf "%s\n" "$gl_cv_func_wcwidth_macro" >&6; }
46165  fi
46166
46167  if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
46168    HAVE_WCWIDTH=1
46169                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
46170printf %s "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
46171if test ${gl_cv_func_wcwidth_works+y}
46172then :
46173  printf %s "(cached) " >&6
46174else $as_nop
46175
46176        if test "$cross_compiling" = yes
46177then :
46178
46179           case "$host_os" in
46180                            # Guess yes on glibc systems.
46181             *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";;
46182                            # Guess yes on musl systems.
46183             *-musl*)       gl_cv_func_wcwidth_works="guessing yes";;
46184                            # Guess yes on AIX 7 systems.
46185             aix[7-9]*)     gl_cv_func_wcwidth_works="guessing yes";;
46186             *)             gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
46187           esac
46188
46189else $as_nop
46190  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46191/* end confdefs.h.  */
46192
46193#include <locale.h>
46194#include <wchar.h>
46195#if !HAVE_DECL_WCWIDTH
46196extern
46197# ifdef __cplusplus
46198"C"
46199# endif
46200int wcwidth (int);
46201#endif
46202int main ()
46203{
46204  int result = 0;
46205  if (setlocale (LC_ALL, "en_US.UTF-8") != NULL)
46206    {
46207      if (wcwidth (0x0301) > 0)
46208        result |= 1;
46209      if (wcwidth (0x05B0) > 0)
46210        result |= 2;
46211      if (wcwidth (0x200B) > 0)
46212        result |= 4;
46213      if (wcwidth (0xFF1A) == 0)
46214        result |= 8;
46215      if (wcwidth (0x2202) > 1)
46216        result |= 16;
46217    }
46218  return result;
46219}
46220_ACEOF
46221if ac_fn_c_try_run "$LINENO"
46222then :
46223  gl_cv_func_wcwidth_works=yes
46224else $as_nop
46225  gl_cv_func_wcwidth_works=no
46226fi
46227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46228  conftest.$ac_objext conftest.beam conftest.$ac_ext
46229fi
46230
46231
46232fi
46233{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
46234printf "%s\n" "$gl_cv_func_wcwidth_works" >&6; }
46235    case "$gl_cv_func_wcwidth_works" in
46236      *yes) ;;
46237      *no) REPLACE_WCWIDTH=1 ;;
46238    esac
46239  else
46240    HAVE_WCWIDTH=0
46241  fi
46242
46243  if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
46244
46245
46246
46247
46248
46249
46250
46251
46252  gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
46253
46254
46255
46256  :
46257
46258  fi
46259
46260
46261
46262
46263
46264          GNULIB_WCWIDTH=1
46265
46266
46267
46268
46269
46270printf "%s\n" "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
46271
46272
46273
46274
46275  case "$host_os" in
46276    mingw*)
46277
46278
46279
46280
46281
46282
46283
46284
46285  gl_LIBOBJS="$gl_LIBOBJS windows-cond.$ac_objext"
46286
46287      ;;
46288  esac
46289
46290  case "$host_os" in
46291    mingw*)
46292
46293
46294
46295
46296
46297
46298
46299
46300  gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext"
46301
46302      ;;
46303  esac
46304
46305  case "$host_os" in
46306    mingw*)
46307
46308
46309
46310
46311
46312
46313
46314
46315  gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext"
46316
46317      ;;
46318  esac
46319
46320  case "$host_os" in
46321    mingw*)
46322
46323
46324
46325
46326
46327
46328
46329
46330  gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext"
46331
46332      ;;
46333  esac
46334
46335  case "$host_os" in
46336    mingw*)
46337
46338
46339
46340
46341
46342
46343
46344
46345  gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext"
46346
46347      ;;
46348  esac
46349
46350  case "$host_os" in
46351    mingw*)
46352
46353
46354
46355
46356
46357
46358
46359
46360  gl_LIBOBJS="$gl_LIBOBJS windows-spawn.$ac_objext"
46361
46362      ;;
46363  esac
46364
46365  case "$host_os" in
46366    mingw*)
46367
46368
46369
46370
46371
46372
46373
46374
46375  gl_LIBOBJS="$gl_LIBOBJS windows-thread.$ac_objext"
46376
46377      ;;
46378  esac
46379
46380  case "$host_os" in
46381    mingw*)
46382
46383
46384
46385
46386
46387
46388
46389
46390  gl_LIBOBJS="$gl_LIBOBJS windows-tls.$ac_objext"
46391
46392      ;;
46393  esac
46394
46395
46396      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
46397printf %s "checking for wmemchr... " >&6; }
46398if test ${gl_cv_func_wmemchr+y}
46399then :
46400  printf %s "(cached) " >&6
46401else $as_nop
46402  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46403/* end confdefs.h.  */
46404#include <wchar.h>
46405
46406int
46407main (void)
46408{
46409return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
46410  ;
46411  return 0;
46412}
46413
46414_ACEOF
46415if ac_fn_c_try_link "$LINENO"
46416then :
46417  gl_cv_func_wmemchr=yes
46418else $as_nop
46419  gl_cv_func_wmemchr=no
46420fi
46421rm -f core conftest.err conftest.$ac_objext conftest.beam \
46422    conftest$ac_exeext conftest.$ac_ext
46423
46424fi
46425{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
46426printf "%s\n" "$gl_cv_func_wmemchr" >&6; }
46427  if test $gl_cv_func_wmemchr = no; then
46428    HAVE_WMEMCHR=0
46429  fi
46430
46431  if test $HAVE_WMEMCHR = 0; then
46432
46433
46434
46435
46436
46437
46438
46439
46440  gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext"
46441
46442  fi
46443
46444
46445
46446
46447
46448          GNULIB_WMEMCHR=1
46449
46450
46451
46452
46453
46454printf "%s\n" "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
46455
46456
46457
46458
46459
46460
46461
46462
46463
46464
46465
46466  if test $ac_cv_func_wmempcpy = no; then
46467    HAVE_WMEMPCPY=0
46468  fi
46469
46470  if test $HAVE_WMEMPCPY = 0; then
46471
46472
46473
46474
46475
46476
46477
46478
46479  gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext"
46480
46481  fi
46482
46483
46484
46485
46486
46487          GNULIB_WMEMPCPY=1
46488
46489
46490
46491
46492
46493printf "%s\n" "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
46494
46495
46496
46497
46498
46499
46500
46501    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
46502      REPLACE_WRITE=1
46503    fi
46504
46505
46506
46507
46508  if test $REPLACE_WRITE = 1; then
46509
46510
46511
46512
46513
46514
46515
46516
46517  gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
46518
46519    :
46520  fi
46521
46522
46523
46524
46525
46526          GNULIB_WRITE=1
46527
46528
46529
46530
46531
46532printf "%s\n" "#define GNULIB_TEST_WRITE 1" >>confdefs.h
46533
46534
46535
46536  :
46537
46538
46539printf "%s\n" "#define GNULIB_XALLOC 1" >>confdefs.h
46540
46541
46542
46543
46544printf "%s\n" "#define GNULIB_XALLOC_DIE 1" >>confdefs.h
46545
46546
46547
46548
46549  ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
46550if test "x$ac_cv_header_stdint_h" = xyes
46551then :
46552  printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
46553
46554fi
46555
46556
46557
46558
46559  :
46560
46561
46562  # End of code from modules
46563
46564
46565
46566
46567
46568
46569
46570
46571
46572  gltests_libdeps=
46573  gltests_ltlibdeps=
46574
46575
46576
46577
46578
46579
46580
46581
46582
46583
46584  gl_source_base='lib/tests'
46585  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
46586
46587  gl_module_indicator_condition=$gltests_WITNESS
46588
46589
46590
46591
46592
46593
46594
46595
46596
46597
46598
46599
46600
46601
46602
46603
46604
46605
46606
46607
46608
46609
46610
46611
46612
46613	# allow to override gcov location
46614
46615# Check whether --with-gcov was given.
46616if test ${with_gcov+y}
46617then :
46618  withval=$with_gcov; _AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov
46619else $as_nop
46620  _AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov
46621fi
46622
46623
46624	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with code coverage support" >&5
46625printf %s "checking whether to build with code coverage support... " >&6; }
46626	# Check whether --enable-code-coverage was given.
46627if test ${enable_code_coverage+y}
46628then :
46629  enableval=$enable_code_coverage;
46630else $as_nop
46631  enable_code_coverage=no
46632fi
46633
46634
46635	 if test "x$enable_code_coverage" = xyes; then
46636  CODE_COVERAGE_ENABLED_TRUE=
46637  CODE_COVERAGE_ENABLED_FALSE='#'
46638else
46639  CODE_COVERAGE_ENABLED_TRUE='#'
46640  CODE_COVERAGE_ENABLED_FALSE=
46641fi
46642
46643	CODE_COVERAGE_ENABLED=$enable_code_coverage
46644
46645	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_code_coverage" >&5
46646printf "%s\n" "$enable_code_coverage" >&6; }
46647
46648	if  test "x$enable_code_coverage" = xyes
46649then :
46650
46651
46652	  for ac_prog in gawk mawk nawk awk
46653do
46654  # Extract the first word of "$ac_prog", so it can be a program name with args.
46655set dummy $ac_prog; ac_word=$2
46656{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46657printf %s "checking for $ac_word... " >&6; }
46658if test ${ac_cv_prog_AWK+y}
46659then :
46660  printf %s "(cached) " >&6
46661else $as_nop
46662  if test -n "$AWK"; then
46663  ac_cv_prog_AWK="$AWK" # Let the user override the test.
46664else
46665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46666for as_dir in $PATH
46667do
46668  IFS=$as_save_IFS
46669  case $as_dir in #(((
46670    '') as_dir=./ ;;
46671    */) ;;
46672    *) as_dir=$as_dir/ ;;
46673  esac
46674    for ac_exec_ext in '' $ac_executable_extensions; do
46675  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
46676    ac_cv_prog_AWK="$ac_prog"
46677    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
46678    break 2
46679  fi
46680done
46681  done
46682IFS=$as_save_IFS
46683
46684fi
46685fi
46686AWK=$ac_cv_prog_AWK
46687if test -n "$AWK"; then
46688  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
46689printf "%s\n" "$AWK" >&6; }
46690else
46691  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
46692printf "%s\n" "no" >&6; }
46693fi
46694
46695
46696  test -n "$AWK" && break
46697done
46698
46699  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU make" >&5
46700printf %s "checking for GNU make... " >&6; }
46701if test ${_cv_gnu_make_command+y}
46702then :
46703  printf %s "(cached) " >&6
46704else $as_nop
46705      _cv_gnu_make_command="" ;
46706    for a in "$MAKE" make gmake gnumake ; do
46707      if test -z "$a" ; then continue ; fi ;
46708      if "$a" --version 2> /dev/null | grep GNU 2>&1 > /dev/null ; then
46709        _cv_gnu_make_command=$a ;
46710        AX_CHECK_GNU_MAKE_HEADLINE=$("$a" --version 2> /dev/null | grep "GNU Make")
46711        ax_check_gnu_make_version=$(echo ${AX_CHECK_GNU_MAKE_HEADLINE} | ${AWK} -F " " '{ print $(NF); }')
46712        break ;
46713      fi
46714    done ;
46715fi
46716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_cv_gnu_make_command" >&5
46717printf "%s\n" "$_cv_gnu_make_command" >&6; }
46718  if test "x$_cv_gnu_make_command" = x""
46719then :
46720  ifGNUmake="#"
46721else $as_nop
46722  ifGNUmake=""
46723fi
46724  if test "x$_cv_gnu_make_command" = x""
46725then :
46726  ifnGNUmake=""
46727else $as_nop
46728  ifGNUmake="#"
46729fi
46730  if test "x$_cv_gnu_make_command" = x""
46731then :
46732  { ax_cv_gnu_make_command=; unset ax_cv_gnu_make_command;}
46733else $as_nop
46734  ax_cv_gnu_make_command=${_cv_gnu_make_command}
46735fi
46736  if test "x$_cv_gnu_make_command" = x""
46737then :
46738  as_fn_error $? "not using GNU make that is needed for coverage" "$LINENO" 5
46739fi
46740
46741
46742
46743
46744	# check for gcov
46745	if test -n "$ac_tool_prefix"; then
46746  # Extract the first word of "${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args.
46747set dummy ${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2
46748{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46749printf %s "checking for $ac_word... " >&6; }
46750if test ${ac_cv_prog_GCOV+y}
46751then :
46752  printf %s "(cached) " >&6
46753else $as_nop
46754  if test -n "$GCOV"; then
46755  ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
46756else
46757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46758for as_dir in $PATH
46759do
46760  IFS=$as_save_IFS
46761  case $as_dir in #(((
46762    '') as_dir=./ ;;
46763    */) ;;
46764    *) as_dir=$as_dir/ ;;
46765  esac
46766    for ac_exec_ext in '' $ac_executable_extensions; do
46767  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
46768    ac_cv_prog_GCOV="${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH"
46769    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
46770    break 2
46771  fi
46772done
46773  done
46774IFS=$as_save_IFS
46775
46776fi
46777fi
46778GCOV=$ac_cv_prog_GCOV
46779if test -n "$GCOV"; then
46780  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
46781printf "%s\n" "$GCOV" >&6; }
46782else
46783  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
46784printf "%s\n" "no" >&6; }
46785fi
46786
46787
46788fi
46789if test -z "$ac_cv_prog_GCOV"; then
46790  ac_ct_GCOV=$GCOV
46791  # Extract the first word of "$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args.
46792set dummy $_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2
46793{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46794printf %s "checking for $ac_word... " >&6; }
46795if test ${ac_cv_prog_ac_ct_GCOV+y}
46796then :
46797  printf %s "(cached) " >&6
46798else $as_nop
46799  if test -n "$ac_ct_GCOV"; then
46800  ac_cv_prog_ac_ct_GCOV="$ac_ct_GCOV" # Let the user override the test.
46801else
46802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46803for as_dir in $PATH
46804do
46805  IFS=$as_save_IFS
46806  case $as_dir in #(((
46807    '') as_dir=./ ;;
46808    */) ;;
46809    *) as_dir=$as_dir/ ;;
46810  esac
46811    for ac_exec_ext in '' $ac_executable_extensions; do
46812  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
46813    ac_cv_prog_ac_ct_GCOV="$_AX_CODE_COVERAGE_GCOV_PROG_WITH"
46814    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
46815    break 2
46816  fi
46817done
46818  done
46819IFS=$as_save_IFS
46820
46821fi
46822fi
46823ac_ct_GCOV=$ac_cv_prog_ac_ct_GCOV
46824if test -n "$ac_ct_GCOV"; then
46825  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GCOV" >&5
46826printf "%s\n" "$ac_ct_GCOV" >&6; }
46827else
46828  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
46829printf "%s\n" "no" >&6; }
46830fi
46831
46832  if test "x$ac_ct_GCOV" = x; then
46833    GCOV=":"
46834  else
46835    case $cross_compiling:$ac_tool_warned in
46836yes:)
46837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
46838printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
46839ac_tool_warned=yes ;;
46840esac
46841    GCOV=$ac_ct_GCOV
46842  fi
46843else
46844  GCOV="$ac_cv_prog_GCOV"
46845fi
46846
46847	if test "X$GCOV" = "X:"
46848then :
46849  as_fn_error $? "gcov is needed to do coverage" "$LINENO" 5
46850fi
46851
46852
46853		if  test "$GCC" = "no"
46854then :
46855
46856		as_fn_error $? "not compiling with gcc, which is required for gcov code coverage" "$LINENO" 5
46857
46858fi
46859
46860	# Extract the first word of "lcov", so it can be a program name with args.
46861set dummy lcov; ac_word=$2
46862{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46863printf %s "checking for $ac_word... " >&6; }
46864if test ${ac_cv_prog_LCOV+y}
46865then :
46866  printf %s "(cached) " >&6
46867else $as_nop
46868  if test -n "$LCOV"; then
46869  ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
46870else
46871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46872for as_dir in $PATH
46873do
46874  IFS=$as_save_IFS
46875  case $as_dir in #(((
46876    '') as_dir=./ ;;
46877    */) ;;
46878    *) as_dir=$as_dir/ ;;
46879  esac
46880    for ac_exec_ext in '' $ac_executable_extensions; do
46881  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
46882    ac_cv_prog_LCOV="lcov"
46883    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
46884    break 2
46885  fi
46886done
46887  done
46888IFS=$as_save_IFS
46889
46890fi
46891fi
46892LCOV=$ac_cv_prog_LCOV
46893if test -n "$LCOV"; then
46894  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
46895printf "%s\n" "$LCOV" >&6; }
46896else
46897  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
46898printf "%s\n" "no" >&6; }
46899fi
46900
46901
46902	# Extract the first word of "genhtml", so it can be a program name with args.
46903set dummy genhtml; ac_word=$2
46904{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46905printf %s "checking for $ac_word... " >&6; }
46906if test ${ac_cv_prog_GENHTML+y}
46907then :
46908  printf %s "(cached) " >&6
46909else $as_nop
46910  if test -n "$GENHTML"; then
46911  ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
46912else
46913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46914for as_dir in $PATH
46915do
46916  IFS=$as_save_IFS
46917  case $as_dir in #(((
46918    '') as_dir=./ ;;
46919    */) ;;
46920    *) as_dir=$as_dir/ ;;
46921  esac
46922    for ac_exec_ext in '' $ac_executable_extensions; do
46923  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
46924    ac_cv_prog_GENHTML="genhtml"
46925    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
46926    break 2
46927  fi
46928done
46929  done
46930IFS=$as_save_IFS
46931
46932fi
46933fi
46934GENHTML=$ac_cv_prog_GENHTML
46935if test -n "$GENHTML"; then
46936  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
46937printf "%s\n" "$GENHTML" >&6; }
46938else
46939  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
46940printf "%s\n" "no" >&6; }
46941fi
46942
46943
46944
46945	if  test x"$LCOV" = x
46946then :
46947
46948		as_fn_error $? "To enable code coverage reporting you must have lcov installed" "$LINENO" 5
46949
46950fi
46951
46952	if  test x"$GENHTML" = x
46953then :
46954
46955		as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 5
46956
46957fi
46958
46959			CODE_COVERAGE_CPPFLAGS="-DNDEBUG"
46960	CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
46961	CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
46962	CODE_COVERAGE_LIBS="-lgcov"
46963
46964
46965
46966
46967
46968
46969
46970fi
46971
46972
46973
46974
46975
46976
46977
46978
46979
46980
46981
46982
46983
46984case `pwd` in
46985  *\ * | *\	*)
46986    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
46987printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
46988esac
46989
46990
46991
46992macro_version='2.4.6'
46993macro_revision='2.4.6'
46994
46995
46996
46997
46998
46999
47000
47001
47002
47003
47004
47005
47006
47007
47008ltmain=$ac_aux_dir/ltmain.sh
47009
47010# Backslashify metacharacters that are still active within
47011# double-quoted strings.
47012sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
47013
47014# Same as above, but do not quote variable references.
47015double_quote_subst='s/\(["`\\]\)/\\\1/g'
47016
47017# Sed substitution to delay expansion of an escaped shell variable in a
47018# double_quote_subst'ed string.
47019delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
47020
47021# Sed substitution to delay expansion of an escaped single quote.
47022delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
47023
47024# Sed substitution to avoid accidental globbing in evaled expressions
47025no_glob_subst='s/\*/\\\*/g'
47026
47027ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47028ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
47029ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
47030
47031{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
47032printf %s "checking how to print strings... " >&6; }
47033# Test print first, because it will be a builtin if present.
47034if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
47035   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
47036  ECHO='print -r --'
47037elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
47038  ECHO='printf %s\n'
47039else
47040  # Use this function as a fallback that always works.
47041  func_fallback_echo ()
47042  {
47043    eval 'cat <<_LTECHO_EOF
47044$1
47045_LTECHO_EOF'
47046  }
47047  ECHO='func_fallback_echo'
47048fi
47049
47050# func_echo_all arg...
47051# Invoke $ECHO with all args, space-separated.
47052func_echo_all ()
47053{
47054    $ECHO ""
47055}
47056
47057case $ECHO in
47058  printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
47059printf "%s\n" "printf" >&6; } ;;
47060  print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
47061printf "%s\n" "print -r" >&6; } ;;
47062  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
47063printf "%s\n" "cat" >&6; } ;;
47064esac
47065
47066
47067
47068
47069
47070
47071
47072
47073
47074
47075
47076
47077
47078
47079{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
47080printf %s "checking for a sed that does not truncate output... " >&6; }
47081if test ${ac_cv_path_SED+y}
47082then :
47083  printf %s "(cached) " >&6
47084else $as_nop
47085            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
47086     for ac_i in 1 2 3 4 5 6 7; do
47087       ac_script="$ac_script$as_nl$ac_script"
47088     done
47089     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
47090     { ac_script=; unset ac_script;}
47091     if test -z "$SED"; then
47092  ac_path_SED_found=false
47093  # Loop through the user's path and test for each of PROGNAME-LIST
47094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47095for as_dir in $PATH
47096do
47097  IFS=$as_save_IFS
47098  case $as_dir in #(((
47099    '') as_dir=./ ;;
47100    */) ;;
47101    *) as_dir=$as_dir/ ;;
47102  esac
47103    for ac_prog in sed gsed
47104   do
47105    for ac_exec_ext in '' $ac_executable_extensions; do
47106      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
47107      as_fn_executable_p "$ac_path_SED" || continue
47108# Check for GNU ac_path_SED and select it if it is found.
47109  # Check for GNU $ac_path_SED
47110case `"$ac_path_SED" --version 2>&1` in
47111*GNU*)
47112  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
47113*)
47114  ac_count=0
47115  printf %s 0123456789 >"conftest.in"
47116  while :
47117  do
47118    cat "conftest.in" "conftest.in" >"conftest.tmp"
47119    mv "conftest.tmp" "conftest.in"
47120    cp "conftest.in" "conftest.nl"
47121    printf "%s\n" '' >> "conftest.nl"
47122    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
47123    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
47124    as_fn_arith $ac_count + 1 && ac_count=$as_val
47125    if test $ac_count -gt ${ac_path_SED_max-0}; then
47126      # Best one so far, save it but keep looking for a better one
47127      ac_cv_path_SED="$ac_path_SED"
47128      ac_path_SED_max=$ac_count
47129    fi
47130    # 10*(2^10) chars as input seems more than enough
47131    test $ac_count -gt 10 && break
47132  done
47133  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
47134esac
47135
47136      $ac_path_SED_found && break 3
47137    done
47138  done
47139  done
47140IFS=$as_save_IFS
47141  if test -z "$ac_cv_path_SED"; then
47142    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
47143  fi
47144else
47145  ac_cv_path_SED=$SED
47146fi
47147
47148fi
47149{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
47150printf "%s\n" "$ac_cv_path_SED" >&6; }
47151 SED="$ac_cv_path_SED"
47152  rm -f conftest.sed
47153
47154test -z "$SED" && SED=sed
47155Xsed="$SED -e 1s/^X//"
47156
47157
47158
47159
47160
47161
47162
47163
47164
47165
47166
47167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
47168printf %s "checking for fgrep... " >&6; }
47169if test ${ac_cv_path_FGREP+y}
47170then :
47171  printf %s "(cached) " >&6
47172else $as_nop
47173  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
47174   then ac_cv_path_FGREP="$GREP -F"
47175   else
47176     if test -z "$FGREP"; then
47177  ac_path_FGREP_found=false
47178  # Loop through the user's path and test for each of PROGNAME-LIST
47179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47180for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
47181do
47182  IFS=$as_save_IFS
47183  case $as_dir in #(((
47184    '') as_dir=./ ;;
47185    */) ;;
47186    *) as_dir=$as_dir/ ;;
47187  esac
47188    for ac_prog in fgrep
47189   do
47190    for ac_exec_ext in '' $ac_executable_extensions; do
47191      ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
47192      as_fn_executable_p "$ac_path_FGREP" || continue
47193# Check for GNU ac_path_FGREP and select it if it is found.
47194  # Check for GNU $ac_path_FGREP
47195case `"$ac_path_FGREP" --version 2>&1` in
47196*GNU*)
47197  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
47198*)
47199  ac_count=0
47200  printf %s 0123456789 >"conftest.in"
47201  while :
47202  do
47203    cat "conftest.in" "conftest.in" >"conftest.tmp"
47204    mv "conftest.tmp" "conftest.in"
47205    cp "conftest.in" "conftest.nl"
47206    printf "%s\n" 'FGREP' >> "conftest.nl"
47207    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
47208    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
47209    as_fn_arith $ac_count + 1 && ac_count=$as_val
47210    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
47211      # Best one so far, save it but keep looking for a better one
47212      ac_cv_path_FGREP="$ac_path_FGREP"
47213      ac_path_FGREP_max=$ac_count
47214    fi
47215    # 10*(2^10) chars as input seems more than enough
47216    test $ac_count -gt 10 && break
47217  done
47218  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
47219esac
47220
47221      $ac_path_FGREP_found && break 3
47222    done
47223  done
47224  done
47225IFS=$as_save_IFS
47226  if test -z "$ac_cv_path_FGREP"; then
47227    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
47228  fi
47229else
47230  ac_cv_path_FGREP=$FGREP
47231fi
47232
47233   fi
47234fi
47235{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
47236printf "%s\n" "$ac_cv_path_FGREP" >&6; }
47237 FGREP="$ac_cv_path_FGREP"
47238
47239
47240test -z "$GREP" && GREP=grep
47241
47242
47243
47244
47245
47246
47247
47248
47249
47250
47251
47252
47253
47254
47255
47256
47257
47258
47259
47260# Check whether --with-gnu-ld was given.
47261if test ${with_gnu_ld+y}
47262then :
47263  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
47264else $as_nop
47265  with_gnu_ld=no
47266fi
47267
47268ac_prog=ld
47269if test yes = "$GCC"; then
47270  # Check if gcc -print-prog-name=ld gives a path.
47271  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
47272printf %s "checking for ld used by $CC... " >&6; }
47273  case $host in
47274  *-*-mingw*)
47275    # gcc leaves a trailing carriage return, which upsets mingw
47276    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
47277  *)
47278    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
47279  esac
47280  case $ac_prog in
47281    # Accept absolute paths.
47282    [\\/]* | ?:[\\/]*)
47283      re_direlt='/[^/][^/]*/\.\./'
47284      # Canonicalize the pathname of ld
47285      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
47286      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
47287	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
47288      done
47289      test -z "$LD" && LD=$ac_prog
47290      ;;
47291  "")
47292    # If it fails, then pretend we aren't using GCC.
47293    ac_prog=ld
47294    ;;
47295  *)
47296    # If it is relative, then search for the first ld in PATH.
47297    with_gnu_ld=unknown
47298    ;;
47299  esac
47300elif test yes = "$with_gnu_ld"; then
47301  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
47302printf %s "checking for GNU ld... " >&6; }
47303else
47304  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
47305printf %s "checking for non-GNU ld... " >&6; }
47306fi
47307if test ${lt_cv_path_LD+y}
47308then :
47309  printf %s "(cached) " >&6
47310else $as_nop
47311  if test -z "$LD"; then
47312  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
47313  for ac_dir in $PATH; do
47314    IFS=$lt_save_ifs
47315    test -z "$ac_dir" && ac_dir=.
47316    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
47317      lt_cv_path_LD=$ac_dir/$ac_prog
47318      # Check to see if the program is GNU ld.  I'd rather use --version,
47319      # but apparently some variants of GNU ld only accept -v.
47320      # Break only if it was the GNU/non-GNU ld that we prefer.
47321      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
47322      *GNU* | *'with BFD'*)
47323	test no != "$with_gnu_ld" && break
47324	;;
47325      *)
47326	test yes != "$with_gnu_ld" && break
47327	;;
47328      esac
47329    fi
47330  done
47331  IFS=$lt_save_ifs
47332else
47333  lt_cv_path_LD=$LD # Let the user override the test with a path.
47334fi
47335fi
47336
47337LD=$lt_cv_path_LD
47338if test -n "$LD"; then
47339  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
47340printf "%s\n" "$LD" >&6; }
47341else
47342  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47343printf "%s\n" "no" >&6; }
47344fi
47345test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
47346{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
47347printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
47348if test ${lt_cv_prog_gnu_ld+y}
47349then :
47350  printf %s "(cached) " >&6
47351else $as_nop
47352  # I'd rather use --version here, but apparently some GNU lds only accept -v.
47353case `$LD -v 2>&1 </dev/null` in
47354*GNU* | *'with BFD'*)
47355  lt_cv_prog_gnu_ld=yes
47356  ;;
47357*)
47358  lt_cv_prog_gnu_ld=no
47359  ;;
47360esac
47361fi
47362{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
47363printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
47364with_gnu_ld=$lt_cv_prog_gnu_ld
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
47375printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
47376if test ${lt_cv_path_NM+y}
47377then :
47378  printf %s "(cached) " >&6
47379else $as_nop
47380  if test -n "$NM"; then
47381  # Let the user override the test.
47382  lt_cv_path_NM=$NM
47383else
47384  lt_nm_to_check=${ac_tool_prefix}nm
47385  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
47386    lt_nm_to_check="$lt_nm_to_check nm"
47387  fi
47388  for lt_tmp_nm in $lt_nm_to_check; do
47389    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
47390    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
47391      IFS=$lt_save_ifs
47392      test -z "$ac_dir" && ac_dir=.
47393      tmp_nm=$ac_dir/$lt_tmp_nm
47394      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
47395	# Check to see if the nm accepts a BSD-compat flag.
47396	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
47397	#   nm: unknown option "B" ignored
47398	# Tru64's nm complains that /dev/null is an invalid object file
47399	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
47400	case $build_os in
47401	mingw*) lt_bad_file=conftest.nm/nofile ;;
47402	*) lt_bad_file=/dev/null ;;
47403	esac
47404	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
47405	*$lt_bad_file* | *'Invalid file or object type'*)
47406	  lt_cv_path_NM="$tmp_nm -B"
47407	  break 2
47408	  ;;
47409	*)
47410	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
47411	  */dev/null*)
47412	    lt_cv_path_NM="$tmp_nm -p"
47413	    break 2
47414	    ;;
47415	  *)
47416	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
47417	    continue # so that we can try to find one that supports BSD flags
47418	    ;;
47419	  esac
47420	  ;;
47421	esac
47422      fi
47423    done
47424    IFS=$lt_save_ifs
47425  done
47426  : ${lt_cv_path_NM=no}
47427fi
47428fi
47429{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
47430printf "%s\n" "$lt_cv_path_NM" >&6; }
47431if test no != "$lt_cv_path_NM"; then
47432  NM=$lt_cv_path_NM
47433else
47434  # Didn't find any BSD compatible name lister, look for dumpbin.
47435  if test -n "$DUMPBIN"; then :
47436    # Let the user override the test.
47437  else
47438    if test -n "$ac_tool_prefix"; then
47439  for ac_prog in dumpbin "link -dump"
47440  do
47441    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
47442set dummy $ac_tool_prefix$ac_prog; ac_word=$2
47443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47444printf %s "checking for $ac_word... " >&6; }
47445if test ${ac_cv_prog_DUMPBIN+y}
47446then :
47447  printf %s "(cached) " >&6
47448else $as_nop
47449  if test -n "$DUMPBIN"; then
47450  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
47451else
47452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47453for as_dir in $PATH
47454do
47455  IFS=$as_save_IFS
47456  case $as_dir in #(((
47457    '') as_dir=./ ;;
47458    */) ;;
47459    *) as_dir=$as_dir/ ;;
47460  esac
47461    for ac_exec_ext in '' $ac_executable_extensions; do
47462  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
47463    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
47464    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
47465    break 2
47466  fi
47467done
47468  done
47469IFS=$as_save_IFS
47470
47471fi
47472fi
47473DUMPBIN=$ac_cv_prog_DUMPBIN
47474if test -n "$DUMPBIN"; then
47475  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
47476printf "%s\n" "$DUMPBIN" >&6; }
47477else
47478  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47479printf "%s\n" "no" >&6; }
47480fi
47481
47482
47483    test -n "$DUMPBIN" && break
47484  done
47485fi
47486if test -z "$DUMPBIN"; then
47487  ac_ct_DUMPBIN=$DUMPBIN
47488  for ac_prog in dumpbin "link -dump"
47489do
47490  # Extract the first word of "$ac_prog", so it can be a program name with args.
47491set dummy $ac_prog; ac_word=$2
47492{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47493printf %s "checking for $ac_word... " >&6; }
47494if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
47495then :
47496  printf %s "(cached) " >&6
47497else $as_nop
47498  if test -n "$ac_ct_DUMPBIN"; then
47499  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
47500else
47501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47502for as_dir in $PATH
47503do
47504  IFS=$as_save_IFS
47505  case $as_dir in #(((
47506    '') as_dir=./ ;;
47507    */) ;;
47508    *) as_dir=$as_dir/ ;;
47509  esac
47510    for ac_exec_ext in '' $ac_executable_extensions; do
47511  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
47512    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
47513    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
47514    break 2
47515  fi
47516done
47517  done
47518IFS=$as_save_IFS
47519
47520fi
47521fi
47522ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
47523if test -n "$ac_ct_DUMPBIN"; then
47524  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
47525printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
47526else
47527  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47528printf "%s\n" "no" >&6; }
47529fi
47530
47531
47532  test -n "$ac_ct_DUMPBIN" && break
47533done
47534
47535  if test "x$ac_ct_DUMPBIN" = x; then
47536    DUMPBIN=":"
47537  else
47538    case $cross_compiling:$ac_tool_warned in
47539yes:)
47540{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
47541printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
47542ac_tool_warned=yes ;;
47543esac
47544    DUMPBIN=$ac_ct_DUMPBIN
47545  fi
47546fi
47547
47548    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
47549    *COFF*)
47550      DUMPBIN="$DUMPBIN -symbols -headers"
47551      ;;
47552    *)
47553      DUMPBIN=:
47554      ;;
47555    esac
47556  fi
47557
47558  if test : != "$DUMPBIN"; then
47559    NM=$DUMPBIN
47560  fi
47561fi
47562test -z "$NM" && NM=nm
47563
47564
47565
47566
47567
47568
47569{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
47570printf %s "checking the name lister ($NM) interface... " >&6; }
47571if test ${lt_cv_nm_interface+y}
47572then :
47573  printf %s "(cached) " >&6
47574else $as_nop
47575  lt_cv_nm_interface="BSD nm"
47576  echo "int some_variable = 0;" > conftest.$ac_ext
47577  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
47578  (eval "$ac_compile" 2>conftest.err)
47579  cat conftest.err >&5
47580  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
47581  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
47582  cat conftest.err >&5
47583  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
47584  cat conftest.out >&5
47585  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
47586    lt_cv_nm_interface="MS dumpbin"
47587  fi
47588  rm -f conftest*
47589fi
47590{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
47591printf "%s\n" "$lt_cv_nm_interface" >&6; }
47592
47593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
47594printf %s "checking whether ln -s works... " >&6; }
47595LN_S=$as_ln_s
47596if test "$LN_S" = "ln -s"; then
47597  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47598printf "%s\n" "yes" >&6; }
47599else
47600  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
47601printf "%s\n" "no, using $LN_S" >&6; }
47602fi
47603
47604# find the maximum length of command line arguments
47605{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
47606printf %s "checking the maximum length of command line arguments... " >&6; }
47607if test ${lt_cv_sys_max_cmd_len+y}
47608then :
47609  printf %s "(cached) " >&6
47610else $as_nop
47611    i=0
47612  teststring=ABCD
47613
47614  case $build_os in
47615  msdosdjgpp*)
47616    # On DJGPP, this test can blow up pretty badly due to problems in libc
47617    # (any single argument exceeding 2000 bytes causes a buffer overrun
47618    # during glob expansion).  Even if it were fixed, the result of this
47619    # check would be larger than it should be.
47620    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
47621    ;;
47622
47623  gnu*)
47624    # Under GNU Hurd, this test is not required because there is
47625    # no limit to the length of command line arguments.
47626    # Libtool will interpret -1 as no limit whatsoever
47627    lt_cv_sys_max_cmd_len=-1;
47628    ;;
47629
47630  cygwin* | mingw* | cegcc*)
47631    # On Win9x/ME, this test blows up -- it succeeds, but takes
47632    # about 5 minutes as the teststring grows exponentially.
47633    # Worse, since 9x/ME are not pre-emptively multitasking,
47634    # you end up with a "frozen" computer, even though with patience
47635    # the test eventually succeeds (with a max line length of 256k).
47636    # Instead, let's just punt: use the minimum linelength reported by
47637    # all of the supported platforms: 8192 (on NT/2K/XP).
47638    lt_cv_sys_max_cmd_len=8192;
47639    ;;
47640
47641  mint*)
47642    # On MiNT this can take a long time and run out of memory.
47643    lt_cv_sys_max_cmd_len=8192;
47644    ;;
47645
47646  amigaos*)
47647    # On AmigaOS with pdksh, this test takes hours, literally.
47648    # So we just punt and use a minimum line length of 8192.
47649    lt_cv_sys_max_cmd_len=8192;
47650    ;;
47651
47652  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
47653    # This has been around since 386BSD, at least.  Likely further.
47654    if test -x /sbin/sysctl; then
47655      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
47656    elif test -x /usr/sbin/sysctl; then
47657      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
47658    else
47659      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
47660    fi
47661    # And add a safety zone
47662    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
47663    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
47664    ;;
47665
47666  interix*)
47667    # We know the value 262144 and hardcode it with a safety zone (like BSD)
47668    lt_cv_sys_max_cmd_len=196608
47669    ;;
47670
47671  os2*)
47672    # The test takes a long time on OS/2.
47673    lt_cv_sys_max_cmd_len=8192
47674    ;;
47675
47676  osf*)
47677    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
47678    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
47679    # nice to cause kernel panics so lets avoid the loop below.
47680    # First set a reasonable default.
47681    lt_cv_sys_max_cmd_len=16384
47682    #
47683    if test -x /sbin/sysconfig; then
47684      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
47685        *1*) lt_cv_sys_max_cmd_len=-1 ;;
47686      esac
47687    fi
47688    ;;
47689  sco3.2v5*)
47690    lt_cv_sys_max_cmd_len=102400
47691    ;;
47692  sysv5* | sco5v6* | sysv4.2uw2*)
47693    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
47694    if test -n "$kargmax"; then
47695      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
47696    else
47697      lt_cv_sys_max_cmd_len=32768
47698    fi
47699    ;;
47700  *)
47701    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
47702    if test -n "$lt_cv_sys_max_cmd_len" && \
47703       test undefined != "$lt_cv_sys_max_cmd_len"; then
47704      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
47705      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
47706    else
47707      # Make teststring a little bigger before we do anything with it.
47708      # a 1K string should be a reasonable start.
47709      for i in 1 2 3 4 5 6 7 8; do
47710        teststring=$teststring$teststring
47711      done
47712      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
47713      # If test is not a shell built-in, we'll probably end up computing a
47714      # maximum length that is only half of the actual maximum length, but
47715      # we can't tell.
47716      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
47717	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
47718	      test 17 != "$i" # 1/2 MB should be enough
47719      do
47720        i=`expr $i + 1`
47721        teststring=$teststring$teststring
47722      done
47723      # Only check the string length outside the loop.
47724      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
47725      teststring=
47726      # Add a significant safety factor because C++ compilers can tack on
47727      # massive amounts of additional arguments before passing them to the
47728      # linker.  It appears as though 1/2 is a usable value.
47729      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
47730    fi
47731    ;;
47732  esac
47733
47734fi
47735
47736if test -n "$lt_cv_sys_max_cmd_len"; then
47737  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
47738printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
47739else
47740  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
47741printf "%s\n" "none" >&6; }
47742fi
47743max_cmd_len=$lt_cv_sys_max_cmd_len
47744
47745
47746
47747
47748
47749
47750: ${CP="cp -f"}
47751: ${MV="mv -f"}
47752: ${RM="rm -f"}
47753
47754if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
47755  lt_unset=unset
47756else
47757  lt_unset=false
47758fi
47759
47760
47761
47762
47763
47764# test EBCDIC or ASCII
47765case `echo X|tr X '\101'` in
47766 A) # ASCII based system
47767    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
47768  lt_SP2NL='tr \040 \012'
47769  lt_NL2SP='tr \015\012 \040\040'
47770  ;;
47771 *) # EBCDIC based system
47772  lt_SP2NL='tr \100 \n'
47773  lt_NL2SP='tr \r\n \100\100'
47774  ;;
47775esac
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
47786printf %s "checking how to convert $build file names to $host format... " >&6; }
47787if test ${lt_cv_to_host_file_cmd+y}
47788then :
47789  printf %s "(cached) " >&6
47790else $as_nop
47791  case $host in
47792  *-*-mingw* )
47793    case $build in
47794      *-*-mingw* ) # actually msys
47795        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
47796        ;;
47797      *-*-cygwin* )
47798        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
47799        ;;
47800      * ) # otherwise, assume *nix
47801        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
47802        ;;
47803    esac
47804    ;;
47805  *-*-cygwin* )
47806    case $build in
47807      *-*-mingw* ) # actually msys
47808        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
47809        ;;
47810      *-*-cygwin* )
47811        lt_cv_to_host_file_cmd=func_convert_file_noop
47812        ;;
47813      * ) # otherwise, assume *nix
47814        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
47815        ;;
47816    esac
47817    ;;
47818  * ) # unhandled hosts (and "normal" native builds)
47819    lt_cv_to_host_file_cmd=func_convert_file_noop
47820    ;;
47821esac
47822
47823fi
47824
47825to_host_file_cmd=$lt_cv_to_host_file_cmd
47826{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
47827printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
47828
47829
47830
47831
47832
47833{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
47834printf %s "checking how to convert $build file names to toolchain format... " >&6; }
47835if test ${lt_cv_to_tool_file_cmd+y}
47836then :
47837  printf %s "(cached) " >&6
47838else $as_nop
47839  #assume ordinary cross tools, or native build.
47840lt_cv_to_tool_file_cmd=func_convert_file_noop
47841case $host in
47842  *-*-mingw* )
47843    case $build in
47844      *-*-mingw* ) # actually msys
47845        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
47846        ;;
47847    esac
47848    ;;
47849esac
47850
47851fi
47852
47853to_tool_file_cmd=$lt_cv_to_tool_file_cmd
47854{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
47855printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
47856
47857
47858
47859
47860
47861{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
47862printf %s "checking for $LD option to reload object files... " >&6; }
47863if test ${lt_cv_ld_reload_flag+y}
47864then :
47865  printf %s "(cached) " >&6
47866else $as_nop
47867  lt_cv_ld_reload_flag='-r'
47868fi
47869{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
47870printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
47871reload_flag=$lt_cv_ld_reload_flag
47872case $reload_flag in
47873"" | " "*) ;;
47874*) reload_flag=" $reload_flag" ;;
47875esac
47876reload_cmds='$LD$reload_flag -o $output$reload_objs'
47877case $host_os in
47878  cygwin* | mingw* | pw32* | cegcc*)
47879    if test yes != "$GCC"; then
47880      reload_cmds=false
47881    fi
47882    ;;
47883  darwin*)
47884    if test yes = "$GCC"; then
47885      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
47886    else
47887      reload_cmds='$LD$reload_flag -o $output$reload_objs'
47888    fi
47889    ;;
47890esac
47891
47892
47893
47894
47895
47896
47897
47898
47899
47900if test -n "$ac_tool_prefix"; then
47901  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
47902set dummy ${ac_tool_prefix}objdump; ac_word=$2
47903{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47904printf %s "checking for $ac_word... " >&6; }
47905if test ${ac_cv_prog_OBJDUMP+y}
47906then :
47907  printf %s "(cached) " >&6
47908else $as_nop
47909  if test -n "$OBJDUMP"; then
47910  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
47911else
47912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47913for as_dir in $PATH
47914do
47915  IFS=$as_save_IFS
47916  case $as_dir in #(((
47917    '') as_dir=./ ;;
47918    */) ;;
47919    *) as_dir=$as_dir/ ;;
47920  esac
47921    for ac_exec_ext in '' $ac_executable_extensions; do
47922  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
47923    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
47924    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
47925    break 2
47926  fi
47927done
47928  done
47929IFS=$as_save_IFS
47930
47931fi
47932fi
47933OBJDUMP=$ac_cv_prog_OBJDUMP
47934if test -n "$OBJDUMP"; then
47935  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
47936printf "%s\n" "$OBJDUMP" >&6; }
47937else
47938  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47939printf "%s\n" "no" >&6; }
47940fi
47941
47942
47943fi
47944if test -z "$ac_cv_prog_OBJDUMP"; then
47945  ac_ct_OBJDUMP=$OBJDUMP
47946  # Extract the first word of "objdump", so it can be a program name with args.
47947set dummy objdump; ac_word=$2
47948{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47949printf %s "checking for $ac_word... " >&6; }
47950if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
47951then :
47952  printf %s "(cached) " >&6
47953else $as_nop
47954  if test -n "$ac_ct_OBJDUMP"; then
47955  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
47956else
47957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47958for as_dir in $PATH
47959do
47960  IFS=$as_save_IFS
47961  case $as_dir in #(((
47962    '') as_dir=./ ;;
47963    */) ;;
47964    *) as_dir=$as_dir/ ;;
47965  esac
47966    for ac_exec_ext in '' $ac_executable_extensions; do
47967  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
47968    ac_cv_prog_ac_ct_OBJDUMP="objdump"
47969    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
47970    break 2
47971  fi
47972done
47973  done
47974IFS=$as_save_IFS
47975
47976fi
47977fi
47978ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
47979if test -n "$ac_ct_OBJDUMP"; then
47980  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
47981printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
47982else
47983  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47984printf "%s\n" "no" >&6; }
47985fi
47986
47987  if test "x$ac_ct_OBJDUMP" = x; then
47988    OBJDUMP="false"
47989  else
47990    case $cross_compiling:$ac_tool_warned in
47991yes:)
47992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
47993printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
47994ac_tool_warned=yes ;;
47995esac
47996    OBJDUMP=$ac_ct_OBJDUMP
47997  fi
47998else
47999  OBJDUMP="$ac_cv_prog_OBJDUMP"
48000fi
48001
48002test -z "$OBJDUMP" && OBJDUMP=objdump
48003
48004
48005
48006
48007
48008
48009
48010
48011
48012{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
48013printf %s "checking how to recognize dependent libraries... " >&6; }
48014if test ${lt_cv_deplibs_check_method+y}
48015then :
48016  printf %s "(cached) " >&6
48017else $as_nop
48018  lt_cv_file_magic_cmd='$MAGIC_CMD'
48019lt_cv_file_magic_test_file=
48020lt_cv_deplibs_check_method='unknown'
48021# Need to set the preceding variable on all platforms that support
48022# interlibrary dependencies.
48023# 'none' -- dependencies not supported.
48024# 'unknown' -- same as none, but documents that we really don't know.
48025# 'pass_all' -- all dependencies passed with no checks.
48026# 'test_compile' -- check by making test program.
48027# 'file_magic [[regex]]' -- check by looking for files in library path
48028# that responds to the $file_magic_cmd with a given extended regex.
48029# If you have 'file' or equivalent on your system and you're not sure
48030# whether 'pass_all' will *always* work, you probably want this one.
48031
48032case $host_os in
48033aix[4-9]*)
48034  lt_cv_deplibs_check_method=pass_all
48035  ;;
48036
48037beos*)
48038  lt_cv_deplibs_check_method=pass_all
48039  ;;
48040
48041bsdi[45]*)
48042  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
48043  lt_cv_file_magic_cmd='/usr/bin/file -L'
48044  lt_cv_file_magic_test_file=/shlib/libc.so
48045  ;;
48046
48047cygwin*)
48048  # func_win32_libid is a shell function defined in ltmain.sh
48049  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
48050  lt_cv_file_magic_cmd='func_win32_libid'
48051  ;;
48052
48053mingw* | pw32*)
48054  # Base MSYS/MinGW do not provide the 'file' command needed by
48055  # func_win32_libid shell function, so use a weaker test based on 'objdump',
48056  # unless we find 'file', for example because we are cross-compiling.
48057  if ( file / ) >/dev/null 2>&1; then
48058    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
48059    lt_cv_file_magic_cmd='func_win32_libid'
48060  else
48061    # Keep this pattern in sync with the one in func_win32_libid.
48062    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
48063    lt_cv_file_magic_cmd='$OBJDUMP -f'
48064  fi
48065  ;;
48066
48067cegcc*)
48068  # use the weaker test based on 'objdump'. See mingw*.
48069  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
48070  lt_cv_file_magic_cmd='$OBJDUMP -f'
48071  ;;
48072
48073darwin* | rhapsody*)
48074  lt_cv_deplibs_check_method=pass_all
48075  ;;
48076
48077freebsd* | dragonfly*)
48078  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
48079    case $host_cpu in
48080    i*86 )
48081      # Not sure whether the presence of OpenBSD here was a mistake.
48082      # Let's accept both of them until this is cleared up.
48083      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
48084      lt_cv_file_magic_cmd=/usr/bin/file
48085      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
48086      ;;
48087    esac
48088  else
48089    lt_cv_deplibs_check_method=pass_all
48090  fi
48091  ;;
48092
48093haiku*)
48094  lt_cv_deplibs_check_method=pass_all
48095  ;;
48096
48097hpux10.20* | hpux11*)
48098  lt_cv_file_magic_cmd=/usr/bin/file
48099  case $host_cpu in
48100  ia64*)
48101    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
48102    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
48103    ;;
48104  hppa*64*)
48105    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
48106    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
48107    ;;
48108  *)
48109    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
48110    lt_cv_file_magic_test_file=/usr/lib/libc.sl
48111    ;;
48112  esac
48113  ;;
48114
48115interix[3-9]*)
48116  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
48117  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
48118  ;;
48119
48120irix5* | irix6* | nonstopux*)
48121  case $LD in
48122  *-32|*"-32 ") libmagic=32-bit;;
48123  *-n32|*"-n32 ") libmagic=N32;;
48124  *-64|*"-64 ") libmagic=64-bit;;
48125  *) libmagic=never-match;;
48126  esac
48127  lt_cv_deplibs_check_method=pass_all
48128  ;;
48129
48130# This must be glibc/ELF.
48131linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
48132  lt_cv_deplibs_check_method=pass_all
48133  ;;
48134
48135netbsd* | netbsdelf*-gnu)
48136  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
48137    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
48138  else
48139    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
48140  fi
48141  ;;
48142
48143newos6*)
48144  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
48145  lt_cv_file_magic_cmd=/usr/bin/file
48146  lt_cv_file_magic_test_file=/usr/lib/libnls.so
48147  ;;
48148
48149*nto* | *qnx*)
48150  lt_cv_deplibs_check_method=pass_all
48151  ;;
48152
48153openbsd* | bitrig*)
48154  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
48155    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
48156  else
48157    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
48158  fi
48159  ;;
48160
48161osf3* | osf4* | osf5*)
48162  lt_cv_deplibs_check_method=pass_all
48163  ;;
48164
48165rdos*)
48166  lt_cv_deplibs_check_method=pass_all
48167  ;;
48168
48169solaris*)
48170  lt_cv_deplibs_check_method=pass_all
48171  ;;
48172
48173sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
48174  lt_cv_deplibs_check_method=pass_all
48175  ;;
48176
48177sysv4 | sysv4.3*)
48178  case $host_vendor in
48179  motorola)
48180    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
48181    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
48182    ;;
48183  ncr)
48184    lt_cv_deplibs_check_method=pass_all
48185    ;;
48186  sequent)
48187    lt_cv_file_magic_cmd='/bin/file'
48188    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
48189    ;;
48190  sni)
48191    lt_cv_file_magic_cmd='/bin/file'
48192    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
48193    lt_cv_file_magic_test_file=/lib/libc.so
48194    ;;
48195  siemens)
48196    lt_cv_deplibs_check_method=pass_all
48197    ;;
48198  pc)
48199    lt_cv_deplibs_check_method=pass_all
48200    ;;
48201  esac
48202  ;;
48203
48204tpf*)
48205  lt_cv_deplibs_check_method=pass_all
48206  ;;
48207os2*)
48208  lt_cv_deplibs_check_method=pass_all
48209  ;;
48210esac
48211
48212fi
48213{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
48214printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
48215
48216file_magic_glob=
48217want_nocaseglob=no
48218if test "$build" = "$host"; then
48219  case $host_os in
48220  mingw* | pw32*)
48221    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
48222      want_nocaseglob=yes
48223    else
48224      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
48225    fi
48226    ;;
48227  esac
48228fi
48229
48230file_magic_cmd=$lt_cv_file_magic_cmd
48231deplibs_check_method=$lt_cv_deplibs_check_method
48232test -z "$deplibs_check_method" && deplibs_check_method=unknown
48233
48234
48235
48236
48237
48238
48239
48240
48241
48242
48243
48244
48245
48246
48247
48248
48249
48250
48251
48252
48253
48254
48255if test -n "$ac_tool_prefix"; then
48256  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
48257set dummy ${ac_tool_prefix}dlltool; ac_word=$2
48258{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48259printf %s "checking for $ac_word... " >&6; }
48260if test ${ac_cv_prog_DLLTOOL+y}
48261then :
48262  printf %s "(cached) " >&6
48263else $as_nop
48264  if test -n "$DLLTOOL"; then
48265  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
48266else
48267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48268for as_dir in $PATH
48269do
48270  IFS=$as_save_IFS
48271  case $as_dir in #(((
48272    '') as_dir=./ ;;
48273    */) ;;
48274    *) as_dir=$as_dir/ ;;
48275  esac
48276    for ac_exec_ext in '' $ac_executable_extensions; do
48277  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
48278    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
48279    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
48280    break 2
48281  fi
48282done
48283  done
48284IFS=$as_save_IFS
48285
48286fi
48287fi
48288DLLTOOL=$ac_cv_prog_DLLTOOL
48289if test -n "$DLLTOOL"; then
48290  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
48291printf "%s\n" "$DLLTOOL" >&6; }
48292else
48293  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
48294printf "%s\n" "no" >&6; }
48295fi
48296
48297
48298fi
48299if test -z "$ac_cv_prog_DLLTOOL"; then
48300  ac_ct_DLLTOOL=$DLLTOOL
48301  # Extract the first word of "dlltool", so it can be a program name with args.
48302set dummy dlltool; ac_word=$2
48303{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48304printf %s "checking for $ac_word... " >&6; }
48305if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
48306then :
48307  printf %s "(cached) " >&6
48308else $as_nop
48309  if test -n "$ac_ct_DLLTOOL"; then
48310  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
48311else
48312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48313for as_dir in $PATH
48314do
48315  IFS=$as_save_IFS
48316  case $as_dir in #(((
48317    '') as_dir=./ ;;
48318    */) ;;
48319    *) as_dir=$as_dir/ ;;
48320  esac
48321    for ac_exec_ext in '' $ac_executable_extensions; do
48322  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
48323    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
48324    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
48325    break 2
48326  fi
48327done
48328  done
48329IFS=$as_save_IFS
48330
48331fi
48332fi
48333ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
48334if test -n "$ac_ct_DLLTOOL"; then
48335  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
48336printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
48337else
48338  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
48339printf "%s\n" "no" >&6; }
48340fi
48341
48342  if test "x$ac_ct_DLLTOOL" = x; then
48343    DLLTOOL="false"
48344  else
48345    case $cross_compiling:$ac_tool_warned in
48346yes:)
48347{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
48348printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
48349ac_tool_warned=yes ;;
48350esac
48351    DLLTOOL=$ac_ct_DLLTOOL
48352  fi
48353else
48354  DLLTOOL="$ac_cv_prog_DLLTOOL"
48355fi
48356
48357test -z "$DLLTOOL" && DLLTOOL=dlltool
48358
48359
48360
48361
48362
48363
48364
48365
48366
48367
48368{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
48369printf %s "checking how to associate runtime and link libraries... " >&6; }
48370if test ${lt_cv_sharedlib_from_linklib_cmd+y}
48371then :
48372  printf %s "(cached) " >&6
48373else $as_nop
48374  lt_cv_sharedlib_from_linklib_cmd='unknown'
48375
48376case $host_os in
48377cygwin* | mingw* | pw32* | cegcc*)
48378  # two different shell functions defined in ltmain.sh;
48379  # decide which one to use based on capabilities of $DLLTOOL
48380  case `$DLLTOOL --help 2>&1` in
48381  *--identify-strict*)
48382    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
48383    ;;
48384  *)
48385    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
48386    ;;
48387  esac
48388  ;;
48389*)
48390  # fallback: assume linklib IS sharedlib
48391  lt_cv_sharedlib_from_linklib_cmd=$ECHO
48392  ;;
48393esac
48394
48395fi
48396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
48397printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
48398sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
48399test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
48400
48401
48402
48403
48404
48405
48406
48407if test -n "$ac_tool_prefix"; then
48408  for ac_prog in ar
48409  do
48410    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
48411set dummy $ac_tool_prefix$ac_prog; ac_word=$2
48412{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48413printf %s "checking for $ac_word... " >&6; }
48414if test ${ac_cv_prog_AR+y}
48415then :
48416  printf %s "(cached) " >&6
48417else $as_nop
48418  if test -n "$AR"; then
48419  ac_cv_prog_AR="$AR" # Let the user override the test.
48420else
48421as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48422for as_dir in $PATH
48423do
48424  IFS=$as_save_IFS
48425  case $as_dir in #(((
48426    '') as_dir=./ ;;
48427    */) ;;
48428    *) as_dir=$as_dir/ ;;
48429  esac
48430    for ac_exec_ext in '' $ac_executable_extensions; do
48431  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
48432    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
48433    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
48434    break 2
48435  fi
48436done
48437  done
48438IFS=$as_save_IFS
48439
48440fi
48441fi
48442AR=$ac_cv_prog_AR
48443if test -n "$AR"; then
48444  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
48445printf "%s\n" "$AR" >&6; }
48446else
48447  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
48448printf "%s\n" "no" >&6; }
48449fi
48450
48451
48452    test -n "$AR" && break
48453  done
48454fi
48455if test -z "$AR"; then
48456  ac_ct_AR=$AR
48457  for ac_prog in ar
48458do
48459  # Extract the first word of "$ac_prog", so it can be a program name with args.
48460set dummy $ac_prog; ac_word=$2
48461{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48462printf %s "checking for $ac_word... " >&6; }
48463if test ${ac_cv_prog_ac_ct_AR+y}
48464then :
48465  printf %s "(cached) " >&6
48466else $as_nop
48467  if test -n "$ac_ct_AR"; then
48468  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
48469else
48470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48471for as_dir in $PATH
48472do
48473  IFS=$as_save_IFS
48474  case $as_dir in #(((
48475    '') as_dir=./ ;;
48476    */) ;;
48477    *) as_dir=$as_dir/ ;;
48478  esac
48479    for ac_exec_ext in '' $ac_executable_extensions; do
48480  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
48481    ac_cv_prog_ac_ct_AR="$ac_prog"
48482    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
48483    break 2
48484  fi
48485done
48486  done
48487IFS=$as_save_IFS
48488
48489fi
48490fi
48491ac_ct_AR=$ac_cv_prog_ac_ct_AR
48492if test -n "$ac_ct_AR"; then
48493  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
48494printf "%s\n" "$ac_ct_AR" >&6; }
48495else
48496  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
48497printf "%s\n" "no" >&6; }
48498fi
48499
48500
48501  test -n "$ac_ct_AR" && break
48502done
48503
48504  if test "x$ac_ct_AR" = x; then
48505    AR="false"
48506  else
48507    case $cross_compiling:$ac_tool_warned in
48508yes:)
48509{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
48510printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
48511ac_tool_warned=yes ;;
48512esac
48513    AR=$ac_ct_AR
48514  fi
48515fi
48516
48517: ${AR=ar}
48518: ${AR_FLAGS=cr}
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
48531printf %s "checking for archiver @FILE support... " >&6; }
48532if test ${lt_cv_ar_at_file+y}
48533then :
48534  printf %s "(cached) " >&6
48535else $as_nop
48536  lt_cv_ar_at_file=no
48537   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48538/* end confdefs.h.  */
48539
48540int
48541main (void)
48542{
48543
48544  ;
48545  return 0;
48546}
48547_ACEOF
48548if ac_fn_c_try_compile "$LINENO"
48549then :
48550  echo conftest.$ac_objext > conftest.lst
48551      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
48552      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
48553  (eval $lt_ar_try) 2>&5
48554  ac_status=$?
48555  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48556  test $ac_status = 0; }
48557      if test 0 -eq "$ac_status"; then
48558	# Ensure the archiver fails upon bogus file names.
48559	rm -f conftest.$ac_objext libconftest.a
48560	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
48561  (eval $lt_ar_try) 2>&5
48562  ac_status=$?
48563  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48564  test $ac_status = 0; }
48565	if test 0 -ne "$ac_status"; then
48566          lt_cv_ar_at_file=@
48567        fi
48568      fi
48569      rm -f conftest.* libconftest.a
48570
48571fi
48572rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
48573
48574fi
48575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
48576printf "%s\n" "$lt_cv_ar_at_file" >&6; }
48577
48578if test no = "$lt_cv_ar_at_file"; then
48579  archiver_list_spec=
48580else
48581  archiver_list_spec=$lt_cv_ar_at_file
48582fi
48583
48584
48585
48586
48587
48588
48589
48590if test -n "$ac_tool_prefix"; then
48591  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
48592set dummy ${ac_tool_prefix}strip; ac_word=$2
48593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48594printf %s "checking for $ac_word... " >&6; }
48595if test ${ac_cv_prog_STRIP+y}
48596then :
48597  printf %s "(cached) " >&6
48598else $as_nop
48599  if test -n "$STRIP"; then
48600  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
48601else
48602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48603for as_dir in $PATH
48604do
48605  IFS=$as_save_IFS
48606  case $as_dir in #(((
48607    '') as_dir=./ ;;
48608    */) ;;
48609    *) as_dir=$as_dir/ ;;
48610  esac
48611    for ac_exec_ext in '' $ac_executable_extensions; do
48612  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
48613    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
48614    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
48615    break 2
48616  fi
48617done
48618  done
48619IFS=$as_save_IFS
48620
48621fi
48622fi
48623STRIP=$ac_cv_prog_STRIP
48624if test -n "$STRIP"; then
48625  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
48626printf "%s\n" "$STRIP" >&6; }
48627else
48628  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
48629printf "%s\n" "no" >&6; }
48630fi
48631
48632
48633fi
48634if test -z "$ac_cv_prog_STRIP"; then
48635  ac_ct_STRIP=$STRIP
48636  # Extract the first word of "strip", so it can be a program name with args.
48637set dummy strip; ac_word=$2
48638{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48639printf %s "checking for $ac_word... " >&6; }
48640if test ${ac_cv_prog_ac_ct_STRIP+y}
48641then :
48642  printf %s "(cached) " >&6
48643else $as_nop
48644  if test -n "$ac_ct_STRIP"; then
48645  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
48646else
48647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48648for as_dir in $PATH
48649do
48650  IFS=$as_save_IFS
48651  case $as_dir in #(((
48652    '') as_dir=./ ;;
48653    */) ;;
48654    *) as_dir=$as_dir/ ;;
48655  esac
48656    for ac_exec_ext in '' $ac_executable_extensions; do
48657  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
48658    ac_cv_prog_ac_ct_STRIP="strip"
48659    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
48660    break 2
48661  fi
48662done
48663  done
48664IFS=$as_save_IFS
48665
48666fi
48667fi
48668ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
48669if test -n "$ac_ct_STRIP"; then
48670  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
48671printf "%s\n" "$ac_ct_STRIP" >&6; }
48672else
48673  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
48674printf "%s\n" "no" >&6; }
48675fi
48676
48677  if test "x$ac_ct_STRIP" = x; then
48678    STRIP=":"
48679  else
48680    case $cross_compiling:$ac_tool_warned in
48681yes:)
48682{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
48683printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
48684ac_tool_warned=yes ;;
48685esac
48686    STRIP=$ac_ct_STRIP
48687  fi
48688else
48689  STRIP="$ac_cv_prog_STRIP"
48690fi
48691
48692test -z "$STRIP" && STRIP=:
48693
48694
48695
48696
48697
48698
48699if test -n "$ac_tool_prefix"; then
48700  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
48701set dummy ${ac_tool_prefix}ranlib; ac_word=$2
48702{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48703printf %s "checking for $ac_word... " >&6; }
48704if test ${ac_cv_prog_RANLIB+y}
48705then :
48706  printf %s "(cached) " >&6
48707else $as_nop
48708  if test -n "$RANLIB"; then
48709  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
48710else
48711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48712for as_dir in $PATH
48713do
48714  IFS=$as_save_IFS
48715  case $as_dir in #(((
48716    '') as_dir=./ ;;
48717    */) ;;
48718    *) as_dir=$as_dir/ ;;
48719  esac
48720    for ac_exec_ext in '' $ac_executable_extensions; do
48721  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
48722    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
48723    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
48724    break 2
48725  fi
48726done
48727  done
48728IFS=$as_save_IFS
48729
48730fi
48731fi
48732RANLIB=$ac_cv_prog_RANLIB
48733if test -n "$RANLIB"; then
48734  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
48735printf "%s\n" "$RANLIB" >&6; }
48736else
48737  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
48738printf "%s\n" "no" >&6; }
48739fi
48740
48741
48742fi
48743if test -z "$ac_cv_prog_RANLIB"; then
48744  ac_ct_RANLIB=$RANLIB
48745  # Extract the first word of "ranlib", so it can be a program name with args.
48746set dummy ranlib; ac_word=$2
48747{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48748printf %s "checking for $ac_word... " >&6; }
48749if test ${ac_cv_prog_ac_ct_RANLIB+y}
48750then :
48751  printf %s "(cached) " >&6
48752else $as_nop
48753  if test -n "$ac_ct_RANLIB"; then
48754  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
48755else
48756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48757for as_dir in $PATH
48758do
48759  IFS=$as_save_IFS
48760  case $as_dir in #(((
48761    '') as_dir=./ ;;
48762    */) ;;
48763    *) as_dir=$as_dir/ ;;
48764  esac
48765    for ac_exec_ext in '' $ac_executable_extensions; do
48766  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
48767    ac_cv_prog_ac_ct_RANLIB="ranlib"
48768    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
48769    break 2
48770  fi
48771done
48772  done
48773IFS=$as_save_IFS
48774
48775fi
48776fi
48777ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
48778if test -n "$ac_ct_RANLIB"; then
48779  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
48780printf "%s\n" "$ac_ct_RANLIB" >&6; }
48781else
48782  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
48783printf "%s\n" "no" >&6; }
48784fi
48785
48786  if test "x$ac_ct_RANLIB" = x; then
48787    RANLIB=":"
48788  else
48789    case $cross_compiling:$ac_tool_warned in
48790yes:)
48791{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
48792printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
48793ac_tool_warned=yes ;;
48794esac
48795    RANLIB=$ac_ct_RANLIB
48796  fi
48797else
48798  RANLIB="$ac_cv_prog_RANLIB"
48799fi
48800
48801test -z "$RANLIB" && RANLIB=:
48802
48803
48804
48805
48806
48807
48808# Determine commands to create old-style static archives.
48809old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
48810old_postinstall_cmds='chmod 644 $oldlib'
48811old_postuninstall_cmds=
48812
48813if test -n "$RANLIB"; then
48814  case $host_os in
48815  bitrig* | openbsd*)
48816    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
48817    ;;
48818  *)
48819    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
48820    ;;
48821  esac
48822  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
48823fi
48824
48825case $host_os in
48826  darwin*)
48827    lock_old_archive_extraction=yes ;;
48828  *)
48829    lock_old_archive_extraction=no ;;
48830esac
48831
48832
48833
48834
48835
48836
48837
48838
48839
48840
48841
48842
48843
48844
48845
48846
48847
48848
48849
48850
48851
48852
48853
48854
48855
48856
48857
48858
48859
48860
48861
48862
48863
48864
48865
48866
48867
48868
48869
48870# If no C compiler was specified, use CC.
48871LTCC=${LTCC-"$CC"}
48872
48873# If no C compiler flags were specified, use CFLAGS.
48874LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
48875
48876# Allow CC to be a program name with arguments.
48877compiler=$CC
48878
48879
48880# Check for command to grab the raw symbol name followed by C symbol from nm.
48881{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
48882printf %s "checking command to parse $NM output from $compiler object... " >&6; }
48883if test ${lt_cv_sys_global_symbol_pipe+y}
48884then :
48885  printf %s "(cached) " >&6
48886else $as_nop
48887
48888# These are sane defaults that work on at least a few old systems.
48889# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
48890
48891# Character class describing NM global symbol codes.
48892symcode='[BCDEGRST]'
48893
48894# Regexp to match symbols that can be accessed directly from C.
48895sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
48896
48897# Define system-specific variables.
48898case $host_os in
48899aix*)
48900  symcode='[BCDT]'
48901  ;;
48902cygwin* | mingw* | pw32* | cegcc*)
48903  symcode='[ABCDGISTW]'
48904  ;;
48905hpux*)
48906  if test ia64 = "$host_cpu"; then
48907    symcode='[ABCDEGRST]'
48908  fi
48909  ;;
48910irix* | nonstopux*)
48911  symcode='[BCDEGRST]'
48912  ;;
48913osf*)
48914  symcode='[BCDEGQRST]'
48915  ;;
48916solaris*)
48917  symcode='[BDRT]'
48918  ;;
48919sco3.2v5*)
48920  symcode='[DT]'
48921  ;;
48922sysv4.2uw2*)
48923  symcode='[DT]'
48924  ;;
48925sysv5* | sco5v6* | unixware* | OpenUNIX*)
48926  symcode='[ABDT]'
48927  ;;
48928sysv4)
48929  symcode='[DFNSTU]'
48930  ;;
48931esac
48932
48933# If we're using GNU nm, then use its standard symbol codes.
48934case `$NM -V 2>&1` in
48935*GNU* | *'with BFD'*)
48936  symcode='[ABCDGIRSTW]' ;;
48937esac
48938
48939if test "$lt_cv_nm_interface" = "MS dumpbin"; then
48940  # Gets list of data symbols to import.
48941  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
48942  # Adjust the below global symbol transforms to fixup imported variables.
48943  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
48944  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
48945  lt_c_name_lib_hook="\
48946  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
48947  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
48948else
48949  # Disable hooks by default.
48950  lt_cv_sys_global_symbol_to_import=
48951  lt_cdecl_hook=
48952  lt_c_name_hook=
48953  lt_c_name_lib_hook=
48954fi
48955
48956# Transform an extracted symbol line into a proper C declaration.
48957# Some systems (esp. on ia64) link data and code symbols differently,
48958# so use this general approach.
48959lt_cv_sys_global_symbol_to_cdecl="sed -n"\
48960$lt_cdecl_hook\
48961" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
48962" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
48963
48964# Transform an extracted symbol line into symbol name and symbol address
48965lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
48966$lt_c_name_hook\
48967" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
48968" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
48969
48970# Transform an extracted symbol line into symbol name with lib prefix and
48971# symbol address.
48972lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
48973$lt_c_name_lib_hook\
48974" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
48975" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
48976" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
48977
48978# Handle CRLF in mingw tool chain
48979opt_cr=
48980case $build_os in
48981mingw*)
48982  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
48983  ;;
48984esac
48985
48986# Try without a prefix underscore, then with it.
48987for ac_symprfx in "" "_"; do
48988
48989  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
48990  symxfrm="\\1 $ac_symprfx\\2 \\2"
48991
48992  # Write the raw and C identifiers.
48993  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
48994    # Fake it for dumpbin and say T for any non-static function,
48995    # D for any global variable and I for any imported variable.
48996    # Also find C++ and __fastcall symbols from MSVC++,
48997    # which start with @ or ?.
48998    lt_cv_sys_global_symbol_pipe="$AWK '"\
48999"     {last_section=section; section=\$ 3};"\
49000"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
49001"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
49002"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
49003"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
49004"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
49005"     \$ 0!~/External *\|/{next};"\
49006"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
49007"     {if(hide[section]) next};"\
49008"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
49009"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
49010"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
49011"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
49012"     ' prfx=^$ac_symprfx"
49013  else
49014    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
49015  fi
49016  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
49017
49018  # Check to see that the pipe works correctly.
49019  pipe_works=no
49020
49021  rm -f conftest*
49022  cat > conftest.$ac_ext <<_LT_EOF
49023#ifdef __cplusplus
49024extern "C" {
49025#endif
49026char nm_test_var;
49027void nm_test_func(void);
49028void nm_test_func(void){}
49029#ifdef __cplusplus
49030}
49031#endif
49032int main(){nm_test_var='a';nm_test_func();return(0);}
49033_LT_EOF
49034
49035  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
49036  (eval $ac_compile) 2>&5
49037  ac_status=$?
49038  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49039  test $ac_status = 0; }; then
49040    # Now try to grab the symbols.
49041    nlist=conftest.nm
49042    $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5
49043    if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then
49044      # Try sorting and uniquifying the output.
49045      if sort "$nlist" | uniq > "$nlist"T; then
49046	mv -f "$nlist"T "$nlist"
49047      else
49048	rm -f "$nlist"T
49049      fi
49050
49051      # Make sure that we snagged all the symbols we need.
49052      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
49053	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
49054	  cat <<_LT_EOF > conftest.$ac_ext
49055/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
49056#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
49057/* DATA imports from DLLs on WIN32 can't be const, because runtime
49058   relocations are performed -- see ld's documentation on pseudo-relocs.  */
49059# define LT_DLSYM_CONST
49060#elif defined __osf__
49061/* This system does not cope well with relocations in const data.  */
49062# define LT_DLSYM_CONST
49063#else
49064# define LT_DLSYM_CONST const
49065#endif
49066
49067#ifdef __cplusplus
49068extern "C" {
49069#endif
49070
49071_LT_EOF
49072	  # Now generate the symbol file.
49073	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
49074
49075	  cat <<_LT_EOF >> conftest.$ac_ext
49076
49077/* The mapping between symbol names and symbols.  */
49078LT_DLSYM_CONST struct {
49079  const char *name;
49080  void       *address;
49081}
49082lt__PROGRAM__LTX_preloaded_symbols[] =
49083{
49084  { "@PROGRAM@", (void *) 0 },
49085_LT_EOF
49086	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
49087	  cat <<\_LT_EOF >> conftest.$ac_ext
49088  {0, (void *) 0}
49089};
49090
49091/* This works around a problem in FreeBSD linker */
49092#ifdef FREEBSD_WORKAROUND
49093static const void *lt_preloaded_setup() {
49094  return lt__PROGRAM__LTX_preloaded_symbols;
49095}
49096#endif
49097
49098#ifdef __cplusplus
49099}
49100#endif
49101_LT_EOF
49102	  # Now try linking the two files.
49103	  mv conftest.$ac_objext conftstm.$ac_objext
49104	  lt_globsym_save_LIBS=$LIBS
49105	  lt_globsym_save_CFLAGS=$CFLAGS
49106	  LIBS=conftstm.$ac_objext
49107	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
49108	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
49109  (eval $ac_link) 2>&5
49110  ac_status=$?
49111  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49112  test $ac_status = 0; } && test -s conftest$ac_exeext; then
49113	    pipe_works=yes
49114	  fi
49115	  LIBS=$lt_globsym_save_LIBS
49116	  CFLAGS=$lt_globsym_save_CFLAGS
49117	else
49118	  echo "cannot find nm_test_func in $nlist" >&5
49119	fi
49120      else
49121	echo "cannot find nm_test_var in $nlist" >&5
49122      fi
49123    else
49124      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
49125    fi
49126  else
49127    echo "$progname: failed program was:" >&5
49128    cat conftest.$ac_ext >&5
49129  fi
49130  rm -rf conftest* conftst*
49131
49132  # Do not use the global_symbol_pipe unless it works.
49133  if test yes = "$pipe_works"; then
49134    break
49135  else
49136    lt_cv_sys_global_symbol_pipe=
49137  fi
49138done
49139
49140fi
49141
49142if test -z "$lt_cv_sys_global_symbol_pipe"; then
49143  lt_cv_sys_global_symbol_to_cdecl=
49144fi
49145if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
49146  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
49147printf "%s\n" "failed" >&6; }
49148else
49149  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49150printf "%s\n" "ok" >&6; }
49151fi
49152
49153# Response file support.
49154if test "$lt_cv_nm_interface" = "MS dumpbin"; then
49155  nm_file_list_spec='@'
49156elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
49157  nm_file_list_spec='@'
49158fi
49159
49160
49161
49162
49163
49164
49165
49166
49167
49168
49169
49170
49171
49172
49173
49174
49175
49176
49177
49178
49179
49180
49181
49182
49183
49184
49185
49186
49187
49188
49189
49190
49191
49192
49193
49194
49195
49196{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
49197printf %s "checking for sysroot... " >&6; }
49198
49199# Check whether --with-sysroot was given.
49200if test ${with_sysroot+y}
49201then :
49202  withval=$with_sysroot;
49203else $as_nop
49204  with_sysroot=no
49205fi
49206
49207
49208lt_sysroot=
49209case $with_sysroot in #(
49210 yes)
49211   if test yes = "$GCC"; then
49212     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
49213   fi
49214   ;; #(
49215 /*)
49216   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
49217   ;; #(
49218 no|'')
49219   ;; #(
49220 *)
49221   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
49222printf "%s\n" "$with_sysroot" >&6; }
49223   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
49224   ;;
49225esac
49226
49227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
49228printf "%s\n" "${lt_sysroot:-no}" >&6; }
49229
49230
49231
49232
49233
49234{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
49235printf %s "checking for a working dd... " >&6; }
49236if test ${ac_cv_path_lt_DD+y}
49237then :
49238  printf %s "(cached) " >&6
49239else $as_nop
49240  printf 0123456789abcdef0123456789abcdef >conftest.i
49241cat conftest.i conftest.i >conftest2.i
49242: ${lt_DD:=$DD}
49243if test -z "$lt_DD"; then
49244  ac_path_lt_DD_found=false
49245  # Loop through the user's path and test for each of PROGNAME-LIST
49246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49247for as_dir in $PATH
49248do
49249  IFS=$as_save_IFS
49250  case $as_dir in #(((
49251    '') as_dir=./ ;;
49252    */) ;;
49253    *) as_dir=$as_dir/ ;;
49254  esac
49255    for ac_prog in dd
49256   do
49257    for ac_exec_ext in '' $ac_executable_extensions; do
49258      ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
49259      as_fn_executable_p "$ac_path_lt_DD" || continue
49260if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
49261  cmp -s conftest.i conftest.out \
49262  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
49263fi
49264      $ac_path_lt_DD_found && break 3
49265    done
49266  done
49267  done
49268IFS=$as_save_IFS
49269  if test -z "$ac_cv_path_lt_DD"; then
49270    :
49271  fi
49272else
49273  ac_cv_path_lt_DD=$lt_DD
49274fi
49275
49276rm -f conftest.i conftest2.i conftest.out
49277fi
49278{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
49279printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
49280
49281
49282{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
49283printf %s "checking how to truncate binary pipes... " >&6; }
49284if test ${lt_cv_truncate_bin+y}
49285then :
49286  printf %s "(cached) " >&6
49287else $as_nop
49288  printf 0123456789abcdef0123456789abcdef >conftest.i
49289cat conftest.i conftest.i >conftest2.i
49290lt_cv_truncate_bin=
49291if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
49292  cmp -s conftest.i conftest.out \
49293  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
49294fi
49295rm -f conftest.i conftest2.i conftest.out
49296test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
49297fi
49298{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
49299printf "%s\n" "$lt_cv_truncate_bin" >&6; }
49300
49301
49302
49303
49304
49305
49306
49307# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
49308func_cc_basename ()
49309{
49310    for cc_temp in $*""; do
49311      case $cc_temp in
49312        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
49313        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
49314        \-*) ;;
49315        *) break;;
49316      esac
49317    done
49318    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
49319}
49320
49321# Check whether --enable-libtool-lock was given.
49322if test ${enable_libtool_lock+y}
49323then :
49324  enableval=$enable_libtool_lock;
49325fi
49326
49327test no = "$enable_libtool_lock" || enable_libtool_lock=yes
49328
49329# Some flags need to be propagated to the compiler or linker for good
49330# libtool support.
49331case $host in
49332ia64-*-hpux*)
49333  # Find out what ABI is being produced by ac_compile, and set mode
49334  # options accordingly.
49335  echo 'int i;' > conftest.$ac_ext
49336  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
49337  (eval $ac_compile) 2>&5
49338  ac_status=$?
49339  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49340  test $ac_status = 0; }; then
49341    case `/usr/bin/file conftest.$ac_objext` in
49342      *ELF-32*)
49343	HPUX_IA64_MODE=32
49344	;;
49345      *ELF-64*)
49346	HPUX_IA64_MODE=64
49347	;;
49348    esac
49349  fi
49350  rm -rf conftest*
49351  ;;
49352*-*-irix6*)
49353  # Find out what ABI is being produced by ac_compile, and set linker
49354  # options accordingly.
49355  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
49356  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
49357  (eval $ac_compile) 2>&5
49358  ac_status=$?
49359  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49360  test $ac_status = 0; }; then
49361    if test yes = "$lt_cv_prog_gnu_ld"; then
49362      case `/usr/bin/file conftest.$ac_objext` in
49363	*32-bit*)
49364	  LD="${LD-ld} -melf32bsmip"
49365	  ;;
49366	*N32*)
49367	  LD="${LD-ld} -melf32bmipn32"
49368	  ;;
49369	*64-bit*)
49370	  LD="${LD-ld} -melf64bmip"
49371	;;
49372      esac
49373    else
49374      case `/usr/bin/file conftest.$ac_objext` in
49375	*32-bit*)
49376	  LD="${LD-ld} -32"
49377	  ;;
49378	*N32*)
49379	  LD="${LD-ld} -n32"
49380	  ;;
49381	*64-bit*)
49382	  LD="${LD-ld} -64"
49383	  ;;
49384      esac
49385    fi
49386  fi
49387  rm -rf conftest*
49388  ;;
49389
49390mips64*-*linux*)
49391  # Find out what ABI is being produced by ac_compile, and set linker
49392  # options accordingly.
49393  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
49394  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
49395  (eval $ac_compile) 2>&5
49396  ac_status=$?
49397  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49398  test $ac_status = 0; }; then
49399    emul=elf
49400    case `/usr/bin/file conftest.$ac_objext` in
49401      *32-bit*)
49402	emul="${emul}32"
49403	;;
49404      *64-bit*)
49405	emul="${emul}64"
49406	;;
49407    esac
49408    case `/usr/bin/file conftest.$ac_objext` in
49409      *MSB*)
49410	emul="${emul}btsmip"
49411	;;
49412      *LSB*)
49413	emul="${emul}ltsmip"
49414	;;
49415    esac
49416    case `/usr/bin/file conftest.$ac_objext` in
49417      *N32*)
49418	emul="${emul}n32"
49419	;;
49420    esac
49421    LD="${LD-ld} -m $emul"
49422  fi
49423  rm -rf conftest*
49424  ;;
49425
49426x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
49427s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
49428  # Find out what ABI is being produced by ac_compile, and set linker
49429  # options accordingly.  Note that the listed cases only cover the
49430  # situations where additional linker options are needed (such as when
49431  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
49432  # vice versa); the common cases where no linker options are needed do
49433  # not appear in the list.
49434  echo 'int i;' > conftest.$ac_ext
49435  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
49436  (eval $ac_compile) 2>&5
49437  ac_status=$?
49438  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49439  test $ac_status = 0; }; then
49440    case `/usr/bin/file conftest.o` in
49441      *32-bit*)
49442	case $host in
49443	  x86_64-*kfreebsd*-gnu)
49444	    LD="${LD-ld} -m elf_i386_fbsd"
49445	    ;;
49446	  x86_64-*linux*)
49447	    case `/usr/bin/file conftest.o` in
49448	      *x86-64*)
49449		LD="${LD-ld} -m elf32_x86_64"
49450		;;
49451	      *)
49452		LD="${LD-ld} -m elf_i386"
49453		;;
49454	    esac
49455	    ;;
49456	  powerpc64le-*linux*)
49457	    LD="${LD-ld} -m elf32lppclinux"
49458	    ;;
49459	  powerpc64-*linux*)
49460	    LD="${LD-ld} -m elf32ppclinux"
49461	    ;;
49462	  s390x-*linux*)
49463	    LD="${LD-ld} -m elf_s390"
49464	    ;;
49465	  sparc64-*linux*)
49466	    LD="${LD-ld} -m elf32_sparc"
49467	    ;;
49468	esac
49469	;;
49470      *64-bit*)
49471	case $host in
49472	  x86_64-*kfreebsd*-gnu)
49473	    LD="${LD-ld} -m elf_x86_64_fbsd"
49474	    ;;
49475	  x86_64-*linux*)
49476	    LD="${LD-ld} -m elf_x86_64"
49477	    ;;
49478	  powerpcle-*linux*)
49479	    LD="${LD-ld} -m elf64lppc"
49480	    ;;
49481	  powerpc-*linux*)
49482	    LD="${LD-ld} -m elf64ppc"
49483	    ;;
49484	  s390*-*linux*|s390*-*tpf*)
49485	    LD="${LD-ld} -m elf64_s390"
49486	    ;;
49487	  sparc*-*linux*)
49488	    LD="${LD-ld} -m elf64_sparc"
49489	    ;;
49490	esac
49491	;;
49492    esac
49493  fi
49494  rm -rf conftest*
49495  ;;
49496
49497*-*-sco3.2v5*)
49498  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
49499  SAVE_CFLAGS=$CFLAGS
49500  CFLAGS="$CFLAGS -belf"
49501  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
49502printf %s "checking whether the C compiler needs -belf... " >&6; }
49503if test ${lt_cv_cc_needs_belf+y}
49504then :
49505  printf %s "(cached) " >&6
49506else $as_nop
49507  ac_ext=c
49508ac_cpp='$CPP $CPPFLAGS'
49509ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49510ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49511ac_compiler_gnu=$ac_cv_c_compiler_gnu
49512
49513     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49514/* end confdefs.h.  */
49515
49516int
49517main (void)
49518{
49519
49520  ;
49521  return 0;
49522}
49523_ACEOF
49524if ac_fn_c_try_link "$LINENO"
49525then :
49526  lt_cv_cc_needs_belf=yes
49527else $as_nop
49528  lt_cv_cc_needs_belf=no
49529fi
49530rm -f core conftest.err conftest.$ac_objext conftest.beam \
49531    conftest$ac_exeext conftest.$ac_ext
49532     ac_ext=c
49533ac_cpp='$CPP $CPPFLAGS'
49534ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49535ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49536ac_compiler_gnu=$ac_cv_c_compiler_gnu
49537
49538fi
49539{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
49540printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
49541  if test yes != "$lt_cv_cc_needs_belf"; then
49542    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
49543    CFLAGS=$SAVE_CFLAGS
49544  fi
49545  ;;
49546*-*solaris*)
49547  # Find out what ABI is being produced by ac_compile, and set linker
49548  # options accordingly.
49549  echo 'int i;' > conftest.$ac_ext
49550  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
49551  (eval $ac_compile) 2>&5
49552  ac_status=$?
49553  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49554  test $ac_status = 0; }; then
49555    case `/usr/bin/file conftest.o` in
49556    *64-bit*)
49557      case $lt_cv_prog_gnu_ld in
49558      yes*)
49559        case $host in
49560        i?86-*-solaris*|x86_64-*-solaris*)
49561          LD="${LD-ld} -m elf_x86_64"
49562          ;;
49563        sparc*-*-solaris*)
49564          LD="${LD-ld} -m elf64_sparc"
49565          ;;
49566        esac
49567        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
49568        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
49569          LD=${LD-ld}_sol2
49570        fi
49571        ;;
49572      *)
49573	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
49574	  LD="${LD-ld} -64"
49575	fi
49576	;;
49577      esac
49578      ;;
49579    esac
49580  fi
49581  rm -rf conftest*
49582  ;;
49583esac
49584
49585need_locks=$enable_libtool_lock
49586
49587if test -n "$ac_tool_prefix"; then
49588  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
49589set dummy ${ac_tool_prefix}mt; ac_word=$2
49590{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49591printf %s "checking for $ac_word... " >&6; }
49592if test ${ac_cv_prog_MANIFEST_TOOL+y}
49593then :
49594  printf %s "(cached) " >&6
49595else $as_nop
49596  if test -n "$MANIFEST_TOOL"; then
49597  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
49598else
49599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49600for as_dir in $PATH
49601do
49602  IFS=$as_save_IFS
49603  case $as_dir in #(((
49604    '') as_dir=./ ;;
49605    */) ;;
49606    *) as_dir=$as_dir/ ;;
49607  esac
49608    for ac_exec_ext in '' $ac_executable_extensions; do
49609  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
49610    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
49611    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
49612    break 2
49613  fi
49614done
49615  done
49616IFS=$as_save_IFS
49617
49618fi
49619fi
49620MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
49621if test -n "$MANIFEST_TOOL"; then
49622  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
49623printf "%s\n" "$MANIFEST_TOOL" >&6; }
49624else
49625  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
49626printf "%s\n" "no" >&6; }
49627fi
49628
49629
49630fi
49631if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
49632  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
49633  # Extract the first word of "mt", so it can be a program name with args.
49634set dummy mt; ac_word=$2
49635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49636printf %s "checking for $ac_word... " >&6; }
49637if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
49638then :
49639  printf %s "(cached) " >&6
49640else $as_nop
49641  if test -n "$ac_ct_MANIFEST_TOOL"; then
49642  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
49643else
49644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49645for as_dir in $PATH
49646do
49647  IFS=$as_save_IFS
49648  case $as_dir in #(((
49649    '') as_dir=./ ;;
49650    */) ;;
49651    *) as_dir=$as_dir/ ;;
49652  esac
49653    for ac_exec_ext in '' $ac_executable_extensions; do
49654  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
49655    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
49656    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
49657    break 2
49658  fi
49659done
49660  done
49661IFS=$as_save_IFS
49662
49663fi
49664fi
49665ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
49666if test -n "$ac_ct_MANIFEST_TOOL"; then
49667  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
49668printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
49669else
49670  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
49671printf "%s\n" "no" >&6; }
49672fi
49673
49674  if test "x$ac_ct_MANIFEST_TOOL" = x; then
49675    MANIFEST_TOOL=":"
49676  else
49677    case $cross_compiling:$ac_tool_warned in
49678yes:)
49679{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
49680printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
49681ac_tool_warned=yes ;;
49682esac
49683    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
49684  fi
49685else
49686  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
49687fi
49688
49689test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
49690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
49691printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
49692if test ${lt_cv_path_mainfest_tool+y}
49693then :
49694  printf %s "(cached) " >&6
49695else $as_nop
49696  lt_cv_path_mainfest_tool=no
49697  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
49698  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
49699  cat conftest.err >&5
49700  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
49701    lt_cv_path_mainfest_tool=yes
49702  fi
49703  rm -f conftest*
49704fi
49705{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
49706printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
49707if test yes != "$lt_cv_path_mainfest_tool"; then
49708  MANIFEST_TOOL=:
49709fi
49710
49711
49712
49713
49714
49715
49716  case $host_os in
49717    rhapsody* | darwin*)
49718    if test -n "$ac_tool_prefix"; then
49719  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
49720set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
49721{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49722printf %s "checking for $ac_word... " >&6; }
49723if test ${ac_cv_prog_DSYMUTIL+y}
49724then :
49725  printf %s "(cached) " >&6
49726else $as_nop
49727  if test -n "$DSYMUTIL"; then
49728  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
49729else
49730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49731for as_dir in $PATH
49732do
49733  IFS=$as_save_IFS
49734  case $as_dir in #(((
49735    '') as_dir=./ ;;
49736    */) ;;
49737    *) as_dir=$as_dir/ ;;
49738  esac
49739    for ac_exec_ext in '' $ac_executable_extensions; do
49740  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
49741    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
49742    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
49743    break 2
49744  fi
49745done
49746  done
49747IFS=$as_save_IFS
49748
49749fi
49750fi
49751DSYMUTIL=$ac_cv_prog_DSYMUTIL
49752if test -n "$DSYMUTIL"; then
49753  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
49754printf "%s\n" "$DSYMUTIL" >&6; }
49755else
49756  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
49757printf "%s\n" "no" >&6; }
49758fi
49759
49760
49761fi
49762if test -z "$ac_cv_prog_DSYMUTIL"; then
49763  ac_ct_DSYMUTIL=$DSYMUTIL
49764  # Extract the first word of "dsymutil", so it can be a program name with args.
49765set dummy dsymutil; ac_word=$2
49766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49767printf %s "checking for $ac_word... " >&6; }
49768if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
49769then :
49770  printf %s "(cached) " >&6
49771else $as_nop
49772  if test -n "$ac_ct_DSYMUTIL"; then
49773  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
49774else
49775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49776for as_dir in $PATH
49777do
49778  IFS=$as_save_IFS
49779  case $as_dir in #(((
49780    '') as_dir=./ ;;
49781    */) ;;
49782    *) as_dir=$as_dir/ ;;
49783  esac
49784    for ac_exec_ext in '' $ac_executable_extensions; do
49785  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
49786    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
49787    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
49788    break 2
49789  fi
49790done
49791  done
49792IFS=$as_save_IFS
49793
49794fi
49795fi
49796ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
49797if test -n "$ac_ct_DSYMUTIL"; then
49798  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
49799printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
49800else
49801  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
49802printf "%s\n" "no" >&6; }
49803fi
49804
49805  if test "x$ac_ct_DSYMUTIL" = x; then
49806    DSYMUTIL=":"
49807  else
49808    case $cross_compiling:$ac_tool_warned in
49809yes:)
49810{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
49811printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
49812ac_tool_warned=yes ;;
49813esac
49814    DSYMUTIL=$ac_ct_DSYMUTIL
49815  fi
49816else
49817  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
49818fi
49819
49820    if test -n "$ac_tool_prefix"; then
49821  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
49822set dummy ${ac_tool_prefix}nmedit; ac_word=$2
49823{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49824printf %s "checking for $ac_word... " >&6; }
49825if test ${ac_cv_prog_NMEDIT+y}
49826then :
49827  printf %s "(cached) " >&6
49828else $as_nop
49829  if test -n "$NMEDIT"; then
49830  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
49831else
49832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49833for as_dir in $PATH
49834do
49835  IFS=$as_save_IFS
49836  case $as_dir in #(((
49837    '') as_dir=./ ;;
49838    */) ;;
49839    *) as_dir=$as_dir/ ;;
49840  esac
49841    for ac_exec_ext in '' $ac_executable_extensions; do
49842  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
49843    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
49844    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
49845    break 2
49846  fi
49847done
49848  done
49849IFS=$as_save_IFS
49850
49851fi
49852fi
49853NMEDIT=$ac_cv_prog_NMEDIT
49854if test -n "$NMEDIT"; then
49855  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
49856printf "%s\n" "$NMEDIT" >&6; }
49857else
49858  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
49859printf "%s\n" "no" >&6; }
49860fi
49861
49862
49863fi
49864if test -z "$ac_cv_prog_NMEDIT"; then
49865  ac_ct_NMEDIT=$NMEDIT
49866  # Extract the first word of "nmedit", so it can be a program name with args.
49867set dummy nmedit; ac_word=$2
49868{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49869printf %s "checking for $ac_word... " >&6; }
49870if test ${ac_cv_prog_ac_ct_NMEDIT+y}
49871then :
49872  printf %s "(cached) " >&6
49873else $as_nop
49874  if test -n "$ac_ct_NMEDIT"; then
49875  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
49876else
49877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49878for as_dir in $PATH
49879do
49880  IFS=$as_save_IFS
49881  case $as_dir in #(((
49882    '') as_dir=./ ;;
49883    */) ;;
49884    *) as_dir=$as_dir/ ;;
49885  esac
49886    for ac_exec_ext in '' $ac_executable_extensions; do
49887  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
49888    ac_cv_prog_ac_ct_NMEDIT="nmedit"
49889    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
49890    break 2
49891  fi
49892done
49893  done
49894IFS=$as_save_IFS
49895
49896fi
49897fi
49898ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
49899if test -n "$ac_ct_NMEDIT"; then
49900  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
49901printf "%s\n" "$ac_ct_NMEDIT" >&6; }
49902else
49903  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
49904printf "%s\n" "no" >&6; }
49905fi
49906
49907  if test "x$ac_ct_NMEDIT" = x; then
49908    NMEDIT=":"
49909  else
49910    case $cross_compiling:$ac_tool_warned in
49911yes:)
49912{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
49913printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
49914ac_tool_warned=yes ;;
49915esac
49916    NMEDIT=$ac_ct_NMEDIT
49917  fi
49918else
49919  NMEDIT="$ac_cv_prog_NMEDIT"
49920fi
49921
49922    if test -n "$ac_tool_prefix"; then
49923  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
49924set dummy ${ac_tool_prefix}lipo; ac_word=$2
49925{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49926printf %s "checking for $ac_word... " >&6; }
49927if test ${ac_cv_prog_LIPO+y}
49928then :
49929  printf %s "(cached) " >&6
49930else $as_nop
49931  if test -n "$LIPO"; then
49932  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
49933else
49934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49935for as_dir in $PATH
49936do
49937  IFS=$as_save_IFS
49938  case $as_dir in #(((
49939    '') as_dir=./ ;;
49940    */) ;;
49941    *) as_dir=$as_dir/ ;;
49942  esac
49943    for ac_exec_ext in '' $ac_executable_extensions; do
49944  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
49945    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
49946    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
49947    break 2
49948  fi
49949done
49950  done
49951IFS=$as_save_IFS
49952
49953fi
49954fi
49955LIPO=$ac_cv_prog_LIPO
49956if test -n "$LIPO"; then
49957  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
49958printf "%s\n" "$LIPO" >&6; }
49959else
49960  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
49961printf "%s\n" "no" >&6; }
49962fi
49963
49964
49965fi
49966if test -z "$ac_cv_prog_LIPO"; then
49967  ac_ct_LIPO=$LIPO
49968  # Extract the first word of "lipo", so it can be a program name with args.
49969set dummy lipo; ac_word=$2
49970{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49971printf %s "checking for $ac_word... " >&6; }
49972if test ${ac_cv_prog_ac_ct_LIPO+y}
49973then :
49974  printf %s "(cached) " >&6
49975else $as_nop
49976  if test -n "$ac_ct_LIPO"; then
49977  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
49978else
49979as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49980for as_dir in $PATH
49981do
49982  IFS=$as_save_IFS
49983  case $as_dir in #(((
49984    '') as_dir=./ ;;
49985    */) ;;
49986    *) as_dir=$as_dir/ ;;
49987  esac
49988    for ac_exec_ext in '' $ac_executable_extensions; do
49989  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
49990    ac_cv_prog_ac_ct_LIPO="lipo"
49991    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
49992    break 2
49993  fi
49994done
49995  done
49996IFS=$as_save_IFS
49997
49998fi
49999fi
50000ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
50001if test -n "$ac_ct_LIPO"; then
50002  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
50003printf "%s\n" "$ac_ct_LIPO" >&6; }
50004else
50005  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
50006printf "%s\n" "no" >&6; }
50007fi
50008
50009  if test "x$ac_ct_LIPO" = x; then
50010    LIPO=":"
50011  else
50012    case $cross_compiling:$ac_tool_warned in
50013yes:)
50014{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
50015printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
50016ac_tool_warned=yes ;;
50017esac
50018    LIPO=$ac_ct_LIPO
50019  fi
50020else
50021  LIPO="$ac_cv_prog_LIPO"
50022fi
50023
50024    if test -n "$ac_tool_prefix"; then
50025  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
50026set dummy ${ac_tool_prefix}otool; ac_word=$2
50027{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50028printf %s "checking for $ac_word... " >&6; }
50029if test ${ac_cv_prog_OTOOL+y}
50030then :
50031  printf %s "(cached) " >&6
50032else $as_nop
50033  if test -n "$OTOOL"; then
50034  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
50035else
50036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50037for as_dir in $PATH
50038do
50039  IFS=$as_save_IFS
50040  case $as_dir in #(((
50041    '') as_dir=./ ;;
50042    */) ;;
50043    *) as_dir=$as_dir/ ;;
50044  esac
50045    for ac_exec_ext in '' $ac_executable_extensions; do
50046  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
50047    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
50048    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
50049    break 2
50050  fi
50051done
50052  done
50053IFS=$as_save_IFS
50054
50055fi
50056fi
50057OTOOL=$ac_cv_prog_OTOOL
50058if test -n "$OTOOL"; then
50059  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
50060printf "%s\n" "$OTOOL" >&6; }
50061else
50062  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
50063printf "%s\n" "no" >&6; }
50064fi
50065
50066
50067fi
50068if test -z "$ac_cv_prog_OTOOL"; then
50069  ac_ct_OTOOL=$OTOOL
50070  # Extract the first word of "otool", so it can be a program name with args.
50071set dummy otool; ac_word=$2
50072{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50073printf %s "checking for $ac_word... " >&6; }
50074if test ${ac_cv_prog_ac_ct_OTOOL+y}
50075then :
50076  printf %s "(cached) " >&6
50077else $as_nop
50078  if test -n "$ac_ct_OTOOL"; then
50079  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
50080else
50081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50082for as_dir in $PATH
50083do
50084  IFS=$as_save_IFS
50085  case $as_dir in #(((
50086    '') as_dir=./ ;;
50087    */) ;;
50088    *) as_dir=$as_dir/ ;;
50089  esac
50090    for ac_exec_ext in '' $ac_executable_extensions; do
50091  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
50092    ac_cv_prog_ac_ct_OTOOL="otool"
50093    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
50094    break 2
50095  fi
50096done
50097  done
50098IFS=$as_save_IFS
50099
50100fi
50101fi
50102ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
50103if test -n "$ac_ct_OTOOL"; then
50104  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
50105printf "%s\n" "$ac_ct_OTOOL" >&6; }
50106else
50107  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
50108printf "%s\n" "no" >&6; }
50109fi
50110
50111  if test "x$ac_ct_OTOOL" = x; then
50112    OTOOL=":"
50113  else
50114    case $cross_compiling:$ac_tool_warned in
50115yes:)
50116{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
50117printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
50118ac_tool_warned=yes ;;
50119esac
50120    OTOOL=$ac_ct_OTOOL
50121  fi
50122else
50123  OTOOL="$ac_cv_prog_OTOOL"
50124fi
50125
50126    if test -n "$ac_tool_prefix"; then
50127  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
50128set dummy ${ac_tool_prefix}otool64; ac_word=$2
50129{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50130printf %s "checking for $ac_word... " >&6; }
50131if test ${ac_cv_prog_OTOOL64+y}
50132then :
50133  printf %s "(cached) " >&6
50134else $as_nop
50135  if test -n "$OTOOL64"; then
50136  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
50137else
50138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50139for as_dir in $PATH
50140do
50141  IFS=$as_save_IFS
50142  case $as_dir in #(((
50143    '') as_dir=./ ;;
50144    */) ;;
50145    *) as_dir=$as_dir/ ;;
50146  esac
50147    for ac_exec_ext in '' $ac_executable_extensions; do
50148  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
50149    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
50150    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
50151    break 2
50152  fi
50153done
50154  done
50155IFS=$as_save_IFS
50156
50157fi
50158fi
50159OTOOL64=$ac_cv_prog_OTOOL64
50160if test -n "$OTOOL64"; then
50161  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
50162printf "%s\n" "$OTOOL64" >&6; }
50163else
50164  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
50165printf "%s\n" "no" >&6; }
50166fi
50167
50168
50169fi
50170if test -z "$ac_cv_prog_OTOOL64"; then
50171  ac_ct_OTOOL64=$OTOOL64
50172  # Extract the first word of "otool64", so it can be a program name with args.
50173set dummy otool64; ac_word=$2
50174{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50175printf %s "checking for $ac_word... " >&6; }
50176if test ${ac_cv_prog_ac_ct_OTOOL64+y}
50177then :
50178  printf %s "(cached) " >&6
50179else $as_nop
50180  if test -n "$ac_ct_OTOOL64"; then
50181  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
50182else
50183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50184for as_dir in $PATH
50185do
50186  IFS=$as_save_IFS
50187  case $as_dir in #(((
50188    '') as_dir=./ ;;
50189    */) ;;
50190    *) as_dir=$as_dir/ ;;
50191  esac
50192    for ac_exec_ext in '' $ac_executable_extensions; do
50193  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
50194    ac_cv_prog_ac_ct_OTOOL64="otool64"
50195    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
50196    break 2
50197  fi
50198done
50199  done
50200IFS=$as_save_IFS
50201
50202fi
50203fi
50204ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
50205if test -n "$ac_ct_OTOOL64"; then
50206  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
50207printf "%s\n" "$ac_ct_OTOOL64" >&6; }
50208else
50209  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
50210printf "%s\n" "no" >&6; }
50211fi
50212
50213  if test "x$ac_ct_OTOOL64" = x; then
50214    OTOOL64=":"
50215  else
50216    case $cross_compiling:$ac_tool_warned in
50217yes:)
50218{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
50219printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
50220ac_tool_warned=yes ;;
50221esac
50222    OTOOL64=$ac_ct_OTOOL64
50223  fi
50224else
50225  OTOOL64="$ac_cv_prog_OTOOL64"
50226fi
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
50255printf %s "checking for -single_module linker flag... " >&6; }
50256if test ${lt_cv_apple_cc_single_mod+y}
50257then :
50258  printf %s "(cached) " >&6
50259else $as_nop
50260  lt_cv_apple_cc_single_mod=no
50261      if test -z "$LT_MULTI_MODULE"; then
50262	# By default we will add the -single_module flag. You can override
50263	# by either setting the environment variable LT_MULTI_MODULE
50264	# non-empty at configure time, or by adding -multi_module to the
50265	# link flags.
50266	rm -rf libconftest.dylib*
50267	echo "int foo(void){return 1;}" > conftest.c
50268	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
50269-dynamiclib -Wl,-single_module conftest.c" >&5
50270	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
50271	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
50272        _lt_result=$?
50273	# If there is a non-empty error log, and "single_module"
50274	# appears in it, assume the flag caused a linker warning
50275        if test -s conftest.err && $GREP single_module conftest.err; then
50276	  cat conftest.err >&5
50277	# Otherwise, if the output was created with a 0 exit code from
50278	# the compiler, it worked.
50279	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
50280	  lt_cv_apple_cc_single_mod=yes
50281	else
50282	  cat conftest.err >&5
50283	fi
50284	rm -rf libconftest.dylib*
50285	rm -f conftest.*
50286      fi
50287fi
50288{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
50289printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
50290
50291    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
50292printf %s "checking for -exported_symbols_list linker flag... " >&6; }
50293if test ${lt_cv_ld_exported_symbols_list+y}
50294then :
50295  printf %s "(cached) " >&6
50296else $as_nop
50297  lt_cv_ld_exported_symbols_list=no
50298      save_LDFLAGS=$LDFLAGS
50299      echo "_main" > conftest.sym
50300      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
50301      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50302/* end confdefs.h.  */
50303
50304int
50305main (void)
50306{
50307
50308  ;
50309  return 0;
50310}
50311_ACEOF
50312if ac_fn_c_try_link "$LINENO"
50313then :
50314  lt_cv_ld_exported_symbols_list=yes
50315else $as_nop
50316  lt_cv_ld_exported_symbols_list=no
50317fi
50318rm -f core conftest.err conftest.$ac_objext conftest.beam \
50319    conftest$ac_exeext conftest.$ac_ext
50320	LDFLAGS=$save_LDFLAGS
50321
50322fi
50323{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
50324printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
50325
50326    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
50327printf %s "checking for -force_load linker flag... " >&6; }
50328if test ${lt_cv_ld_force_load+y}
50329then :
50330  printf %s "(cached) " >&6
50331else $as_nop
50332  lt_cv_ld_force_load=no
50333      cat > conftest.c << _LT_EOF
50334int forced_loaded() { return 2;}
50335_LT_EOF
50336      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
50337      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
50338      echo "$AR cr libconftest.a conftest.o" >&5
50339      $AR cr libconftest.a conftest.o 2>&5
50340      echo "$RANLIB libconftest.a" >&5
50341      $RANLIB libconftest.a 2>&5
50342      cat > conftest.c << _LT_EOF
50343int main() { return 0;}
50344_LT_EOF
50345      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
50346      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
50347      _lt_result=$?
50348      if test -s conftest.err && $GREP force_load conftest.err; then
50349	cat conftest.err >&5
50350      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
50351	lt_cv_ld_force_load=yes
50352      else
50353	cat conftest.err >&5
50354      fi
50355        rm -f conftest.err libconftest.a conftest conftest.c
50356        rm -rf conftest.dSYM
50357
50358fi
50359{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
50360printf "%s\n" "$lt_cv_ld_force_load" >&6; }
50361    case $host_os in
50362    rhapsody* | darwin1.[012])
50363      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
50364    darwin1.*)
50365      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
50366    darwin*) # darwin 5.x on
50367      # if running on 10.5 or later, the deployment target defaults
50368      # to the OS version, if on x86, and 10.4, the deployment
50369      # target defaults to 10.4. Don't you love it?
50370      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
50371	10.0,*86*-darwin8*|10.0,*-darwin[912]*)
50372	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
50373	10.[012][,.]*)
50374	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
50375	10.*|11.*)
50376	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
50377      esac
50378    ;;
50379  esac
50380    if test yes = "$lt_cv_apple_cc_single_mod"; then
50381      _lt_dar_single_mod='$single_module'
50382    fi
50383    if test yes = "$lt_cv_ld_exported_symbols_list"; then
50384      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
50385    else
50386      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
50387    fi
50388    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
50389      _lt_dsymutil='~$DSYMUTIL $lib || :'
50390    else
50391      _lt_dsymutil=
50392    fi
50393    ;;
50394  esac
50395
50396# func_munge_path_list VARIABLE PATH
50397# -----------------------------------
50398# VARIABLE is name of variable containing _space_ separated list of
50399# directories to be munged by the contents of PATH, which is string
50400# having a format:
50401# "DIR[:DIR]:"
50402#       string "DIR[ DIR]" will be prepended to VARIABLE
50403# ":DIR[:DIR]"
50404#       string "DIR[ DIR]" will be appended to VARIABLE
50405# "DIRP[:DIRP]::[DIRA:]DIRA"
50406#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
50407#       "DIRA[ DIRA]" will be appended to VARIABLE
50408# "DIR[:DIR]"
50409#       VARIABLE will be replaced by "DIR[ DIR]"
50410func_munge_path_list ()
50411{
50412    case x$2 in
50413    x)
50414        ;;
50415    *:)
50416        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
50417        ;;
50418    x:*)
50419        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
50420        ;;
50421    *::*)
50422        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
50423        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
50424        ;;
50425    *)
50426        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
50427        ;;
50428    esac
50429}
50430
50431ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
50432"
50433if test "x$ac_cv_header_dlfcn_h" = xyes
50434then :
50435  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
50436
50437fi
50438
50439
50440
50441
50442
50443# Set options
50444enable_dlopen=yes
50445
50446
50447
50448
50449  enable_win32_dll=no
50450
50451
50452            # Check whether --enable-shared was given.
50453if test ${enable_shared+y}
50454then :
50455  enableval=$enable_shared; p=${PACKAGE-default}
50456    case $enableval in
50457    yes) enable_shared=yes ;;
50458    no) enable_shared=no ;;
50459    *)
50460      enable_shared=no
50461      # Look at the argument we got.  We use all the common list separators.
50462      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
50463      for pkg in $enableval; do
50464	IFS=$lt_save_ifs
50465	if test "X$pkg" = "X$p"; then
50466	  enable_shared=yes
50467	fi
50468      done
50469      IFS=$lt_save_ifs
50470      ;;
50471    esac
50472else $as_nop
50473  enable_shared=yes
50474fi
50475
50476
50477
50478
50479
50480
50481
50482
50483
50484  # Check whether --enable-static was given.
50485if test ${enable_static+y}
50486then :
50487  enableval=$enable_static; p=${PACKAGE-default}
50488    case $enableval in
50489    yes) enable_static=yes ;;
50490    no) enable_static=no ;;
50491    *)
50492     enable_static=no
50493      # Look at the argument we got.  We use all the common list separators.
50494      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
50495      for pkg in $enableval; do
50496	IFS=$lt_save_ifs
50497	if test "X$pkg" = "X$p"; then
50498	  enable_static=yes
50499	fi
50500      done
50501      IFS=$lt_save_ifs
50502      ;;
50503    esac
50504else $as_nop
50505  enable_static=yes
50506fi
50507
50508
50509
50510
50511
50512
50513
50514
50515
50516
50517# Check whether --with-pic was given.
50518if test ${with_pic+y}
50519then :
50520  withval=$with_pic; lt_p=${PACKAGE-default}
50521    case $withval in
50522    yes|no) pic_mode=$withval ;;
50523    *)
50524      pic_mode=default
50525      # Look at the argument we got.  We use all the common list separators.
50526      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
50527      for lt_pkg in $withval; do
50528	IFS=$lt_save_ifs
50529	if test "X$lt_pkg" = "X$lt_p"; then
50530	  pic_mode=yes
50531	fi
50532      done
50533      IFS=$lt_save_ifs
50534      ;;
50535    esac
50536else $as_nop
50537  pic_mode=default
50538fi
50539
50540
50541
50542
50543
50544
50545
50546
50547  # Check whether --enable-fast-install was given.
50548if test ${enable_fast_install+y}
50549then :
50550  enableval=$enable_fast_install; p=${PACKAGE-default}
50551    case $enableval in
50552    yes) enable_fast_install=yes ;;
50553    no) enable_fast_install=no ;;
50554    *)
50555      enable_fast_install=no
50556      # Look at the argument we got.  We use all the common list separators.
50557      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
50558      for pkg in $enableval; do
50559	IFS=$lt_save_ifs
50560	if test "X$pkg" = "X$p"; then
50561	  enable_fast_install=yes
50562	fi
50563      done
50564      IFS=$lt_save_ifs
50565      ;;
50566    esac
50567else $as_nop
50568  enable_fast_install=yes
50569fi
50570
50571
50572
50573
50574
50575
50576
50577
50578  shared_archive_member_spec=
50579case $host,$enable_shared in
50580power*-*-aix[5-9]*,yes)
50581  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
50582printf %s "checking which variant of shared library versioning to provide... " >&6; }
50583
50584# Check whether --with-aix-soname was given.
50585if test ${with_aix_soname+y}
50586then :
50587  withval=$with_aix_soname; case $withval in
50588    aix|svr4|both)
50589      ;;
50590    *)
50591      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
50592      ;;
50593    esac
50594    lt_cv_with_aix_soname=$with_aix_soname
50595else $as_nop
50596  if test ${lt_cv_with_aix_soname+y}
50597then :
50598  printf %s "(cached) " >&6
50599else $as_nop
50600  lt_cv_with_aix_soname=aix
50601fi
50602
50603    with_aix_soname=$lt_cv_with_aix_soname
50604fi
50605
50606  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
50607printf "%s\n" "$with_aix_soname" >&6; }
50608  if test aix != "$with_aix_soname"; then
50609    # For the AIX way of multilib, we name the shared archive member
50610    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
50611    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
50612    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
50613    # the AIX toolchain works better with OBJECT_MODE set (default 32).
50614    if test 64 = "${OBJECT_MODE-32}"; then
50615      shared_archive_member_spec=shr_64
50616    else
50617      shared_archive_member_spec=shr
50618    fi
50619  fi
50620  ;;
50621*)
50622  with_aix_soname=aix
50623  ;;
50624esac
50625
50626
50627
50628
50629
50630
50631
50632
50633
50634
50635# This can be used to rebuild libtool when needed
50636LIBTOOL_DEPS=$ltmain
50637
50638# Always use our own libtool.
50639LIBTOOL='$(SHELL) $(top_builddir)/libtool'
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670test -z "$LN_S" && LN_S="ln -s"
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685if test -n "${ZSH_VERSION+set}"; then
50686   setopt NO_GLOB_SUBST
50687fi
50688
50689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
50690printf %s "checking for objdir... " >&6; }
50691if test ${lt_cv_objdir+y}
50692then :
50693  printf %s "(cached) " >&6
50694else $as_nop
50695  rm -f .libs 2>/dev/null
50696mkdir .libs 2>/dev/null
50697if test -d .libs; then
50698  lt_cv_objdir=.libs
50699else
50700  # MS-DOS does not allow filenames that begin with a dot.
50701  lt_cv_objdir=_libs
50702fi
50703rmdir .libs 2>/dev/null
50704fi
50705{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
50706printf "%s\n" "$lt_cv_objdir" >&6; }
50707objdir=$lt_cv_objdir
50708
50709
50710
50711
50712
50713printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
50714
50715
50716
50717
50718case $host_os in
50719aix3*)
50720  # AIX sometimes has problems with the GCC collect2 program.  For some
50721  # reason, if we set the COLLECT_NAMES environment variable, the problems
50722  # vanish in a puff of smoke.
50723  if test set != "${COLLECT_NAMES+set}"; then
50724    COLLECT_NAMES=
50725    export COLLECT_NAMES
50726  fi
50727  ;;
50728esac
50729
50730# Global variables:
50731ofile=libtool
50732can_build_shared=yes
50733
50734# All known linkers require a '.a' archive for static linking (except MSVC,
50735# which needs '.lib').
50736libext=a
50737
50738with_gnu_ld=$lt_cv_prog_gnu_ld
50739
50740old_CC=$CC
50741old_CFLAGS=$CFLAGS
50742
50743# Set sane defaults for various variables
50744test -z "$CC" && CC=cc
50745test -z "$LTCC" && LTCC=$CC
50746test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
50747test -z "$LD" && LD=ld
50748test -z "$ac_objext" && ac_objext=o
50749
50750func_cc_basename $compiler
50751cc_basename=$func_cc_basename_result
50752
50753
50754# Only perform the check for file, if the check method requires it
50755test -z "$MAGIC_CMD" && MAGIC_CMD=file
50756case $deplibs_check_method in
50757file_magic*)
50758  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
50759    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
50760printf %s "checking for ${ac_tool_prefix}file... " >&6; }
50761if test ${lt_cv_path_MAGIC_CMD+y}
50762then :
50763  printf %s "(cached) " >&6
50764else $as_nop
50765  case $MAGIC_CMD in
50766[\\/*] |  ?:[\\/]*)
50767  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
50768  ;;
50769*)
50770  lt_save_MAGIC_CMD=$MAGIC_CMD
50771  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
50772  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
50773  for ac_dir in $ac_dummy; do
50774    IFS=$lt_save_ifs
50775    test -z "$ac_dir" && ac_dir=.
50776    if test -f "$ac_dir/${ac_tool_prefix}file"; then
50777      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
50778      if test -n "$file_magic_test_file"; then
50779	case $deplibs_check_method in
50780	"file_magic "*)
50781	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
50782	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
50783	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
50784	    $EGREP "$file_magic_regex" > /dev/null; then
50785	    :
50786	  else
50787	    cat <<_LT_EOF 1>&2
50788
50789*** Warning: the command libtool uses to detect shared libraries,
50790*** $file_magic_cmd, produces output that libtool cannot recognize.
50791*** The result is that libtool may fail to recognize shared libraries
50792*** as such.  This will affect the creation of libtool libraries that
50793*** depend on shared libraries, but programs linked with such libtool
50794*** libraries will work regardless of this problem.  Nevertheless, you
50795*** may want to report the problem to your system manager and/or to
50796*** bug-libtool@gnu.org
50797
50798_LT_EOF
50799	  fi ;;
50800	esac
50801      fi
50802      break
50803    fi
50804  done
50805  IFS=$lt_save_ifs
50806  MAGIC_CMD=$lt_save_MAGIC_CMD
50807  ;;
50808esac
50809fi
50810
50811MAGIC_CMD=$lt_cv_path_MAGIC_CMD
50812if test -n "$MAGIC_CMD"; then
50813  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
50814printf "%s\n" "$MAGIC_CMD" >&6; }
50815else
50816  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
50817printf "%s\n" "no" >&6; }
50818fi
50819
50820
50821
50822
50823
50824if test -z "$lt_cv_path_MAGIC_CMD"; then
50825  if test -n "$ac_tool_prefix"; then
50826    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
50827printf %s "checking for file... " >&6; }
50828if test ${lt_cv_path_MAGIC_CMD+y}
50829then :
50830  printf %s "(cached) " >&6
50831else $as_nop
50832  case $MAGIC_CMD in
50833[\\/*] |  ?:[\\/]*)
50834  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
50835  ;;
50836*)
50837  lt_save_MAGIC_CMD=$MAGIC_CMD
50838  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
50839  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
50840  for ac_dir in $ac_dummy; do
50841    IFS=$lt_save_ifs
50842    test -z "$ac_dir" && ac_dir=.
50843    if test -f "$ac_dir/file"; then
50844      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
50845      if test -n "$file_magic_test_file"; then
50846	case $deplibs_check_method in
50847	"file_magic "*)
50848	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
50849	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
50850	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
50851	    $EGREP "$file_magic_regex" > /dev/null; then
50852	    :
50853	  else
50854	    cat <<_LT_EOF 1>&2
50855
50856*** Warning: the command libtool uses to detect shared libraries,
50857*** $file_magic_cmd, produces output that libtool cannot recognize.
50858*** The result is that libtool may fail to recognize shared libraries
50859*** as such.  This will affect the creation of libtool libraries that
50860*** depend on shared libraries, but programs linked with such libtool
50861*** libraries will work regardless of this problem.  Nevertheless, you
50862*** may want to report the problem to your system manager and/or to
50863*** bug-libtool@gnu.org
50864
50865_LT_EOF
50866	  fi ;;
50867	esac
50868      fi
50869      break
50870    fi
50871  done
50872  IFS=$lt_save_ifs
50873  MAGIC_CMD=$lt_save_MAGIC_CMD
50874  ;;
50875esac
50876fi
50877
50878MAGIC_CMD=$lt_cv_path_MAGIC_CMD
50879if test -n "$MAGIC_CMD"; then
50880  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
50881printf "%s\n" "$MAGIC_CMD" >&6; }
50882else
50883  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
50884printf "%s\n" "no" >&6; }
50885fi
50886
50887
50888  else
50889    MAGIC_CMD=:
50890  fi
50891fi
50892
50893  fi
50894  ;;
50895esac
50896
50897# Use C for the default configuration in the libtool script
50898
50899lt_save_CC=$CC
50900ac_ext=c
50901ac_cpp='$CPP $CPPFLAGS'
50902ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50903ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50904ac_compiler_gnu=$ac_cv_c_compiler_gnu
50905
50906
50907# Source file extension for C test sources.
50908ac_ext=c
50909
50910# Object file extension for compiled C test sources.
50911objext=o
50912objext=$objext
50913
50914# Code to be used in simple compile tests
50915lt_simple_compile_test_code="int some_variable = 0;"
50916
50917# Code to be used in simple link tests
50918lt_simple_link_test_code='int main(){return(0);}'
50919
50920
50921
50922
50923
50924
50925
50926# If no C compiler was specified, use CC.
50927LTCC=${LTCC-"$CC"}
50928
50929# If no C compiler flags were specified, use CFLAGS.
50930LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
50931
50932# Allow CC to be a program name with arguments.
50933compiler=$CC
50934
50935# Save the default compiler, since it gets overwritten when the other
50936# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
50937compiler_DEFAULT=$CC
50938
50939# save warnings/boilerplate of simple test code
50940ac_outfile=conftest.$ac_objext
50941echo "$lt_simple_compile_test_code" >conftest.$ac_ext
50942eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
50943_lt_compiler_boilerplate=`cat conftest.err`
50944$RM conftest*
50945
50946ac_outfile=conftest.$ac_objext
50947echo "$lt_simple_link_test_code" >conftest.$ac_ext
50948eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
50949_lt_linker_boilerplate=`cat conftest.err`
50950$RM -r conftest*
50951
50952
50953## CAVEAT EMPTOR:
50954## There is no encapsulation within the following macros, do not change
50955## the running order or otherwise move them around unless you know exactly
50956## what you are doing...
50957if test -n "$compiler"; then
50958
50959lt_prog_compiler_no_builtin_flag=
50960
50961if test yes = "$GCC"; then
50962  case $cc_basename in
50963  nvcc*)
50964    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
50965  *)
50966    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
50967  esac
50968
50969  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
50970printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
50971if test ${lt_cv_prog_compiler_rtti_exceptions+y}
50972then :
50973  printf %s "(cached) " >&6
50974else $as_nop
50975  lt_cv_prog_compiler_rtti_exceptions=no
50976   ac_outfile=conftest.$ac_objext
50977   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
50978   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
50979   # Insert the option either (1) after the last *FLAGS variable, or
50980   # (2) before a word containing "conftest.", or (3) at the end.
50981   # Note that $ac_compile itself does not contain backslashes and begins
50982   # with a dollar sign (not a hyphen), so the echo should work correctly.
50983   # The option is referenced via a variable to avoid confusing sed.
50984   lt_compile=`echo "$ac_compile" | $SED \
50985   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
50986   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
50987   -e 's:$: $lt_compiler_flag:'`
50988   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
50989   (eval "$lt_compile" 2>conftest.err)
50990   ac_status=$?
50991   cat conftest.err >&5
50992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
50993   if (exit $ac_status) && test -s "$ac_outfile"; then
50994     # The compiler can only warn and ignore the option if not recognized
50995     # So say no if there are warnings other than the usual output.
50996     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
50997     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
50998     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
50999       lt_cv_prog_compiler_rtti_exceptions=yes
51000     fi
51001   fi
51002   $RM conftest*
51003
51004fi
51005{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
51006printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
51007
51008if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
51009    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
51010else
51011    :
51012fi
51013
51014fi
51015
51016
51017
51018
51019
51020
51021  lt_prog_compiler_wl=
51022lt_prog_compiler_pic=
51023lt_prog_compiler_static=
51024
51025
51026  if test yes = "$GCC"; then
51027    lt_prog_compiler_wl='-Wl,'
51028    lt_prog_compiler_static='-static'
51029
51030    case $host_os in
51031      aix*)
51032      # All AIX code is PIC.
51033      if test ia64 = "$host_cpu"; then
51034	# AIX 5 now supports IA64 processor
51035	lt_prog_compiler_static='-Bstatic'
51036      fi
51037      lt_prog_compiler_pic='-fPIC'
51038      ;;
51039
51040    amigaos*)
51041      case $host_cpu in
51042      powerpc)
51043            # see comment about AmigaOS4 .so support
51044            lt_prog_compiler_pic='-fPIC'
51045        ;;
51046      m68k)
51047            # FIXME: we need at least 68020 code to build shared libraries, but
51048            # adding the '-m68020' flag to GCC prevents building anything better,
51049            # like '-m68040'.
51050            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
51051        ;;
51052      esac
51053      ;;
51054
51055    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
51056      # PIC is the default for these OSes.
51057      ;;
51058
51059    mingw* | cygwin* | pw32* | os2* | cegcc*)
51060      # This hack is so that the source file can tell whether it is being
51061      # built for inclusion in a dll (and should export symbols for example).
51062      # Although the cygwin gcc ignores -fPIC, still need this for old-style
51063      # (--disable-auto-import) libraries
51064      lt_prog_compiler_pic='-DDLL_EXPORT'
51065      case $host_os in
51066      os2*)
51067	lt_prog_compiler_static='$wl-static'
51068	;;
51069      esac
51070      ;;
51071
51072    darwin* | rhapsody*)
51073      # PIC is the default on this platform
51074      # Common symbols not allowed in MH_DYLIB files
51075      lt_prog_compiler_pic='-fno-common'
51076      ;;
51077
51078    haiku*)
51079      # PIC is the default for Haiku.
51080      # The "-static" flag exists, but is broken.
51081      lt_prog_compiler_static=
51082      ;;
51083
51084    hpux*)
51085      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
51086      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
51087      # sets the default TLS model and affects inlining.
51088      case $host_cpu in
51089      hppa*64*)
51090	# +Z the default
51091	;;
51092      *)
51093	lt_prog_compiler_pic='-fPIC'
51094	;;
51095      esac
51096      ;;
51097
51098    interix[3-9]*)
51099      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
51100      # Instead, we relocate shared libraries at runtime.
51101      ;;
51102
51103    msdosdjgpp*)
51104      # Just because we use GCC doesn't mean we suddenly get shared libraries
51105      # on systems that don't support them.
51106      lt_prog_compiler_can_build_shared=no
51107      enable_shared=no
51108      ;;
51109
51110    *nto* | *qnx*)
51111      # QNX uses GNU C++, but need to define -shared option too, otherwise
51112      # it will coredump.
51113      lt_prog_compiler_pic='-fPIC -shared'
51114      ;;
51115
51116    sysv4*MP*)
51117      if test -d /usr/nec; then
51118	lt_prog_compiler_pic=-Kconform_pic
51119      fi
51120      ;;
51121
51122    *)
51123      lt_prog_compiler_pic='-fPIC'
51124      ;;
51125    esac
51126
51127    case $cc_basename in
51128    nvcc*) # Cuda Compiler Driver 2.2
51129      lt_prog_compiler_wl='-Xlinker '
51130      if test -n "$lt_prog_compiler_pic"; then
51131        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
51132      fi
51133      ;;
51134    esac
51135  else
51136    # PORTME Check for flag to pass linker flags through the system compiler.
51137    case $host_os in
51138    aix*)
51139      lt_prog_compiler_wl='-Wl,'
51140      if test ia64 = "$host_cpu"; then
51141	# AIX 5 now supports IA64 processor
51142	lt_prog_compiler_static='-Bstatic'
51143      else
51144	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
51145      fi
51146      ;;
51147
51148    darwin* | rhapsody*)
51149      # PIC is the default on this platform
51150      # Common symbols not allowed in MH_DYLIB files
51151      lt_prog_compiler_pic='-fno-common'
51152      case $cc_basename in
51153      nagfor*)
51154        # NAG Fortran compiler
51155        lt_prog_compiler_wl='-Wl,-Wl,,'
51156        lt_prog_compiler_pic='-PIC'
51157        lt_prog_compiler_static='-Bstatic'
51158        ;;
51159      esac
51160      ;;
51161
51162    mingw* | cygwin* | pw32* | os2* | cegcc*)
51163      # This hack is so that the source file can tell whether it is being
51164      # built for inclusion in a dll (and should export symbols for example).
51165      lt_prog_compiler_pic='-DDLL_EXPORT'
51166      case $host_os in
51167      os2*)
51168	lt_prog_compiler_static='$wl-static'
51169	;;
51170      esac
51171      ;;
51172
51173    hpux9* | hpux10* | hpux11*)
51174      lt_prog_compiler_wl='-Wl,'
51175      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
51176      # not for PA HP-UX.
51177      case $host_cpu in
51178      hppa*64*|ia64*)
51179	# +Z the default
51180	;;
51181      *)
51182	lt_prog_compiler_pic='+Z'
51183	;;
51184      esac
51185      # Is there a better lt_prog_compiler_static that works with the bundled CC?
51186      lt_prog_compiler_static='$wl-a ${wl}archive'
51187      ;;
51188
51189    irix5* | irix6* | nonstopux*)
51190      lt_prog_compiler_wl='-Wl,'
51191      # PIC (with -KPIC) is the default.
51192      lt_prog_compiler_static='-non_shared'
51193      ;;
51194
51195    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
51196      case $cc_basename in
51197      # old Intel for x86_64, which still supported -KPIC.
51198      ecc*)
51199	lt_prog_compiler_wl='-Wl,'
51200	lt_prog_compiler_pic='-KPIC'
51201	lt_prog_compiler_static='-static'
51202        ;;
51203      # flang / f18. f95 an alias for gfortran or flang on Debian
51204      flang* | f18* | f95*)
51205	lt_prog_compiler_wl='-Wl,'
51206	lt_prog_compiler_pic='-fPIC'
51207	lt_prog_compiler_static='-static'
51208        ;;
51209      # icc used to be incompatible with GCC.
51210      # ICC 10 doesn't accept -KPIC any more.
51211      icc* | ifort*)
51212	lt_prog_compiler_wl='-Wl,'
51213	lt_prog_compiler_pic='-fPIC'
51214	lt_prog_compiler_static='-static'
51215        ;;
51216      # Lahey Fortran 8.1.
51217      lf95*)
51218	lt_prog_compiler_wl='-Wl,'
51219	lt_prog_compiler_pic='--shared'
51220	lt_prog_compiler_static='--static'
51221	;;
51222      nagfor*)
51223	# NAG Fortran compiler
51224	lt_prog_compiler_wl='-Wl,-Wl,,'
51225	lt_prog_compiler_pic='-PIC'
51226	lt_prog_compiler_static='-Bstatic'
51227	;;
51228      tcc*)
51229	# Fabrice Bellard et al's Tiny C Compiler
51230	lt_prog_compiler_wl='-Wl,'
51231	lt_prog_compiler_pic='-fPIC'
51232	lt_prog_compiler_static='-static'
51233	;;
51234      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
51235        # Portland Group compilers (*not* the Pentium gcc compiler,
51236	# which looks to be a dead project)
51237	lt_prog_compiler_wl='-Wl,'
51238	lt_prog_compiler_pic='-fpic'
51239	lt_prog_compiler_static='-Bstatic'
51240        ;;
51241      ccc*)
51242        lt_prog_compiler_wl='-Wl,'
51243        # All Alpha code is PIC.
51244        lt_prog_compiler_static='-non_shared'
51245        ;;
51246      xl* | bgxl* | bgf* | mpixl*)
51247	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
51248	lt_prog_compiler_wl='-Wl,'
51249	lt_prog_compiler_pic='-qpic'
51250	lt_prog_compiler_static='-qstaticlink'
51251	;;
51252      *)
51253	case `$CC -V 2>&1 | sed 5q` in
51254	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
51255	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
51256	  lt_prog_compiler_pic='-KPIC'
51257	  lt_prog_compiler_static='-Bstatic'
51258	  lt_prog_compiler_wl=''
51259	  ;;
51260	*Sun\ F* | *Sun*Fortran*)
51261	  lt_prog_compiler_pic='-KPIC'
51262	  lt_prog_compiler_static='-Bstatic'
51263	  lt_prog_compiler_wl='-Qoption ld '
51264	  ;;
51265	*Sun\ C*)
51266	  # Sun C 5.9
51267	  lt_prog_compiler_pic='-KPIC'
51268	  lt_prog_compiler_static='-Bstatic'
51269	  lt_prog_compiler_wl='-Wl,'
51270	  ;;
51271        *Intel*\ [CF]*Compiler*)
51272	  lt_prog_compiler_wl='-Wl,'
51273	  lt_prog_compiler_pic='-fPIC'
51274	  lt_prog_compiler_static='-static'
51275	  ;;
51276	*Portland\ Group*)
51277	  lt_prog_compiler_wl='-Wl,'
51278	  lt_prog_compiler_pic='-fpic'
51279	  lt_prog_compiler_static='-Bstatic'
51280	  ;;
51281	esac
51282	;;
51283      esac
51284      ;;
51285
51286    newsos6)
51287      lt_prog_compiler_pic='-KPIC'
51288      lt_prog_compiler_static='-Bstatic'
51289      ;;
51290
51291    *nto* | *qnx*)
51292      # QNX uses GNU C++, but need to define -shared option too, otherwise
51293      # it will coredump.
51294      lt_prog_compiler_pic='-fPIC -shared'
51295      ;;
51296
51297    osf3* | osf4* | osf5*)
51298      lt_prog_compiler_wl='-Wl,'
51299      # All OSF/1 code is PIC.
51300      lt_prog_compiler_static='-non_shared'
51301      ;;
51302
51303    rdos*)
51304      lt_prog_compiler_static='-non_shared'
51305      ;;
51306
51307    solaris*)
51308      lt_prog_compiler_pic='-KPIC'
51309      lt_prog_compiler_static='-Bstatic'
51310      case $cc_basename in
51311      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
51312	lt_prog_compiler_wl='-Qoption ld ';;
51313      *)
51314	lt_prog_compiler_wl='-Wl,';;
51315      esac
51316      ;;
51317
51318    sunos4*)
51319      lt_prog_compiler_wl='-Qoption ld '
51320      lt_prog_compiler_pic='-PIC'
51321      lt_prog_compiler_static='-Bstatic'
51322      ;;
51323
51324    sysv4 | sysv4.2uw2* | sysv4.3*)
51325      lt_prog_compiler_wl='-Wl,'
51326      lt_prog_compiler_pic='-KPIC'
51327      lt_prog_compiler_static='-Bstatic'
51328      ;;
51329
51330    sysv4*MP*)
51331      if test -d /usr/nec; then
51332	lt_prog_compiler_pic='-Kconform_pic'
51333	lt_prog_compiler_static='-Bstatic'
51334      fi
51335      ;;
51336
51337    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
51338      lt_prog_compiler_wl='-Wl,'
51339      lt_prog_compiler_pic='-KPIC'
51340      lt_prog_compiler_static='-Bstatic'
51341      ;;
51342
51343    unicos*)
51344      lt_prog_compiler_wl='-Wl,'
51345      lt_prog_compiler_can_build_shared=no
51346      ;;
51347
51348    uts4*)
51349      lt_prog_compiler_pic='-pic'
51350      lt_prog_compiler_static='-Bstatic'
51351      ;;
51352
51353    *)
51354      lt_prog_compiler_can_build_shared=no
51355      ;;
51356    esac
51357  fi
51358
51359case $host_os in
51360  # For platforms that do not support PIC, -DPIC is meaningless:
51361  *djgpp*)
51362    lt_prog_compiler_pic=
51363    ;;
51364  *)
51365    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
51366    ;;
51367esac
51368
51369{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
51370printf %s "checking for $compiler option to produce PIC... " >&6; }
51371if test ${lt_cv_prog_compiler_pic+y}
51372then :
51373  printf %s "(cached) " >&6
51374else $as_nop
51375  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
51376fi
51377{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
51378printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
51379lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
51380
51381#
51382# Check to make sure the PIC flag actually works.
51383#
51384if test -n "$lt_prog_compiler_pic"; then
51385  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
51386printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
51387if test ${lt_cv_prog_compiler_pic_works+y}
51388then :
51389  printf %s "(cached) " >&6
51390else $as_nop
51391  lt_cv_prog_compiler_pic_works=no
51392   ac_outfile=conftest.$ac_objext
51393   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
51394   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
51395   # Insert the option either (1) after the last *FLAGS variable, or
51396   # (2) before a word containing "conftest.", or (3) at the end.
51397   # Note that $ac_compile itself does not contain backslashes and begins
51398   # with a dollar sign (not a hyphen), so the echo should work correctly.
51399   # The option is referenced via a variable to avoid confusing sed.
51400   lt_compile=`echo "$ac_compile" | $SED \
51401   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
51402   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
51403   -e 's:$: $lt_compiler_flag:'`
51404   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
51405   (eval "$lt_compile" 2>conftest.err)
51406   ac_status=$?
51407   cat conftest.err >&5
51408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
51409   if (exit $ac_status) && test -s "$ac_outfile"; then
51410     # The compiler can only warn and ignore the option if not recognized
51411     # So say no if there are warnings other than the usual output.
51412     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
51413     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
51414     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
51415       lt_cv_prog_compiler_pic_works=yes
51416     fi
51417   fi
51418   $RM conftest*
51419
51420fi
51421{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
51422printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
51423
51424if test yes = "$lt_cv_prog_compiler_pic_works"; then
51425    case $lt_prog_compiler_pic in
51426     "" | " "*) ;;
51427     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
51428     esac
51429else
51430    lt_prog_compiler_pic=
51431     lt_prog_compiler_can_build_shared=no
51432fi
51433
51434fi
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446#
51447# Check to make sure the static flag actually works.
51448#
51449wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
51450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
51451printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
51452if test ${lt_cv_prog_compiler_static_works+y}
51453then :
51454  printf %s "(cached) " >&6
51455else $as_nop
51456  lt_cv_prog_compiler_static_works=no
51457   save_LDFLAGS=$LDFLAGS
51458   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
51459   echo "$lt_simple_link_test_code" > conftest.$ac_ext
51460   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
51461     # The linker can only warn and ignore the option if not recognized
51462     # So say no if there are warnings
51463     if test -s conftest.err; then
51464       # Append any errors to the config.log.
51465       cat conftest.err 1>&5
51466       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
51467       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
51468       if diff conftest.exp conftest.er2 >/dev/null; then
51469         lt_cv_prog_compiler_static_works=yes
51470       fi
51471     else
51472       lt_cv_prog_compiler_static_works=yes
51473     fi
51474   fi
51475   $RM -r conftest*
51476   LDFLAGS=$save_LDFLAGS
51477
51478fi
51479{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
51480printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
51481
51482if test yes = "$lt_cv_prog_compiler_static_works"; then
51483    :
51484else
51485    lt_prog_compiler_static=
51486fi
51487
51488
51489
51490
51491
51492
51493
51494  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
51495printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
51496if test ${lt_cv_prog_compiler_c_o+y}
51497then :
51498  printf %s "(cached) " >&6
51499else $as_nop
51500  lt_cv_prog_compiler_c_o=no
51501   $RM -r conftest 2>/dev/null
51502   mkdir conftest
51503   cd conftest
51504   mkdir out
51505   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
51506
51507   lt_compiler_flag="-o out/conftest2.$ac_objext"
51508   # Insert the option either (1) after the last *FLAGS variable, or
51509   # (2) before a word containing "conftest.", or (3) at the end.
51510   # Note that $ac_compile itself does not contain backslashes and begins
51511   # with a dollar sign (not a hyphen), so the echo should work correctly.
51512   lt_compile=`echo "$ac_compile" | $SED \
51513   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
51514   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
51515   -e 's:$: $lt_compiler_flag:'`
51516   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
51517   (eval "$lt_compile" 2>out/conftest.err)
51518   ac_status=$?
51519   cat out/conftest.err >&5
51520   echo "$as_me:$LINENO: \$? = $ac_status" >&5
51521   if (exit $ac_status) && test -s out/conftest2.$ac_objext
51522   then
51523     # The compiler can only warn and ignore the option if not recognized
51524     # So say no if there are warnings
51525     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
51526     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
51527     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
51528       lt_cv_prog_compiler_c_o=yes
51529     fi
51530   fi
51531   chmod u+w . 2>&5
51532   $RM conftest*
51533   # SGI C++ compiler will create directory out/ii_files/ for
51534   # template instantiation
51535   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
51536   $RM out/* && rmdir out
51537   cd ..
51538   $RM -r conftest
51539   $RM conftest*
51540
51541fi
51542{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
51543printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
51544
51545
51546
51547
51548
51549
51550  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
51551printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
51552if test ${lt_cv_prog_compiler_c_o+y}
51553then :
51554  printf %s "(cached) " >&6
51555else $as_nop
51556  lt_cv_prog_compiler_c_o=no
51557   $RM -r conftest 2>/dev/null
51558   mkdir conftest
51559   cd conftest
51560   mkdir out
51561   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
51562
51563   lt_compiler_flag="-o out/conftest2.$ac_objext"
51564   # Insert the option either (1) after the last *FLAGS variable, or
51565   # (2) before a word containing "conftest.", or (3) at the end.
51566   # Note that $ac_compile itself does not contain backslashes and begins
51567   # with a dollar sign (not a hyphen), so the echo should work correctly.
51568   lt_compile=`echo "$ac_compile" | $SED \
51569   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
51570   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
51571   -e 's:$: $lt_compiler_flag:'`
51572   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
51573   (eval "$lt_compile" 2>out/conftest.err)
51574   ac_status=$?
51575   cat out/conftest.err >&5
51576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
51577   if (exit $ac_status) && test -s out/conftest2.$ac_objext
51578   then
51579     # The compiler can only warn and ignore the option if not recognized
51580     # So say no if there are warnings
51581     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
51582     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
51583     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
51584       lt_cv_prog_compiler_c_o=yes
51585     fi
51586   fi
51587   chmod u+w . 2>&5
51588   $RM conftest*
51589   # SGI C++ compiler will create directory out/ii_files/ for
51590   # template instantiation
51591   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
51592   $RM out/* && rmdir out
51593   cd ..
51594   $RM -r conftest
51595   $RM conftest*
51596
51597fi
51598{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
51599printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
51600
51601
51602
51603
51604hard_links=nottested
51605if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
51606  # do not overwrite the value of need_locks provided by the user
51607  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
51608printf %s "checking if we can lock with hard links... " >&6; }
51609  hard_links=yes
51610  $RM conftest*
51611  ln conftest.a conftest.b 2>/dev/null && hard_links=no
51612  touch conftest.a
51613  ln conftest.a conftest.b 2>&5 || hard_links=no
51614  ln conftest.a conftest.b 2>/dev/null && hard_links=no
51615  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
51616printf "%s\n" "$hard_links" >&6; }
51617  if test no = "$hard_links"; then
51618    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
51619printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
51620    need_locks=warn
51621  fi
51622else
51623  need_locks=no
51624fi
51625
51626
51627
51628
51629
51630
51631  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
51632printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
51633
51634  runpath_var=
51635  allow_undefined_flag=
51636  always_export_symbols=no
51637  archive_cmds=
51638  archive_expsym_cmds=
51639  compiler_needs_object=no
51640  enable_shared_with_static_runtimes=no
51641  export_dynamic_flag_spec=
51642  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
51643  hardcode_automatic=no
51644  hardcode_direct=no
51645  hardcode_direct_absolute=no
51646  hardcode_libdir_flag_spec=
51647  hardcode_libdir_separator=
51648  hardcode_minus_L=no
51649  hardcode_shlibpath_var=unsupported
51650  inherit_rpath=no
51651  link_all_deplibs=unknown
51652  module_cmds=
51653  module_expsym_cmds=
51654  old_archive_from_new_cmds=
51655  old_archive_from_expsyms_cmds=
51656  thread_safe_flag_spec=
51657  whole_archive_flag_spec=
51658  # include_expsyms should be a list of space-separated symbols to be *always*
51659  # included in the symbol list
51660  include_expsyms=
51661  # exclude_expsyms can be an extended regexp of symbols to exclude
51662  # it will be wrapped by ' (' and ')$', so one must not match beginning or
51663  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
51664  # as well as any symbol that contains 'd'.
51665  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
51666  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
51667  # platforms (ab)use it in PIC code, but their linkers get confused if
51668  # the symbol is explicitly referenced.  Since portable code cannot
51669  # rely on this symbol name, it's probably fine to never include it in
51670  # preloaded symbol tables.
51671  # Exclude shared library initialization/finalization symbols.
51672  extract_expsyms_cmds=
51673
51674  case $host_os in
51675  cygwin* | mingw* | pw32* | cegcc*)
51676    # FIXME: the MSVC++ port hasn't been tested in a loooong time
51677    # When not using gcc, we currently assume that we are using
51678    # Microsoft Visual C++.
51679    if test yes != "$GCC"; then
51680      with_gnu_ld=no
51681    fi
51682    ;;
51683  interix*)
51684    # we just hope/assume this is gcc and not c89 (= MSVC++)
51685    with_gnu_ld=yes
51686    ;;
51687  openbsd* | bitrig*)
51688    with_gnu_ld=no
51689    ;;
51690  linux* | k*bsd*-gnu | gnu*)
51691    link_all_deplibs=no
51692    ;;
51693  esac
51694
51695  ld_shlibs=yes
51696
51697  # On some targets, GNU ld is compatible enough with the native linker
51698  # that we're better off using the native interface for both.
51699  lt_use_gnu_ld_interface=no
51700  if test yes = "$with_gnu_ld"; then
51701    case $host_os in
51702      aix*)
51703	# The AIX port of GNU ld has always aspired to compatibility
51704	# with the native linker.  However, as the warning in the GNU ld
51705	# block says, versions before 2.19.5* couldn't really create working
51706	# shared libraries, regardless of the interface used.
51707	case `$LD -v 2>&1` in
51708	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
51709	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
51710	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
51711	  *)
51712	    lt_use_gnu_ld_interface=yes
51713	    ;;
51714	esac
51715	;;
51716      *)
51717	lt_use_gnu_ld_interface=yes
51718	;;
51719    esac
51720  fi
51721
51722  if test yes = "$lt_use_gnu_ld_interface"; then
51723    # If archive_cmds runs LD, not CC, wlarc should be empty
51724    wlarc='$wl'
51725
51726    # Set some defaults for GNU ld with shared library support. These
51727    # are reset later if shared libraries are not supported. Putting them
51728    # here allows them to be overridden if necessary.
51729    runpath_var=LD_RUN_PATH
51730    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
51731    export_dynamic_flag_spec='$wl--export-dynamic'
51732    # ancient GNU ld didn't support --whole-archive et. al.
51733    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
51734      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
51735    else
51736      whole_archive_flag_spec=
51737    fi
51738    supports_anon_versioning=no
51739    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
51740      *GNU\ gold*) supports_anon_versioning=yes ;;
51741      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
51742      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
51743      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
51744      *\ 2.11.*) ;; # other 2.11 versions
51745      *) supports_anon_versioning=yes ;;
51746    esac
51747
51748    # See if GNU ld supports shared libraries.
51749    case $host_os in
51750    aix[3-9]*)
51751      # On AIX/PPC, the GNU linker is very broken
51752      if test ia64 != "$host_cpu"; then
51753	ld_shlibs=no
51754	cat <<_LT_EOF 1>&2
51755
51756*** Warning: the GNU linker, at least up to release 2.19, is reported
51757*** to be unable to reliably create shared libraries on AIX.
51758*** Therefore, libtool is disabling shared libraries support.  If you
51759*** really care for shared libraries, you may want to install binutils
51760*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
51761*** You will then need to restart the configuration process.
51762
51763_LT_EOF
51764      fi
51765      ;;
51766
51767    amigaos*)
51768      case $host_cpu in
51769      powerpc)
51770            # see comment about AmigaOS4 .so support
51771            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51772            archive_expsym_cmds=''
51773        ;;
51774      m68k)
51775            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
51776            hardcode_libdir_flag_spec='-L$libdir'
51777            hardcode_minus_L=yes
51778        ;;
51779      esac
51780      ;;
51781
51782    beos*)
51783      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
51784	allow_undefined_flag=unsupported
51785	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
51786	# support --undefined.  This deserves some investigation.  FIXME
51787	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51788      else
51789	ld_shlibs=no
51790      fi
51791      ;;
51792
51793    cygwin* | mingw* | pw32* | cegcc*)
51794      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
51795      # as there is no search path for DLLs.
51796      hardcode_libdir_flag_spec='-L$libdir'
51797      export_dynamic_flag_spec='$wl--export-all-symbols'
51798      allow_undefined_flag=unsupported
51799      always_export_symbols=no
51800      enable_shared_with_static_runtimes=yes
51801      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
51802      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
51803
51804      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
51805        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
51806	# If the export-symbols file already is a .def file, use it as
51807	# is; otherwise, prepend EXPORTS...
51808	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
51809          cp $export_symbols $output_objdir/$soname.def;
51810        else
51811          echo EXPORTS > $output_objdir/$soname.def;
51812          cat $export_symbols >> $output_objdir/$soname.def;
51813        fi~
51814        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
51815      else
51816	ld_shlibs=no
51817      fi
51818      ;;
51819
51820    haiku*)
51821      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51822      link_all_deplibs=yes
51823      ;;
51824
51825    os2*)
51826      hardcode_libdir_flag_spec='-L$libdir'
51827      hardcode_minus_L=yes
51828      allow_undefined_flag=unsupported
51829      shrext_cmds=.dll
51830      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
51831	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
51832	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
51833	$ECHO EXPORTS >> $output_objdir/$libname.def~
51834	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
51835	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
51836	emximp -o $lib $output_objdir/$libname.def'
51837      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
51838	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
51839	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
51840	$ECHO EXPORTS >> $output_objdir/$libname.def~
51841	prefix_cmds="$SED"~
51842	if test EXPORTS = "`$SED 1q $export_symbols`"; then
51843	  prefix_cmds="$prefix_cmds -e 1d";
51844	fi~
51845	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
51846	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
51847	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
51848	emximp -o $lib $output_objdir/$libname.def'
51849      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
51850      enable_shared_with_static_runtimes=yes
51851      ;;
51852
51853    interix[3-9]*)
51854      hardcode_direct=no
51855      hardcode_shlibpath_var=no
51856      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
51857      export_dynamic_flag_spec='$wl-E'
51858      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
51859      # Instead, shared libraries are loaded at an image base (0x10000000 by
51860      # default) and relocated if they conflict, which is a slow very memory
51861      # consuming and fragmenting process.  To avoid this, we pick a random,
51862      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
51863      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
51864      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
51865      archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
51866      ;;
51867
51868    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
51869      tmp_diet=no
51870      if test linux-dietlibc = "$host_os"; then
51871	case $cc_basename in
51872	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
51873	esac
51874      fi
51875      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
51876	 && test no = "$tmp_diet"
51877      then
51878	tmp_addflag=' $pic_flag'
51879	tmp_sharedflag='-shared'
51880	case $cc_basename,$host_cpu in
51881        pgcc*)				# Portland Group C compiler
51882	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
51883	  tmp_addflag=' $pic_flag'
51884	  ;;
51885	pgf77* | pgf90* | pgf95* | pgfortran*)
51886					# Portland Group f77 and f90 compilers
51887	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
51888	  tmp_addflag=' $pic_flag -Mnomain' ;;
51889	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
51890	  tmp_addflag=' -i_dynamic' ;;
51891	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
51892	  tmp_addflag=' -i_dynamic -nofor_main' ;;
51893	ifc* | ifort*)			# Intel Fortran compiler
51894	  tmp_addflag=' -nofor_main' ;;
51895	lf95*)				# Lahey Fortran 8.1
51896	  whole_archive_flag_spec=
51897	  tmp_sharedflag='--shared' ;;
51898        nagfor*)                        # NAGFOR 5.3
51899          tmp_sharedflag='-Wl,-shared' ;;
51900	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
51901	  tmp_sharedflag='-qmkshrobj'
51902	  tmp_addflag= ;;
51903	nvcc*)	# Cuda Compiler Driver 2.2
51904	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
51905	  compiler_needs_object=yes
51906	  ;;
51907	esac
51908	case `$CC -V 2>&1 | sed 5q` in
51909	*Sun\ C*)			# Sun C 5.9
51910	  whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
51911	  compiler_needs_object=yes
51912	  tmp_sharedflag='-G' ;;
51913	*Sun\ F*)			# Sun Fortran 8.3
51914	  tmp_sharedflag='-G' ;;
51915	esac
51916	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51917
51918        if test yes = "$supports_anon_versioning"; then
51919          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
51920            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
51921            echo "local: *; };" >> $output_objdir/$libname.ver~
51922            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
51923        fi
51924
51925	case $cc_basename in
51926	tcc*)
51927	  export_dynamic_flag_spec='-rdynamic'
51928	  ;;
51929	xlf* | bgf* | bgxlf* | mpixlf*)
51930	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
51931	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
51932	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
51933	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
51934	  if test yes = "$supports_anon_versioning"; then
51935	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
51936              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
51937              echo "local: *; };" >> $output_objdir/$libname.ver~
51938              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
51939	  fi
51940	  ;;
51941	esac
51942      else
51943        ld_shlibs=no
51944      fi
51945      ;;
51946
51947    netbsd* | netbsdelf*-gnu)
51948      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
51949	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
51950	wlarc=
51951      else
51952	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51953	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
51954      fi
51955      ;;
51956
51957    solaris*)
51958      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
51959	ld_shlibs=no
51960	cat <<_LT_EOF 1>&2
51961
51962*** Warning: The releases 2.8.* of the GNU linker cannot reliably
51963*** create shared libraries on Solaris systems.  Therefore, libtool
51964*** is disabling shared libraries support.  We urge you to upgrade GNU
51965*** binutils to release 2.9.1 or newer.  Another option is to modify
51966*** your PATH or compiler configuration so that the native linker is
51967*** used, and then restart.
51968
51969_LT_EOF
51970      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
51971	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51972	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
51973      else
51974	ld_shlibs=no
51975      fi
51976      ;;
51977
51978    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
51979      case `$LD -v 2>&1` in
51980        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
51981	ld_shlibs=no
51982	cat <<_LT_EOF 1>&2
51983
51984*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
51985*** reliably create shared libraries on SCO systems.  Therefore, libtool
51986*** is disabling shared libraries support.  We urge you to upgrade GNU
51987*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
51988*** your PATH or compiler configuration so that the native linker is
51989*** used, and then restart.
51990
51991_LT_EOF
51992	;;
51993	*)
51994	  # For security reasons, it is highly recommended that you always
51995	  # use absolute paths for naming shared libraries, and exclude the
51996	  # DT_RUNPATH tag from executables and libraries.  But doing so
51997	  # requires that you compile everything twice, which is a pain.
51998	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
51999	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
52000	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52001	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
52002	  else
52003	    ld_shlibs=no
52004	  fi
52005	;;
52006      esac
52007      ;;
52008
52009    sunos4*)
52010      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
52011      wlarc=
52012      hardcode_direct=yes
52013      hardcode_shlibpath_var=no
52014      ;;
52015
52016    *)
52017      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
52018	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52019	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
52020      else
52021	ld_shlibs=no
52022      fi
52023      ;;
52024    esac
52025
52026    if test no = "$ld_shlibs"; then
52027      runpath_var=
52028      hardcode_libdir_flag_spec=
52029      export_dynamic_flag_spec=
52030      whole_archive_flag_spec=
52031    fi
52032  else
52033    # PORTME fill in a description of your system's linker (not GNU ld)
52034    case $host_os in
52035    aix3*)
52036      allow_undefined_flag=unsupported
52037      always_export_symbols=yes
52038      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
52039      # Note: this linker hardcodes the directories in LIBPATH if there
52040      # are no directories specified by -L.
52041      hardcode_minus_L=yes
52042      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
52043	# Neither direct hardcoding nor static linking is supported with a
52044	# broken collect2.
52045	hardcode_direct=unsupported
52046      fi
52047      ;;
52048
52049    aix[4-9]*)
52050      if test ia64 = "$host_cpu"; then
52051	# On IA64, the linker does run time linking by default, so we don't
52052	# have to do anything special.
52053	aix_use_runtimelinking=no
52054	exp_sym_flag='-Bexport'
52055	no_entry_flag=
52056      else
52057	# If we're using GNU nm, then we don't want the "-C" option.
52058	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
52059	# Without the "-l" option, or with the "-B" option, AIX nm treats
52060	# weak defined symbols like other global defined symbols, whereas
52061	# GNU nm marks them as "W".
52062	# While the 'weak' keyword is ignored in the Export File, we need
52063	# it in the Import File for the 'aix-soname' feature, so we have
52064	# to replace the "-B" option with "-P" for AIX nm.
52065	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
52066	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
52067	else
52068	  export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
52069	fi
52070	aix_use_runtimelinking=no
52071
52072	# Test if we are trying to use run time linking or normal
52073	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
52074	# have runtime linking enabled, and use it for executables.
52075	# For shared libraries, we enable/disable runtime linking
52076	# depending on the kind of the shared library created -
52077	# when "with_aix_soname,aix_use_runtimelinking" is:
52078	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
52079	# "aix,yes"  lib.so          shared, rtl:yes, for executables
52080	#            lib.a           static archive
52081	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
52082	#            lib.a(lib.so.V) shared, rtl:no,  for executables
52083	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
52084	#            lib.a(lib.so.V) shared, rtl:no
52085	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
52086	#            lib.a           static archive
52087	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
52088	  for ld_flag in $LDFLAGS; do
52089	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
52090	    aix_use_runtimelinking=yes
52091	    break
52092	  fi
52093	  done
52094	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
52095	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
52096	    # so we don't have lib.a shared libs to link our executables.
52097	    # We have to force runtime linking in this case.
52098	    aix_use_runtimelinking=yes
52099	    LDFLAGS="$LDFLAGS -Wl,-brtl"
52100	  fi
52101	  ;;
52102	esac
52103
52104	exp_sym_flag='-bexport'
52105	no_entry_flag='-bnoentry'
52106      fi
52107
52108      # When large executables or shared objects are built, AIX ld can
52109      # have problems creating the table of contents.  If linking a library
52110      # or program results in "error TOC overflow" add -mminimal-toc to
52111      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
52112      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
52113
52114      archive_cmds=''
52115      hardcode_direct=yes
52116      hardcode_direct_absolute=yes
52117      hardcode_libdir_separator=':'
52118      link_all_deplibs=yes
52119      file_list_spec='$wl-f,'
52120      case $with_aix_soname,$aix_use_runtimelinking in
52121      aix,*) ;; # traditional, no import file
52122      svr4,* | *,yes) # use import file
52123	# The Import File defines what to hardcode.
52124	hardcode_direct=no
52125	hardcode_direct_absolute=no
52126	;;
52127      esac
52128
52129      if test yes = "$GCC"; then
52130	case $host_os in aix4.[012]|aix4.[012].*)
52131	# We only want to do this on AIX 4.2 and lower, the check
52132	# below for broken collect2 doesn't work under 4.3+
52133	  collect2name=`$CC -print-prog-name=collect2`
52134	  if test -f "$collect2name" &&
52135	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
52136	  then
52137	  # We have reworked collect2
52138	  :
52139	  else
52140	  # We have old collect2
52141	  hardcode_direct=unsupported
52142	  # It fails to find uninstalled libraries when the uninstalled
52143	  # path is not listed in the libpath.  Setting hardcode_minus_L
52144	  # to unsupported forces relinking
52145	  hardcode_minus_L=yes
52146	  hardcode_libdir_flag_spec='-L$libdir'
52147	  hardcode_libdir_separator=
52148	  fi
52149	  ;;
52150	esac
52151	shared_flag='-shared'
52152	if test yes = "$aix_use_runtimelinking"; then
52153	  shared_flag="$shared_flag "'$wl-G'
52154	fi
52155	# Need to ensure runtime linking is disabled for the traditional
52156	# shared library, or the linker may eventually find shared libraries
52157	# /with/ Import File - we do not want to mix them.
52158	shared_flag_aix='-shared'
52159	shared_flag_svr4='-shared $wl-G'
52160      else
52161	# not using gcc
52162	if test ia64 = "$host_cpu"; then
52163	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
52164	# chokes on -Wl,-G. The following line is correct:
52165	  shared_flag='-G'
52166	else
52167	  if test yes = "$aix_use_runtimelinking"; then
52168	    shared_flag='$wl-G'
52169	  else
52170	    shared_flag='$wl-bM:SRE'
52171	  fi
52172	  shared_flag_aix='$wl-bM:SRE'
52173	  shared_flag_svr4='$wl-G'
52174	fi
52175      fi
52176
52177      export_dynamic_flag_spec='$wl-bexpall'
52178      # It seems that -bexpall does not export symbols beginning with
52179      # underscore (_), so it is better to generate a list of symbols to export.
52180      always_export_symbols=yes
52181      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
52182	# Warning - without using the other runtime loading flags (-brtl),
52183	# -berok will link without error, but may produce a broken library.
52184	allow_undefined_flag='-berok'
52185        # Determine the default libpath from the value encoded in an
52186        # empty executable.
52187        if test set = "${lt_cv_aix_libpath+set}"; then
52188  aix_libpath=$lt_cv_aix_libpath
52189else
52190  if test ${lt_cv_aix_libpath_+y}
52191then :
52192  printf %s "(cached) " >&6
52193else $as_nop
52194  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52195/* end confdefs.h.  */
52196
52197int
52198main (void)
52199{
52200
52201  ;
52202  return 0;
52203}
52204_ACEOF
52205if ac_fn_c_try_link "$LINENO"
52206then :
52207
52208  lt_aix_libpath_sed='
52209      /Import File Strings/,/^$/ {
52210	  /^0/ {
52211	      s/^0  *\([^ ]*\) *$/\1/
52212	      p
52213	  }
52214      }'
52215  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
52216  # Check for a 64-bit object if we didn't find anything.
52217  if test -z "$lt_cv_aix_libpath_"; then
52218    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
52219  fi
52220fi
52221rm -f core conftest.err conftest.$ac_objext conftest.beam \
52222    conftest$ac_exeext conftest.$ac_ext
52223  if test -z "$lt_cv_aix_libpath_"; then
52224    lt_cv_aix_libpath_=/usr/lib:/lib
52225  fi
52226
52227fi
52228
52229  aix_libpath=$lt_cv_aix_libpath_
52230fi
52231
52232        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
52233        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
52234      else
52235	if test ia64 = "$host_cpu"; then
52236	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
52237	  allow_undefined_flag="-z nodefs"
52238	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
52239	else
52240	 # Determine the default libpath from the value encoded in an
52241	 # empty executable.
52242	 if test set = "${lt_cv_aix_libpath+set}"; then
52243  aix_libpath=$lt_cv_aix_libpath
52244else
52245  if test ${lt_cv_aix_libpath_+y}
52246then :
52247  printf %s "(cached) " >&6
52248else $as_nop
52249  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52250/* end confdefs.h.  */
52251
52252int
52253main (void)
52254{
52255
52256  ;
52257  return 0;
52258}
52259_ACEOF
52260if ac_fn_c_try_link "$LINENO"
52261then :
52262
52263  lt_aix_libpath_sed='
52264      /Import File Strings/,/^$/ {
52265	  /^0/ {
52266	      s/^0  *\([^ ]*\) *$/\1/
52267	      p
52268	  }
52269      }'
52270  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
52271  # Check for a 64-bit object if we didn't find anything.
52272  if test -z "$lt_cv_aix_libpath_"; then
52273    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
52274  fi
52275fi
52276rm -f core conftest.err conftest.$ac_objext conftest.beam \
52277    conftest$ac_exeext conftest.$ac_ext
52278  if test -z "$lt_cv_aix_libpath_"; then
52279    lt_cv_aix_libpath_=/usr/lib:/lib
52280  fi
52281
52282fi
52283
52284  aix_libpath=$lt_cv_aix_libpath_
52285fi
52286
52287	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
52288	  # Warning - without using the other run time loading flags,
52289	  # -berok will link without error, but may produce a broken library.
52290	  no_undefined_flag=' $wl-bernotok'
52291	  allow_undefined_flag=' $wl-berok'
52292	  if test yes = "$with_gnu_ld"; then
52293	    # We only use this code for GNU lds that support --whole-archive.
52294	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
52295	  else
52296	    # Exported symbols can be pulled into shared objects from archives
52297	    whole_archive_flag_spec='$convenience'
52298	  fi
52299	  archive_cmds_need_lc=yes
52300	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
52301	  # -brtl affects multiple linker settings, -berok does not and is overridden later
52302	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
52303	  if test svr4 != "$with_aix_soname"; then
52304	    # This is similar to how AIX traditionally builds its shared libraries.
52305	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
52306	  fi
52307	  if test aix != "$with_aix_soname"; then
52308	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
52309	  else
52310	    # used by -dlpreopen to get the symbols
52311	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
52312	  fi
52313	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
52314	fi
52315      fi
52316      ;;
52317
52318    amigaos*)
52319      case $host_cpu in
52320      powerpc)
52321            # see comment about AmigaOS4 .so support
52322            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
52323            archive_expsym_cmds=''
52324        ;;
52325      m68k)
52326            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
52327            hardcode_libdir_flag_spec='-L$libdir'
52328            hardcode_minus_L=yes
52329        ;;
52330      esac
52331      ;;
52332
52333    bsdi[45]*)
52334      export_dynamic_flag_spec=-rdynamic
52335      ;;
52336
52337    cygwin* | mingw* | pw32* | cegcc*)
52338      # When not using gcc, we currently assume that we are using
52339      # Microsoft Visual C++.
52340      # hardcode_libdir_flag_spec is actually meaningless, as there is
52341      # no search path for DLLs.
52342      case $cc_basename in
52343      cl*)
52344	# Native MSVC
52345	hardcode_libdir_flag_spec=' '
52346	allow_undefined_flag=unsupported
52347	always_export_symbols=yes
52348	file_list_spec='@'
52349	# Tell ltmain to make .lib files, not .a files.
52350	libext=lib
52351	# Tell ltmain to make .dll files, not .so files.
52352	shrext_cmds=.dll
52353	# FIXME: Setting linknames here is a bad hack.
52354	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
52355	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
52356            cp "$export_symbols" "$output_objdir/$soname.def";
52357            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
52358          else
52359            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
52360          fi~
52361          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
52362          linknames='
52363	# The linker will not automatically build a static lib if we build a DLL.
52364	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
52365	enable_shared_with_static_runtimes=yes
52366	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
52367	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
52368	# Don't use ranlib
52369	old_postinstall_cmds='chmod 644 $oldlib'
52370	postlink_cmds='lt_outputfile="@OUTPUT@"~
52371          lt_tool_outputfile="@TOOL_OUTPUT@"~
52372          case $lt_outputfile in
52373            *.exe|*.EXE) ;;
52374            *)
52375              lt_outputfile=$lt_outputfile.exe
52376              lt_tool_outputfile=$lt_tool_outputfile.exe
52377              ;;
52378          esac~
52379          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
52380            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
52381            $RM "$lt_outputfile.manifest";
52382          fi'
52383	;;
52384      *)
52385	# Assume MSVC wrapper
52386	hardcode_libdir_flag_spec=' '
52387	allow_undefined_flag=unsupported
52388	# Tell ltmain to make .lib files, not .a files.
52389	libext=lib
52390	# Tell ltmain to make .dll files, not .so files.
52391	shrext_cmds=.dll
52392	# FIXME: Setting linknames here is a bad hack.
52393	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
52394	# The linker will automatically build a .lib file if we build a DLL.
52395	old_archive_from_new_cmds='true'
52396	# FIXME: Should let the user specify the lib program.
52397	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
52398	enable_shared_with_static_runtimes=yes
52399	;;
52400      esac
52401      ;;
52402
52403    darwin* | rhapsody*)
52404
52405
52406  archive_cmds_need_lc=no
52407  hardcode_direct=no
52408  hardcode_automatic=yes
52409  hardcode_shlibpath_var=unsupported
52410  if test yes = "$lt_cv_ld_force_load"; then
52411    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
52412
52413  else
52414    whole_archive_flag_spec=''
52415  fi
52416  link_all_deplibs=yes
52417  allow_undefined_flag=$_lt_dar_allow_undefined
52418  case $cc_basename in
52419     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
52420     *) _lt_dar_can_shared=$GCC ;;
52421  esac
52422  if test yes = "$_lt_dar_can_shared"; then
52423    output_verbose_link_cmd=func_echo_all
52424    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
52425    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
52426    archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
52427    module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
52428
52429  else
52430  ld_shlibs=no
52431  fi
52432
52433      ;;
52434
52435    dgux*)
52436      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
52437      hardcode_libdir_flag_spec='-L$libdir'
52438      hardcode_shlibpath_var=no
52439      ;;
52440
52441    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
52442    # support.  Future versions do this automatically, but an explicit c++rt0.o
52443    # does not break anything, and helps significantly (at the cost of a little
52444    # extra space).
52445    freebsd2.2*)
52446      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
52447      hardcode_libdir_flag_spec='-R$libdir'
52448      hardcode_direct=yes
52449      hardcode_shlibpath_var=no
52450      ;;
52451
52452    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
52453    freebsd2.*)
52454      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
52455      hardcode_direct=yes
52456      hardcode_minus_L=yes
52457      hardcode_shlibpath_var=no
52458      ;;
52459
52460    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
52461    freebsd* | dragonfly*)
52462      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
52463      hardcode_libdir_flag_spec='-R$libdir'
52464      hardcode_direct=yes
52465      hardcode_shlibpath_var=no
52466      ;;
52467
52468    hpux9*)
52469      if test yes = "$GCC"; then
52470	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
52471      else
52472	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
52473      fi
52474      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
52475      hardcode_libdir_separator=:
52476      hardcode_direct=yes
52477
52478      # hardcode_minus_L: Not really in the search PATH,
52479      # but as the default location of the library.
52480      hardcode_minus_L=yes
52481      export_dynamic_flag_spec='$wl-E'
52482      ;;
52483
52484    hpux10*)
52485      if test yes,no = "$GCC,$with_gnu_ld"; then
52486	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
52487      else
52488	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
52489      fi
52490      if test no = "$with_gnu_ld"; then
52491	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
52492	hardcode_libdir_separator=:
52493	hardcode_direct=yes
52494	hardcode_direct_absolute=yes
52495	export_dynamic_flag_spec='$wl-E'
52496	# hardcode_minus_L: Not really in the search PATH,
52497	# but as the default location of the library.
52498	hardcode_minus_L=yes
52499      fi
52500      ;;
52501
52502    hpux11*)
52503      if test yes,no = "$GCC,$with_gnu_ld"; then
52504	case $host_cpu in
52505	hppa*64*)
52506	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
52507	  ;;
52508	ia64*)
52509	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
52510	  ;;
52511	*)
52512	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
52513	  ;;
52514	esac
52515      else
52516	case $host_cpu in
52517	hppa*64*)
52518	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
52519	  ;;
52520	ia64*)
52521	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
52522	  ;;
52523	*)
52524
52525	  # Older versions of the 11.00 compiler do not understand -b yet
52526	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
52527	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
52528printf %s "checking if $CC understands -b... " >&6; }
52529if test ${lt_cv_prog_compiler__b+y}
52530then :
52531  printf %s "(cached) " >&6
52532else $as_nop
52533  lt_cv_prog_compiler__b=no
52534   save_LDFLAGS=$LDFLAGS
52535   LDFLAGS="$LDFLAGS -b"
52536   echo "$lt_simple_link_test_code" > conftest.$ac_ext
52537   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
52538     # The linker can only warn and ignore the option if not recognized
52539     # So say no if there are warnings
52540     if test -s conftest.err; then
52541       # Append any errors to the config.log.
52542       cat conftest.err 1>&5
52543       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
52544       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
52545       if diff conftest.exp conftest.er2 >/dev/null; then
52546         lt_cv_prog_compiler__b=yes
52547       fi
52548     else
52549       lt_cv_prog_compiler__b=yes
52550     fi
52551   fi
52552   $RM -r conftest*
52553   LDFLAGS=$save_LDFLAGS
52554
52555fi
52556{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
52557printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
52558
52559if test yes = "$lt_cv_prog_compiler__b"; then
52560    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
52561else
52562    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
52563fi
52564
52565	  ;;
52566	esac
52567      fi
52568      if test no = "$with_gnu_ld"; then
52569	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
52570	hardcode_libdir_separator=:
52571
52572	case $host_cpu in
52573	hppa*64*|ia64*)
52574	  hardcode_direct=no
52575	  hardcode_shlibpath_var=no
52576	  ;;
52577	*)
52578	  hardcode_direct=yes
52579	  hardcode_direct_absolute=yes
52580	  export_dynamic_flag_spec='$wl-E'
52581
52582	  # hardcode_minus_L: Not really in the search PATH,
52583	  # but as the default location of the library.
52584	  hardcode_minus_L=yes
52585	  ;;
52586	esac
52587      fi
52588      ;;
52589
52590    irix5* | irix6* | nonstopux*)
52591      if test yes = "$GCC"; then
52592	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
52593	# Try to use the -exported_symbol ld option, if it does not
52594	# work, assume that -exports_file does not work either and
52595	# implicitly export all symbols.
52596	# This should be the same for all languages, so no per-tag cache variable.
52597	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
52598printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
52599if test ${lt_cv_irix_exported_symbol+y}
52600then :
52601  printf %s "(cached) " >&6
52602else $as_nop
52603  save_LDFLAGS=$LDFLAGS
52604	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
52605	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52606/* end confdefs.h.  */
52607int foo (void) { return 0; }
52608_ACEOF
52609if ac_fn_c_try_link "$LINENO"
52610then :
52611  lt_cv_irix_exported_symbol=yes
52612else $as_nop
52613  lt_cv_irix_exported_symbol=no
52614fi
52615rm -f core conftest.err conftest.$ac_objext conftest.beam \
52616    conftest$ac_exeext conftest.$ac_ext
52617           LDFLAGS=$save_LDFLAGS
52618fi
52619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
52620printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
52621	if test yes = "$lt_cv_irix_exported_symbol"; then
52622          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
52623	fi
52624	link_all_deplibs=no
52625      else
52626	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
52627	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
52628      fi
52629      archive_cmds_need_lc='no'
52630      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
52631      hardcode_libdir_separator=:
52632      inherit_rpath=yes
52633      link_all_deplibs=yes
52634      ;;
52635
52636    linux*)
52637      case $cc_basename in
52638      tcc*)
52639	# Fabrice Bellard et al's Tiny C Compiler
52640	ld_shlibs=yes
52641	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
52642	;;
52643      esac
52644      ;;
52645
52646    netbsd* | netbsdelf*-gnu)
52647      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
52648	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
52649      else
52650	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
52651      fi
52652      hardcode_libdir_flag_spec='-R$libdir'
52653      hardcode_direct=yes
52654      hardcode_shlibpath_var=no
52655      ;;
52656
52657    newsos6)
52658      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
52659      hardcode_direct=yes
52660      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
52661      hardcode_libdir_separator=:
52662      hardcode_shlibpath_var=no
52663      ;;
52664
52665    *nto* | *qnx*)
52666      ;;
52667
52668    openbsd* | bitrig*)
52669      if test -f /usr/libexec/ld.so; then
52670	hardcode_direct=yes
52671	hardcode_shlibpath_var=no
52672	hardcode_direct_absolute=yes
52673	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
52674	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
52675	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
52676	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
52677	  export_dynamic_flag_spec='$wl-E'
52678	else
52679	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
52680	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
52681	fi
52682      else
52683	ld_shlibs=no
52684      fi
52685      ;;
52686
52687    os2*)
52688      hardcode_libdir_flag_spec='-L$libdir'
52689      hardcode_minus_L=yes
52690      allow_undefined_flag=unsupported
52691      shrext_cmds=.dll
52692      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
52693	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
52694	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
52695	$ECHO EXPORTS >> $output_objdir/$libname.def~
52696	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
52697	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
52698	emximp -o $lib $output_objdir/$libname.def'
52699      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
52700	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
52701	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
52702	$ECHO EXPORTS >> $output_objdir/$libname.def~
52703	prefix_cmds="$SED"~
52704	if test EXPORTS = "`$SED 1q $export_symbols`"; then
52705	  prefix_cmds="$prefix_cmds -e 1d";
52706	fi~
52707	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
52708	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
52709	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
52710	emximp -o $lib $output_objdir/$libname.def'
52711      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
52712      enable_shared_with_static_runtimes=yes
52713      ;;
52714
52715    osf3*)
52716      if test yes = "$GCC"; then
52717	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
52718	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
52719      else
52720	allow_undefined_flag=' -expect_unresolved \*'
52721	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
52722      fi
52723      archive_cmds_need_lc='no'
52724      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
52725      hardcode_libdir_separator=:
52726      ;;
52727
52728    osf4* | osf5*)	# as osf3* with the addition of -msym flag
52729      if test yes = "$GCC"; then
52730	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
52731	archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
52732	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
52733      else
52734	allow_undefined_flag=' -expect_unresolved \*'
52735	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
52736	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
52737          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
52738
52739	# Both c and cxx compiler support -rpath directly
52740	hardcode_libdir_flag_spec='-rpath $libdir'
52741      fi
52742      archive_cmds_need_lc='no'
52743      hardcode_libdir_separator=:
52744      ;;
52745
52746    solaris*)
52747      no_undefined_flag=' -z defs'
52748      if test yes = "$GCC"; then
52749	wlarc='$wl'
52750	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
52751	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
52752          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
52753      else
52754	case `$CC -V 2>&1` in
52755	*"Compilers 5.0"*)
52756	  wlarc=''
52757	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
52758	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
52759            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
52760	  ;;
52761	*)
52762	  wlarc='$wl'
52763	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
52764	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
52765            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
52766	  ;;
52767	esac
52768      fi
52769      hardcode_libdir_flag_spec='-R$libdir'
52770      hardcode_shlibpath_var=no
52771      case $host_os in
52772      solaris2.[0-5] | solaris2.[0-5].*) ;;
52773      *)
52774	# The compiler driver will combine and reorder linker options,
52775	# but understands '-z linker_flag'.  GCC discards it without '$wl',
52776	# but is careful enough not to reorder.
52777	# Supported since Solaris 2.6 (maybe 2.5.1?)
52778	if test yes = "$GCC"; then
52779	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
52780	else
52781	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
52782	fi
52783	;;
52784      esac
52785      link_all_deplibs=yes
52786      ;;
52787
52788    sunos4*)
52789      if test sequent = "$host_vendor"; then
52790	# Use $CC to link under sequent, because it throws in some extra .o
52791	# files that make .init and .fini sections work.
52792	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
52793      else
52794	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
52795      fi
52796      hardcode_libdir_flag_spec='-L$libdir'
52797      hardcode_direct=yes
52798      hardcode_minus_L=yes
52799      hardcode_shlibpath_var=no
52800      ;;
52801
52802    sysv4)
52803      case $host_vendor in
52804	sni)
52805	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
52806	  hardcode_direct=yes # is this really true???
52807	;;
52808	siemens)
52809	  ## LD is ld it makes a PLAMLIB
52810	  ## CC just makes a GrossModule.
52811	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
52812	  reload_cmds='$CC -r -o $output$reload_objs'
52813	  hardcode_direct=no
52814        ;;
52815	motorola)
52816	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
52817	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
52818	;;
52819      esac
52820      runpath_var='LD_RUN_PATH'
52821      hardcode_shlibpath_var=no
52822      ;;
52823
52824    sysv4.3*)
52825      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
52826      hardcode_shlibpath_var=no
52827      export_dynamic_flag_spec='-Bexport'
52828      ;;
52829
52830    sysv4*MP*)
52831      if test -d /usr/nec; then
52832	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
52833	hardcode_shlibpath_var=no
52834	runpath_var=LD_RUN_PATH
52835	hardcode_runpath_var=yes
52836	ld_shlibs=yes
52837      fi
52838      ;;
52839
52840    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
52841      no_undefined_flag='$wl-z,text'
52842      archive_cmds_need_lc=no
52843      hardcode_shlibpath_var=no
52844      runpath_var='LD_RUN_PATH'
52845
52846      if test yes = "$GCC"; then
52847	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
52848	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
52849      else
52850	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
52851	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
52852      fi
52853      ;;
52854
52855    sysv5* | sco3.2v5* | sco5v6*)
52856      # Note: We CANNOT use -z defs as we might desire, because we do not
52857      # link with -lc, and that would cause any symbols used from libc to
52858      # always be unresolved, which means just about no library would
52859      # ever link correctly.  If we're not using GNU ld we use -z text
52860      # though, which does catch some bad symbols but isn't as heavy-handed
52861      # as -z defs.
52862      no_undefined_flag='$wl-z,text'
52863      allow_undefined_flag='$wl-z,nodefs'
52864      archive_cmds_need_lc=no
52865      hardcode_shlibpath_var=no
52866      hardcode_libdir_flag_spec='$wl-R,$libdir'
52867      hardcode_libdir_separator=':'
52868      link_all_deplibs=yes
52869      export_dynamic_flag_spec='$wl-Bexport'
52870      runpath_var='LD_RUN_PATH'
52871
52872      if test yes = "$GCC"; then
52873	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
52874	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
52875      else
52876	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
52877	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
52878      fi
52879      ;;
52880
52881    uts4*)
52882      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
52883      hardcode_libdir_flag_spec='-L$libdir'
52884      hardcode_shlibpath_var=no
52885      ;;
52886
52887    *)
52888      ld_shlibs=no
52889      ;;
52890    esac
52891
52892    if test sni = "$host_vendor"; then
52893      case $host in
52894      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
52895	export_dynamic_flag_spec='$wl-Blargedynsym'
52896	;;
52897      esac
52898    fi
52899  fi
52900
52901{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
52902printf "%s\n" "$ld_shlibs" >&6; }
52903test no = "$ld_shlibs" && can_build_shared=no
52904
52905with_gnu_ld=$with_gnu_ld
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915
52916
52917
52918
52919
52920
52921#
52922# Do we need to explicitly link libc?
52923#
52924case "x$archive_cmds_need_lc" in
52925x|xyes)
52926  # Assume -lc should be added
52927  archive_cmds_need_lc=yes
52928
52929  if test yes,yes = "$GCC,$enable_shared"; then
52930    case $archive_cmds in
52931    *'~'*)
52932      # FIXME: we may have to deal with multi-command sequences.
52933      ;;
52934    '$CC '*)
52935      # Test whether the compiler implicitly links with -lc since on some
52936      # systems, -lgcc has to come before -lc. If gcc already passes -lc
52937      # to ld, don't add -lc before -lgcc.
52938      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
52939printf %s "checking whether -lc should be explicitly linked in... " >&6; }
52940if test ${lt_cv_archive_cmds_need_lc+y}
52941then :
52942  printf %s "(cached) " >&6
52943else $as_nop
52944  $RM conftest*
52945	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
52946
52947	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
52948  (eval $ac_compile) 2>&5
52949  ac_status=$?
52950  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52951  test $ac_status = 0; } 2>conftest.err; then
52952	  soname=conftest
52953	  lib=conftest
52954	  libobjs=conftest.$ac_objext
52955	  deplibs=
52956	  wl=$lt_prog_compiler_wl
52957	  pic_flag=$lt_prog_compiler_pic
52958	  compiler_flags=-v
52959	  linker_flags=-v
52960	  verstring=
52961	  output_objdir=.
52962	  libname=conftest
52963	  lt_save_allow_undefined_flag=$allow_undefined_flag
52964	  allow_undefined_flag=
52965	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
52966  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
52967  ac_status=$?
52968  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52969  test $ac_status = 0; }
52970	  then
52971	    lt_cv_archive_cmds_need_lc=no
52972	  else
52973	    lt_cv_archive_cmds_need_lc=yes
52974	  fi
52975	  allow_undefined_flag=$lt_save_allow_undefined_flag
52976	else
52977	  cat conftest.err 1>&5
52978	fi
52979	$RM conftest*
52980
52981fi
52982{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
52983printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
52984      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
52985      ;;
52986    esac
52987  fi
52988  ;;
52989esac
52990
52991
52992
52993
52994
52995
52996
52997
52998
52999
53000
53001
53002
53003
53004
53005
53006
53007
53008
53009
53010
53011
53012
53013
53014
53015
53016
53017
53018
53019
53020
53021
53022
53023
53024
53025
53026
53027
53028
53029
53030
53031
53032
53033
53034
53035
53036
53037
53038
53039
53040
53041
53042
53043
53044
53045
53046
53047
53048
53049
53050
53051
53052
53053
53054
53055
53056
53057
53058
53059
53060
53061
53062
53063
53064
53065
53066
53067
53068
53069
53070
53071
53072
53073
53074
53075
53076
53077
53078
53079
53080
53081
53082
53083
53084
53085
53086
53087
53088
53089
53090
53091
53092
53093
53094
53095
53096
53097
53098
53099
53100
53101
53102
53103
53104
53105
53106
53107
53108
53109
53110
53111
53112
53113
53114
53115
53116
53117
53118
53119
53120
53121
53122
53123
53124
53125
53126
53127
53128
53129
53130
53131
53132
53133
53134
53135
53136
53137
53138
53139
53140
53141
53142  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
53143printf %s "checking dynamic linker characteristics... " >&6; }
53144
53145if test yes = "$GCC"; then
53146  case $host_os in
53147    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
53148    *) lt_awk_arg='/^libraries:/' ;;
53149  esac
53150  case $host_os in
53151    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
53152    *) lt_sed_strip_eq='s|=/|/|g' ;;
53153  esac
53154  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
53155  case $lt_search_path_spec in
53156  *\;*)
53157    # if the path contains ";" then we assume it to be the separator
53158    # otherwise default to the standard path separator (i.e. ":") - it is
53159    # assumed that no part of a normal pathname contains ";" but that should
53160    # okay in the real world where ";" in dirpaths is itself problematic.
53161    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
53162    ;;
53163  *)
53164    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
53165    ;;
53166  esac
53167  # Ok, now we have the path, separated by spaces, we can step through it
53168  # and add multilib dir if necessary...
53169  lt_tmp_lt_search_path_spec=
53170  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
53171  # ...but if some path component already ends with the multilib dir we assume
53172  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
53173  case "$lt_multi_os_dir; $lt_search_path_spec " in
53174  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
53175    lt_multi_os_dir=
53176    ;;
53177  esac
53178  for lt_sys_path in $lt_search_path_spec; do
53179    if test -d "$lt_sys_path$lt_multi_os_dir"; then
53180      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
53181    elif test -n "$lt_multi_os_dir"; then
53182      test -d "$lt_sys_path" && \
53183	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
53184    fi
53185  done
53186  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
53187BEGIN {RS = " "; FS = "/|\n";} {
53188  lt_foo = "";
53189  lt_count = 0;
53190  for (lt_i = NF; lt_i > 0; lt_i--) {
53191    if ($lt_i != "" && $lt_i != ".") {
53192      if ($lt_i == "..") {
53193        lt_count++;
53194      } else {
53195        if (lt_count == 0) {
53196          lt_foo = "/" $lt_i lt_foo;
53197        } else {
53198          lt_count--;
53199        }
53200      }
53201    }
53202  }
53203  if (lt_foo != "") { lt_freq[lt_foo]++; }
53204  if (lt_freq[lt_foo] == 1) { print lt_foo; }
53205}'`
53206  # AWK program above erroneously prepends '/' to C:/dos/paths
53207  # for these hosts.
53208  case $host_os in
53209    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
53210      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
53211  esac
53212  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
53213else
53214  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
53215fi
53216library_names_spec=
53217libname_spec='lib$name'
53218soname_spec=
53219shrext_cmds=.so
53220postinstall_cmds=
53221postuninstall_cmds=
53222finish_cmds=
53223finish_eval=
53224shlibpath_var=
53225shlibpath_overrides_runpath=unknown
53226version_type=none
53227dynamic_linker="$host_os ld.so"
53228sys_lib_dlsearch_path_spec="/lib /usr/lib"
53229need_lib_prefix=unknown
53230hardcode_into_libs=no
53231
53232# when you set need_version to no, make sure it does not cause -set_version
53233# flags to be left without arguments
53234need_version=unknown
53235
53236
53237
53238case $host_os in
53239aix3*)
53240  version_type=linux # correct to gnu/linux during the next big refactor
53241  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
53242  shlibpath_var=LIBPATH
53243
53244  # AIX 3 has no versioning support, so we append a major version to the name.
53245  soname_spec='$libname$release$shared_ext$major'
53246  ;;
53247
53248aix[4-9]*)
53249  version_type=linux # correct to gnu/linux during the next big refactor
53250  need_lib_prefix=no
53251  need_version=no
53252  hardcode_into_libs=yes
53253  if test ia64 = "$host_cpu"; then
53254    # AIX 5 supports IA64
53255    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
53256    shlibpath_var=LD_LIBRARY_PATH
53257  else
53258    # With GCC up to 2.95.x, collect2 would create an import file
53259    # for dependence libraries.  The import file would start with
53260    # the line '#! .'.  This would cause the generated library to
53261    # depend on '.', always an invalid library.  This was fixed in
53262    # development snapshots of GCC prior to 3.0.
53263    case $host_os in
53264      aix4 | aix4.[01] | aix4.[01].*)
53265      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
53266	   echo ' yes '
53267	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
53268	:
53269      else
53270	can_build_shared=no
53271      fi
53272      ;;
53273    esac
53274    # Using Import Files as archive members, it is possible to support
53275    # filename-based versioning of shared library archives on AIX. While
53276    # this would work for both with and without runtime linking, it will
53277    # prevent static linking of such archives. So we do filename-based
53278    # shared library versioning with .so extension only, which is used
53279    # when both runtime linking and shared linking is enabled.
53280    # Unfortunately, runtime linking may impact performance, so we do
53281    # not want this to be the default eventually. Also, we use the
53282    # versioned .so libs for executables only if there is the -brtl
53283    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
53284    # To allow for filename-based versioning support, we need to create
53285    # libNAME.so.V as an archive file, containing:
53286    # *) an Import File, referring to the versioned filename of the
53287    #    archive as well as the shared archive member, telling the
53288    #    bitwidth (32 or 64) of that shared object, and providing the
53289    #    list of exported symbols of that shared object, eventually
53290    #    decorated with the 'weak' keyword
53291    # *) the shared object with the F_LOADONLY flag set, to really avoid
53292    #    it being seen by the linker.
53293    # At run time we better use the real file rather than another symlink,
53294    # but for link time we create the symlink libNAME.so -> libNAME.so.V
53295
53296    case $with_aix_soname,$aix_use_runtimelinking in
53297    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
53298    # soname into executable. Probably we can add versioning support to
53299    # collect2, so additional links can be useful in future.
53300    aix,yes) # traditional libtool
53301      dynamic_linker='AIX unversionable lib.so'
53302      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
53303      # instead of lib<name>.a to let people know that these are not
53304      # typical AIX shared libraries.
53305      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53306      ;;
53307    aix,no) # traditional AIX only
53308      dynamic_linker='AIX lib.a(lib.so.V)'
53309      # We preserve .a as extension for shared libraries through AIX4.2
53310      # and later when we are not doing run time linking.
53311      library_names_spec='$libname$release.a $libname.a'
53312      soname_spec='$libname$release$shared_ext$major'
53313      ;;
53314    svr4,*) # full svr4 only
53315      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
53316      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
53317      # We do not specify a path in Import Files, so LIBPATH fires.
53318      shlibpath_overrides_runpath=yes
53319      ;;
53320    *,yes) # both, prefer svr4
53321      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
53322      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
53323      # unpreferred sharedlib libNAME.a needs extra handling
53324      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
53325      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
53326      # We do not specify a path in Import Files, so LIBPATH fires.
53327      shlibpath_overrides_runpath=yes
53328      ;;
53329    *,no) # both, prefer aix
53330      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
53331      library_names_spec='$libname$release.a $libname.a'
53332      soname_spec='$libname$release$shared_ext$major'
53333      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
53334      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
53335      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
53336      ;;
53337    esac
53338    shlibpath_var=LIBPATH
53339  fi
53340  ;;
53341
53342amigaos*)
53343  case $host_cpu in
53344  powerpc)
53345    # Since July 2007 AmigaOS4 officially supports .so libraries.
53346    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
53347    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53348    ;;
53349  m68k)
53350    library_names_spec='$libname.ixlibrary $libname.a'
53351    # Create ${libname}_ixlibrary.a entries in /sys/libs.
53352    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
53353    ;;
53354  esac
53355  ;;
53356
53357beos*)
53358  library_names_spec='$libname$shared_ext'
53359  dynamic_linker="$host_os ld.so"
53360  shlibpath_var=LIBRARY_PATH
53361  ;;
53362
53363bsdi[45]*)
53364  version_type=linux # correct to gnu/linux during the next big refactor
53365  need_version=no
53366  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53367  soname_spec='$libname$release$shared_ext$major'
53368  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
53369  shlibpath_var=LD_LIBRARY_PATH
53370  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
53371  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
53372  # the default ld.so.conf also contains /usr/contrib/lib and
53373  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
53374  # libtool to hard-code these into programs
53375  ;;
53376
53377cygwin* | mingw* | pw32* | cegcc*)
53378  version_type=windows
53379  shrext_cmds=.dll
53380  need_version=no
53381  need_lib_prefix=no
53382
53383  case $GCC,$cc_basename in
53384  yes,*)
53385    # gcc
53386    library_names_spec='$libname.dll.a'
53387    # DLL is installed to $(libdir)/../bin by postinstall_cmds
53388    postinstall_cmds='base_file=`basename \$file`~
53389      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
53390      dldir=$destdir/`dirname \$dlpath`~
53391      test -d \$dldir || mkdir -p \$dldir~
53392      $install_prog $dir/$dlname \$dldir/$dlname~
53393      chmod a+x \$dldir/$dlname~
53394      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
53395        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
53396      fi'
53397    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
53398      dlpath=$dir/\$dldll~
53399       $RM \$dlpath'
53400    shlibpath_overrides_runpath=yes
53401
53402    case $host_os in
53403    cygwin*)
53404      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
53405      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
53406
53407      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
53408      ;;
53409    mingw* | cegcc*)
53410      # MinGW DLLs use traditional 'lib' prefix
53411      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
53412      ;;
53413    pw32*)
53414      # pw32 DLLs use 'pw' prefix rather than 'lib'
53415      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
53416      ;;
53417    esac
53418    dynamic_linker='Win32 ld.exe'
53419    ;;
53420
53421  *,cl*)
53422    # Native MSVC
53423    libname_spec='$name'
53424    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
53425    library_names_spec='$libname.dll.lib'
53426
53427    case $build_os in
53428    mingw*)
53429      sys_lib_search_path_spec=
53430      lt_save_ifs=$IFS
53431      IFS=';'
53432      for lt_path in $LIB
53433      do
53434        IFS=$lt_save_ifs
53435        # Let DOS variable expansion print the short 8.3 style file name.
53436        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
53437        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
53438      done
53439      IFS=$lt_save_ifs
53440      # Convert to MSYS style.
53441      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
53442      ;;
53443    cygwin*)
53444      # Convert to unix form, then to dos form, then back to unix form
53445      # but this time dos style (no spaces!) so that the unix form looks
53446      # like /cygdrive/c/PROGRA~1:/cygdr...
53447      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
53448      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
53449      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
53450      ;;
53451    *)
53452      sys_lib_search_path_spec=$LIB
53453      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
53454        # It is most probably a Windows format PATH.
53455        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
53456      else
53457        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
53458      fi
53459      # FIXME: find the short name or the path components, as spaces are
53460      # common. (e.g. "Program Files" -> "PROGRA~1")
53461      ;;
53462    esac
53463
53464    # DLL is installed to $(libdir)/../bin by postinstall_cmds
53465    postinstall_cmds='base_file=`basename \$file`~
53466      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
53467      dldir=$destdir/`dirname \$dlpath`~
53468      test -d \$dldir || mkdir -p \$dldir~
53469      $install_prog $dir/$dlname \$dldir/$dlname'
53470    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
53471      dlpath=$dir/\$dldll~
53472       $RM \$dlpath'
53473    shlibpath_overrides_runpath=yes
53474    dynamic_linker='Win32 link.exe'
53475    ;;
53476
53477  *)
53478    # Assume MSVC wrapper
53479    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
53480    dynamic_linker='Win32 ld.exe'
53481    ;;
53482  esac
53483  # FIXME: first we should search . and the directory the executable is in
53484  shlibpath_var=PATH
53485  ;;
53486
53487darwin* | rhapsody*)
53488  dynamic_linker="$host_os dyld"
53489  version_type=darwin
53490  need_lib_prefix=no
53491  need_version=no
53492  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
53493  soname_spec='$libname$release$major$shared_ext'
53494  shlibpath_overrides_runpath=yes
53495  shlibpath_var=DYLD_LIBRARY_PATH
53496  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
53497
53498  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
53499  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
53500  ;;
53501
53502dgux*)
53503  version_type=linux # correct to gnu/linux during the next big refactor
53504  need_lib_prefix=no
53505  need_version=no
53506  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53507  soname_spec='$libname$release$shared_ext$major'
53508  shlibpath_var=LD_LIBRARY_PATH
53509  ;;
53510
53511freebsd* | dragonfly*)
53512  # DragonFly does not have aout.  When/if they implement a new
53513  # versioning mechanism, adjust this.
53514  if test -x /usr/bin/objformat; then
53515    objformat=`/usr/bin/objformat`
53516  else
53517    case $host_os in
53518    freebsd[23].*) objformat=aout ;;
53519    *) objformat=elf ;;
53520    esac
53521  fi
53522  version_type=freebsd-$objformat
53523  case $version_type in
53524    freebsd-elf*)
53525      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53526      soname_spec='$libname$release$shared_ext$major'
53527      need_version=no
53528      need_lib_prefix=no
53529      ;;
53530    freebsd-*)
53531      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
53532      need_version=yes
53533      ;;
53534  esac
53535  shlibpath_var=LD_LIBRARY_PATH
53536  case $host_os in
53537  freebsd2.*)
53538    shlibpath_overrides_runpath=yes
53539    ;;
53540  freebsd3.[01]* | freebsdelf3.[01]*)
53541    shlibpath_overrides_runpath=yes
53542    hardcode_into_libs=yes
53543    ;;
53544  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
53545  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
53546    shlibpath_overrides_runpath=no
53547    hardcode_into_libs=yes
53548    ;;
53549  *) # from 4.6 on, and DragonFly
53550    shlibpath_overrides_runpath=yes
53551    hardcode_into_libs=yes
53552    ;;
53553  esac
53554  ;;
53555
53556haiku*)
53557  version_type=linux # correct to gnu/linux during the next big refactor
53558  need_lib_prefix=no
53559  need_version=no
53560  dynamic_linker="$host_os runtime_loader"
53561  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53562  soname_spec='$libname$release$shared_ext$major'
53563  shlibpath_var=LIBRARY_PATH
53564  shlibpath_overrides_runpath=no
53565  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
53566  hardcode_into_libs=yes
53567  ;;
53568
53569hpux9* | hpux10* | hpux11*)
53570  # Give a soname corresponding to the major version so that dld.sl refuses to
53571  # link against other versions.
53572  version_type=sunos
53573  need_lib_prefix=no
53574  need_version=no
53575  case $host_cpu in
53576  ia64*)
53577    shrext_cmds='.so'
53578    hardcode_into_libs=yes
53579    dynamic_linker="$host_os dld.so"
53580    shlibpath_var=LD_LIBRARY_PATH
53581    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
53582    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53583    soname_spec='$libname$release$shared_ext$major'
53584    if test 32 = "$HPUX_IA64_MODE"; then
53585      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
53586      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
53587    else
53588      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
53589      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
53590    fi
53591    ;;
53592  hppa*64*)
53593    shrext_cmds='.sl'
53594    hardcode_into_libs=yes
53595    dynamic_linker="$host_os dld.sl"
53596    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
53597    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
53598    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53599    soname_spec='$libname$release$shared_ext$major'
53600    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
53601    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
53602    ;;
53603  *)
53604    shrext_cmds='.sl'
53605    dynamic_linker="$host_os dld.sl"
53606    shlibpath_var=SHLIB_PATH
53607    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
53608    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53609    soname_spec='$libname$release$shared_ext$major'
53610    ;;
53611  esac
53612  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
53613  postinstall_cmds='chmod 555 $lib'
53614  # or fails outright, so override atomically:
53615  install_override_mode=555
53616  ;;
53617
53618interix[3-9]*)
53619  version_type=linux # correct to gnu/linux during the next big refactor
53620  need_lib_prefix=no
53621  need_version=no
53622  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53623  soname_spec='$libname$release$shared_ext$major'
53624  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
53625  shlibpath_var=LD_LIBRARY_PATH
53626  shlibpath_overrides_runpath=no
53627  hardcode_into_libs=yes
53628  ;;
53629
53630irix5* | irix6* | nonstopux*)
53631  case $host_os in
53632    nonstopux*) version_type=nonstopux ;;
53633    *)
53634	if test yes = "$lt_cv_prog_gnu_ld"; then
53635		version_type=linux # correct to gnu/linux during the next big refactor
53636	else
53637		version_type=irix
53638	fi ;;
53639  esac
53640  need_lib_prefix=no
53641  need_version=no
53642  soname_spec='$libname$release$shared_ext$major'
53643  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
53644  case $host_os in
53645  irix5* | nonstopux*)
53646    libsuff= shlibsuff=
53647    ;;
53648  *)
53649    case $LD in # libtool.m4 will add one of these switches to LD
53650    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
53651      libsuff= shlibsuff= libmagic=32-bit;;
53652    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
53653      libsuff=32 shlibsuff=N32 libmagic=N32;;
53654    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
53655      libsuff=64 shlibsuff=64 libmagic=64-bit;;
53656    *) libsuff= shlibsuff= libmagic=never-match;;
53657    esac
53658    ;;
53659  esac
53660  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
53661  shlibpath_overrides_runpath=no
53662  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
53663  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
53664  hardcode_into_libs=yes
53665  ;;
53666
53667# No shared lib support for Linux oldld, aout, or coff.
53668linux*oldld* | linux*aout* | linux*coff*)
53669  dynamic_linker=no
53670  ;;
53671
53672linux*android*)
53673  version_type=none # Android doesn't support versioned libraries.
53674  need_lib_prefix=no
53675  need_version=no
53676  library_names_spec='$libname$release$shared_ext'
53677  soname_spec='$libname$release$shared_ext'
53678  finish_cmds=
53679  shlibpath_var=LD_LIBRARY_PATH
53680  shlibpath_overrides_runpath=yes
53681
53682  # This implies no fast_install, which is unacceptable.
53683  # Some rework will be needed to allow for fast_install
53684  # before this can be enabled.
53685  hardcode_into_libs=yes
53686
53687  dynamic_linker='Android linker'
53688  # Don't embed -rpath directories since the linker doesn't support them.
53689  hardcode_libdir_flag_spec='-L$libdir'
53690  ;;
53691
53692# This must be glibc/ELF.
53693linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
53694  version_type=linux # correct to gnu/linux during the next big refactor
53695  need_lib_prefix=no
53696  need_version=no
53697  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53698  soname_spec='$libname$release$shared_ext$major'
53699  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
53700  shlibpath_var=LD_LIBRARY_PATH
53701  shlibpath_overrides_runpath=no
53702
53703  # Some binutils ld are patched to set DT_RUNPATH
53704  if test ${lt_cv_shlibpath_overrides_runpath+y}
53705then :
53706  printf %s "(cached) " >&6
53707else $as_nop
53708  lt_cv_shlibpath_overrides_runpath=no
53709    save_LDFLAGS=$LDFLAGS
53710    save_libdir=$libdir
53711    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
53712	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
53713    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53714/* end confdefs.h.  */
53715
53716int
53717main (void)
53718{
53719
53720  ;
53721  return 0;
53722}
53723_ACEOF
53724if ac_fn_c_try_link "$LINENO"
53725then :
53726  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
53727then :
53728  lt_cv_shlibpath_overrides_runpath=yes
53729fi
53730fi
53731rm -f core conftest.err conftest.$ac_objext conftest.beam \
53732    conftest$ac_exeext conftest.$ac_ext
53733    LDFLAGS=$save_LDFLAGS
53734    libdir=$save_libdir
53735
53736fi
53737
53738  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
53739
53740  # This implies no fast_install, which is unacceptable.
53741  # Some rework will be needed to allow for fast_install
53742  # before this can be enabled.
53743  hardcode_into_libs=yes
53744
53745  # Ideally, we could use ldconfig to report *all* directores which are
53746  # searched for libraries, however this is still not possible.  Aside from not
53747  # being certain /sbin/ldconfig is available, command
53748  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
53749  # even though it is searched at run-time.  Try to do the best guess by
53750  # appending ld.so.conf contents (and includes) to the search path.
53751  if test -f /etc/ld.so.conf; then
53752    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
53753    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
53754  fi
53755
53756  # We used to test for /lib/ld.so.1 and disable shared libraries on
53757  # powerpc, because MkLinux only supported shared libraries with the
53758  # GNU dynamic linker.  Since this was broken with cross compilers,
53759  # most powerpc-linux boxes support dynamic linking these days and
53760  # people can always --disable-shared, the test was removed, and we
53761  # assume the GNU/Linux dynamic linker is in use.
53762  dynamic_linker='GNU/Linux ld.so'
53763  ;;
53764
53765netbsdelf*-gnu)
53766  version_type=linux
53767  need_lib_prefix=no
53768  need_version=no
53769  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
53770  soname_spec='${libname}${release}${shared_ext}$major'
53771  shlibpath_var=LD_LIBRARY_PATH
53772  shlibpath_overrides_runpath=no
53773  hardcode_into_libs=yes
53774  dynamic_linker='NetBSD ld.elf_so'
53775  ;;
53776
53777netbsd*)
53778  version_type=sunos
53779  need_lib_prefix=no
53780  need_version=no
53781  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
53782    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
53783    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
53784    dynamic_linker='NetBSD (a.out) ld.so'
53785  else
53786    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53787    soname_spec='$libname$release$shared_ext$major'
53788    dynamic_linker='NetBSD ld.elf_so'
53789  fi
53790  shlibpath_var=LD_LIBRARY_PATH
53791  shlibpath_overrides_runpath=yes
53792  hardcode_into_libs=yes
53793  ;;
53794
53795newsos6)
53796  version_type=linux # correct to gnu/linux during the next big refactor
53797  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53798  shlibpath_var=LD_LIBRARY_PATH
53799  shlibpath_overrides_runpath=yes
53800  ;;
53801
53802*nto* | *qnx*)
53803  version_type=qnx
53804  need_lib_prefix=no
53805  need_version=no
53806  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53807  soname_spec='$libname$release$shared_ext$major'
53808  shlibpath_var=LD_LIBRARY_PATH
53809  shlibpath_overrides_runpath=no
53810  hardcode_into_libs=yes
53811  dynamic_linker='ldqnx.so'
53812  ;;
53813
53814openbsd* | bitrig*)
53815  version_type=sunos
53816  sys_lib_dlsearch_path_spec=/usr/lib
53817  need_lib_prefix=no
53818  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
53819    need_version=no
53820  else
53821    need_version=yes
53822  fi
53823  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
53824  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
53825  shlibpath_var=LD_LIBRARY_PATH
53826  shlibpath_overrides_runpath=yes
53827  ;;
53828
53829os2*)
53830  libname_spec='$name'
53831  version_type=windows
53832  shrext_cmds=.dll
53833  need_version=no
53834  need_lib_prefix=no
53835  # OS/2 can only load a DLL with a base name of 8 characters or less.
53836  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
53837    v=$($ECHO $release$versuffix | tr -d .-);
53838    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
53839    $ECHO $n$v`$shared_ext'
53840  library_names_spec='${libname}_dll.$libext'
53841  dynamic_linker='OS/2 ld.exe'
53842  shlibpath_var=BEGINLIBPATH
53843  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
53844  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
53845  postinstall_cmds='base_file=`basename \$file`~
53846    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
53847    dldir=$destdir/`dirname \$dlpath`~
53848    test -d \$dldir || mkdir -p \$dldir~
53849    $install_prog $dir/$dlname \$dldir/$dlname~
53850    chmod a+x \$dldir/$dlname~
53851    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
53852      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
53853    fi'
53854  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
53855    dlpath=$dir/\$dldll~
53856    $RM \$dlpath'
53857  ;;
53858
53859osf3* | osf4* | osf5*)
53860  version_type=osf
53861  need_lib_prefix=no
53862  need_version=no
53863  soname_spec='$libname$release$shared_ext$major'
53864  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53865  shlibpath_var=LD_LIBRARY_PATH
53866  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
53867  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
53868  ;;
53869
53870rdos*)
53871  dynamic_linker=no
53872  ;;
53873
53874solaris*)
53875  version_type=linux # correct to gnu/linux during the next big refactor
53876  need_lib_prefix=no
53877  need_version=no
53878  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53879  soname_spec='$libname$release$shared_ext$major'
53880  shlibpath_var=LD_LIBRARY_PATH
53881  shlibpath_overrides_runpath=yes
53882  hardcode_into_libs=yes
53883  # ldd complains unless libraries are executable
53884  postinstall_cmds='chmod +x $lib'
53885  ;;
53886
53887sunos4*)
53888  version_type=sunos
53889  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
53890  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
53891  shlibpath_var=LD_LIBRARY_PATH
53892  shlibpath_overrides_runpath=yes
53893  if test yes = "$with_gnu_ld"; then
53894    need_lib_prefix=no
53895  fi
53896  need_version=yes
53897  ;;
53898
53899sysv4 | sysv4.3*)
53900  version_type=linux # correct to gnu/linux during the next big refactor
53901  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53902  soname_spec='$libname$release$shared_ext$major'
53903  shlibpath_var=LD_LIBRARY_PATH
53904  case $host_vendor in
53905    sni)
53906      shlibpath_overrides_runpath=no
53907      need_lib_prefix=no
53908      runpath_var=LD_RUN_PATH
53909      ;;
53910    siemens)
53911      need_lib_prefix=no
53912      ;;
53913    motorola)
53914      need_lib_prefix=no
53915      need_version=no
53916      shlibpath_overrides_runpath=no
53917      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
53918      ;;
53919  esac
53920  ;;
53921
53922sysv4*MP*)
53923  if test -d /usr/nec; then
53924    version_type=linux # correct to gnu/linux during the next big refactor
53925    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
53926    soname_spec='$libname$shared_ext.$major'
53927    shlibpath_var=LD_LIBRARY_PATH
53928  fi
53929  ;;
53930
53931sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
53932  version_type=sco
53933  need_lib_prefix=no
53934  need_version=no
53935  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
53936  soname_spec='$libname$release$shared_ext$major'
53937  shlibpath_var=LD_LIBRARY_PATH
53938  shlibpath_overrides_runpath=yes
53939  hardcode_into_libs=yes
53940  if test yes = "$with_gnu_ld"; then
53941    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
53942  else
53943    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
53944    case $host_os in
53945      sco3.2v5*)
53946        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
53947	;;
53948    esac
53949  fi
53950  sys_lib_dlsearch_path_spec='/usr/lib'
53951  ;;
53952
53953tpf*)
53954  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
53955  version_type=linux # correct to gnu/linux during the next big refactor
53956  need_lib_prefix=no
53957  need_version=no
53958  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53959  shlibpath_var=LD_LIBRARY_PATH
53960  shlibpath_overrides_runpath=no
53961  hardcode_into_libs=yes
53962  ;;
53963
53964uts4*)
53965  version_type=linux # correct to gnu/linux during the next big refactor
53966  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
53967  soname_spec='$libname$release$shared_ext$major'
53968  shlibpath_var=LD_LIBRARY_PATH
53969  ;;
53970
53971*)
53972  dynamic_linker=no
53973  ;;
53974esac
53975{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
53976printf "%s\n" "$dynamic_linker" >&6; }
53977test no = "$dynamic_linker" && can_build_shared=no
53978
53979variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
53980if test yes = "$GCC"; then
53981  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
53982fi
53983
53984if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
53985  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
53986fi
53987
53988if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
53989  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
53990fi
53991
53992# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
53993configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
53994
53995# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
53996func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
53997
53998# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
53999configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
54000
54001
54002
54003
54004
54005
54006
54007
54008
54009
54010
54011
54012
54013
54014
54015
54016
54017
54018
54019
54020
54021
54022
54023
54024
54025
54026
54027
54028
54029
54030
54031
54032
54033
54034
54035
54036
54037
54038
54039
54040
54041
54042
54043
54044
54045
54046
54047
54048
54049
54050
54051
54052
54053
54054
54055
54056
54057
54058
54059
54060
54061
54062
54063
54064
54065
54066
54067
54068
54069
54070
54071
54072
54073
54074
54075
54076
54077
54078
54079
54080
54081
54082
54083
54084
54085
54086
54087
54088
54089
54090
54091
54092
54093
54094
54095
54096
54097  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
54098printf %s "checking how to hardcode library paths into programs... " >&6; }
54099hardcode_action=
54100if test -n "$hardcode_libdir_flag_spec" ||
54101   test -n "$runpath_var" ||
54102   test yes = "$hardcode_automatic"; then
54103
54104  # We can hardcode non-existent directories.
54105  if test no != "$hardcode_direct" &&
54106     # If the only mechanism to avoid hardcoding is shlibpath_var, we
54107     # have to relink, otherwise we might link with an installed library
54108     # when we should be linking with a yet-to-be-installed one
54109     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
54110     test no != "$hardcode_minus_L"; then
54111    # Linking always hardcodes the temporary library directory.
54112    hardcode_action=relink
54113  else
54114    # We can link without hardcoding, and we can hardcode nonexisting dirs.
54115    hardcode_action=immediate
54116  fi
54117else
54118  # We cannot hardcode anything, or else we can only hardcode existing
54119  # directories.
54120  hardcode_action=unsupported
54121fi
54122{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
54123printf "%s\n" "$hardcode_action" >&6; }
54124
54125if test relink = "$hardcode_action" ||
54126   test yes = "$inherit_rpath"; then
54127  # Fast installation is not supported
54128  enable_fast_install=no
54129elif test yes = "$shlibpath_overrides_runpath" ||
54130     test no = "$enable_shared"; then
54131  # Fast installation is not necessary
54132  enable_fast_install=needless
54133fi
54134
54135
54136
54137
54138
54139
54140  if test yes != "$enable_dlopen"; then
54141  enable_dlopen=unknown
54142  enable_dlopen_self=unknown
54143  enable_dlopen_self_static=unknown
54144else
54145  lt_cv_dlopen=no
54146  lt_cv_dlopen_libs=
54147
54148  case $host_os in
54149  beos*)
54150    lt_cv_dlopen=load_add_on
54151    lt_cv_dlopen_libs=
54152    lt_cv_dlopen_self=yes
54153    ;;
54154
54155  mingw* | pw32* | cegcc*)
54156    lt_cv_dlopen=LoadLibrary
54157    lt_cv_dlopen_libs=
54158    ;;
54159
54160  cygwin*)
54161    lt_cv_dlopen=dlopen
54162    lt_cv_dlopen_libs=
54163    ;;
54164
54165  darwin*)
54166    # if libdl is installed we need to link against it
54167    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
54168printf %s "checking for dlopen in -ldl... " >&6; }
54169if test ${ac_cv_lib_dl_dlopen+y}
54170then :
54171  printf %s "(cached) " >&6
54172else $as_nop
54173  ac_check_lib_save_LIBS=$LIBS
54174LIBS="-ldl  $LIBS"
54175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54176/* end confdefs.h.  */
54177
54178/* Override any GCC internal prototype to avoid an error.
54179   Use char because int might match the return type of a GCC
54180   builtin and then its argument prototype would still apply.  */
54181char dlopen ();
54182int
54183main (void)
54184{
54185return dlopen ();
54186  ;
54187  return 0;
54188}
54189_ACEOF
54190if ac_fn_c_try_link "$LINENO"
54191then :
54192  ac_cv_lib_dl_dlopen=yes
54193else $as_nop
54194  ac_cv_lib_dl_dlopen=no
54195fi
54196rm -f core conftest.err conftest.$ac_objext conftest.beam \
54197    conftest$ac_exeext conftest.$ac_ext
54198LIBS=$ac_check_lib_save_LIBS
54199fi
54200{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
54201printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
54202if test "x$ac_cv_lib_dl_dlopen" = xyes
54203then :
54204  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
54205else $as_nop
54206
54207    lt_cv_dlopen=dyld
54208    lt_cv_dlopen_libs=
54209    lt_cv_dlopen_self=yes
54210
54211fi
54212
54213    ;;
54214
54215  tpf*)
54216    # Don't try to run any link tests for TPF.  We know it's impossible
54217    # because TPF is a cross-compiler, and we know how we open DSOs.
54218    lt_cv_dlopen=dlopen
54219    lt_cv_dlopen_libs=
54220    lt_cv_dlopen_self=no
54221    ;;
54222
54223  *)
54224    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
54225if test "x$ac_cv_func_shl_load" = xyes
54226then :
54227  lt_cv_dlopen=shl_load
54228else $as_nop
54229  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
54230printf %s "checking for shl_load in -ldld... " >&6; }
54231if test ${ac_cv_lib_dld_shl_load+y}
54232then :
54233  printf %s "(cached) " >&6
54234else $as_nop
54235  ac_check_lib_save_LIBS=$LIBS
54236LIBS="-ldld  $LIBS"
54237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54238/* end confdefs.h.  */
54239
54240/* Override any GCC internal prototype to avoid an error.
54241   Use char because int might match the return type of a GCC
54242   builtin and then its argument prototype would still apply.  */
54243char shl_load ();
54244int
54245main (void)
54246{
54247return shl_load ();
54248  ;
54249  return 0;
54250}
54251_ACEOF
54252if ac_fn_c_try_link "$LINENO"
54253then :
54254  ac_cv_lib_dld_shl_load=yes
54255else $as_nop
54256  ac_cv_lib_dld_shl_load=no
54257fi
54258rm -f core conftest.err conftest.$ac_objext conftest.beam \
54259    conftest$ac_exeext conftest.$ac_ext
54260LIBS=$ac_check_lib_save_LIBS
54261fi
54262{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
54263printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
54264if test "x$ac_cv_lib_dld_shl_load" = xyes
54265then :
54266  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
54267else $as_nop
54268  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
54269if test "x$ac_cv_func_dlopen" = xyes
54270then :
54271  lt_cv_dlopen=dlopen
54272else $as_nop
54273  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
54274printf %s "checking for dlopen in -ldl... " >&6; }
54275if test ${ac_cv_lib_dl_dlopen+y}
54276then :
54277  printf %s "(cached) " >&6
54278else $as_nop
54279  ac_check_lib_save_LIBS=$LIBS
54280LIBS="-ldl  $LIBS"
54281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54282/* end confdefs.h.  */
54283
54284/* Override any GCC internal prototype to avoid an error.
54285   Use char because int might match the return type of a GCC
54286   builtin and then its argument prototype would still apply.  */
54287char dlopen ();
54288int
54289main (void)
54290{
54291return dlopen ();
54292  ;
54293  return 0;
54294}
54295_ACEOF
54296if ac_fn_c_try_link "$LINENO"
54297then :
54298  ac_cv_lib_dl_dlopen=yes
54299else $as_nop
54300  ac_cv_lib_dl_dlopen=no
54301fi
54302rm -f core conftest.err conftest.$ac_objext conftest.beam \
54303    conftest$ac_exeext conftest.$ac_ext
54304LIBS=$ac_check_lib_save_LIBS
54305fi
54306{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
54307printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
54308if test "x$ac_cv_lib_dl_dlopen" = xyes
54309then :
54310  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
54311else $as_nop
54312  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
54313printf %s "checking for dlopen in -lsvld... " >&6; }
54314if test ${ac_cv_lib_svld_dlopen+y}
54315then :
54316  printf %s "(cached) " >&6
54317else $as_nop
54318  ac_check_lib_save_LIBS=$LIBS
54319LIBS="-lsvld  $LIBS"
54320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54321/* end confdefs.h.  */
54322
54323/* Override any GCC internal prototype to avoid an error.
54324   Use char because int might match the return type of a GCC
54325   builtin and then its argument prototype would still apply.  */
54326char dlopen ();
54327int
54328main (void)
54329{
54330return dlopen ();
54331  ;
54332  return 0;
54333}
54334_ACEOF
54335if ac_fn_c_try_link "$LINENO"
54336then :
54337  ac_cv_lib_svld_dlopen=yes
54338else $as_nop
54339  ac_cv_lib_svld_dlopen=no
54340fi
54341rm -f core conftest.err conftest.$ac_objext conftest.beam \
54342    conftest$ac_exeext conftest.$ac_ext
54343LIBS=$ac_check_lib_save_LIBS
54344fi
54345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
54346printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
54347if test "x$ac_cv_lib_svld_dlopen" = xyes
54348then :
54349  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
54350else $as_nop
54351  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
54352printf %s "checking for dld_link in -ldld... " >&6; }
54353if test ${ac_cv_lib_dld_dld_link+y}
54354then :
54355  printf %s "(cached) " >&6
54356else $as_nop
54357  ac_check_lib_save_LIBS=$LIBS
54358LIBS="-ldld  $LIBS"
54359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54360/* end confdefs.h.  */
54361
54362/* Override any GCC internal prototype to avoid an error.
54363   Use char because int might match the return type of a GCC
54364   builtin and then its argument prototype would still apply.  */
54365char dld_link ();
54366int
54367main (void)
54368{
54369return dld_link ();
54370  ;
54371  return 0;
54372}
54373_ACEOF
54374if ac_fn_c_try_link "$LINENO"
54375then :
54376  ac_cv_lib_dld_dld_link=yes
54377else $as_nop
54378  ac_cv_lib_dld_dld_link=no
54379fi
54380rm -f core conftest.err conftest.$ac_objext conftest.beam \
54381    conftest$ac_exeext conftest.$ac_ext
54382LIBS=$ac_check_lib_save_LIBS
54383fi
54384{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
54385printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
54386if test "x$ac_cv_lib_dld_dld_link" = xyes
54387then :
54388  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
54389fi
54390
54391
54392fi
54393
54394
54395fi
54396
54397
54398fi
54399
54400
54401fi
54402
54403
54404fi
54405
54406    ;;
54407  esac
54408
54409  if test no = "$lt_cv_dlopen"; then
54410    enable_dlopen=no
54411  else
54412    enable_dlopen=yes
54413  fi
54414
54415  case $lt_cv_dlopen in
54416  dlopen)
54417    save_CPPFLAGS=$CPPFLAGS
54418    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
54419
54420    save_LDFLAGS=$LDFLAGS
54421    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
54422
54423    save_LIBS=$LIBS
54424    LIBS="$lt_cv_dlopen_libs $LIBS"
54425
54426    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
54427printf %s "checking whether a program can dlopen itself... " >&6; }
54428if test ${lt_cv_dlopen_self+y}
54429then :
54430  printf %s "(cached) " >&6
54431else $as_nop
54432  	  if test yes = "$cross_compiling"; then :
54433  lt_cv_dlopen_self=cross
54434else
54435  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
54436  lt_status=$lt_dlunknown
54437  cat > conftest.$ac_ext <<_LT_EOF
54438#line $LINENO "configure"
54439#include "confdefs.h"
54440
54441#if HAVE_DLFCN_H
54442#include <dlfcn.h>
54443#endif
54444
54445#include <stdio.h>
54446
54447#ifdef RTLD_GLOBAL
54448#  define LT_DLGLOBAL		RTLD_GLOBAL
54449#else
54450#  ifdef DL_GLOBAL
54451#    define LT_DLGLOBAL		DL_GLOBAL
54452#  else
54453#    define LT_DLGLOBAL		0
54454#  endif
54455#endif
54456
54457/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
54458   find out it does not work in some platform. */
54459#ifndef LT_DLLAZY_OR_NOW
54460#  ifdef RTLD_LAZY
54461#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
54462#  else
54463#    ifdef DL_LAZY
54464#      define LT_DLLAZY_OR_NOW		DL_LAZY
54465#    else
54466#      ifdef RTLD_NOW
54467#        define LT_DLLAZY_OR_NOW	RTLD_NOW
54468#      else
54469#        ifdef DL_NOW
54470#          define LT_DLLAZY_OR_NOW	DL_NOW
54471#        else
54472#          define LT_DLLAZY_OR_NOW	0
54473#        endif
54474#      endif
54475#    endif
54476#  endif
54477#endif
54478
54479/* When -fvisibility=hidden is used, assume the code has been annotated
54480   correspondingly for the symbols needed.  */
54481#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
54482int fnord () __attribute__((visibility("default")));
54483#endif
54484
54485int fnord () { return 42; }
54486int main ()
54487{
54488  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
54489  int status = $lt_dlunknown;
54490
54491  if (self)
54492    {
54493      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
54494      else
54495        {
54496	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
54497          else puts (dlerror ());
54498	}
54499      /* dlclose (self); */
54500    }
54501  else
54502    puts (dlerror ());
54503
54504  return status;
54505}
54506_LT_EOF
54507  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
54508  (eval $ac_link) 2>&5
54509  ac_status=$?
54510  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54511  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
54512    (./conftest; exit; ) >&5 2>/dev/null
54513    lt_status=$?
54514    case x$lt_status in
54515      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
54516      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
54517      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
54518    esac
54519  else :
54520    # compilation failed
54521    lt_cv_dlopen_self=no
54522  fi
54523fi
54524rm -fr conftest*
54525
54526
54527fi
54528{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
54529printf "%s\n" "$lt_cv_dlopen_self" >&6; }
54530
54531    if test yes = "$lt_cv_dlopen_self"; then
54532      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
54533      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
54534printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
54535if test ${lt_cv_dlopen_self_static+y}
54536then :
54537  printf %s "(cached) " >&6
54538else $as_nop
54539  	  if test yes = "$cross_compiling"; then :
54540  lt_cv_dlopen_self_static=cross
54541else
54542  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
54543  lt_status=$lt_dlunknown
54544  cat > conftest.$ac_ext <<_LT_EOF
54545#line $LINENO "configure"
54546#include "confdefs.h"
54547
54548#if HAVE_DLFCN_H
54549#include <dlfcn.h>
54550#endif
54551
54552#include <stdio.h>
54553
54554#ifdef RTLD_GLOBAL
54555#  define LT_DLGLOBAL		RTLD_GLOBAL
54556#else
54557#  ifdef DL_GLOBAL
54558#    define LT_DLGLOBAL		DL_GLOBAL
54559#  else
54560#    define LT_DLGLOBAL		0
54561#  endif
54562#endif
54563
54564/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
54565   find out it does not work in some platform. */
54566#ifndef LT_DLLAZY_OR_NOW
54567#  ifdef RTLD_LAZY
54568#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
54569#  else
54570#    ifdef DL_LAZY
54571#      define LT_DLLAZY_OR_NOW		DL_LAZY
54572#    else
54573#      ifdef RTLD_NOW
54574#        define LT_DLLAZY_OR_NOW	RTLD_NOW
54575#      else
54576#        ifdef DL_NOW
54577#          define LT_DLLAZY_OR_NOW	DL_NOW
54578#        else
54579#          define LT_DLLAZY_OR_NOW	0
54580#        endif
54581#      endif
54582#    endif
54583#  endif
54584#endif
54585
54586/* When -fvisibility=hidden is used, assume the code has been annotated
54587   correspondingly for the symbols needed.  */
54588#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
54589int fnord () __attribute__((visibility("default")));
54590#endif
54591
54592int fnord () { return 42; }
54593int main ()
54594{
54595  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
54596  int status = $lt_dlunknown;
54597
54598  if (self)
54599    {
54600      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
54601      else
54602        {
54603	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
54604          else puts (dlerror ());
54605	}
54606      /* dlclose (self); */
54607    }
54608  else
54609    puts (dlerror ());
54610
54611  return status;
54612}
54613_LT_EOF
54614  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
54615  (eval $ac_link) 2>&5
54616  ac_status=$?
54617  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54618  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
54619    (./conftest; exit; ) >&5 2>/dev/null
54620    lt_status=$?
54621    case x$lt_status in
54622      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
54623      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
54624      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
54625    esac
54626  else :
54627    # compilation failed
54628    lt_cv_dlopen_self_static=no
54629  fi
54630fi
54631rm -fr conftest*
54632
54633
54634fi
54635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
54636printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
54637    fi
54638
54639    CPPFLAGS=$save_CPPFLAGS
54640    LDFLAGS=$save_LDFLAGS
54641    LIBS=$save_LIBS
54642    ;;
54643  esac
54644
54645  case $lt_cv_dlopen_self in
54646  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
54647  *) enable_dlopen_self=unknown ;;
54648  esac
54649
54650  case $lt_cv_dlopen_self_static in
54651  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
54652  *) enable_dlopen_self_static=unknown ;;
54653  esac
54654fi
54655
54656
54657
54658
54659
54660
54661
54662
54663
54664
54665
54666
54667
54668
54669
54670
54671
54672striplib=
54673old_striplib=
54674{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
54675printf %s "checking whether stripping libraries is possible... " >&6; }
54676if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
54677  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
54678  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
54679  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54680printf "%s\n" "yes" >&6; }
54681else
54682# FIXME - insert some real tests, host_os isn't really good enough
54683  case $host_os in
54684  darwin*)
54685    if test -n "$STRIP"; then
54686      striplib="$STRIP -x"
54687      old_striplib="$STRIP -S"
54688      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54689printf "%s\n" "yes" >&6; }
54690    else
54691      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
54692printf "%s\n" "no" >&6; }
54693    fi
54694    ;;
54695  *)
54696    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
54697printf "%s\n" "no" >&6; }
54698    ;;
54699  esac
54700fi
54701
54702
54703
54704
54705
54706
54707
54708
54709
54710
54711
54712
54713  # Report what library types will actually be built
54714  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
54715printf %s "checking if libtool supports shared libraries... " >&6; }
54716  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
54717printf "%s\n" "$can_build_shared" >&6; }
54718
54719  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
54720printf %s "checking whether to build shared libraries... " >&6; }
54721  test no = "$can_build_shared" && enable_shared=no
54722
54723  # On AIX, shared libraries and static libraries use the same namespace, and
54724  # are all built from PIC.
54725  case $host_os in
54726  aix3*)
54727    test yes = "$enable_shared" && enable_static=no
54728    if test -n "$RANLIB"; then
54729      archive_cmds="$archive_cmds~\$RANLIB \$lib"
54730      postinstall_cmds='$RANLIB $lib'
54731    fi
54732    ;;
54733
54734  aix[4-9]*)
54735    if test ia64 != "$host_cpu"; then
54736      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
54737      yes,aix,yes) ;;			# shared object as lib.so file only
54738      yes,svr4,*) ;;			# shared object as lib.so archive member only
54739      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
54740      esac
54741    fi
54742    ;;
54743  esac
54744  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
54745printf "%s\n" "$enable_shared" >&6; }
54746
54747  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
54748printf %s "checking whether to build static libraries... " >&6; }
54749  # Make sure either enable_shared or enable_static is yes.
54750  test yes = "$enable_shared" || enable_static=yes
54751  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
54752printf "%s\n" "$enable_static" >&6; }
54753
54754
54755
54756
54757fi
54758ac_ext=c
54759ac_cpp='$CPP $CPPFLAGS'
54760ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54761ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54762ac_compiler_gnu=$ac_cv_c_compiler_gnu
54763
54764CC=$lt_save_CC
54765
54766
54767
54768
54769
54770
54771
54772
54773
54774
54775
54776
54777
54778
54779
54780        ac_config_commands="$ac_config_commands libtool"
54781
54782
54783
54784
54785# Only expand once:
54786
54787
54788
54789# Define these substitutions here to keep all version information in one place.
54790# For information on how to properly maintain the library version information,
54791# refer to the libtool manual, section "Updating library version information":
54792# https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
54793#
54794# 1. Start with version information of ‘0:0:0’ for each libtool library.
54795# 2. Update the version information only immediately before a public release of your software. More frequent updates are unnecessary, and only guarantee that the current interface number gets larger faster.
54796# 3. If the library source code has changed at all since the last update, then increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
54797# 4. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0.
54798# 5. If any interfaces have been added since the last public release, then increment age.
54799# 6. If any existing interfaces have been removed or changed since the last public release, then set age to 0.
54800LIBWGET_SO_VERSION=1:0:0
54801
54802LIBWGET_VERSION=2.0.0
54803
54804
54805#
54806# Generate version defines for include file
54807#
54808LIBWGET_VERSION_MAJOR=`echo $LIBWGET_VERSION|cut -d'.' -f1`
54809
54810LIBWGET_VERSION_MINOR=`echo $LIBWGET_VERSION|cut -d'.' -f2`
54811
54812LIBWGET_VERSION_PATCH=`echo $LIBWGET_VERSION|cut -d'.' -f3`
54813
54814LIBWGET_VERSION_NUMBER=`printf '0x%02x%02x%02x' $LIBWGET_VERSION_MAJOR $LIBWGET_VERSION_MINOR $LIBWGET_VERSION_PATCH`
54815
54816ac_config_files="$ac_config_files include/wget/wgetver.h"
54817
54818
54819
54820ac_config_headers="$ac_config_headers config.h"
54821
54822
54823# Non-verbose make
54824# Check whether --enable-silent-rules was given.
54825if test ${enable_silent_rules+y}
54826then :
54827  enableval=$enable_silent_rules;
54828fi
54829
54830case $enable_silent_rules in # (((
54831  yes) AM_DEFAULT_VERBOSITY=0;;
54832   no) AM_DEFAULT_VERBOSITY=1;;
54833    *) AM_DEFAULT_VERBOSITY=0;;
54834esac
54835am_make=${MAKE-make}
54836{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
54837printf %s "checking whether $am_make supports nested variables... " >&6; }
54838if test ${am_cv_make_support_nested_variables+y}
54839then :
54840  printf %s "(cached) " >&6
54841else $as_nop
54842  if printf "%s\n" 'TRUE=$(BAR$(V))
54843BAR0=false
54844BAR1=true
54845V=1
54846am__doit:
54847	@$(TRUE)
54848.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
54849  am_cv_make_support_nested_variables=yes
54850else
54851  am_cv_make_support_nested_variables=no
54852fi
54853fi
54854{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
54855printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
54856if test $am_cv_make_support_nested_variables = yes; then
54857    AM_V='$(V)'
54858  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
54859else
54860  AM_V=$AM_DEFAULT_VERBOSITY
54861  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
54862fi
54863AM_BACKSLASH='\'
54864
54865
54866# Check for large file support.  This check needs to come fairly
54867# early because it could (in principle) affect whether functions and
54868# headers are available, whether they work, etc.
54869# Check whether --enable-largefile was given.
54870if test ${enable_largefile+y}
54871then :
54872  enableval=$enable_largefile;
54873fi
54874
54875if test "$enable_largefile" != no; then
54876
54877  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
54878printf %s "checking for special C compiler options needed for large files... " >&6; }
54879if test ${ac_cv_sys_largefile_CC+y}
54880then :
54881  printf %s "(cached) " >&6
54882else $as_nop
54883  ac_cv_sys_largefile_CC=no
54884     if test "$GCC" != yes; then
54885       ac_save_CC=$CC
54886       while :; do
54887	 # IRIX 6.2 and later do not support large files by default,
54888	 # so use the C compiler's -n32 option if that helps.
54889	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54890/* end confdefs.h.  */
54891#include <sys/types.h>
54892 /* Check that off_t can represent 2**63 - 1 correctly.
54893    We can't simply define LARGE_OFF_T to be 9223372036854775807,
54894    since some C++ compilers masquerading as C compilers
54895    incorrectly reject 9223372036854775807.  */
54896#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
54897  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
54898		       && LARGE_OFF_T % 2147483647 == 1)
54899		      ? 1 : -1];
54900int
54901main (void)
54902{
54903
54904  ;
54905  return 0;
54906}
54907_ACEOF
54908	 if ac_fn_c_try_compile "$LINENO"
54909then :
54910  break
54911fi
54912rm -f core conftest.err conftest.$ac_objext conftest.beam
54913	 CC="$CC -n32"
54914	 if ac_fn_c_try_compile "$LINENO"
54915then :
54916  ac_cv_sys_largefile_CC=' -n32'; break
54917fi
54918rm -f core conftest.err conftest.$ac_objext conftest.beam
54919	 break
54920       done
54921       CC=$ac_save_CC
54922       rm -f conftest.$ac_ext
54923    fi
54924fi
54925{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
54926printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
54927  if test "$ac_cv_sys_largefile_CC" != no; then
54928    CC=$CC$ac_cv_sys_largefile_CC
54929  fi
54930
54931  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
54932printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
54933if test ${ac_cv_sys_file_offset_bits+y}
54934then :
54935  printf %s "(cached) " >&6
54936else $as_nop
54937  while :; do
54938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54939/* end confdefs.h.  */
54940#include <sys/types.h>
54941 /* Check that off_t can represent 2**63 - 1 correctly.
54942    We can't simply define LARGE_OFF_T to be 9223372036854775807,
54943    since some C++ compilers masquerading as C compilers
54944    incorrectly reject 9223372036854775807.  */
54945#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
54946  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
54947		       && LARGE_OFF_T % 2147483647 == 1)
54948		      ? 1 : -1];
54949int
54950main (void)
54951{
54952
54953  ;
54954  return 0;
54955}
54956_ACEOF
54957if ac_fn_c_try_compile "$LINENO"
54958then :
54959  ac_cv_sys_file_offset_bits=no; break
54960fi
54961rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
54962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54963/* end confdefs.h.  */
54964#define _FILE_OFFSET_BITS 64
54965#include <sys/types.h>
54966 /* Check that off_t can represent 2**63 - 1 correctly.
54967    We can't simply define LARGE_OFF_T to be 9223372036854775807,
54968    since some C++ compilers masquerading as C compilers
54969    incorrectly reject 9223372036854775807.  */
54970#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
54971  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
54972		       && LARGE_OFF_T % 2147483647 == 1)
54973		      ? 1 : -1];
54974int
54975main (void)
54976{
54977
54978  ;
54979  return 0;
54980}
54981_ACEOF
54982if ac_fn_c_try_compile "$LINENO"
54983then :
54984  ac_cv_sys_file_offset_bits=64; break
54985fi
54986rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
54987  ac_cv_sys_file_offset_bits=unknown
54988  break
54989done
54990fi
54991{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
54992printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
54993case $ac_cv_sys_file_offset_bits in #(
54994  no | unknown) ;;
54995  *)
54996printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
54997;;
54998esac
54999rm -rf conftest*
55000  if test $ac_cv_sys_file_offset_bits = unknown; then
55001    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
55002printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
55003if test ${ac_cv_sys_large_files+y}
55004then :
55005  printf %s "(cached) " >&6
55006else $as_nop
55007  while :; do
55008  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55009/* end confdefs.h.  */
55010#include <sys/types.h>
55011 /* Check that off_t can represent 2**63 - 1 correctly.
55012    We can't simply define LARGE_OFF_T to be 9223372036854775807,
55013    since some C++ compilers masquerading as C compilers
55014    incorrectly reject 9223372036854775807.  */
55015#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
55016  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
55017		       && LARGE_OFF_T % 2147483647 == 1)
55018		      ? 1 : -1];
55019int
55020main (void)
55021{
55022
55023  ;
55024  return 0;
55025}
55026_ACEOF
55027if ac_fn_c_try_compile "$LINENO"
55028then :
55029  ac_cv_sys_large_files=no; break
55030fi
55031rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
55032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55033/* end confdefs.h.  */
55034#define _LARGE_FILES 1
55035#include <sys/types.h>
55036 /* Check that off_t can represent 2**63 - 1 correctly.
55037    We can't simply define LARGE_OFF_T to be 9223372036854775807,
55038    since some C++ compilers masquerading as C compilers
55039    incorrectly reject 9223372036854775807.  */
55040#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
55041  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
55042		       && LARGE_OFF_T % 2147483647 == 1)
55043		      ? 1 : -1];
55044int
55045main (void)
55046{
55047
55048  ;
55049  return 0;
55050}
55051_ACEOF
55052if ac_fn_c_try_compile "$LINENO"
55053then :
55054  ac_cv_sys_large_files=1; break
55055fi
55056rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
55057  ac_cv_sys_large_files=unknown
55058  break
55059done
55060fi
55061{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
55062printf "%s\n" "$ac_cv_sys_large_files" >&6; }
55063case $ac_cv_sys_large_files in #(
55064  no | unknown) ;;
55065  *)
55066printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
55067;;
55068esac
55069rm -rf conftest*
55070  fi
55071fi
55072
55073# The cast to long int works around a bug in the HP C Compiler
55074# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
55075# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
55076# This bug is HP SR number 8606223364.
55077{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
55078printf %s "checking size of off_t... " >&6; }
55079if test ${ac_cv_sizeof_off_t+y}
55080then :
55081  printf %s "(cached) " >&6
55082else $as_nop
55083  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"
55084then :
55085
55086else $as_nop
55087  if test "$ac_cv_type_off_t" = yes; then
55088     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
55089printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
55090as_fn_error 77 "cannot compute sizeof (off_t)
55091See \`config.log' for more details" "$LINENO" 5; }
55092   else
55093     ac_cv_sizeof_off_t=0
55094   fi
55095fi
55096
55097fi
55098{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
55099printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
55100
55101
55102
55103printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
55104
55105
55106
55107# Checks for programs.
55108
55109for ac_prog in flex lex
55110do
55111  # Extract the first word of "$ac_prog", so it can be a program name with args.
55112set dummy $ac_prog; ac_word=$2
55113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55114printf %s "checking for $ac_word... " >&6; }
55115if test ${ac_cv_prog_LEX+y}
55116then :
55117  printf %s "(cached) " >&6
55118else $as_nop
55119  if test -n "$LEX"; then
55120  ac_cv_prog_LEX="$LEX" # Let the user override the test.
55121else
55122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55123for as_dir in $PATH
55124do
55125  IFS=$as_save_IFS
55126  case $as_dir in #(((
55127    '') as_dir=./ ;;
55128    */) ;;
55129    *) as_dir=$as_dir/ ;;
55130  esac
55131    for ac_exec_ext in '' $ac_executable_extensions; do
55132  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
55133    ac_cv_prog_LEX="$ac_prog"
55134    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
55135    break 2
55136  fi
55137done
55138  done
55139IFS=$as_save_IFS
55140
55141fi
55142fi
55143LEX=$ac_cv_prog_LEX
55144if test -n "$LEX"; then
55145  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
55146printf "%s\n" "$LEX" >&6; }
55147else
55148  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
55149printf "%s\n" "no" >&6; }
55150fi
55151
55152
55153  test -n "$LEX" && break
55154done
55155test -n "$LEX" || LEX=":"
55156
55157  if test "x$LEX" != "x:"; then
55158    cat >conftest.l <<_ACEOF
55159%{
55160#ifdef __cplusplus
55161extern "C"
55162#endif
55163int yywrap(void);
55164%}
55165%%
55166a { ECHO; }
55167b { REJECT; }
55168c { yymore (); }
55169d { yyless (1); }
55170e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
55171#ifdef __cplusplus
55172    yyless ((yyinput () != 0));
55173#else
55174    yyless ((input () != 0));
55175#endif
55176  }
55177f { unput (yytext[0]); }
55178. { BEGIN INITIAL; }
55179%%
55180#ifdef YYTEXT_POINTER
55181extern char *yytext;
55182#endif
55183int
55184yywrap (void)
55185{
55186  return 1;
55187}
55188int
55189main (void)
55190{
55191  return ! yylex ();
55192}
55193_ACEOF
55194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5
55195printf %s "checking for lex output file root... " >&6; }
55196if test ${ac_cv_prog_lex_root+y}
55197then :
55198  printf %s "(cached) " >&6
55199else $as_nop
55200
55201ac_cv_prog_lex_root=unknown
55202{ { ac_try="$LEX conftest.l"
55203case "(($ac_try" in
55204  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
55205  *) ac_try_echo=$ac_try;;
55206esac
55207eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
55208printf "%s\n" "$ac_try_echo"; } >&5
55209  (eval "$LEX conftest.l") 2>&5
55210  ac_status=$?
55211  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55212  test $ac_status = 0; } &&
55213if test -f lex.yy.c; then
55214  ac_cv_prog_lex_root=lex.yy
55215elif test -f lexyy.c; then
55216  ac_cv_prog_lex_root=lexyy
55217fi
55218fi
55219{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
55220printf "%s\n" "$ac_cv_prog_lex_root" >&6; }
55221if test "$ac_cv_prog_lex_root" = unknown
55222then :
55223  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5
55224printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;}
55225   LEX=: LEXLIB=
55226fi
55227LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
55228
55229if test ${LEXLIB+y}
55230then :
55231
55232else $as_nop
55233
55234  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5
55235printf %s "checking for lex library... " >&6; }
55236if test ${ac_cv_lib_lex+y}
55237then :
55238  printf %s "(cached) " >&6
55239else $as_nop
55240
55241    ac_save_LIBS="$LIBS"
55242    ac_found=false
55243    for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do
55244      case $ac_cv_lib_lex in #(
55245  'none needed') :
55246     ;; #(
55247  'not found') :
55248    break ;; #(
55249  *) :
55250    LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #(
55251  *) :
55252     ;;
55253esac
55254
55255      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55256/* end confdefs.h.  */
55257`cat $LEX_OUTPUT_ROOT.c`
55258_ACEOF
55259if ac_fn_c_try_link "$LINENO"
55260then :
55261  ac_found=:
55262fi
55263rm -f core conftest.err conftest.$ac_objext conftest.beam \
55264    conftest$ac_exeext conftest.$ac_ext
55265      if $ac_found; then
55266        break
55267      fi
55268    done
55269    LIBS="$ac_save_LIBS"
55270
55271fi
55272{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
55273printf "%s\n" "$ac_cv_lib_lex" >&6; }
55274  if test "$ac_cv_lib_lex" = 'not found'
55275then :
55276  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5
55277printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;}
55278	 LEX=: LEXLIB=
55279elif test "$ac_cv_lib_lex" = 'none needed'
55280then :
55281  LEXLIB=''
55282else $as_nop
55283  LEXLIB=$ac_cv_lib_lex
55284fi
55285
55286fi
55287
55288
55289if test "$LEX" != :
55290then :
55291
55292{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
55293printf %s "checking whether yytext is a pointer... " >&6; }
55294if test ${ac_cv_prog_lex_yytext_pointer+y}
55295then :
55296  printf %s "(cached) " >&6
55297else $as_nop
55298  # POSIX says lex can declare yytext either as a pointer or an array; the
55299# default is implementation-dependent.  Figure out which it is, since
55300# not all implementations provide the %pointer and %array declarations.
55301ac_cv_prog_lex_yytext_pointer=no
55302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55303/* end confdefs.h.  */
55304
55305  #define YYTEXT_POINTER 1
55306`cat $LEX_OUTPUT_ROOT.c`
55307_ACEOF
55308if ac_fn_c_try_compile "$LINENO"
55309then :
55310  ac_cv_prog_lex_yytext_pointer=yes
55311fi
55312rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
55313
55314fi
55315{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
55316printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; }
55317if test $ac_cv_prog_lex_yytext_pointer = yes; then
55318
55319printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h
55320
55321fi
55322
55323fi
55324rm -f conftest.l $LEX_OUTPUT_ROOT.c
55325
55326fi
55327
55328{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
55329printf %s "checking whether ln -s works... " >&6; }
55330LN_S=$as_ln_s
55331if test "$LN_S" = "ln -s"; then
55332  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55333printf "%s\n" "yes" >&6; }
55334else
55335  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
55336printf "%s\n" "no, using $LN_S" >&6; }
55337fi
55338
55339
55340# enable all possible compiler warnings in WARN_FLAGS
55341#
55342# to enable by default: create a file '.manywarnings'
55343# enable explicitly : ./configure --enable-manywarnings
55344# disable explicitly: ./configure --disable-manywarnings
55345
55346  #
55347  # check if manywarnings is requested
55348  #
55349  # Check whether --enable-manywarnings was given.
55350if test ${enable_manywarnings+y}
55351then :
55352  enableval=$enable_manywarnings; case $enableval in
55353       yes|no) ;;
55354       *) as_fn_error $? "Bad value $enableval for --enable-manywarnings option" "$LINENO" 5 ;;
55355     esac
55356       wget_manywarnings=$enableval
55357
55358else $as_nop
55359
55360      test -f .manywarnings && wget_manywarnings=yes || wget_manywarnings=no
55361
55362
55363fi
55364
55365
55366  WARN_CFLAGS=""
55367
55368  if test "$wget_manywarnings" = yes; then
55369    # AC_PROG_CC sets $GCC to 'yes' if compiler is gcc
55370    # AC_REQUIRE([AC_PROG_CC])
55371
55372    case $CC in
55373      *gcc*) CCNAME="gcc";;
55374      *clang*) CCNAME="clang";;
55375    esac
55376
55377    if test "$CCNAME" = "gcc"; then
55378      test -n "C" && wget_LANGUAGE=C || wget_LANGUAGE=C
55379
55380      # add -Wall -Wextra to reduce number of warn flags
55381
55382  ret=$CFLAGS
55383  words=" $CFLAGS "
55384  for word in "-Wall -Wextra -Wformat=2"; do
55385    if test "${words#*" $word "}" = "$words"; then ret="$ret $word"; fi
55386  done
55387  wget_WARN_CFLAGS=$ret
55388
55389
55390      # collect all disabled warn flags in $WARN_CFLAGS
55391      # remove -Werror-implicit-function-declaration (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90690)
55392      wget_WARN_CFLAGS=$wget_WARN_CFLAGS" "$($CC $wget_WARN_CFLAGS -Q --help=warning,$wget_LANGUAGE|\
55393        awk '{ if (($2 == "[disabled]" || $2 == "")\
55394          && $1!~/=/ && $1~/^-W/ && $1!~/</ && $1!="-Wall" && $1!~/^-Werror-/) print $1 }')
55395
55396      GCC_VERSION=$($CC -dumpversion | cut -f1 -d.)
55397      if test $GCC_VERSION -ge 6; then
55398        wget_WARN_CFLAGS=$wget_WARN_CFLAGS" -Warray-bounds=2 -Wnormalized=nfc -Wshift-overflow=2 -Wunused-const-variable=2"
55399      fi
55400      if test $GCC_VERSION -ge 7; then
55401        wget_WARN_CFLAGS=$wget_WARN_CFLAGS" -Wformat-overflow=2 -Wformat-truncation=1 -Wstringop-overflow=2"
55402      fi
55403
55404    elif test "$CCNAME" = "clang"; then
55405      # set all warn flags on
55406
55407  ret=$CFLAGS
55408  words=" $CFLAGS "
55409  for word in "-Weverything"; do
55410    if test "${words#*" $word "}" = "$words"; then ret="$ret $word"; fi
55411  done
55412  wget_WARN_CFLAGS=$ret
55413
55414    fi
55415
55416    WARN_CFLAGS=$wget_WARN_CFLAGS
55417  fi
55418
55419
55420if test -n "$WARN_CFLAGS"; then
55421  if test "$CCNAME" = "gcc"; then
55422    # Set up list of unwanted warnings
55423    nw=
55424    nw="$nw -Wsystem-headers"       # System headers may trigger lot's of useless warnings
55425    nw="$nw -Wvla"                  # This project is C99
55426    nw="$nw -Wstack-protector"
55427    nw="$nw -Wmissing-field-initializer"
55428    nw="$nw -Wtraditional"
55429    nw="$nw -Wtraditional-conversion"
55430    nw="$nw -Wc++-compat"
55431    nw="$nw -Wcast-qual"
55432    nw="$nw -Wconversion"
55433    nw="$nw -Wsign-conversion"
55434    nw="$nw -Wunsuffixed-float-constants"
55435    nw="$nw -Wdeclaration-after-statement" # C89 only, messing up gcc < 5
55436    nw="$nw -Wcast-function-type" # gcc 8, very noisy
55437    nw="$nw -Wabi" # gcc 8, very noisy
55438    nw="$nw -Wunused-macros" # triggers in auto-generated lex css parser, #pragma doesn't work, conflicts with -Werror
55439    nw="$nw -Wchkp" # gcc-9 says: not supported any more (but emits it via -Q --help=C)"
55440    if test "$cross_compiling" = yes; then
55441      nw="$nw -Wformat"
55442    fi
55443
55444    # remove unwanted warn flags
55445
55446  ret=
55447  words=" $nw "
55448  for word in $WARN_CFLAGS; do
55449     if test "${words#*" $word "}" = "$words"; then ret="$ret $word"; fi
55450  done
55451  WARN_CFLAGS=$ret
55452
55453
55454    # add more flags as you like
55455    if test $GCC_VERSION -ge 5; then
55456      WARN_CFLAGS="$WARN_CFLAGS -fdiagnostics-color=always"
55457    fi
55458    if test "$cross_compiling" = yes; then
55459      WARN_CFLAGS="$WARN_CFLAGS -Wno-format"
55460    fi
55461    if test $GCC_VERSION -ge 8; then
55462      WARN_CFLAGS="$WARN_CFLAGS -Wno-cast-function-type"
55463    fi
55464    # WARN_CFLAGS="$WARN_CFLAGS -Werror"
55465
55466    # We use a slightly smaller set of warning options for lib/.
55467    # Remove the following and save the result in GNULIB_WARN_CFLAGS.
55468    # Removing is not enough if these switches are implicitly set by other
55469    #  flags like -Wall or -Wextra. We have to explicitly unset them
55470    #  with -Wno-....
55471    nw=
55472    nw="$nw -Wpedantic"
55473    nw="$nw -Wsign-compare"
55474    nw="$nw -Wunused-parameter"
55475    nw="$nw -Wswitch-default"
55476    nw="$nw -Wformat-nonliteral"
55477    nw="$nw -Wsuggest-attribute=pure"
55478    nw="$nw -Wunsafe-loop-optimizations"
55479    nw="$nw -Wundef"
55480    nw="$nw -Wswitch-enum"
55481    nw="$nw -Wbad-function-cast"
55482    nw="$nw -Wredundant-decls"
55483    nw="$nw -Werror"
55484
55485  ret=
55486  words=" $nw "
55487  for word in $WARN_CFLAGS; do
55488     if test "${words#*" $word "}" = "$words"; then ret="$ret $word"; fi
55489  done
55490  GNULIB_WARN_CFLAGS=$ret
55491
55492
55493  ret=
55494  words=" -Werror "
55495  for word in $CFLAGS; do
55496     if test "${words#*" $word "}" = "$words"; then ret="$ret $word"; fi
55497  done
55498  CFLAGS=$ret
55499
55500
55501    # disable options implicitly set by other options
55502    GNULIB_WARN_CFLAGS="-Wno-error $GNULIB_WARN_CFLAGS"
55503    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-sign-compare -Wno-unused-parameter -Wno-alloca"
55504    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-float-conversion -Wno-cast-function-type"
55505    if test "$cross_compiling" = yes; then
55506      GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-incompatible-pointer-types"
55507    fi
55508
55509  elif test "$CCNAME" = "clang"; then
55510    # setup flags for this project
55511    WARN_CFLAGS="$WARN_CFLAGS -Wno-system-headers -Wno-vla -Wno-cast-qual -Wno-padded"
55512    WARN_CFLAGS="$WARN_CFLAGS -Wno-reserved-id-macro -Wno-sign-conversion  -Wno-disabled-macro-expansion"
55513    WARN_CFLAGS="$WARN_CFLAGS -Wno-documentation -Wno-documentation-unknown-command"
55514    WARN_CFLAGS="$WARN_CFLAGS -Wno-covered-switch-default -Wno-unused-macros"
55515    WARN_CFLAGS="$WARN_CFLAGS -Wno-missing-field-initializers"
55516    WARN_CFLAGS="$WARN_CFLAGS -Wno-nullability-extension -Wno-nullability-completeness"
55517
55518    CLANG_VERSION=$($CC -dumpversion | cut -f1 -d.)
55519    if test $CLANG_VERSION -ge 11; then
55520      WARN_CFLAGS="$WARN_CFLAGS -Wno-implicit-int-float-conversion"
55521    fi
55522
55523    # remove all flags from WARN_FLAGS that are already in CFLAGS
55524    # wget_WORD_REMOVE([WARN_CFLAGS], [$WARN_CFLAGS], [$CFLAGS])
55525
55526
55527  ret=
55528  words=" -Werror "
55529  for word in $CFLAGS; do
55530     if test "${words#*" $word "}" = "$words"; then ret="$ret $word"; fi
55531  done
55532  CFLAGS=$ret
55533
55534
55535    # disable verbose options
55536    GNULIB_WARN_CFLAGS="-Wno-error $GNULIB_WARN_CFLAGS"
55537    GNULIB_WARN_CFLAGS="$WARN_CFLAGS -Wno-sign-compare -Wno-unused-parameter -Wno-undef -Wno-format-nonliteral"
55538    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-conversion -Wno-disabled-macro-expansion -Wno-c++98-compat"
55539    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-gnu-statement-expression -Wno-shorten-64-to-32 -Wno-switch-enum"
55540    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-unused-macros -Wno-missing-field-initializers"
55541    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-gnu-zero-variadic-macro-arguments -Wno-conditional-uninitialized"
55542    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-comma -Wno-assign-enum -Wno-unreachable-code -Wno-error"
55543    GNULIB_WARN_CFLAGS="$GNULIB_WARN_CFLAGS -Wno-missing-field-initializers -Wno-used-but-marked-unused"
55544
55545    # remove all flags from GNULIB_WARN_FLAGS that are already in CFLAGS
55546    # wget_WORD_REMOVE([GNULIB_WARN_CFLAGS], [$GNULIB_WARN_CFLAGS], [$CFLAGS])
55547  fi
55548
55549  MANYWARNINGS=-DWGET_MANYWARNINGS
55550
55551
55552
55553fi
55554
55555# Check whether --enable-manylibs was given.
55556if test ${enable_manylibs+y}
55557then :
55558  enableval=$enable_manylibs; enable_manylibs=$enableval
55559else $as_nop
55560  enable_manylibs=yes
55561fi
55562
55563 if test "$enable_manylibs" = "yes"; then
55564  ENABLE_MANYLIBS_TRUE=
55565  ENABLE_MANYLIBS_FALSE='#'
55566else
55567  ENABLE_MANYLIBS_TRUE='#'
55568  ENABLE_MANYLIBS_FALSE=
55569fi
55570
55571
55572# Check whether --enable-fuzzing was given.
55573if test ${enable_fuzzing+y}
55574then :
55575  enableval=$enable_fuzzing; enable_fuzzing=yes;
55576else $as_nop
55577  enable_fuzzing=no; LIB_FUZZING_ENGINE=""
55578fi
55579
55580 if test -n "$LIB_FUZZING_ENGINE"; then
55581  FUZZING_TRUE=
55582  FUZZING_FALSE='#'
55583else
55584  FUZZING_TRUE='#'
55585  FUZZING_FALSE=
55586fi
55587
55588
55589# Check whether --enable-fsanitize-ubsan was given.
55590if test ${enable_fsanitize_ubsan+y}
55591then :
55592  enableval=$enable_fsanitize_ubsan; gl_cc_sanitize_ubsan=yes
55593else $as_nop
55594  gl_cc_sanitize_ubsan=no
55595fi
55596
55597
55598# Check whether --enable-fsanitize-asan was given.
55599if test ${enable_fsanitize_asan+y}
55600then :
55601  enableval=$enable_fsanitize_asan; gl_cc_sanitize_asan=yes
55602else $as_nop
55603  gl_cc_sanitize_asan=no
55604fi
55605
55606
55607# Check whether --enable-fsanitize-msan was given.
55608if test ${enable_fsanitize_msan+y}
55609then :
55610  enableval=$enable_fsanitize_msan; gl_cc_sanitize_msan=yes
55611else $as_nop
55612  gl_cc_sanitize_msan=no
55613fi
55614
55615
55616# Check whether --enable-fsanitize-tsan was given.
55617if test ${enable_fsanitize_tsan+y}
55618then :
55619  enableval=$enable_fsanitize_tsan; gl_cc_sanitize_tsan=yes
55620else $as_nop
55621  gl_cc_sanitize_tsan=no
55622fi
55623
55624
55625
55626if test "$gl_cc_sanitize_asan" = yes; then
55627  if test "$gl_cc_sanitize_msan" = yes; then
55628    as_fn_error $? "Address Sanitizer and Memory Sanitizer are mutually exclusive" "$LINENO" 5
55629  elif test "$gl_cc_sanitize_tsan" = yes; then
55630    as_fn_error $? "Address Sanitizer and Thread Sanitizer are mutually exclusive" "$LINENO" 5
55631  fi
55632fi
55633
55634
55635if test "$gl_cc_sanitize_msan" = yes; then
55636  if test "$gl_cc_sanitize_tsan" = yes; then
55637    as_fn_error $? "Memory Sanitizer and Thread Sanitizer are mutually exclusive" "$LINENO" 5
55638  fi
55639fi
55640
55641
55642if test "$gl_cc_sanitize_ubsan" = yes; then
55643
55644  ac_ext=c
55645ac_cpp='$CPP $CPPFLAGS'
55646ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55647ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55648ac_compiler_gnu=$ac_cv_c_compiler_gnu
55649
55650
55651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
55652printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
55653if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
55654then :
55655  printf %s "(cached) " >&6
55656else $as_nop
55657
55658  gl_save_compiler_FLAGS="$CFLAGS"
55659  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
55660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55661/* end confdefs.h.  */
55662
55663int
55664main (void)
55665{
55666
55667  ;
55668  return 0;
55669}
55670_ACEOF
55671if ac_fn_c_try_link "$LINENO"
55672then :
55673  gl_cv_warn_c__Werror__Wunknown_warning_option=yes
55674else $as_nop
55675  gl_cv_warn_c__Werror__Wunknown_warning_option=no
55676fi
55677rm -f core conftest.err conftest.$ac_objext conftest.beam \
55678    conftest$ac_exeext conftest.$ac_ext
55679  CFLAGS="$gl_save_compiler_FLAGS"
55680
55681fi
55682{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
55683printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
55684if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
55685then :
55686  gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
55687else $as_nop
55688  gl_unknown_warnings_are_errors=
55689fi
55690
55691  ac_ext=c
55692ac_cpp='$CPP $CPPFLAGS'
55693ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55694ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55695ac_compiler_gnu=$ac_cv_c_compiler_gnu
55696
55697
55698
55699
55700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=undefined" >&5
55701printf %s "checking whether C compiler handles -fsanitize=undefined... " >&6; }
55702if test ${gl_cv_warn_c__fsanitize_undefined+y}
55703then :
55704  printf %s "(cached) " >&6
55705else $as_nop
55706
55707  gl_save_compiler_FLAGS="$CFLAGS"
55708  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=undefined"
55709  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55710/* end confdefs.h.  */
55711
55712int
55713main (void)
55714{
55715
55716  ;
55717  return 0;
55718}
55719_ACEOF
55720if ac_fn_c_try_link "$LINENO"
55721then :
55722  gl_cv_warn_c__fsanitize_undefined=yes
55723else $as_nop
55724  gl_cv_warn_c__fsanitize_undefined=no
55725fi
55726rm -f core conftest.err conftest.$ac_objext conftest.beam \
55727    conftest$ac_exeext conftest.$ac_ext
55728  CFLAGS="$gl_save_compiler_FLAGS"
55729
55730fi
55731{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_undefined" >&5
55732printf "%s\n" "$gl_cv_warn_c__fsanitize_undefined" >&6; }
55733if test "x$gl_cv_warn_c__fsanitize_undefined" = xyes
55734then :
55735  as_fn_append WARN_CFLAGS " -fsanitize=undefined"
55736fi
55737
55738
55739
55740
55741{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=bool" >&5
55742printf %s "checking whether C compiler handles -fsanitize=bool... " >&6; }
55743if test ${gl_cv_warn_c__fsanitize_bool+y}
55744then :
55745  printf %s "(cached) " >&6
55746else $as_nop
55747
55748  gl_save_compiler_FLAGS="$CFLAGS"
55749  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=bool"
55750  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55751/* end confdefs.h.  */
55752
55753int
55754main (void)
55755{
55756
55757  ;
55758  return 0;
55759}
55760_ACEOF
55761if ac_fn_c_try_link "$LINENO"
55762then :
55763  gl_cv_warn_c__fsanitize_bool=yes
55764else $as_nop
55765  gl_cv_warn_c__fsanitize_bool=no
55766fi
55767rm -f core conftest.err conftest.$ac_objext conftest.beam \
55768    conftest$ac_exeext conftest.$ac_ext
55769  CFLAGS="$gl_save_compiler_FLAGS"
55770
55771fi
55772{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_bool" >&5
55773printf "%s\n" "$gl_cv_warn_c__fsanitize_bool" >&6; }
55774if test "x$gl_cv_warn_c__fsanitize_bool" = xyes
55775then :
55776  as_fn_append WARN_CFLAGS " -fsanitize=bool"
55777fi
55778
55779
55780
55781
55782{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=alignment" >&5
55783printf %s "checking whether C compiler handles -fsanitize=alignment... " >&6; }
55784if test ${gl_cv_warn_c__fsanitize_alignment+y}
55785then :
55786  printf %s "(cached) " >&6
55787else $as_nop
55788
55789  gl_save_compiler_FLAGS="$CFLAGS"
55790  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=alignment"
55791  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55792/* end confdefs.h.  */
55793
55794int
55795main (void)
55796{
55797
55798  ;
55799  return 0;
55800}
55801_ACEOF
55802if ac_fn_c_try_link "$LINENO"
55803then :
55804  gl_cv_warn_c__fsanitize_alignment=yes
55805else $as_nop
55806  gl_cv_warn_c__fsanitize_alignment=no
55807fi
55808rm -f core conftest.err conftest.$ac_objext conftest.beam \
55809    conftest$ac_exeext conftest.$ac_ext
55810  CFLAGS="$gl_save_compiler_FLAGS"
55811
55812fi
55813{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_alignment" >&5
55814printf "%s\n" "$gl_cv_warn_c__fsanitize_alignment" >&6; }
55815if test "x$gl_cv_warn_c__fsanitize_alignment" = xyes
55816then :
55817  as_fn_append WARN_CFLAGS " -fsanitize=alignment"
55818fi
55819
55820
55821
55822
55823{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=null" >&5
55824printf %s "checking whether C compiler handles -fsanitize=null... " >&6; }
55825if test ${gl_cv_warn_c__fsanitize_null+y}
55826then :
55827  printf %s "(cached) " >&6
55828else $as_nop
55829
55830  gl_save_compiler_FLAGS="$CFLAGS"
55831  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=null"
55832  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55833/* end confdefs.h.  */
55834
55835int
55836main (void)
55837{
55838
55839  ;
55840  return 0;
55841}
55842_ACEOF
55843if ac_fn_c_try_link "$LINENO"
55844then :
55845  gl_cv_warn_c__fsanitize_null=yes
55846else $as_nop
55847  gl_cv_warn_c__fsanitize_null=no
55848fi
55849rm -f core conftest.err conftest.$ac_objext conftest.beam \
55850    conftest$ac_exeext conftest.$ac_ext
55851  CFLAGS="$gl_save_compiler_FLAGS"
55852
55853fi
55854{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_null" >&5
55855printf "%s\n" "$gl_cv_warn_c__fsanitize_null" >&6; }
55856if test "x$gl_cv_warn_c__fsanitize_null" = xyes
55857then :
55858  as_fn_append WARN_CFLAGS " -fsanitize=null"
55859fi
55860
55861
55862
55863
55864{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=enum" >&5
55865printf %s "checking whether C compiler handles -fsanitize=enum... " >&6; }
55866if test ${gl_cv_warn_c__fsanitize_enum+y}
55867then :
55868  printf %s "(cached) " >&6
55869else $as_nop
55870
55871  gl_save_compiler_FLAGS="$CFLAGS"
55872  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=enum"
55873  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55874/* end confdefs.h.  */
55875
55876int
55877main (void)
55878{
55879
55880  ;
55881  return 0;
55882}
55883_ACEOF
55884if ac_fn_c_try_link "$LINENO"
55885then :
55886  gl_cv_warn_c__fsanitize_enum=yes
55887else $as_nop
55888  gl_cv_warn_c__fsanitize_enum=no
55889fi
55890rm -f core conftest.err conftest.$ac_objext conftest.beam \
55891    conftest$ac_exeext conftest.$ac_ext
55892  CFLAGS="$gl_save_compiler_FLAGS"
55893
55894fi
55895{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_enum" >&5
55896printf "%s\n" "$gl_cv_warn_c__fsanitize_enum" >&6; }
55897if test "x$gl_cv_warn_c__fsanitize_enum" = xyes
55898then :
55899  as_fn_append WARN_CFLAGS " -fsanitize=enum"
55900fi
55901
55902
55903
55904
55905{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=bounds-strict" >&5
55906printf %s "checking whether C compiler handles -fsanitize=bounds-strict... " >&6; }
55907if test ${gl_cv_warn_c__fsanitize_bounds_strict+y}
55908then :
55909  printf %s "(cached) " >&6
55910else $as_nop
55911
55912  gl_save_compiler_FLAGS="$CFLAGS"
55913  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=bounds-strict"
55914  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55915/* end confdefs.h.  */
55916
55917int
55918main (void)
55919{
55920
55921  ;
55922  return 0;
55923}
55924_ACEOF
55925if ac_fn_c_try_link "$LINENO"
55926then :
55927  gl_cv_warn_c__fsanitize_bounds_strict=yes
55928else $as_nop
55929  gl_cv_warn_c__fsanitize_bounds_strict=no
55930fi
55931rm -f core conftest.err conftest.$ac_objext conftest.beam \
55932    conftest$ac_exeext conftest.$ac_ext
55933  CFLAGS="$gl_save_compiler_FLAGS"
55934
55935fi
55936{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_bounds_strict" >&5
55937printf "%s\n" "$gl_cv_warn_c__fsanitize_bounds_strict" >&6; }
55938if test "x$gl_cv_warn_c__fsanitize_bounds_strict" = xyes
55939then :
55940  as_fn_append WARN_CFLAGS " -fsanitize=bounds-strict"
55941fi
55942
55943
55944
55945  # additional clang options, from OSS-Fuzz (20.12.2019)
55946
55947
55948{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=integer" >&5
55949printf %s "checking whether C compiler handles -fsanitize=integer... " >&6; }
55950if test ${gl_cv_warn_c__fsanitize_integer+y}
55951then :
55952  printf %s "(cached) " >&6
55953else $as_nop
55954
55955  gl_save_compiler_FLAGS="$CFLAGS"
55956  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=integer"
55957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55958/* end confdefs.h.  */
55959
55960int
55961main (void)
55962{
55963
55964  ;
55965  return 0;
55966}
55967_ACEOF
55968if ac_fn_c_try_link "$LINENO"
55969then :
55970  gl_cv_warn_c__fsanitize_integer=yes
55971else $as_nop
55972  gl_cv_warn_c__fsanitize_integer=no
55973fi
55974rm -f core conftest.err conftest.$ac_objext conftest.beam \
55975    conftest$ac_exeext conftest.$ac_ext
55976  CFLAGS="$gl_save_compiler_FLAGS"
55977
55978fi
55979{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_integer" >&5
55980printf "%s\n" "$gl_cv_warn_c__fsanitize_integer" >&6; }
55981if test "x$gl_cv_warn_c__fsanitize_integer" = xyes
55982then :
55983  as_fn_append WARN_CFLAGS " -fsanitize=integer"
55984fi
55985
55986
55987
55988
55989{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=array-bounds" >&5
55990printf %s "checking whether C compiler handles -fsanitize=array-bounds... " >&6; }
55991if test ${gl_cv_warn_c__fsanitize_array_bounds+y}
55992then :
55993  printf %s "(cached) " >&6
55994else $as_nop
55995
55996  gl_save_compiler_FLAGS="$CFLAGS"
55997  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=array-bounds"
55998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55999/* end confdefs.h.  */
56000
56001int
56002main (void)
56003{
56004
56005  ;
56006  return 0;
56007}
56008_ACEOF
56009if ac_fn_c_try_link "$LINENO"
56010then :
56011  gl_cv_warn_c__fsanitize_array_bounds=yes
56012else $as_nop
56013  gl_cv_warn_c__fsanitize_array_bounds=no
56014fi
56015rm -f core conftest.err conftest.$ac_objext conftest.beam \
56016    conftest$ac_exeext conftest.$ac_ext
56017  CFLAGS="$gl_save_compiler_FLAGS"
56018
56019fi
56020{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_array_bounds" >&5
56021printf "%s\n" "$gl_cv_warn_c__fsanitize_array_bounds" >&6; }
56022if test "x$gl_cv_warn_c__fsanitize_array_bounds" = xyes
56023then :
56024  as_fn_append WARN_CFLAGS " -fsanitize=array-bounds"
56025fi
56026
56027
56028
56029
56030{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=builtin" >&5
56031printf %s "checking whether C compiler handles -fsanitize=builtin... " >&6; }
56032if test ${gl_cv_warn_c__fsanitize_builtin+y}
56033then :
56034  printf %s "(cached) " >&6
56035else $as_nop
56036
56037  gl_save_compiler_FLAGS="$CFLAGS"
56038  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=builtin"
56039  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56040/* end confdefs.h.  */
56041
56042int
56043main (void)
56044{
56045
56046  ;
56047  return 0;
56048}
56049_ACEOF
56050if ac_fn_c_try_link "$LINENO"
56051then :
56052  gl_cv_warn_c__fsanitize_builtin=yes
56053else $as_nop
56054  gl_cv_warn_c__fsanitize_builtin=no
56055fi
56056rm -f core conftest.err conftest.$ac_objext conftest.beam \
56057    conftest$ac_exeext conftest.$ac_ext
56058  CFLAGS="$gl_save_compiler_FLAGS"
56059
56060fi
56061{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_builtin" >&5
56062printf "%s\n" "$gl_cv_warn_c__fsanitize_builtin" >&6; }
56063if test "x$gl_cv_warn_c__fsanitize_builtin" = xyes
56064then :
56065  as_fn_append WARN_CFLAGS " -fsanitize=builtin"
56066fi
56067
56068
56069
56070
56071{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=float-divide-by-zero" >&5
56072printf %s "checking whether C compiler handles -fsanitize=float-divide-by-zero... " >&6; }
56073if test ${gl_cv_warn_c__fsanitize_float_divide_by_zero+y}
56074then :
56075  printf %s "(cached) " >&6
56076else $as_nop
56077
56078  gl_save_compiler_FLAGS="$CFLAGS"
56079  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=float-divide-by-zero"
56080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56081/* end confdefs.h.  */
56082
56083int
56084main (void)
56085{
56086
56087  ;
56088  return 0;
56089}
56090_ACEOF
56091if ac_fn_c_try_link "$LINENO"
56092then :
56093  gl_cv_warn_c__fsanitize_float_divide_by_zero=yes
56094else $as_nop
56095  gl_cv_warn_c__fsanitize_float_divide_by_zero=no
56096fi
56097rm -f core conftest.err conftest.$ac_objext conftest.beam \
56098    conftest$ac_exeext conftest.$ac_ext
56099  CFLAGS="$gl_save_compiler_FLAGS"
56100
56101fi
56102{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_float_divide_by_zero" >&5
56103printf "%s\n" "$gl_cv_warn_c__fsanitize_float_divide_by_zero" >&6; }
56104if test "x$gl_cv_warn_c__fsanitize_float_divide_by_zero" = xyes
56105then :
56106  as_fn_append WARN_CFLAGS " -fsanitize=float-divide-by-zero"
56107fi
56108
56109
56110
56111
56112{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=function" >&5
56113printf %s "checking whether C compiler handles -fsanitize=function... " >&6; }
56114if test ${gl_cv_warn_c__fsanitize_function+y}
56115then :
56116  printf %s "(cached) " >&6
56117else $as_nop
56118
56119  gl_save_compiler_FLAGS="$CFLAGS"
56120  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=function"
56121  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56122/* end confdefs.h.  */
56123
56124int
56125main (void)
56126{
56127
56128  ;
56129  return 0;
56130}
56131_ACEOF
56132if ac_fn_c_try_link "$LINENO"
56133then :
56134  gl_cv_warn_c__fsanitize_function=yes
56135else $as_nop
56136  gl_cv_warn_c__fsanitize_function=no
56137fi
56138rm -f core conftest.err conftest.$ac_objext conftest.beam \
56139    conftest$ac_exeext conftest.$ac_ext
56140  CFLAGS="$gl_save_compiler_FLAGS"
56141
56142fi
56143{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_function" >&5
56144printf "%s\n" "$gl_cv_warn_c__fsanitize_function" >&6; }
56145if test "x$gl_cv_warn_c__fsanitize_function" = xyes
56146then :
56147  as_fn_append WARN_CFLAGS " -fsanitize=function"
56148fi
56149
56150
56151
56152
56153{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=integer-divide-by-zero" >&5
56154printf %s "checking whether C compiler handles -fsanitize=integer-divide-by-zero... " >&6; }
56155if test ${gl_cv_warn_c__fsanitize_integer_divide_by_zero+y}
56156then :
56157  printf %s "(cached) " >&6
56158else $as_nop
56159
56160  gl_save_compiler_FLAGS="$CFLAGS"
56161  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=integer-divide-by-zero"
56162  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56163/* end confdefs.h.  */
56164
56165int
56166main (void)
56167{
56168
56169  ;
56170  return 0;
56171}
56172_ACEOF
56173if ac_fn_c_try_link "$LINENO"
56174then :
56175  gl_cv_warn_c__fsanitize_integer_divide_by_zero=yes
56176else $as_nop
56177  gl_cv_warn_c__fsanitize_integer_divide_by_zero=no
56178fi
56179rm -f core conftest.err conftest.$ac_objext conftest.beam \
56180    conftest$ac_exeext conftest.$ac_ext
56181  CFLAGS="$gl_save_compiler_FLAGS"
56182
56183fi
56184{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_integer_divide_by_zero" >&5
56185printf "%s\n" "$gl_cv_warn_c__fsanitize_integer_divide_by_zero" >&6; }
56186if test "x$gl_cv_warn_c__fsanitize_integer_divide_by_zero" = xyes
56187then :
56188  as_fn_append WARN_CFLAGS " -fsanitize=integer-divide-by-zero"
56189fi
56190
56191
56192
56193
56194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=object-size" >&5
56195printf %s "checking whether C compiler handles -fsanitize=object-size... " >&6; }
56196if test ${gl_cv_warn_c__fsanitize_object_size+y}
56197then :
56198  printf %s "(cached) " >&6
56199else $as_nop
56200
56201  gl_save_compiler_FLAGS="$CFLAGS"
56202  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=object-size"
56203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56204/* end confdefs.h.  */
56205
56206int
56207main (void)
56208{
56209
56210  ;
56211  return 0;
56212}
56213_ACEOF
56214if ac_fn_c_try_link "$LINENO"
56215then :
56216  gl_cv_warn_c__fsanitize_object_size=yes
56217else $as_nop
56218  gl_cv_warn_c__fsanitize_object_size=no
56219fi
56220rm -f core conftest.err conftest.$ac_objext conftest.beam \
56221    conftest$ac_exeext conftest.$ac_ext
56222  CFLAGS="$gl_save_compiler_FLAGS"
56223
56224fi
56225{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_object_size" >&5
56226printf "%s\n" "$gl_cv_warn_c__fsanitize_object_size" >&6; }
56227if test "x$gl_cv_warn_c__fsanitize_object_size" = xyes
56228then :
56229  as_fn_append WARN_CFLAGS " -fsanitize=object-size"
56230fi
56231
56232
56233
56234
56235{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=return" >&5
56236printf %s "checking whether C compiler handles -fsanitize=return... " >&6; }
56237if test ${gl_cv_warn_c__fsanitize_return+y}
56238then :
56239  printf %s "(cached) " >&6
56240else $as_nop
56241
56242  gl_save_compiler_FLAGS="$CFLAGS"
56243  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=return"
56244  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56245/* end confdefs.h.  */
56246
56247int
56248main (void)
56249{
56250
56251  ;
56252  return 0;
56253}
56254_ACEOF
56255if ac_fn_c_try_link "$LINENO"
56256then :
56257  gl_cv_warn_c__fsanitize_return=yes
56258else $as_nop
56259  gl_cv_warn_c__fsanitize_return=no
56260fi
56261rm -f core conftest.err conftest.$ac_objext conftest.beam \
56262    conftest$ac_exeext conftest.$ac_ext
56263  CFLAGS="$gl_save_compiler_FLAGS"
56264
56265fi
56266{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_return" >&5
56267printf "%s\n" "$gl_cv_warn_c__fsanitize_return" >&6; }
56268if test "x$gl_cv_warn_c__fsanitize_return" = xyes
56269then :
56270  as_fn_append WARN_CFLAGS " -fsanitize=return"
56271fi
56272
56273
56274
56275
56276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=returns-nonnull-attribute" >&5
56277printf %s "checking whether C compiler handles -fsanitize=returns-nonnull-attribute... " >&6; }
56278if test ${gl_cv_warn_c__fsanitize_returns_nonnull_attribute+y}
56279then :
56280  printf %s "(cached) " >&6
56281else $as_nop
56282
56283  gl_save_compiler_FLAGS="$CFLAGS"
56284  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=returns-nonnull-attribute"
56285  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56286/* end confdefs.h.  */
56287
56288int
56289main (void)
56290{
56291
56292  ;
56293  return 0;
56294}
56295_ACEOF
56296if ac_fn_c_try_link "$LINENO"
56297then :
56298  gl_cv_warn_c__fsanitize_returns_nonnull_attribute=yes
56299else $as_nop
56300  gl_cv_warn_c__fsanitize_returns_nonnull_attribute=no
56301fi
56302rm -f core conftest.err conftest.$ac_objext conftest.beam \
56303    conftest$ac_exeext conftest.$ac_ext
56304  CFLAGS="$gl_save_compiler_FLAGS"
56305
56306fi
56307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_returns_nonnull_attribute" >&5
56308printf "%s\n" "$gl_cv_warn_c__fsanitize_returns_nonnull_attribute" >&6; }
56309if test "x$gl_cv_warn_c__fsanitize_returns_nonnull_attribute" = xyes
56310then :
56311  as_fn_append WARN_CFLAGS " -fsanitize=returns-nonnull-attribute"
56312fi
56313
56314
56315
56316
56317{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=shift" >&5
56318printf %s "checking whether C compiler handles -fsanitize=shift... " >&6; }
56319if test ${gl_cv_warn_c__fsanitize_shift+y}
56320then :
56321  printf %s "(cached) " >&6
56322else $as_nop
56323
56324  gl_save_compiler_FLAGS="$CFLAGS"
56325  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=shift"
56326  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56327/* end confdefs.h.  */
56328
56329int
56330main (void)
56331{
56332
56333  ;
56334  return 0;
56335}
56336_ACEOF
56337if ac_fn_c_try_link "$LINENO"
56338then :
56339  gl_cv_warn_c__fsanitize_shift=yes
56340else $as_nop
56341  gl_cv_warn_c__fsanitize_shift=no
56342fi
56343rm -f core conftest.err conftest.$ac_objext conftest.beam \
56344    conftest$ac_exeext conftest.$ac_ext
56345  CFLAGS="$gl_save_compiler_FLAGS"
56346
56347fi
56348{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_shift" >&5
56349printf "%s\n" "$gl_cv_warn_c__fsanitize_shift" >&6; }
56350if test "x$gl_cv_warn_c__fsanitize_shift" = xyes
56351then :
56352  as_fn_append WARN_CFLAGS " -fsanitize=shift"
56353fi
56354
56355
56356
56357
56358{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=signed-integer-overflow" >&5
56359printf %s "checking whether C compiler handles -fsanitize=signed-integer-overflow... " >&6; }
56360if test ${gl_cv_warn_c__fsanitize_signed_integer_overflow+y}
56361then :
56362  printf %s "(cached) " >&6
56363else $as_nop
56364
56365  gl_save_compiler_FLAGS="$CFLAGS"
56366  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=signed-integer-overflow"
56367  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56368/* end confdefs.h.  */
56369
56370int
56371main (void)
56372{
56373
56374  ;
56375  return 0;
56376}
56377_ACEOF
56378if ac_fn_c_try_link "$LINENO"
56379then :
56380  gl_cv_warn_c__fsanitize_signed_integer_overflow=yes
56381else $as_nop
56382  gl_cv_warn_c__fsanitize_signed_integer_overflow=no
56383fi
56384rm -f core conftest.err conftest.$ac_objext conftest.beam \
56385    conftest$ac_exeext conftest.$ac_ext
56386  CFLAGS="$gl_save_compiler_FLAGS"
56387
56388fi
56389{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_signed_integer_overflow" >&5
56390printf "%s\n" "$gl_cv_warn_c__fsanitize_signed_integer_overflow" >&6; }
56391if test "x$gl_cv_warn_c__fsanitize_signed_integer_overflow" = xyes
56392then :
56393  as_fn_append WARN_CFLAGS " -fsanitize=signed-integer-overflow"
56394fi
56395
56396
56397
56398
56399{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=unsigned-integer-overflow" >&5
56400printf %s "checking whether C compiler handles -fsanitize=unsigned-integer-overflow... " >&6; }
56401if test ${gl_cv_warn_c__fsanitize_unsigned_integer_overflow+y}
56402then :
56403  printf %s "(cached) " >&6
56404else $as_nop
56405
56406  gl_save_compiler_FLAGS="$CFLAGS"
56407  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=unsigned-integer-overflow"
56408  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56409/* end confdefs.h.  */
56410
56411int
56412main (void)
56413{
56414
56415  ;
56416  return 0;
56417}
56418_ACEOF
56419if ac_fn_c_try_link "$LINENO"
56420then :
56421  gl_cv_warn_c__fsanitize_unsigned_integer_overflow=yes
56422else $as_nop
56423  gl_cv_warn_c__fsanitize_unsigned_integer_overflow=no
56424fi
56425rm -f core conftest.err conftest.$ac_objext conftest.beam \
56426    conftest$ac_exeext conftest.$ac_ext
56427  CFLAGS="$gl_save_compiler_FLAGS"
56428
56429fi
56430{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_unsigned_integer_overflow" >&5
56431printf "%s\n" "$gl_cv_warn_c__fsanitize_unsigned_integer_overflow" >&6; }
56432if test "x$gl_cv_warn_c__fsanitize_unsigned_integer_overflow" = xyes
56433then :
56434  as_fn_append WARN_CFLAGS " -fsanitize=unsigned-integer-overflow"
56435fi
56436
56437
56438
56439
56440{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=unreachable" >&5
56441printf %s "checking whether C compiler handles -fsanitize=unreachable... " >&6; }
56442if test ${gl_cv_warn_c__fsanitize_unreachable+y}
56443then :
56444  printf %s "(cached) " >&6
56445else $as_nop
56446
56447  gl_save_compiler_FLAGS="$CFLAGS"
56448  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=unreachable"
56449  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56450/* end confdefs.h.  */
56451
56452int
56453main (void)
56454{
56455
56456  ;
56457  return 0;
56458}
56459_ACEOF
56460if ac_fn_c_try_link "$LINENO"
56461then :
56462  gl_cv_warn_c__fsanitize_unreachable=yes
56463else $as_nop
56464  gl_cv_warn_c__fsanitize_unreachable=no
56465fi
56466rm -f core conftest.err conftest.$ac_objext conftest.beam \
56467    conftest$ac_exeext conftest.$ac_ext
56468  CFLAGS="$gl_save_compiler_FLAGS"
56469
56470fi
56471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_unreachable" >&5
56472printf "%s\n" "$gl_cv_warn_c__fsanitize_unreachable" >&6; }
56473if test "x$gl_cv_warn_c__fsanitize_unreachable" = xyes
56474then :
56475  as_fn_append WARN_CFLAGS " -fsanitize=unreachable"
56476fi
56477
56478
56479
56480
56481{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=vla-bound" >&5
56482printf %s "checking whether C compiler handles -fsanitize=vla-bound... " >&6; }
56483if test ${gl_cv_warn_c__fsanitize_vla_bound+y}
56484then :
56485  printf %s "(cached) " >&6
56486else $as_nop
56487
56488  gl_save_compiler_FLAGS="$CFLAGS"
56489  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=vla-bound"
56490  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56491/* end confdefs.h.  */
56492
56493int
56494main (void)
56495{
56496
56497  ;
56498  return 0;
56499}
56500_ACEOF
56501if ac_fn_c_try_link "$LINENO"
56502then :
56503  gl_cv_warn_c__fsanitize_vla_bound=yes
56504else $as_nop
56505  gl_cv_warn_c__fsanitize_vla_bound=no
56506fi
56507rm -f core conftest.err conftest.$ac_objext conftest.beam \
56508    conftest$ac_exeext conftest.$ac_ext
56509  CFLAGS="$gl_save_compiler_FLAGS"
56510
56511fi
56512{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_vla_bound" >&5
56513printf "%s\n" "$gl_cv_warn_c__fsanitize_vla_bound" >&6; }
56514if test "x$gl_cv_warn_c__fsanitize_vla_bound" = xyes
56515then :
56516  as_fn_append WARN_CFLAGS " -fsanitize=vla-bound"
56517fi
56518
56519
56520
56521
56522{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=vptr" >&5
56523printf %s "checking whether C compiler handles -fsanitize=vptr... " >&6; }
56524if test ${gl_cv_warn_c__fsanitize_vptr+y}
56525then :
56526  printf %s "(cached) " >&6
56527else $as_nop
56528
56529  gl_save_compiler_FLAGS="$CFLAGS"
56530  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=vptr"
56531  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56532/* end confdefs.h.  */
56533
56534int
56535main (void)
56536{
56537
56538  ;
56539  return 0;
56540}
56541_ACEOF
56542if ac_fn_c_try_link "$LINENO"
56543then :
56544  gl_cv_warn_c__fsanitize_vptr=yes
56545else $as_nop
56546  gl_cv_warn_c__fsanitize_vptr=no
56547fi
56548rm -f core conftest.err conftest.$ac_objext conftest.beam \
56549    conftest$ac_exeext conftest.$ac_ext
56550  CFLAGS="$gl_save_compiler_FLAGS"
56551
56552fi
56553{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_vptr" >&5
56554printf "%s\n" "$gl_cv_warn_c__fsanitize_vptr" >&6; }
56555if test "x$gl_cv_warn_c__fsanitize_vptr" = xyes
56556then :
56557  as_fn_append WARN_CFLAGS " -fsanitize=vptr"
56558fi
56559
56560
56561fi
56562
56563if test "$gl_cc_sanitize_asan" = yes; then
56564
56565
56566{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=address" >&5
56567printf %s "checking whether C compiler handles -fsanitize=address... " >&6; }
56568if test ${gl_cv_warn_c__fsanitize_address+y}
56569then :
56570  printf %s "(cached) " >&6
56571else $as_nop
56572
56573  gl_save_compiler_FLAGS="$CFLAGS"
56574  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=address"
56575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56576/* end confdefs.h.  */
56577
56578int
56579main (void)
56580{
56581
56582  ;
56583  return 0;
56584}
56585_ACEOF
56586if ac_fn_c_try_link "$LINENO"
56587then :
56588  gl_cv_warn_c__fsanitize_address=yes
56589else $as_nop
56590  gl_cv_warn_c__fsanitize_address=no
56591fi
56592rm -f core conftest.err conftest.$ac_objext conftest.beam \
56593    conftest$ac_exeext conftest.$ac_ext
56594  CFLAGS="$gl_save_compiler_FLAGS"
56595
56596fi
56597{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_address" >&5
56598printf "%s\n" "$gl_cv_warn_c__fsanitize_address" >&6; }
56599if test "x$gl_cv_warn_c__fsanitize_address" = xyes
56600then :
56601  as_fn_append WARN_CFLAGS " -fsanitize=address"
56602fi
56603
56604
56605
56606
56607{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=leak" >&5
56608printf %s "checking whether C compiler handles -fsanitize=leak... " >&6; }
56609if test ${gl_cv_warn_c__fsanitize_leak+y}
56610then :
56611  printf %s "(cached) " >&6
56612else $as_nop
56613
56614  gl_save_compiler_FLAGS="$CFLAGS"
56615  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=leak"
56616  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56617/* end confdefs.h.  */
56618
56619int
56620main (void)
56621{
56622
56623  ;
56624  return 0;
56625}
56626_ACEOF
56627if ac_fn_c_try_link "$LINENO"
56628then :
56629  gl_cv_warn_c__fsanitize_leak=yes
56630else $as_nop
56631  gl_cv_warn_c__fsanitize_leak=no
56632fi
56633rm -f core conftest.err conftest.$ac_objext conftest.beam \
56634    conftest$ac_exeext conftest.$ac_ext
56635  CFLAGS="$gl_save_compiler_FLAGS"
56636
56637fi
56638{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_leak" >&5
56639printf "%s\n" "$gl_cv_warn_c__fsanitize_leak" >&6; }
56640if test "x$gl_cv_warn_c__fsanitize_leak" = xyes
56641then :
56642  as_fn_append WARN_CFLAGS " -fsanitize=leak"
56643fi
56644
56645
56646
56647
56648{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=nonnull-attribute" >&5
56649printf %s "checking whether C compiler handles -fsanitize=nonnull-attribute... " >&6; }
56650if test ${gl_cv_warn_c__fsanitize_nonnull_attribute+y}
56651then :
56652  printf %s "(cached) " >&6
56653else $as_nop
56654
56655  gl_save_compiler_FLAGS="$CFLAGS"
56656  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=nonnull-attribute"
56657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56658/* end confdefs.h.  */
56659
56660int
56661main (void)
56662{
56663
56664  ;
56665  return 0;
56666}
56667_ACEOF
56668if ac_fn_c_try_link "$LINENO"
56669then :
56670  gl_cv_warn_c__fsanitize_nonnull_attribute=yes
56671else $as_nop
56672  gl_cv_warn_c__fsanitize_nonnull_attribute=no
56673fi
56674rm -f core conftest.err conftest.$ac_objext conftest.beam \
56675    conftest$ac_exeext conftest.$ac_ext
56676  CFLAGS="$gl_save_compiler_FLAGS"
56677
56678fi
56679{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_nonnull_attribute" >&5
56680printf "%s\n" "$gl_cv_warn_c__fsanitize_nonnull_attribute" >&6; }
56681if test "x$gl_cv_warn_c__fsanitize_nonnull_attribute" = xyes
56682then :
56683  as_fn_append WARN_CFLAGS " -fsanitize=nonnull-attribute"
56684fi
56685
56686
56687
56688
56689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fno-omit-frame-pointer" >&5
56690printf %s "checking whether C compiler handles -fno-omit-frame-pointer... " >&6; }
56691if test ${gl_cv_warn_c__fno_omit_frame_pointer+y}
56692then :
56693  printf %s "(cached) " >&6
56694else $as_nop
56695
56696  gl_save_compiler_FLAGS="$CFLAGS"
56697  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fno-omit-frame-pointer"
56698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56699/* end confdefs.h.  */
56700
56701int
56702main (void)
56703{
56704
56705  ;
56706  return 0;
56707}
56708_ACEOF
56709if ac_fn_c_try_link "$LINENO"
56710then :
56711  gl_cv_warn_c__fno_omit_frame_pointer=yes
56712else $as_nop
56713  gl_cv_warn_c__fno_omit_frame_pointer=no
56714fi
56715rm -f core conftest.err conftest.$ac_objext conftest.beam \
56716    conftest$ac_exeext conftest.$ac_ext
56717  CFLAGS="$gl_save_compiler_FLAGS"
56718
56719fi
56720{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fno_omit_frame_pointer" >&5
56721printf "%s\n" "$gl_cv_warn_c__fno_omit_frame_pointer" >&6; }
56722if test "x$gl_cv_warn_c__fno_omit_frame_pointer" = xyes
56723then :
56724  as_fn_append WARN_CFLAGS " -fno-omit-frame-pointer"
56725fi
56726
56727
56728
56729  # additional clang option
56730
56731
56732{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize-address-use-after-scope" >&5
56733printf %s "checking whether C compiler handles -fsanitize-address-use-after-scope... " >&6; }
56734if test ${gl_cv_warn_c__fsanitize_address_use_after_scope+y}
56735then :
56736  printf %s "(cached) " >&6
56737else $as_nop
56738
56739  gl_save_compiler_FLAGS="$CFLAGS"
56740  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize-address-use-after-scope"
56741  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56742/* end confdefs.h.  */
56743
56744int
56745main (void)
56746{
56747
56748  ;
56749  return 0;
56750}
56751_ACEOF
56752if ac_fn_c_try_link "$LINENO"
56753then :
56754  gl_cv_warn_c__fsanitize_address_use_after_scope=yes
56755else $as_nop
56756  gl_cv_warn_c__fsanitize_address_use_after_scope=no
56757fi
56758rm -f core conftest.err conftest.$ac_objext conftest.beam \
56759    conftest$ac_exeext conftest.$ac_ext
56760  CFLAGS="$gl_save_compiler_FLAGS"
56761
56762fi
56763{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_address_use_after_scope" >&5
56764printf "%s\n" "$gl_cv_warn_c__fsanitize_address_use_after_scope" >&6; }
56765if test "x$gl_cv_warn_c__fsanitize_address_use_after_scope" = xyes
56766then :
56767  as_fn_append WARN_CFLAGS " -fsanitize-address-use-after-scope"
56768fi
56769
56770
56771fi
56772
56773if test "$gl_cc_sanitize_ubsan" = yes || test "$gl_cc_sanitize_asan" = yes; then
56774
56775
56776{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fno-sanitize-recover=all" >&5
56777printf %s "checking whether C compiler handles -fno-sanitize-recover=all... " >&6; }
56778if test ${gl_cv_warn_c__fno_sanitize_recover_all+y}
56779then :
56780  printf %s "(cached) " >&6
56781else $as_nop
56782
56783  gl_save_compiler_FLAGS="$CFLAGS"
56784  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fno-sanitize-recover=all"
56785  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56786/* end confdefs.h.  */
56787
56788int
56789main (void)
56790{
56791
56792  ;
56793  return 0;
56794}
56795_ACEOF
56796if ac_fn_c_try_link "$LINENO"
56797then :
56798  gl_cv_warn_c__fno_sanitize_recover_all=yes
56799else $as_nop
56800  gl_cv_warn_c__fno_sanitize_recover_all=no
56801fi
56802rm -f core conftest.err conftest.$ac_objext conftest.beam \
56803    conftest$ac_exeext conftest.$ac_ext
56804  CFLAGS="$gl_save_compiler_FLAGS"
56805
56806fi
56807{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fno_sanitize_recover_all" >&5
56808printf "%s\n" "$gl_cv_warn_c__fno_sanitize_recover_all" >&6; }
56809if test "x$gl_cv_warn_c__fno_sanitize_recover_all" = xyes
56810then :
56811  as_fn_append WARN_CFLAGS " -fno-sanitize-recover=all"
56812fi
56813
56814
56815
56816
56817{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize-recover=unsigned-integer-overflow" >&5
56818printf %s "checking whether C compiler handles -fsanitize-recover=unsigned-integer-overflow... " >&6; }
56819if test ${gl_cv_warn_c__fsanitize_recover_unsigned_integer_overflow+y}
56820then :
56821  printf %s "(cached) " >&6
56822else $as_nop
56823
56824  gl_save_compiler_FLAGS="$CFLAGS"
56825  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize-recover=unsigned-integer-overflow"
56826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56827/* end confdefs.h.  */
56828
56829int
56830main (void)
56831{
56832
56833  ;
56834  return 0;
56835}
56836_ACEOF
56837if ac_fn_c_try_link "$LINENO"
56838then :
56839  gl_cv_warn_c__fsanitize_recover_unsigned_integer_overflow=yes
56840else $as_nop
56841  gl_cv_warn_c__fsanitize_recover_unsigned_integer_overflow=no
56842fi
56843rm -f core conftest.err conftest.$ac_objext conftest.beam \
56844    conftest$ac_exeext conftest.$ac_ext
56845  CFLAGS="$gl_save_compiler_FLAGS"
56846
56847fi
56848{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_recover_unsigned_integer_overflow" >&5
56849printf "%s\n" "$gl_cv_warn_c__fsanitize_recover_unsigned_integer_overflow" >&6; }
56850if test "x$gl_cv_warn_c__fsanitize_recover_unsigned_integer_overflow" = xyes
56851then :
56852  as_fn_append WARN_CFLAGS " -fsanitize-recover=unsigned-integer-overflow"
56853fi
56854
56855
56856fi
56857
56858if test "$gl_cc_sanitize_msan" = yes; then
56859  # clang options
56860
56861
56862{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=memory" >&5
56863printf %s "checking whether C compiler handles -fsanitize=memory... " >&6; }
56864if test ${gl_cv_warn_c__fsanitize_memory+y}
56865then :
56866  printf %s "(cached) " >&6
56867else $as_nop
56868
56869  gl_save_compiler_FLAGS="$CFLAGS"
56870  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=memory"
56871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56872/* end confdefs.h.  */
56873
56874int
56875main (void)
56876{
56877
56878  ;
56879  return 0;
56880}
56881_ACEOF
56882if ac_fn_c_try_link "$LINENO"
56883then :
56884  gl_cv_warn_c__fsanitize_memory=yes
56885else $as_nop
56886  gl_cv_warn_c__fsanitize_memory=no
56887fi
56888rm -f core conftest.err conftest.$ac_objext conftest.beam \
56889    conftest$ac_exeext conftest.$ac_ext
56890  CFLAGS="$gl_save_compiler_FLAGS"
56891
56892fi
56893{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_memory" >&5
56894printf "%s\n" "$gl_cv_warn_c__fsanitize_memory" >&6; }
56895if test "x$gl_cv_warn_c__fsanitize_memory" = xyes
56896then :
56897  as_fn_append WARN_CFLAGS " -fsanitize=memory"
56898fi
56899
56900
56901
56902
56903{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize-memory-track-origins" >&5
56904printf %s "checking whether C compiler handles -fsanitize-memory-track-origins... " >&6; }
56905if test ${gl_cv_warn_c__fsanitize_memory_track_origins+y}
56906then :
56907  printf %s "(cached) " >&6
56908else $as_nop
56909
56910  gl_save_compiler_FLAGS="$CFLAGS"
56911  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize-memory-track-origins"
56912  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56913/* end confdefs.h.  */
56914
56915int
56916main (void)
56917{
56918
56919  ;
56920  return 0;
56921}
56922_ACEOF
56923if ac_fn_c_try_link "$LINENO"
56924then :
56925  gl_cv_warn_c__fsanitize_memory_track_origins=yes
56926else $as_nop
56927  gl_cv_warn_c__fsanitize_memory_track_origins=no
56928fi
56929rm -f core conftest.err conftest.$ac_objext conftest.beam \
56930    conftest$ac_exeext conftest.$ac_ext
56931  CFLAGS="$gl_save_compiler_FLAGS"
56932
56933fi
56934{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_memory_track_origins" >&5
56935printf "%s\n" "$gl_cv_warn_c__fsanitize_memory_track_origins" >&6; }
56936if test "x$gl_cv_warn_c__fsanitize_memory_track_origins" = xyes
56937then :
56938  as_fn_append WARN_CFLAGS " -fsanitize-memory-track-origins"
56939fi
56940
56941
56942
56943  # gcc options
56944  if test "$CCNAME" = "gcc"; then
56945
56946
56947{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=leak" >&5
56948printf %s "checking whether C compiler handles -fsanitize=leak... " >&6; }
56949if test ${gl_cv_warn_c__fsanitize_leak+y}
56950then :
56951  printf %s "(cached) " >&6
56952else $as_nop
56953
56954  gl_save_compiler_FLAGS="$CFLAGS"
56955  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=leak"
56956  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56957/* end confdefs.h.  */
56958
56959int
56960main (void)
56961{
56962
56963  ;
56964  return 0;
56965}
56966_ACEOF
56967if ac_fn_c_try_link "$LINENO"
56968then :
56969  gl_cv_warn_c__fsanitize_leak=yes
56970else $as_nop
56971  gl_cv_warn_c__fsanitize_leak=no
56972fi
56973rm -f core conftest.err conftest.$ac_objext conftest.beam \
56974    conftest$ac_exeext conftest.$ac_ext
56975  CFLAGS="$gl_save_compiler_FLAGS"
56976
56977fi
56978{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_leak" >&5
56979printf "%s\n" "$gl_cv_warn_c__fsanitize_leak" >&6; }
56980if test "x$gl_cv_warn_c__fsanitize_leak" = xyes
56981then :
56982  as_fn_append WARN_CFLAGS " -fsanitize=leak"
56983fi
56984
56985
56986  fi
56987
56988
56989
56990{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fno-omit-frame-pointer" >&5
56991printf %s "checking whether C compiler handles -fno-omit-frame-pointer... " >&6; }
56992if test ${gl_cv_warn_c__fno_omit_frame_pointer+y}
56993then :
56994  printf %s "(cached) " >&6
56995else $as_nop
56996
56997  gl_save_compiler_FLAGS="$CFLAGS"
56998  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fno-omit-frame-pointer"
56999  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57000/* end confdefs.h.  */
57001
57002int
57003main (void)
57004{
57005
57006  ;
57007  return 0;
57008}
57009_ACEOF
57010if ac_fn_c_try_link "$LINENO"
57011then :
57012  gl_cv_warn_c__fno_omit_frame_pointer=yes
57013else $as_nop
57014  gl_cv_warn_c__fno_omit_frame_pointer=no
57015fi
57016rm -f core conftest.err conftest.$ac_objext conftest.beam \
57017    conftest$ac_exeext conftest.$ac_ext
57018  CFLAGS="$gl_save_compiler_FLAGS"
57019
57020fi
57021{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fno_omit_frame_pointer" >&5
57022printf "%s\n" "$gl_cv_warn_c__fno_omit_frame_pointer" >&6; }
57023if test "x$gl_cv_warn_c__fno_omit_frame_pointer" = xyes
57024then :
57025  as_fn_append WARN_CFLAGS " -fno-omit-frame-pointer"
57026fi
57027
57028
57029
57030
57031{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fPIE" >&5
57032printf %s "checking whether C compiler handles -fPIE... " >&6; }
57033if test ${gl_cv_warn_c__fPIE+y}
57034then :
57035  printf %s "(cached) " >&6
57036else $as_nop
57037
57038  gl_save_compiler_FLAGS="$CFLAGS"
57039  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fPIE"
57040  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57041/* end confdefs.h.  */
57042
57043int
57044main (void)
57045{
57046
57047  ;
57048  return 0;
57049}
57050_ACEOF
57051if ac_fn_c_try_link "$LINENO"
57052then :
57053  gl_cv_warn_c__fPIE=yes
57054else $as_nop
57055  gl_cv_warn_c__fPIE=no
57056fi
57057rm -f core conftest.err conftest.$ac_objext conftest.beam \
57058    conftest$ac_exeext conftest.$ac_ext
57059  CFLAGS="$gl_save_compiler_FLAGS"
57060
57061fi
57062{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fPIE" >&5
57063printf "%s\n" "$gl_cv_warn_c__fPIE" >&6; }
57064if test "x$gl_cv_warn_c__fPIE" = xyes
57065then :
57066  as_fn_append WARN_CFLAGS " -fPIE"
57067fi
57068
57069
57070fi
57071
57072if test "$gl_cc_sanitize_tsan" = yes; then
57073
57074
57075{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fsanitize=thread -fPIC -pie" >&5
57076printf %s "checking whether C compiler handles -fsanitize=thread -fPIC -pie... " >&6; }
57077if test ${gl_cv_warn_c__fsanitize_thread__fPIC__pie+y}
57078then :
57079  printf %s "(cached) " >&6
57080else $as_nop
57081
57082  gl_save_compiler_FLAGS="$CFLAGS"
57083  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fsanitize=thread -fPIC -pie"
57084  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57085/* end confdefs.h.  */
57086
57087int
57088main (void)
57089{
57090
57091  ;
57092  return 0;
57093}
57094_ACEOF
57095if ac_fn_c_try_link "$LINENO"
57096then :
57097  gl_cv_warn_c__fsanitize_thread__fPIC__pie=yes
57098else $as_nop
57099  gl_cv_warn_c__fsanitize_thread__fPIC__pie=no
57100fi
57101rm -f core conftest.err conftest.$ac_objext conftest.beam \
57102    conftest$ac_exeext conftest.$ac_ext
57103  CFLAGS="$gl_save_compiler_FLAGS"
57104
57105fi
57106{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fsanitize_thread__fPIC__pie" >&5
57107printf "%s\n" "$gl_cv_warn_c__fsanitize_thread__fPIC__pie" >&6; }
57108if test "x$gl_cv_warn_c__fsanitize_thread__fPIC__pie" = xyes
57109then :
57110  as_fn_append WARN_CFLAGS " -fsanitize=thread -fPIC -pie"
57111fi
57112
57113
57114fi
57115
57116#
57117# Assertions
57118#
57119# Check whether --enable-assert was given.
57120if test ${enable_assert+y}
57121then :
57122  enableval=$enable_assert; ENABLE_ASSERT=$enableval
57123else $as_nop
57124  ENABLE_ASSERT=no
57125fi
57126
57127
57128if test "$ENABLE_ASSERT" != "yes"
57129then :
57130  CFLAGS="-DNDEBUG $CFLAGS"
57131fi
57132
57133#
57134# xattr
57135#
57136# Check whether --enable-xattr was given.
57137if test ${enable_xattr+y}
57138then :
57139  enableval=$enable_xattr; ENABLE_XATTR=$enableval
57140else $as_nop
57141  ENABLE_XATTR=yes
57142fi
57143
57144
57145case "$host_os" in
57146  *linux* | *darwin*) xattr_syscalls="fsetxattr" ;;
57147  freebsd*)           xattr_syscalls="extattr_set_fd" ;;
57148  *)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling Extended Attribute support: your system is not known to support extended attributes." >&5
57149printf "%s\n" "$as_me: Disabling Extended Attribute support: your system is not known to support extended attributes." >&6;}
57150      ENABLE_XATTR=no
57151esac
57152
57153if test "${ENABLE_XATTR}" = "yes" ; then
57154
57155  for ac_func in $xattr_syscalls
57156do :
57157  as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
57158ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
57159if eval test \"x\$"$as_ac_var"\" = x"yes"
57160then :
57161  cat >>confdefs.h <<_ACEOF
57162#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
57163_ACEOF
57164
57165else $as_nop
57166
57167    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling Extended Attribute support: your system does not support $xattr_syscalls" >&5
57168printf "%s\n" "$as_me: Disabling Extended Attribute support: your system does not support $xattr_syscalls" >&6;}
57169    ENABLE_XATTR=no
57170
57171fi
57172
57173done
57174fi
57175
57176test "${ENABLE_XATTR}" = "yes" &&
57177printf "%s\n" "#define ENABLE_XATTR 1" >>confdefs.h
57178
57179
57180#
57181# Gettext
57182#
57183
57184
57185  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
57186printf %s "checking whether NLS is requested... " >&6; }
57187    # Check whether --enable-nls was given.
57188if test ${enable_nls+y}
57189then :
57190  enableval=$enable_nls; USE_NLS=$enableval
57191else $as_nop
57192  USE_NLS=yes
57193fi
57194
57195  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
57196printf "%s\n" "$USE_NLS" >&6; }
57197
57198
57199
57200
57201      GETTEXT_MACRO_VERSION=0.19
57202
57203
57204
57205
57206# Prepare PATH_SEPARATOR.
57207# The user is always right.
57208if test "${PATH_SEPARATOR+set}" != set; then
57209  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
57210  # contains only /bin. Note that ksh looks also at the FPATH variable,
57211  # so we have to set that as well for the test.
57212  PATH_SEPARATOR=:
57213  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
57214    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
57215           || PATH_SEPARATOR=';'
57216       }
57217fi
57218
57219# Find out how to test for executable files. Don't use a zero-byte file,
57220# as systems may use methods other than mode bits to determine executability.
57221cat >conf$$.file <<_ASEOF
57222#! /bin/sh
57223exit 0
57224_ASEOF
57225chmod +x conf$$.file
57226if test -x conf$$.file >/dev/null 2>&1; then
57227  ac_executable_p="test -x"
57228else
57229  ac_executable_p="test -f"
57230fi
57231rm -f conf$$.file
57232
57233# Extract the first word of "msgfmt", so it can be a program name with args.
57234set dummy msgfmt; ac_word=$2
57235{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57236printf %s "checking for $ac_word... " >&6; }
57237if test ${ac_cv_path_MSGFMT+y}
57238then :
57239  printf %s "(cached) " >&6
57240else $as_nop
57241  case "$MSGFMT" in
57242  [\\/]* | ?:[\\/]*)
57243    ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
57244    ;;
57245  *)
57246    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
57247    for ac_dir in $PATH; do
57248      IFS="$ac_save_IFS"
57249      test -z "$ac_dir" && ac_dir=.
57250      for ac_exec_ext in '' $ac_executable_extensions; do
57251        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
57252          echo "$as_me: trying $ac_dir/$ac_word..." >&5
57253          if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
57254     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
57255            ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
57256            break 2
57257          fi
57258        fi
57259      done
57260    done
57261    IFS="$ac_save_IFS"
57262  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
57263    ;;
57264esac
57265fi
57266MSGFMT="$ac_cv_path_MSGFMT"
57267if test "$MSGFMT" != ":"; then
57268  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
57269printf "%s\n" "$MSGFMT" >&6; }
57270else
57271  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
57272printf "%s\n" "no" >&6; }
57273fi
57274
57275  # Extract the first word of "gmsgfmt", so it can be a program name with args.
57276set dummy gmsgfmt; ac_word=$2
57277{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57278printf %s "checking for $ac_word... " >&6; }
57279if test ${ac_cv_path_GMSGFMT+y}
57280then :
57281  printf %s "(cached) " >&6
57282else $as_nop
57283  case $GMSGFMT in
57284  [\\/]* | ?:[\\/]*)
57285  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
57286  ;;
57287  *)
57288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57289for as_dir in $PATH
57290do
57291  IFS=$as_save_IFS
57292  case $as_dir in #(((
57293    '') as_dir=./ ;;
57294    */) ;;
57295    *) as_dir=$as_dir/ ;;
57296  esac
57297    for ac_exec_ext in '' $ac_executable_extensions; do
57298  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
57299    ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
57300    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
57301    break 2
57302  fi
57303done
57304  done
57305IFS=$as_save_IFS
57306
57307  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
57308  ;;
57309esac
57310fi
57311GMSGFMT=$ac_cv_path_GMSGFMT
57312if test -n "$GMSGFMT"; then
57313  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
57314printf "%s\n" "$GMSGFMT" >&6; }
57315else
57316  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
57317printf "%s\n" "no" >&6; }
57318fi
57319
57320
57321
57322    case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
57323    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
57324    *) MSGFMT_015=$MSGFMT ;;
57325  esac
57326
57327  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
57328    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
57329    *) GMSGFMT_015=$GMSGFMT ;;
57330  esac
57331
57332
57333
57334# Prepare PATH_SEPARATOR.
57335# The user is always right.
57336if test "${PATH_SEPARATOR+set}" != set; then
57337  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
57338  # contains only /bin. Note that ksh looks also at the FPATH variable,
57339  # so we have to set that as well for the test.
57340  PATH_SEPARATOR=:
57341  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
57342    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
57343           || PATH_SEPARATOR=';'
57344       }
57345fi
57346
57347# Find out how to test for executable files. Don't use a zero-byte file,
57348# as systems may use methods other than mode bits to determine executability.
57349cat >conf$$.file <<_ASEOF
57350#! /bin/sh
57351exit 0
57352_ASEOF
57353chmod +x conf$$.file
57354if test -x conf$$.file >/dev/null 2>&1; then
57355  ac_executable_p="test -x"
57356else
57357  ac_executable_p="test -f"
57358fi
57359rm -f conf$$.file
57360
57361# Extract the first word of "xgettext", so it can be a program name with args.
57362set dummy xgettext; ac_word=$2
57363{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57364printf %s "checking for $ac_word... " >&6; }
57365if test ${ac_cv_path_XGETTEXT+y}
57366then :
57367  printf %s "(cached) " >&6
57368else $as_nop
57369  case "$XGETTEXT" in
57370  [\\/]* | ?:[\\/]*)
57371    ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
57372    ;;
57373  *)
57374    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
57375    for ac_dir in $PATH; do
57376      IFS="$ac_save_IFS"
57377      test -z "$ac_dir" && ac_dir=.
57378      for ac_exec_ext in '' $ac_executable_extensions; do
57379        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
57380          echo "$as_me: trying $ac_dir/$ac_word..." >&5
57381          if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
57382     (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
57383            ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
57384            break 2
57385          fi
57386        fi
57387      done
57388    done
57389    IFS="$ac_save_IFS"
57390  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
57391    ;;
57392esac
57393fi
57394XGETTEXT="$ac_cv_path_XGETTEXT"
57395if test "$XGETTEXT" != ":"; then
57396  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
57397printf "%s\n" "$XGETTEXT" >&6; }
57398else
57399  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
57400printf "%s\n" "no" >&6; }
57401fi
57402
57403    rm -f messages.po
57404
57405    case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
57406    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
57407    *) XGETTEXT_015=$XGETTEXT ;;
57408  esac
57409
57410
57411
57412# Prepare PATH_SEPARATOR.
57413# The user is always right.
57414if test "${PATH_SEPARATOR+set}" != set; then
57415  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
57416  # contains only /bin. Note that ksh looks also at the FPATH variable,
57417  # so we have to set that as well for the test.
57418  PATH_SEPARATOR=:
57419  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
57420    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
57421           || PATH_SEPARATOR=';'
57422       }
57423fi
57424
57425# Find out how to test for executable files. Don't use a zero-byte file,
57426# as systems may use methods other than mode bits to determine executability.
57427cat >conf$$.file <<_ASEOF
57428#! /bin/sh
57429exit 0
57430_ASEOF
57431chmod +x conf$$.file
57432if test -x conf$$.file >/dev/null 2>&1; then
57433  ac_executable_p="test -x"
57434else
57435  ac_executable_p="test -f"
57436fi
57437rm -f conf$$.file
57438
57439# Extract the first word of "msgmerge", so it can be a program name with args.
57440set dummy msgmerge; ac_word=$2
57441{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57442printf %s "checking for $ac_word... " >&6; }
57443if test ${ac_cv_path_MSGMERGE+y}
57444then :
57445  printf %s "(cached) " >&6
57446else $as_nop
57447  case "$MSGMERGE" in
57448  [\\/]* | ?:[\\/]*)
57449    ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
57450    ;;
57451  *)
57452    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
57453    for ac_dir in $PATH; do
57454      IFS="$ac_save_IFS"
57455      test -z "$ac_dir" && ac_dir=.
57456      for ac_exec_ext in '' $ac_executable_extensions; do
57457        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
57458          echo "$as_me: trying $ac_dir/$ac_word..." >&5
57459          if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
57460            ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
57461            break 2
57462          fi
57463        fi
57464      done
57465    done
57466    IFS="$ac_save_IFS"
57467  test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
57468    ;;
57469esac
57470fi
57471MSGMERGE="$ac_cv_path_MSGMERGE"
57472if test "$MSGMERGE" != ":"; then
57473  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
57474printf "%s\n" "$MSGMERGE" >&6; }
57475else
57476  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
57477printf "%s\n" "no" >&6; }
57478fi
57479
57480
57481        test -n "$localedir" || localedir='${datadir}/locale'
57482
57483
57484    test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
57485
57486
57487  ac_config_commands="$ac_config_commands po-directories"
57488
57489
57490
57491
57492
57493
57494
57495
57496
57497
57498
57499
57500
57501
57502
57503
57504
57505
57506
57507
57508
57509
57510
57511
57512
57513
57514    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
57515printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
57516if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
57517then :
57518  printf %s "(cached) " >&6
57519else $as_nop
57520  gt_save_LIBS="$LIBS"
57521     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
57522     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57523/* end confdefs.h.  */
57524#include <CoreFoundation/CFPreferences.h>
57525int
57526main (void)
57527{
57528CFPreferencesCopyAppValue(NULL, NULL)
57529  ;
57530  return 0;
57531}
57532_ACEOF
57533if ac_fn_c_try_link "$LINENO"
57534then :
57535  gt_cv_func_CFPreferencesCopyAppValue=yes
57536else $as_nop
57537  gt_cv_func_CFPreferencesCopyAppValue=no
57538fi
57539rm -f core conftest.err conftest.$ac_objext conftest.beam \
57540    conftest$ac_exeext conftest.$ac_ext
57541     LIBS="$gt_save_LIBS"
57542fi
57543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
57544printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
57545  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
57546
57547printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
57548
57549  fi
57550                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
57551printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; }
57552if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y}
57553then :
57554  printf %s "(cached) " >&6
57555else $as_nop
57556  gt_save_LIBS="$LIBS"
57557     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
57558     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57559/* end confdefs.h.  */
57560#include <CoreFoundation/CFLocale.h>
57561int
57562main (void)
57563{
57564CFLocaleCopyPreferredLanguages();
57565  ;
57566  return 0;
57567}
57568_ACEOF
57569if ac_fn_c_try_link "$LINENO"
57570then :
57571  gt_cv_func_CFLocaleCopyPreferredLanguages=yes
57572else $as_nop
57573  gt_cv_func_CFLocaleCopyPreferredLanguages=no
57574fi
57575rm -f core conftest.err conftest.$ac_objext conftest.beam \
57576    conftest$ac_exeext conftest.$ac_ext
57577     LIBS="$gt_save_LIBS"
57578fi
57579{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
57580printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
57581  if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
57582
57583printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
57584
57585  fi
57586  INTL_MACOSX_LIBS=
57587  if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
57588     || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
57589    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
57590  fi
57591
57592
57593
57594
57595
57596
57597  LIBINTL=
57598  LTLIBINTL=
57599  POSUB=
57600
57601    case " $gt_needs " in
57602    *" need-formatstring-macros "*) gt_api_version=3 ;;
57603    *" need-ngettext "*) gt_api_version=2 ;;
57604    *) gt_api_version=1 ;;
57605  esac
57606  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
57607  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
57608
57609    if test "$USE_NLS" = "yes"; then
57610    gt_use_preinstalled_gnugettext=no
57611
57612
57613        if test $gt_api_version -ge 3; then
57614          gt_revision_test_code='
57615#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
57616#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
57617#endif
57618typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
57619'
57620        else
57621          gt_revision_test_code=
57622        fi
57623        if test $gt_api_version -ge 2; then
57624          gt_expression_test_code=' + * ngettext ("", "", 0)'
57625        else
57626          gt_expression_test_code=
57627        fi
57628
57629        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
57630printf %s "checking for GNU gettext in libc... " >&6; }
57631if eval test \${$gt_func_gnugettext_libc+y}
57632then :
57633  printf %s "(cached) " >&6
57634else $as_nop
57635  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57636/* end confdefs.h.  */
57637
57638#include <libintl.h>
57639$gt_revision_test_code
57640extern int _nl_msg_cat_cntr;
57641extern int *_nl_domain_bindings;
57642
57643int
57644main (void)
57645{
57646
57647bindtextdomain ("", "");
57648return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
57649
57650  ;
57651  return 0;
57652}
57653_ACEOF
57654if ac_fn_c_try_link "$LINENO"
57655then :
57656  eval "$gt_func_gnugettext_libc=yes"
57657else $as_nop
57658  eval "$gt_func_gnugettext_libc=no"
57659fi
57660rm -f core conftest.err conftest.$ac_objext conftest.beam \
57661    conftest$ac_exeext conftest.$ac_ext
57662fi
57663eval ac_res=\$$gt_func_gnugettext_libc
57664	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
57665printf "%s\n" "$ac_res" >&6; }
57666
57667        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
57668
57669
57670
57671
57672
57673          am_save_CPPFLAGS="$CPPFLAGS"
57674
57675  for element in $INCICONV; do
57676    haveit=
57677    for x in $CPPFLAGS; do
57678
57679  acl_save_prefix="$prefix"
57680  prefix="$acl_final_prefix"
57681  acl_save_exec_prefix="$exec_prefix"
57682  exec_prefix="$acl_final_exec_prefix"
57683  eval x=\"$x\"
57684  exec_prefix="$acl_save_exec_prefix"
57685  prefix="$acl_save_prefix"
57686
57687      if test "X$x" = "X$element"; then
57688        haveit=yes
57689        break
57690      fi
57691    done
57692    if test -z "$haveit"; then
57693      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
57694    fi
57695  done
57696
57697
57698  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
57699printf %s "checking for iconv... " >&6; }
57700if test ${am_cv_func_iconv+y}
57701then :
57702  printf %s "(cached) " >&6
57703else $as_nop
57704
57705    am_cv_func_iconv="no, consider installing GNU libiconv"
57706    am_cv_lib_iconv=no
57707    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57708/* end confdefs.h.  */
57709
57710#include <stdlib.h>
57711#include <iconv.h>
57712
57713int
57714main (void)
57715{
57716iconv_t cd = iconv_open("","");
57717           iconv(cd,NULL,NULL,NULL,NULL);
57718           iconv_close(cd);
57719  ;
57720  return 0;
57721}
57722_ACEOF
57723if ac_fn_c_try_link "$LINENO"
57724then :
57725  am_cv_func_iconv=yes
57726fi
57727rm -f core conftest.err conftest.$ac_objext conftest.beam \
57728    conftest$ac_exeext conftest.$ac_ext
57729    if test "$am_cv_func_iconv" != yes; then
57730      am_save_LIBS="$LIBS"
57731      LIBS="$LIBS $LIBICONV"
57732      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57733/* end confdefs.h.  */
57734
57735#include <stdlib.h>
57736#include <iconv.h>
57737
57738int
57739main (void)
57740{
57741iconv_t cd = iconv_open("","");
57742             iconv(cd,NULL,NULL,NULL,NULL);
57743             iconv_close(cd);
57744  ;
57745  return 0;
57746}
57747_ACEOF
57748if ac_fn_c_try_link "$LINENO"
57749then :
57750  am_cv_lib_iconv=yes
57751        am_cv_func_iconv=yes
57752fi
57753rm -f core conftest.err conftest.$ac_objext conftest.beam \
57754    conftest$ac_exeext conftest.$ac_ext
57755      LIBS="$am_save_LIBS"
57756    fi
57757
57758fi
57759{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
57760printf "%s\n" "$am_cv_func_iconv" >&6; }
57761  if test "$am_cv_func_iconv" = yes; then
57762    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
57763printf %s "checking for working iconv... " >&6; }
57764if test ${am_cv_func_iconv_works+y}
57765then :
57766  printf %s "(cached) " >&6
57767else $as_nop
57768
57769                  am_save_LIBS="$LIBS"
57770      if test $am_cv_lib_iconv = yes; then
57771        LIBS="$LIBS $LIBICONV"
57772      fi
57773      am_cv_func_iconv_works=no
57774      for ac_iconv_const in '' 'const'; do
57775        if test "$cross_compiling" = yes
57776then :
57777  case "$host_os" in
57778             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
57779             *)            am_cv_func_iconv_works="guessing yes" ;;
57780           esac
57781else $as_nop
57782  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57783/* end confdefs.h.  */
57784
57785#include <iconv.h>
57786#include <string.h>
57787
57788#ifndef ICONV_CONST
57789# define ICONV_CONST $ac_iconv_const
57790#endif
57791
57792int
57793main (void)
57794{
57795int result = 0;
57796  /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
57797     successful returns.  This is even documented in
57798     <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
57799  {
57800    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
57801    if (cd_utf8_to_88591 != (iconv_t)(-1))
57802      {
57803        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
57804        char buf[10];
57805        ICONV_CONST char *inptr = input;
57806        size_t inbytesleft = strlen (input);
57807        char *outptr = buf;
57808        size_t outbytesleft = sizeof (buf);
57809        size_t res = iconv (cd_utf8_to_88591,
57810                            &inptr, &inbytesleft,
57811                            &outptr, &outbytesleft);
57812        if (res == 0)
57813          result |= 1;
57814        iconv_close (cd_utf8_to_88591);
57815      }
57816  }
57817  /* Test against Solaris 10 bug: Failures are not distinguishable from
57818     successful returns.  */
57819  {
57820    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
57821    if (cd_ascii_to_88591 != (iconv_t)(-1))
57822      {
57823        static ICONV_CONST char input[] = "\263";
57824        char buf[10];
57825        ICONV_CONST char *inptr = input;
57826        size_t inbytesleft = strlen (input);
57827        char *outptr = buf;
57828        size_t outbytesleft = sizeof (buf);
57829        size_t res = iconv (cd_ascii_to_88591,
57830                            &inptr, &inbytesleft,
57831                            &outptr, &outbytesleft);
57832        if (res == 0)
57833          result |= 2;
57834        iconv_close (cd_ascii_to_88591);
57835      }
57836  }
57837  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
57838  {
57839    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
57840    if (cd_88591_to_utf8 != (iconv_t)(-1))
57841      {
57842        static ICONV_CONST char input[] = "\304";
57843        static char buf[2] = { (char)0xDE, (char)0xAD };
57844        ICONV_CONST char *inptr = input;
57845        size_t inbytesleft = 1;
57846        char *outptr = buf;
57847        size_t outbytesleft = 1;
57848        size_t res = iconv (cd_88591_to_utf8,
57849                            &inptr, &inbytesleft,
57850                            &outptr, &outbytesleft);
57851        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
57852          result |= 4;
57853        iconv_close (cd_88591_to_utf8);
57854      }
57855  }
57856#if 0 /* This bug could be worked around by the caller.  */
57857  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
57858  {
57859    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
57860    if (cd_88591_to_utf8 != (iconv_t)(-1))
57861      {
57862        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
57863        char buf[50];
57864        ICONV_CONST char *inptr = input;
57865        size_t inbytesleft = strlen (input);
57866        char *outptr = buf;
57867        size_t outbytesleft = sizeof (buf);
57868        size_t res = iconv (cd_88591_to_utf8,
57869                            &inptr, &inbytesleft,
57870                            &outptr, &outbytesleft);
57871        if ((int)res > 0)
57872          result |= 8;
57873        iconv_close (cd_88591_to_utf8);
57874      }
57875  }
57876#endif
57877  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
57878     provided.  */
57879  {
57880    /* Try standardized names.  */
57881    iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
57882    /* Try IRIX, OSF/1 names.  */
57883    iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
57884    /* Try AIX names.  */
57885    iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
57886    /* Try HP-UX names.  */
57887    iconv_t cd4 = iconv_open ("utf8", "eucJP");
57888    if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
57889        && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
57890      result |= 16;
57891    if (cd1 != (iconv_t)(-1))
57892      iconv_close (cd1);
57893    if (cd2 != (iconv_t)(-1))
57894      iconv_close (cd2);
57895    if (cd3 != (iconv_t)(-1))
57896      iconv_close (cd3);
57897    if (cd4 != (iconv_t)(-1))
57898      iconv_close (cd4);
57899  }
57900  return result;
57901
57902  ;
57903  return 0;
57904}
57905_ACEOF
57906if ac_fn_c_try_run "$LINENO"
57907then :
57908  am_cv_func_iconv_works=yes
57909fi
57910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
57911  conftest.$ac_objext conftest.beam conftest.$ac_ext
57912fi
57913
57914        test "$am_cv_func_iconv_works" = no || break
57915      done
57916      LIBS="$am_save_LIBS"
57917
57918fi
57919{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
57920printf "%s\n" "$am_cv_func_iconv_works" >&6; }
57921    case "$am_cv_func_iconv_works" in
57922      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
57923      *)   am_func_iconv=yes ;;
57924    esac
57925  else
57926    am_func_iconv=no am_cv_lib_iconv=no
57927  fi
57928  if test "$am_func_iconv" = yes; then
57929
57930printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
57931
57932  fi
57933  if test "$am_cv_lib_iconv" = yes; then
57934    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
57935printf %s "checking how to link with libiconv... " >&6; }
57936    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
57937printf "%s\n" "$LIBICONV" >&6; }
57938  else
57939            CPPFLAGS="$am_save_CPPFLAGS"
57940    LIBICONV=
57941    LTLIBICONV=
57942  fi
57943
57944
57945
57946
57947
57948
57949
57950
57951
57952
57953    use_additional=yes
57954
57955  acl_save_prefix="$prefix"
57956  prefix="$acl_final_prefix"
57957  acl_save_exec_prefix="$exec_prefix"
57958  exec_prefix="$acl_final_exec_prefix"
57959
57960    eval additional_includedir=\"$includedir\"
57961    eval additional_libdir=\"$libdir\"
57962    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
57963    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
57964
57965  exec_prefix="$acl_save_exec_prefix"
57966  prefix="$acl_save_prefix"
57967
57968
57969# Check whether --with-libintl-prefix was given.
57970if test ${with_libintl_prefix+y}
57971then :
57972  withval=$with_libintl_prefix;
57973    if test "X$withval" = "Xno"; then
57974      use_additional=no
57975    else
57976      if test "X$withval" = "X"; then
57977
57978  acl_save_prefix="$prefix"
57979  prefix="$acl_final_prefix"
57980  acl_save_exec_prefix="$exec_prefix"
57981  exec_prefix="$acl_final_exec_prefix"
57982
57983          eval additional_includedir=\"$includedir\"
57984          eval additional_libdir=\"$libdir\"
57985          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
57986          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
57987
57988  exec_prefix="$acl_save_exec_prefix"
57989  prefix="$acl_save_prefix"
57990
57991      else
57992        additional_includedir="$withval/include"
57993        additional_libdir="$withval/$acl_libdirstem"
57994        additional_libdir2="$withval/$acl_libdirstem2"
57995        additional_libdir3="$withval/$acl_libdirstem3"
57996      fi
57997    fi
57998
57999fi
58000
58001  if test "X$additional_libdir2" = "X$additional_libdir"; then
58002    additional_libdir2=
58003  fi
58004  if test "X$additional_libdir3" = "X$additional_libdir"; then
58005    additional_libdir3=
58006  fi
58007      LIBINTL=
58008  LTLIBINTL=
58009  INCINTL=
58010  LIBINTL_PREFIX=
58011      HAVE_LIBINTL=
58012  rpathdirs=
58013  ltrpathdirs=
58014  names_already_handled=
58015  names_next_round='intl '
58016  while test -n "$names_next_round"; do
58017    names_this_round="$names_next_round"
58018    names_next_round=
58019    for name in $names_this_round; do
58020      already_handled=
58021      for n in $names_already_handled; do
58022        if test "$n" = "$name"; then
58023          already_handled=yes
58024          break
58025        fi
58026      done
58027      if test -z "$already_handled"; then
58028        names_already_handled="$names_already_handled $name"
58029                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
58030        eval value=\"\$HAVE_LIB$uppername\"
58031        if test -n "$value"; then
58032          if test "$value" = yes; then
58033            eval value=\"\$LIB$uppername\"
58034            test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
58035            eval value=\"\$LTLIB$uppername\"
58036            test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
58037          else
58038                                    :
58039          fi
58040        else
58041                              found_dir=
58042          found_la=
58043          found_so=
58044          found_a=
58045          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
58046          if test -n "$acl_shlibext"; then
58047            shrext=".$acl_shlibext"             # typically: shrext=.so
58048          else
58049            shrext=
58050          fi
58051          if test $use_additional = yes; then
58052            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
58053              if test "X$found_dir" = "X"; then
58054                eval dir=\$$additional_libdir_variable
58055                if test -n "$dir"; then
58056                                                      if test -n "$acl_shlibext"; then
58057                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
58058                      found_dir="$dir"
58059                      found_so="$dir/$libname$shrext"
58060                    else
58061                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
58062                        ver=`(cd "$dir" && \
58063                              for f in "$libname$shrext".*; do echo "$f"; done \
58064                              | sed -e "s,^$libname$shrext\\\\.,," \
58065                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
58066                              | sed 1q ) 2>/dev/null`
58067                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
58068                          found_dir="$dir"
58069                          found_so="$dir/$libname$shrext.$ver"
58070                        fi
58071                      else
58072                        eval library_names=\"$acl_library_names_spec\"
58073                        for f in $library_names; do
58074                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
58075                            found_dir="$dir"
58076                            found_so="$dir/$f"
58077                            break
58078                          fi
58079                        done
58080                      fi
58081                    fi
58082                  fi
58083                                    if test "X$found_dir" = "X"; then
58084                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
58085                      found_dir="$dir"
58086                      found_a="$dir/$libname.$acl_libext"
58087                    fi
58088                  fi
58089                  if test "X$found_dir" != "X"; then
58090                    if test -f "$dir/$libname.la"; then
58091                      found_la="$dir/$libname.la"
58092                    fi
58093                  fi
58094                fi
58095              fi
58096            done
58097          fi
58098          if test "X$found_dir" = "X"; then
58099            for x in $LDFLAGS $LTLIBINTL; do
58100
58101  acl_save_prefix="$prefix"
58102  prefix="$acl_final_prefix"
58103  acl_save_exec_prefix="$exec_prefix"
58104  exec_prefix="$acl_final_exec_prefix"
58105  eval x=\"$x\"
58106  exec_prefix="$acl_save_exec_prefix"
58107  prefix="$acl_save_prefix"
58108
58109              case "$x" in
58110                -L*)
58111                  dir=`echo "X$x" | sed -e 's/^X-L//'`
58112                                    if test -n "$acl_shlibext"; then
58113                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
58114                      found_dir="$dir"
58115                      found_so="$dir/$libname$shrext"
58116                    else
58117                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
58118                        ver=`(cd "$dir" && \
58119                              for f in "$libname$shrext".*; do echo "$f"; done \
58120                              | sed -e "s,^$libname$shrext\\\\.,," \
58121                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
58122                              | sed 1q ) 2>/dev/null`
58123                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
58124                          found_dir="$dir"
58125                          found_so="$dir/$libname$shrext.$ver"
58126                        fi
58127                      else
58128                        eval library_names=\"$acl_library_names_spec\"
58129                        for f in $library_names; do
58130                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
58131                            found_dir="$dir"
58132                            found_so="$dir/$f"
58133                            break
58134                          fi
58135                        done
58136                      fi
58137                    fi
58138                  fi
58139                                    if test "X$found_dir" = "X"; then
58140                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
58141                      found_dir="$dir"
58142                      found_a="$dir/$libname.$acl_libext"
58143                    fi
58144                  fi
58145                  if test "X$found_dir" != "X"; then
58146                    if test -f "$dir/$libname.la"; then
58147                      found_la="$dir/$libname.la"
58148                    fi
58149                  fi
58150                  ;;
58151              esac
58152              if test "X$found_dir" != "X"; then
58153                break
58154              fi
58155            done
58156          fi
58157          if test "X$found_dir" != "X"; then
58158                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
58159            if test "X$found_so" != "X"; then
58160                                                        if test "$enable_rpath" = no \
58161                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
58162                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
58163                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
58164                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
58165              else
58166                                                                                haveit=
58167                for x in $ltrpathdirs; do
58168                  if test "X$x" = "X$found_dir"; then
58169                    haveit=yes
58170                    break
58171                  fi
58172                done
58173                if test -z "$haveit"; then
58174                  ltrpathdirs="$ltrpathdirs $found_dir"
58175                fi
58176                                if test "$acl_hardcode_direct" = yes; then
58177                                                      LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
58178                else
58179                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
58180                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
58181                                                            haveit=
58182                    for x in $rpathdirs; do
58183                      if test "X$x" = "X$found_dir"; then
58184                        haveit=yes
58185                        break
58186                      fi
58187                    done
58188                    if test -z "$haveit"; then
58189                      rpathdirs="$rpathdirs $found_dir"
58190                    fi
58191                  else
58192                                                                                haveit=
58193                    for x in $LDFLAGS $LIBINTL; do
58194
58195  acl_save_prefix="$prefix"
58196  prefix="$acl_final_prefix"
58197  acl_save_exec_prefix="$exec_prefix"
58198  exec_prefix="$acl_final_exec_prefix"
58199  eval x=\"$x\"
58200  exec_prefix="$acl_save_exec_prefix"
58201  prefix="$acl_save_prefix"
58202
58203                      if test "X$x" = "X-L$found_dir"; then
58204                        haveit=yes
58205                        break
58206                      fi
58207                    done
58208                    if test -z "$haveit"; then
58209                      LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
58210                    fi
58211                    if test "$acl_hardcode_minus_L" != no; then
58212                                                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
58213                    else
58214                                                                                                                                                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
58215                    fi
58216                  fi
58217                fi
58218              fi
58219            else
58220              if test "X$found_a" != "X"; then
58221                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
58222              else
58223                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
58224              fi
58225            fi
58226                        additional_includedir=
58227            case "$found_dir" in
58228              */$acl_libdirstem | */$acl_libdirstem/)
58229                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
58230                if test "$name" = 'intl'; then
58231                  LIBINTL_PREFIX="$basedir"
58232                fi
58233                additional_includedir="$basedir/include"
58234                ;;
58235              */$acl_libdirstem2 | */$acl_libdirstem2/)
58236                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
58237                if test "$name" = 'intl'; then
58238                  LIBINTL_PREFIX="$basedir"
58239                fi
58240                additional_includedir="$basedir/include"
58241                ;;
58242              */$acl_libdirstem3 | */$acl_libdirstem3/)
58243                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
58244                if test "$name" = 'intl'; then
58245                  LIBINTL_PREFIX="$basedir"
58246                fi
58247                additional_includedir="$basedir/include"
58248                ;;
58249            esac
58250            if test "X$additional_includedir" != "X"; then
58251                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
58252                haveit=
58253                if test "X$additional_includedir" = "X/usr/local/include"; then
58254                  if test -n "$GCC"; then
58255                    case $host_os in
58256                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
58257                    esac
58258                  fi
58259                fi
58260                if test -z "$haveit"; then
58261                  for x in $CPPFLAGS $INCINTL; do
58262
58263  acl_save_prefix="$prefix"
58264  prefix="$acl_final_prefix"
58265  acl_save_exec_prefix="$exec_prefix"
58266  exec_prefix="$acl_final_exec_prefix"
58267  eval x=\"$x\"
58268  exec_prefix="$acl_save_exec_prefix"
58269  prefix="$acl_save_prefix"
58270
58271                    if test "X$x" = "X-I$additional_includedir"; then
58272                      haveit=yes
58273                      break
58274                    fi
58275                  done
58276                  if test -z "$haveit"; then
58277                    if test -d "$additional_includedir"; then
58278                                            INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
58279                    fi
58280                  fi
58281                fi
58282              fi
58283            fi
58284                        if test -n "$found_la"; then
58285                                                        save_libdir="$libdir"
58286              case "$found_la" in
58287                */* | *\\*) . "$found_la" ;;
58288                *) . "./$found_la" ;;
58289              esac
58290              libdir="$save_libdir"
58291                            for dep in $dependency_libs; do
58292                case "$dep" in
58293                  -L*)
58294                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
58295                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
58296                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
58297                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
58298                      haveit=
58299                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
58300                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
58301                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
58302                        if test -n "$GCC"; then
58303                          case $host_os in
58304                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
58305                          esac
58306                        fi
58307                      fi
58308                      if test -z "$haveit"; then
58309                        haveit=
58310                        for x in $LDFLAGS $LIBINTL; do
58311
58312  acl_save_prefix="$prefix"
58313  prefix="$acl_final_prefix"
58314  acl_save_exec_prefix="$exec_prefix"
58315  exec_prefix="$acl_final_exec_prefix"
58316  eval x=\"$x\"
58317  exec_prefix="$acl_save_exec_prefix"
58318  prefix="$acl_save_prefix"
58319
58320                          if test "X$x" = "X-L$dependency_libdir"; then
58321                            haveit=yes
58322                            break
58323                          fi
58324                        done
58325                        if test -z "$haveit"; then
58326                          if test -d "$dependency_libdir"; then
58327                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir"
58328                          fi
58329                        fi
58330                        haveit=
58331                        for x in $LDFLAGS $LTLIBINTL; do
58332
58333  acl_save_prefix="$prefix"
58334  prefix="$acl_final_prefix"
58335  acl_save_exec_prefix="$exec_prefix"
58336  exec_prefix="$acl_final_exec_prefix"
58337  eval x=\"$x\"
58338  exec_prefix="$acl_save_exec_prefix"
58339  prefix="$acl_save_prefix"
58340
58341                          if test "X$x" = "X-L$dependency_libdir"; then
58342                            haveit=yes
58343                            break
58344                          fi
58345                        done
58346                        if test -z "$haveit"; then
58347                          if test -d "$dependency_libdir"; then
58348                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir"
58349                          fi
58350                        fi
58351                      fi
58352                    fi
58353                    ;;
58354                  -R*)
58355                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
58356                    if test "$enable_rpath" != no; then
58357                                                                  haveit=
58358                      for x in $rpathdirs; do
58359                        if test "X$x" = "X$dir"; then
58360                          haveit=yes
58361                          break
58362                        fi
58363                      done
58364                      if test -z "$haveit"; then
58365                        rpathdirs="$rpathdirs $dir"
58366                      fi
58367                                                                  haveit=
58368                      for x in $ltrpathdirs; do
58369                        if test "X$x" = "X$dir"; then
58370                          haveit=yes
58371                          break
58372                        fi
58373                      done
58374                      if test -z "$haveit"; then
58375                        ltrpathdirs="$ltrpathdirs $dir"
58376                      fi
58377                    fi
58378                    ;;
58379                  -l*)
58380                                                                                                                                                                dep=`echo "X$dep" | sed -e 's/^X-l//'`
58381                    if test "X$dep" != Xc \
58382                       || case $host_os in
58383                            linux* | gnu* | k*bsd*-gnu) false ;;
58384                            *)                          true ;;
58385                          esac; then
58386                      names_next_round="$names_next_round $dep"
58387                    fi
58388                    ;;
58389                  *.la)
58390                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
58391                    ;;
58392                  *)
58393                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
58394                    LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
58395                    ;;
58396                esac
58397              done
58398            fi
58399          else
58400                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
58401            LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
58402          fi
58403        fi
58404      fi
58405    done
58406  done
58407  if test "X$rpathdirs" != "X"; then
58408    if test -n "$acl_hardcode_libdir_separator"; then
58409                        alldirs=
58410      for found_dir in $rpathdirs; do
58411        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
58412      done
58413            acl_save_libdir="$libdir"
58414      libdir="$alldirs"
58415      eval flag=\"$acl_hardcode_libdir_flag_spec\"
58416      libdir="$acl_save_libdir"
58417      LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
58418    else
58419            for found_dir in $rpathdirs; do
58420        acl_save_libdir="$libdir"
58421        libdir="$found_dir"
58422        eval flag=\"$acl_hardcode_libdir_flag_spec\"
58423        libdir="$acl_save_libdir"
58424        LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
58425      done
58426    fi
58427  fi
58428  if test "X$ltrpathdirs" != "X"; then
58429            for found_dir in $ltrpathdirs; do
58430      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
58431    done
58432  fi
58433
58434
58435
58436
58437
58438          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
58439printf %s "checking for GNU gettext in libintl... " >&6; }
58440if eval test \${$gt_func_gnugettext_libintl+y}
58441then :
58442  printf %s "(cached) " >&6
58443else $as_nop
58444  gt_save_CPPFLAGS="$CPPFLAGS"
58445            CPPFLAGS="$CPPFLAGS $INCINTL"
58446            gt_save_LIBS="$LIBS"
58447            LIBS="$LIBS $LIBINTL"
58448                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58449/* end confdefs.h.  */
58450
58451#include <libintl.h>
58452$gt_revision_test_code
58453extern int _nl_msg_cat_cntr;
58454extern
58455#ifdef __cplusplus
58456"C"
58457#endif
58458const char *_nl_expand_alias (const char *);
58459
58460int
58461main (void)
58462{
58463
58464bindtextdomain ("", "");
58465return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
58466
58467  ;
58468  return 0;
58469}
58470_ACEOF
58471if ac_fn_c_try_link "$LINENO"
58472then :
58473  eval "$gt_func_gnugettext_libintl=yes"
58474else $as_nop
58475  eval "$gt_func_gnugettext_libintl=no"
58476fi
58477rm -f core conftest.err conftest.$ac_objext conftest.beam \
58478    conftest$ac_exeext conftest.$ac_ext
58479                        if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
58480              LIBS="$LIBS $LIBICONV"
58481              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58482/* end confdefs.h.  */
58483
58484#include <libintl.h>
58485$gt_revision_test_code
58486extern int _nl_msg_cat_cntr;
58487extern
58488#ifdef __cplusplus
58489"C"
58490#endif
58491const char *_nl_expand_alias (const char *);
58492
58493int
58494main (void)
58495{
58496
58497bindtextdomain ("", "");
58498return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
58499
58500  ;
58501  return 0;
58502}
58503_ACEOF
58504if ac_fn_c_try_link "$LINENO"
58505then :
58506  LIBINTL="$LIBINTL $LIBICONV"
58507                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
58508                 eval "$gt_func_gnugettext_libintl=yes"
58509
58510fi
58511rm -f core conftest.err conftest.$ac_objext conftest.beam \
58512    conftest$ac_exeext conftest.$ac_ext
58513            fi
58514            CPPFLAGS="$gt_save_CPPFLAGS"
58515            LIBS="$gt_save_LIBS"
58516fi
58517eval ac_res=\$$gt_func_gnugettext_libintl
58518	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
58519printf "%s\n" "$ac_res" >&6; }
58520        fi
58521
58522                                        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
58523           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
58524                && test "$PACKAGE" != gettext-runtime \
58525                && test "$PACKAGE" != gettext-tools; }; then
58526          gt_use_preinstalled_gnugettext=yes
58527        else
58528                    LIBINTL=
58529          LTLIBINTL=
58530          INCINTL=
58531        fi
58532
58533
58534
58535    if test -n "$INTL_MACOSX_LIBS"; then
58536      if test "$gt_use_preinstalled_gnugettext" = "yes" \
58537         || test "$nls_cv_use_gnu_gettext" = "yes"; then
58538                LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
58539        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
58540      fi
58541    fi
58542
58543    if test "$gt_use_preinstalled_gnugettext" = "yes" \
58544       || test "$nls_cv_use_gnu_gettext" = "yes"; then
58545
58546printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
58547
58548    else
58549      USE_NLS=no
58550    fi
58551  fi
58552
58553  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
58554printf %s "checking whether to use NLS... " >&6; }
58555  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
58556printf "%s\n" "$USE_NLS" >&6; }
58557  if test "$USE_NLS" = "yes"; then
58558    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
58559printf %s "checking where the gettext function comes from... " >&6; }
58560    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
58561      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
58562        gt_source="external libintl"
58563      else
58564        gt_source="libc"
58565      fi
58566    else
58567      gt_source="included intl directory"
58568    fi
58569    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
58570printf "%s\n" "$gt_source" >&6; }
58571  fi
58572
58573  if test "$USE_NLS" = "yes"; then
58574
58575    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
58576      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
58577        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
58578printf %s "checking how to link with libintl... " >&6; }
58579        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
58580printf "%s\n" "$LIBINTL" >&6; }
58581
58582  for element in $INCINTL; do
58583    haveit=
58584    for x in $CPPFLAGS; do
58585
58586  acl_save_prefix="$prefix"
58587  prefix="$acl_final_prefix"
58588  acl_save_exec_prefix="$exec_prefix"
58589  exec_prefix="$acl_final_exec_prefix"
58590  eval x=\"$x\"
58591  exec_prefix="$acl_save_exec_prefix"
58592  prefix="$acl_save_prefix"
58593
58594      if test "X$x" = "X$element"; then
58595        haveit=yes
58596        break
58597      fi
58598    done
58599    if test -z "$haveit"; then
58600      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
58601    fi
58602  done
58603
58604      fi
58605
58606
58607printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
58608
58609
58610printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
58611
58612    fi
58613
58614        POSUB=po
58615  fi
58616
58617
58618
58619    INTLLIBS="$LIBINTL"
58620
58621
58622
58623
58624
58625
58626  ac_config_files="$ac_config_files po/Makefile.in"
58627
58628  have_po=yes
58629
58630
58631#do not indent here
58632
58633
58634 if  test "$have_po" = "yes" ; then
58635  HAVE_PO_TRUE=
58636  HAVE_PO_FALSE='#'
58637else
58638  HAVE_PO_TRUE='#'
58639  HAVE_PO_FALSE=
58640fi
58641
58642
58643#
58644# check for doxygen and pandoc
58645#
58646# Check whether --enable-doc was given.
58647if test ${enable_doc+y}
58648then :
58649  enableval=$enable_doc; enable_doc=$enableval
58650else $as_nop
58651  enable_doc=yes
58652fi
58653
58654if test "$enable_doc" = yes; then
58655  for ac_prog in doxygen
58656do
58657  # Extract the first word of "$ac_prog", so it can be a program name with args.
58658set dummy $ac_prog; ac_word=$2
58659{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58660printf %s "checking for $ac_word... " >&6; }
58661if test ${ac_cv_prog_DOXYGEN+y}
58662then :
58663  printf %s "(cached) " >&6
58664else $as_nop
58665  if test -n "$DOXYGEN"; then
58666  ac_cv_prog_DOXYGEN="$DOXYGEN" # Let the user override the test.
58667else
58668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58669for as_dir in $PATH
58670do
58671  IFS=$as_save_IFS
58672  case $as_dir in #(((
58673    '') as_dir=./ ;;
58674    */) ;;
58675    *) as_dir=$as_dir/ ;;
58676  esac
58677    for ac_exec_ext in '' $ac_executable_extensions; do
58678  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
58679    ac_cv_prog_DOXYGEN="$ac_prog"
58680    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
58681    break 2
58682  fi
58683done
58684  done
58685IFS=$as_save_IFS
58686
58687fi
58688fi
58689DOXYGEN=$ac_cv_prog_DOXYGEN
58690if test -n "$DOXYGEN"; then
58691  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5
58692printf "%s\n" "$DOXYGEN" >&6; }
58693else
58694  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
58695printf "%s\n" "no" >&6; }
58696fi
58697
58698
58699  test -n "$DOXYGEN" && break
58700done
58701
58702  for ac_prog in pandoc
58703do
58704  # Extract the first word of "$ac_prog", so it can be a program name with args.
58705set dummy $ac_prog; ac_word=$2
58706{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58707printf %s "checking for $ac_word... " >&6; }
58708if test ${ac_cv_prog_PANDOC+y}
58709then :
58710  printf %s "(cached) " >&6
58711else $as_nop
58712  if test -n "$PANDOC"; then
58713  ac_cv_prog_PANDOC="$PANDOC" # Let the user override the test.
58714else
58715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58716for as_dir in $PATH
58717do
58718  IFS=$as_save_IFS
58719  case $as_dir in #(((
58720    '') as_dir=./ ;;
58721    */) ;;
58722    *) as_dir=$as_dir/ ;;
58723  esac
58724    for ac_exec_ext in '' $ac_executable_extensions; do
58725  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
58726    ac_cv_prog_PANDOC="$ac_prog"
58727    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
58728    break 2
58729  fi
58730done
58731  done
58732IFS=$as_save_IFS
58733
58734fi
58735fi
58736PANDOC=$ac_cv_prog_PANDOC
58737if test -n "$PANDOC"; then
58738  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
58739printf "%s\n" "$PANDOC" >&6; }
58740else
58741  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
58742printf "%s\n" "no" >&6; }
58743fi
58744
58745
58746  test -n "$PANDOC" && break
58747done
58748
58749
58750  if test -n "$DOXYGEN" || test -n "$PANDOC"; then
58751    LIBWGET_DOCS_INFO="yes (found:"
58752    if test -n "$DOXYGEN"; then
58753      LIBWGET_DOCS_INFO="$LIBWGET_DOCS_INFO Doxygen)"
58754	else
58755	  LIBWGET_DOCS_INFO="no"
58756    fi
58757    WGET2_DOCS_INFO="yes (found:"
58758    if test -n "$PANDOC"; then
58759      WGET2_DOCS_INFO="$WGET2_DOCS_INFO Pandoc)"
58760	else
58761	  WGET2_DOCS_INFO="no"
58762    fi
58763  else
58764    DOCS_INFO="no (neither Doxygen nor Pandoc found)"
58765  fi
58766else
58767  DOCS_INFO="no (disabled)"
58768fi
58769 if  test -n "$DOXYGEN" || test -n "$PANDOC" ; then
58770  WITH_DOCS_TRUE=
58771  WITH_DOCS_FALSE='#'
58772else
58773  WITH_DOCS_TRUE='#'
58774  WITH_DOCS_FALSE=
58775fi
58776
58777 if  test -n "$DOXYGEN" ; then
58778  WITH_DOXYGEN_TRUE=
58779  WITH_DOXYGEN_FALSE='#'
58780else
58781  WITH_DOXYGEN_TRUE='#'
58782  WITH_DOXYGEN_FALSE=
58783fi
58784
58785 if  test -n "$PANDOC" ; then
58786  WITH_PANDOC_TRUE=
58787  WITH_PANDOC_FALSE='#'
58788else
58789  WITH_PANDOC_TRUE='#'
58790  WITH_PANDOC_FALSE=
58791fi
58792
58793
58794#
58795# enable creation of man pages
58796#
58797#AC_ARG_ENABLE(man,[AS_HELP_STRING([--enable-man],
58798#                                  [generate man pages [default=auto]])],enable_man=yes,enable_man=no)
58799
58800#AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != "no")
58801#AC_MSG_CHECKING([whether to generate man pages])
58802#AS_IF([test "$enable_man" != no], [
58803#  AC_MSG_RESULT([yes])
58804#], [
58805#  AC_MSG_RESULT([no])
58806#])
58807
58808
58809# Check for ldconfig
58810# Extract the first word of "ldconfig", so it can be a program name with args.
58811set dummy ldconfig; ac_word=$2
58812{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58813printf %s "checking for $ac_word... " >&6; }
58814if test ${ac_cv_prog_LDCONFIG+y}
58815then :
58816  printf %s "(cached) " >&6
58817else $as_nop
58818  if test -n "$LDCONFIG"; then
58819  ac_cv_prog_LDCONFIG="$LDCONFIG" # Let the user override the test.
58820else
58821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58822for as_dir in $PATH
58823do
58824  IFS=$as_save_IFS
58825  case $as_dir in #(((
58826    '') as_dir=./ ;;
58827    */) ;;
58828    *) as_dir=$as_dir/ ;;
58829  esac
58830    for ac_exec_ext in '' $ac_executable_extensions; do
58831  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
58832    ac_cv_prog_LDCONFIG="ldconfig"
58833    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
58834    break 2
58835  fi
58836done
58837  done
58838IFS=$as_save_IFS
58839
58840  test -z "$ac_cv_prog_LDCONFIG" && ac_cv_prog_LDCONFIG=":"
58841fi
58842fi
58843LDCONFIG=$ac_cv_prog_LDCONFIG
58844if test -n "$LDCONFIG"; then
58845  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDCONFIG" >&5
58846printf "%s\n" "$LDCONFIG" >&6; }
58847else
58848  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
58849printf "%s\n" "no" >&6; }
58850fi
58851
58852
58853
58854# Check for valgrind
58855# Check whether --enable-valgrind-tests was given.
58856if test ${enable_valgrind_tests+y}
58857then :
58858  enableval=$enable_valgrind_tests; ac_enable_valgrind=$enableval
58859else $as_nop
58860  ac_enable_valgrind=no
58861fi
58862
58863if test "${ac_enable_valgrind}" != "no"
58864then :
58865
58866  # Extract the first word of "valgrind", so it can be a program name with args.
58867set dummy valgrind; ac_word=$2
58868{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58869printf %s "checking for $ac_word... " >&6; }
58870if test ${ac_cv_prog_HAVE_VALGRIND+y}
58871then :
58872  printf %s "(cached) " >&6
58873else $as_nop
58874  if test -n "$HAVE_VALGRIND"; then
58875  ac_cv_prog_HAVE_VALGRIND="$HAVE_VALGRIND" # Let the user override the test.
58876else
58877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58878for as_dir in $PATH
58879do
58880  IFS=$as_save_IFS
58881  case $as_dir in #(((
58882    '') as_dir=./ ;;
58883    */) ;;
58884    *) as_dir=$as_dir/ ;;
58885  esac
58886    for ac_exec_ext in '' $ac_executable_extensions; do
58887  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
58888    ac_cv_prog_HAVE_VALGRIND="yes"
58889    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
58890    break 2
58891  fi
58892done
58893  done
58894IFS=$as_save_IFS
58895
58896  test -z "$ac_cv_prog_HAVE_VALGRIND" && ac_cv_prog_HAVE_VALGRIND="no"
58897fi
58898fi
58899HAVE_VALGRIND=$ac_cv_prog_HAVE_VALGRIND
58900if test -n "$HAVE_VALGRIND"; then
58901  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_VALGRIND" >&5
58902printf "%s\n" "$HAVE_VALGRIND" >&6; }
58903else
58904  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
58905printf "%s\n" "no" >&6; }
58906fi
58907
58908
58909  if test "$HAVE_VALGRIND" = "yes"
58910then :
58911
58912    VALGRIND_TESTS="1"
58913
58914    TESTS_INFO="Test suite will be run under Valgrind"
58915
58916else $as_nop
58917
58918    TESTS_INFO="Valgrind not found"
58919
58920fi
58921
58922else $as_nop
58923
58924  TESTS_INFO="Valgrind testing not enabled"
58925
58926fi
58927
58928
58929if test "$VALGRIND_TESTS" = 1; then
58930  if test "$gl_cc_sanitize_asan" = yes; then
58931    as_fn_error $? "Valgrind and Address Sanitizer are mutually exclusive" "$LINENO" 5
58932  elif test "$gl_cc_sanitize_msan" = yes; then
58933    as_fn_error $? "Valgrind and Memory Sanitizer are mutually exclusive" "$LINENO" 5
58934  elif test "$gl_cc_sanitize_tsan" = yes; then
58935    as_fn_error $? "Valgrind and Thread Sanitizer are mutually exclusive" "$LINENO" 5
58936  fi
58937fi
58938
58939# check for pandoc (documentation converter)
58940
58941# check for gcc's atomic read-add-write functionality
58942{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __sync_fetch_and_add (int)" >&5
58943printf %s "checking for __sync_fetch_and_add (int)... " >&6; }
58944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58945/* end confdefs.h.  */
58946
58947    int main(void) { return __sync_fetch_and_add((int *)0, 0); }
58948
58949_ACEOF
58950if ac_fn_c_try_link "$LINENO"
58951then :
58952
58953printf "%s\n" "#define WITH_SYNC_FETCH_AND_ADD 1" >>confdefs.h
58954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58955printf "%s\n" "yes" >&6; }
58956else $as_nop
58957  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
58958printf "%s\n" "no" >&6; }
58959
58960fi
58961rm -f core conftest.err conftest.$ac_objext conftest.beam \
58962    conftest$ac_exeext conftest.$ac_ext
58963{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __sync_fetch_and_add (long long)" >&5
58964printf %s "checking for __sync_fetch_and_add (long long)... " >&6; }
58965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58966/* end confdefs.h.  */
58967
58968    int main(void) { return __sync_fetch_and_add((long long *)0, 0); }
58969
58970_ACEOF
58971if ac_fn_c_try_link "$LINENO"
58972then :
58973
58974printf "%s\n" "#define WITH_SYNC_FETCH_AND_ADD_LONGLONG 1" >>confdefs.h
58975 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58976printf "%s\n" "yes" >&6; }
58977else $as_nop
58978  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
58979printf "%s\n" "no" >&6; }
58980
58981fi
58982rm -f core conftest.err conftest.$ac_objext conftest.beam \
58983    conftest$ac_exeext conftest.$ac_ext
58984
58985
58986
58987
58988
58989
58990
58991
58992if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
58993	if test -n "$ac_tool_prefix"; then
58994  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
58995set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
58996{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58997printf %s "checking for $ac_word... " >&6; }
58998if test ${ac_cv_path_PKG_CONFIG+y}
58999then :
59000  printf %s "(cached) " >&6
59001else $as_nop
59002  case $PKG_CONFIG in
59003  [\\/]* | ?:[\\/]*)
59004  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
59005  ;;
59006  *)
59007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59008for as_dir in $PATH
59009do
59010  IFS=$as_save_IFS
59011  case $as_dir in #(((
59012    '') as_dir=./ ;;
59013    */) ;;
59014    *) as_dir=$as_dir/ ;;
59015  esac
59016    for ac_exec_ext in '' $ac_executable_extensions; do
59017  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
59018    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
59019    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
59020    break 2
59021  fi
59022done
59023  done
59024IFS=$as_save_IFS
59025
59026  ;;
59027esac
59028fi
59029PKG_CONFIG=$ac_cv_path_PKG_CONFIG
59030if test -n "$PKG_CONFIG"; then
59031  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
59032printf "%s\n" "$PKG_CONFIG" >&6; }
59033else
59034  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59035printf "%s\n" "no" >&6; }
59036fi
59037
59038
59039fi
59040if test -z "$ac_cv_path_PKG_CONFIG"; then
59041  ac_pt_PKG_CONFIG=$PKG_CONFIG
59042  # Extract the first word of "pkg-config", so it can be a program name with args.
59043set dummy pkg-config; ac_word=$2
59044{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59045printf %s "checking for $ac_word... " >&6; }
59046if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
59047then :
59048  printf %s "(cached) " >&6
59049else $as_nop
59050  case $ac_pt_PKG_CONFIG in
59051  [\\/]* | ?:[\\/]*)
59052  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
59053  ;;
59054  *)
59055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59056for as_dir in $PATH
59057do
59058  IFS=$as_save_IFS
59059  case $as_dir in #(((
59060    '') as_dir=./ ;;
59061    */) ;;
59062    *) as_dir=$as_dir/ ;;
59063  esac
59064    for ac_exec_ext in '' $ac_executable_extensions; do
59065  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
59066    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
59067    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
59068    break 2
59069  fi
59070done
59071  done
59072IFS=$as_save_IFS
59073
59074  ;;
59075esac
59076fi
59077ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
59078if test -n "$ac_pt_PKG_CONFIG"; then
59079  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
59080printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
59081else
59082  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59083printf "%s\n" "no" >&6; }
59084fi
59085
59086  if test "x$ac_pt_PKG_CONFIG" = x; then
59087    PKG_CONFIG=""
59088  else
59089    case $cross_compiling:$ac_tool_warned in
59090yes:)
59091{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
59092printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
59093ac_tool_warned=yes ;;
59094esac
59095    PKG_CONFIG=$ac_pt_PKG_CONFIG
59096  fi
59097else
59098  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
59099fi
59100
59101fi
59102if test -n "$PKG_CONFIG"; then
59103	_pkg_min_version=0.9.0
59104	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
59105printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
59106	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
59107		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59108printf "%s\n" "yes" >&6; }
59109	else
59110		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59111printf "%s\n" "no" >&6; }
59112		PKG_CONFIG=""
59113	fi
59114fi
59115
59116
59117# Check whether --with-ssl was given.
59118if test ${with_ssl+y}
59119then :
59120  withval=$with_ssl; with_ssl=$withval
59121else $as_nop
59122  with_ssl="yes"
59123fi
59124
59125
59126if test "$with_ssl" = "gnutls" || test "$with_ssl" = "yes"
59127then :
59128
59129
59130pkg_failed=no
59131{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gnutls" >&5
59132printf %s "checking for gnutls... " >&6; }
59133
59134if test -n "$GNUTLS_CFLAGS"; then
59135    pkg_cv_GNUTLS_CFLAGS="$GNUTLS_CFLAGS"
59136 elif test -n "$PKG_CONFIG"; then
59137    if test -n "$PKG_CONFIG" && \
59138    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls\""; } >&5
59139  ($PKG_CONFIG --exists --print-errors "gnutls") 2>&5
59140  ac_status=$?
59141  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59142  test $ac_status = 0; }; then
59143  pkg_cv_GNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls" 2>/dev/null`
59144		      test "x$?" != "x0" && pkg_failed=yes
59145else
59146  pkg_failed=yes
59147fi
59148 else
59149    pkg_failed=untried
59150fi
59151if test -n "$GNUTLS_LIBS"; then
59152    pkg_cv_GNUTLS_LIBS="$GNUTLS_LIBS"
59153 elif test -n "$PKG_CONFIG"; then
59154    if test -n "$PKG_CONFIG" && \
59155    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls\""; } >&5
59156  ($PKG_CONFIG --exists --print-errors "gnutls") 2>&5
59157  ac_status=$?
59158  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59159  test $ac_status = 0; }; then
59160  pkg_cv_GNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls" 2>/dev/null`
59161		      test "x$?" != "x0" && pkg_failed=yes
59162else
59163  pkg_failed=yes
59164fi
59165 else
59166    pkg_failed=untried
59167fi
59168
59169
59170
59171if test $pkg_failed = yes; then
59172        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59173printf "%s\n" "no" >&6; }
59174
59175if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59176        _pkg_short_errors_supported=yes
59177else
59178        _pkg_short_errors_supported=no
59179fi
59180        if test $_pkg_short_errors_supported = yes; then
59181	        GNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gnutls" 2>&1`
59182        else
59183	        GNUTLS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gnutls" 2>&1`
59184        fi
59185	# Put the nasty error message in config.log where it belongs
59186	echo "$GNUTLS_PKG_ERRORS" >&5
59187
59188
59189    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gnutls_global_init" >&5
59190printf %s "checking for library containing gnutls_global_init... " >&6; }
59191if test ${ac_cv_search_gnutls_global_init+y}
59192then :
59193  printf %s "(cached) " >&6
59194else $as_nop
59195  ac_func_search_save_LIBS=$LIBS
59196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59197/* end confdefs.h.  */
59198
59199/* Override any GCC internal prototype to avoid an error.
59200   Use char because int might match the return type of a GCC
59201   builtin and then its argument prototype would still apply.  */
59202char gnutls_global_init ();
59203int
59204main (void)
59205{
59206return gnutls_global_init ();
59207  ;
59208  return 0;
59209}
59210_ACEOF
59211for ac_lib in '' gnutls
59212do
59213  if test -z "$ac_lib"; then
59214    ac_res="none required"
59215  else
59216    ac_res=-l$ac_lib
59217    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
59218  fi
59219  if ac_fn_c_try_link "$LINENO"
59220then :
59221  ac_cv_search_gnutls_global_init=$ac_res
59222fi
59223rm -f core conftest.err conftest.$ac_objext conftest.beam \
59224    conftest$ac_exeext
59225  if test ${ac_cv_search_gnutls_global_init+y}
59226then :
59227  break
59228fi
59229done
59230if test ${ac_cv_search_gnutls_global_init+y}
59231then :
59232
59233else $as_nop
59234  ac_cv_search_gnutls_global_init=no
59235fi
59236rm conftest.$ac_ext
59237LIBS=$ac_func_search_save_LIBS
59238fi
59239{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gnutls_global_init" >&5
59240printf "%s\n" "$ac_cv_search_gnutls_global_init" >&6; }
59241ac_res=$ac_cv_search_gnutls_global_init
59242if test "$ac_res" != no
59243then :
59244  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
59245  with_gnutls=yes
59246else $as_nop
59247  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** GNUTLS was not found. Fallback to libnettle for hashing and checksumming." >&5
59248printf "%s\n" "$as_me: WARNING: *** GNUTLS was not found. Fallback to libnettle for hashing and checksumming." >&2;}
59249fi
59250
59251
59252elif test $pkg_failed = untried; then
59253        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59254printf "%s\n" "no" >&6; }
59255
59256    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gnutls_global_init" >&5
59257printf %s "checking for library containing gnutls_global_init... " >&6; }
59258if test ${ac_cv_search_gnutls_global_init+y}
59259then :
59260  printf %s "(cached) " >&6
59261else $as_nop
59262  ac_func_search_save_LIBS=$LIBS
59263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59264/* end confdefs.h.  */
59265
59266/* Override any GCC internal prototype to avoid an error.
59267   Use char because int might match the return type of a GCC
59268   builtin and then its argument prototype would still apply.  */
59269char gnutls_global_init ();
59270int
59271main (void)
59272{
59273return gnutls_global_init ();
59274  ;
59275  return 0;
59276}
59277_ACEOF
59278for ac_lib in '' gnutls
59279do
59280  if test -z "$ac_lib"; then
59281    ac_res="none required"
59282  else
59283    ac_res=-l$ac_lib
59284    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
59285  fi
59286  if ac_fn_c_try_link "$LINENO"
59287then :
59288  ac_cv_search_gnutls_global_init=$ac_res
59289fi
59290rm -f core conftest.err conftest.$ac_objext conftest.beam \
59291    conftest$ac_exeext
59292  if test ${ac_cv_search_gnutls_global_init+y}
59293then :
59294  break
59295fi
59296done
59297if test ${ac_cv_search_gnutls_global_init+y}
59298then :
59299
59300else $as_nop
59301  ac_cv_search_gnutls_global_init=no
59302fi
59303rm conftest.$ac_ext
59304LIBS=$ac_func_search_save_LIBS
59305fi
59306{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gnutls_global_init" >&5
59307printf "%s\n" "$ac_cv_search_gnutls_global_init" >&6; }
59308ac_res=$ac_cv_search_gnutls_global_init
59309if test "$ac_res" != no
59310then :
59311  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
59312  with_gnutls=yes
59313else $as_nop
59314  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** GNUTLS was not found. Fallback to libnettle for hashing and checksumming." >&5
59315printf "%s\n" "$as_me: WARNING: *** GNUTLS was not found. Fallback to libnettle for hashing and checksumming." >&2;}
59316fi
59317
59318
59319else
59320	GNUTLS_CFLAGS=$pkg_cv_GNUTLS_CFLAGS
59321	GNUTLS_LIBS=$pkg_cv_GNUTLS_LIBS
59322        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59323printf "%s\n" "yes" >&6; }
59324
59325    with_gnutls=yes
59326    LIBS="$GNUTLS_LIBS $LIBS"
59327    CFLAGS="$GNUTLS_CFLAGS $CFLAGS"
59328
59329printf "%s\n" "#define WITH_GNUTLS 1" >>confdefs.h
59330
59331
59332printf "%s\n" "#define WITH_GNUTLS_IN_TESTSUITE 1" >>confdefs.h
59333
59334    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gnutls_hash" >&5
59335printf %s "checking for library containing gnutls_hash... " >&6; }
59336if test ${ac_cv_search_gnutls_hash+y}
59337then :
59338  printf %s "(cached) " >&6
59339else $as_nop
59340  ac_func_search_save_LIBS=$LIBS
59341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59342/* end confdefs.h.  */
59343
59344/* Override any GCC internal prototype to avoid an error.
59345   Use char because int might match the return type of a GCC
59346   builtin and then its argument prototype would still apply.  */
59347char gnutls_hash ();
59348int
59349main (void)
59350{
59351return gnutls_hash ();
59352  ;
59353  return 0;
59354}
59355_ACEOF
59356for ac_lib in '' gnutls
59357do
59358  if test -z "$ac_lib"; then
59359    ac_res="none required"
59360  else
59361    ac_res=-l$ac_lib
59362    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
59363  fi
59364  if ac_fn_c_try_link "$LINENO"
59365then :
59366  ac_cv_search_gnutls_hash=$ac_res
59367fi
59368rm -f core conftest.err conftest.$ac_objext conftest.beam \
59369    conftest$ac_exeext
59370  if test ${ac_cv_search_gnutls_hash+y}
59371then :
59372  break
59373fi
59374done
59375if test ${ac_cv_search_gnutls_hash+y}
59376then :
59377
59378else $as_nop
59379  ac_cv_search_gnutls_hash=no
59380fi
59381rm conftest.$ac_ext
59382LIBS=$ac_func_search_save_LIBS
59383fi
59384{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gnutls_hash" >&5
59385printf "%s\n" "$ac_cv_search_gnutls_hash" >&6; }
59386ac_res=$ac_cv_search_gnutls_hash
59387if test "$ac_res" != no
59388then :
59389  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
59390  with_gnutls_hash=yes
59391fi
59392
59393    if test "$with_gnutls_hash" = "yes"
59394then :
59395  ac_fn_c_check_header_compile "$LINENO" "gnutls/crypto.h" "ac_cv_header_gnutls_crypto_h" "#include <gnutls/gnutls.h>
59396"
59397if test "x$ac_cv_header_gnutls_crypto_h" = xyes
59398then :
59399  printf "%s\n" "#define HAVE_GNUTLS_CRYPTO_H 1" >>confdefs.h
59400
59401fi
59402
59403fi
59404           for ac_header in gnutls/ocsp.h
59405do :
59406  ac_fn_c_check_header_compile "$LINENO" "gnutls/ocsp.h" "ac_cv_header_gnutls_ocsp_h" "$ac_includes_default"
59407if test "x$ac_cv_header_gnutls_ocsp_h" = xyes
59408then :
59409  printf "%s\n" "#define HAVE_GNUTLS_OCSP_H 1" >>confdefs.h
59410
59411printf "%s\n" "#define WITH_OCSP 1" >>confdefs.h
59412
59413
59414printf "%s\n" "#define WITH_GNUTLS_OCSP 1" >>confdefs.h
59415
59416else $as_nop
59417  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** Header file gnutls/ocsp.h was not found. OCSP will be disabled." >&5
59418printf "%s\n" "$as_me: WARNING: *** Header file gnutls/ocsp.h was not found. OCSP will be disabled." >&2;}
59419fi
59420
59421done
59422    ac_fn_c_check_func "$LINENO" "gnutls_srp_server_get_username" "ac_cv_func_gnutls_srp_server_get_username"
59423if test "x$ac_cv_func_gnutls_srp_server_get_username" = xyes
59424then :
59425  printf "%s\n" "#define HAVE_GNUTLS_SRP_SERVER_GET_USERNAME 1" >>confdefs.h
59426
59427fi
59428ac_fn_c_check_func "$LINENO" "gnutls_transport_get_int" "ac_cv_func_gnutls_transport_get_int"
59429if test "x$ac_cv_func_gnutls_transport_get_int" = xyes
59430then :
59431  printf "%s\n" "#define HAVE_GNUTLS_TRANSPORT_GET_INT 1" >>confdefs.h
59432
59433fi
59434
59435
59436fi
59437
59438fi
59439
59440if test "$with_ssl" = "openssl" || (test "$with_ssl" = "yes" && test "$with_gnutls" != "yes")
59441then :
59442
59443
59444pkg_failed=no
59445{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl" >&5
59446printf %s "checking for openssl... " >&6; }
59447
59448if test -n "$OPENSSL_CFLAGS"; then
59449    pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
59450 elif test -n "$PKG_CONFIG"; then
59451    if test -n "$PKG_CONFIG" && \
59452    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
59453  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
59454  ac_status=$?
59455  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59456  test $ac_status = 0; }; then
59457  pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null`
59458		      test "x$?" != "x0" && pkg_failed=yes
59459else
59460  pkg_failed=yes
59461fi
59462 else
59463    pkg_failed=untried
59464fi
59465if test -n "$OPENSSL_LIBS"; then
59466    pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
59467 elif test -n "$PKG_CONFIG"; then
59468    if test -n "$PKG_CONFIG" && \
59469    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
59470  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
59471  ac_status=$?
59472  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59473  test $ac_status = 0; }; then
59474  pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null`
59475		      test "x$?" != "x0" && pkg_failed=yes
59476else
59477  pkg_failed=yes
59478fi
59479 else
59480    pkg_failed=untried
59481fi
59482
59483
59484
59485if test $pkg_failed = yes; then
59486        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59487printf "%s\n" "no" >&6; }
59488
59489if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59490        _pkg_short_errors_supported=yes
59491else
59492        _pkg_short_errors_supported=no
59493fi
59494        if test $_pkg_short_errors_supported = yes; then
59495	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl" 2>&1`
59496        else
59497	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl" 2>&1`
59498        fi
59499	# Put the nasty error message in config.log where it belongs
59500	echo "$OPENSSL_PKG_ERRORS" >&5
59501
59502
59503    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_CTX_new" >&5
59504printf %s "checking for library containing SSL_CTX_new... " >&6; }
59505if test ${ac_cv_search_SSL_CTX_new+y}
59506then :
59507  printf %s "(cached) " >&6
59508else $as_nop
59509  ac_func_search_save_LIBS=$LIBS
59510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59511/* end confdefs.h.  */
59512
59513/* Override any GCC internal prototype to avoid an error.
59514   Use char because int might match the return type of a GCC
59515   builtin and then its argument prototype would still apply.  */
59516char SSL_CTX_new ();
59517int
59518main (void)
59519{
59520return SSL_CTX_new ();
59521  ;
59522  return 0;
59523}
59524_ACEOF
59525for ac_lib in '' openssl
59526do
59527  if test -z "$ac_lib"; then
59528    ac_res="none required"
59529  else
59530    ac_res=-l$ac_lib
59531    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
59532  fi
59533  if ac_fn_c_try_link "$LINENO"
59534then :
59535  ac_cv_search_SSL_CTX_new=$ac_res
59536fi
59537rm -f core conftest.err conftest.$ac_objext conftest.beam \
59538    conftest$ac_exeext
59539  if test ${ac_cv_search_SSL_CTX_new+y}
59540then :
59541  break
59542fi
59543done
59544if test ${ac_cv_search_SSL_CTX_new+y}
59545then :
59546
59547else $as_nop
59548  ac_cv_search_SSL_CTX_new=no
59549fi
59550rm conftest.$ac_ext
59551LIBS=$ac_func_search_save_LIBS
59552fi
59553{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_CTX_new" >&5
59554printf "%s\n" "$ac_cv_search_SSL_CTX_new" >&6; }
59555ac_res=$ac_cv_search_SSL_CTX_new
59556if test "$ac_res" != no
59557then :
59558  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
59559  with_openssl=yes;
59560printf "%s\n" "#define WITH_OPENSSL 1" >>confdefs.h
59561
59562else $as_nop
59563  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** OpenSSL was not found." >&5
59564printf "%s\n" "$as_me: WARNING: *** OpenSSL was not found." >&2;}
59565
59566fi
59567
59568
59569elif test $pkg_failed = untried; then
59570        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59571printf "%s\n" "no" >&6; }
59572
59573    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_CTX_new" >&5
59574printf %s "checking for library containing SSL_CTX_new... " >&6; }
59575if test ${ac_cv_search_SSL_CTX_new+y}
59576then :
59577  printf %s "(cached) " >&6
59578else $as_nop
59579  ac_func_search_save_LIBS=$LIBS
59580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59581/* end confdefs.h.  */
59582
59583/* Override any GCC internal prototype to avoid an error.
59584   Use char because int might match the return type of a GCC
59585   builtin and then its argument prototype would still apply.  */
59586char SSL_CTX_new ();
59587int
59588main (void)
59589{
59590return SSL_CTX_new ();
59591  ;
59592  return 0;
59593}
59594_ACEOF
59595for ac_lib in '' openssl
59596do
59597  if test -z "$ac_lib"; then
59598    ac_res="none required"
59599  else
59600    ac_res=-l$ac_lib
59601    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
59602  fi
59603  if ac_fn_c_try_link "$LINENO"
59604then :
59605  ac_cv_search_SSL_CTX_new=$ac_res
59606fi
59607rm -f core conftest.err conftest.$ac_objext conftest.beam \
59608    conftest$ac_exeext
59609  if test ${ac_cv_search_SSL_CTX_new+y}
59610then :
59611  break
59612fi
59613done
59614if test ${ac_cv_search_SSL_CTX_new+y}
59615then :
59616
59617else $as_nop
59618  ac_cv_search_SSL_CTX_new=no
59619fi
59620rm conftest.$ac_ext
59621LIBS=$ac_func_search_save_LIBS
59622fi
59623{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_CTX_new" >&5
59624printf "%s\n" "$ac_cv_search_SSL_CTX_new" >&6; }
59625ac_res=$ac_cv_search_SSL_CTX_new
59626if test "$ac_res" != no
59627then :
59628  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
59629  with_openssl=yes;
59630printf "%s\n" "#define WITH_OPENSSL 1" >>confdefs.h
59631
59632else $as_nop
59633  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** OpenSSL was not found." >&5
59634printf "%s\n" "$as_me: WARNING: *** OpenSSL was not found." >&2;}
59635
59636fi
59637
59638
59639else
59640	OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
59641	OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
59642        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59643printf "%s\n" "yes" >&6; }
59644
59645    with_openssl=yes
59646    LIBS="$OPENSSL_LIBS $LIBS"
59647    CFLAGS="$OPENSSL_CFLAGS $CFLAGS"
59648
59649printf "%s\n" "#define WITH_OPENSSL 1" >>confdefs.h
59650
59651
59652fi
59653
59654  if test "$with_openssl" = "yes"
59655then :
59656
59657    ac_fn_c_check_header_compile "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
59658if test "x$ac_cv_header_openssl_ssl_h" = xyes
59659then :
59660  printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
59661
59662fi
59663
59664    ac_fn_c_check_header_compile "$LINENO" "openssl/x509_vfy.h" "ac_cv_header_openssl_x509_vfy_h" "$ac_includes_default"
59665if test "x$ac_cv_header_openssl_x509_vfy_h" = xyes
59666then :
59667  printf "%s\n" "#define HAVE_OPENSSL_X509_VFY_H 1" >>confdefs.h
59668
59669fi
59670
59671           for ac_header in openssl/ocsp.h
59672do :
59673  ac_fn_c_check_header_compile "$LINENO" "openssl/ocsp.h" "ac_cv_header_openssl_ocsp_h" "$ac_includes_default"
59674if test "x$ac_cv_header_openssl_ocsp_h" = xyes
59675then :
59676  printf "%s\n" "#define HAVE_OPENSSL_OCSP_H 1" >>confdefs.h
59677
59678printf "%s\n" "#define WITH_OCSP 1" >>confdefs.h
59679
59680else $as_nop
59681  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** Header file openssl/ocsp.h was not found. OCSP will be disabled." >&5
59682printf "%s\n" "$as_me: WARNING: *** Header file openssl/ocsp.h was not found. OCSP will be disabled." >&2;}
59683fi
59684
59685done
59686
59687    ac_fn_c_check_func "$LINENO" "SSL_new" "ac_cv_func_SSL_new"
59688if test "x$ac_cv_func_SSL_new" = xyes
59689then :
59690  printf "%s\n" "#define HAVE_SSL_NEW 1" >>confdefs.h
59691
59692fi
59693ac_fn_c_check_func "$LINENO" "X509_STORE_add_lookup" "ac_cv_func_X509_STORE_add_lookup"
59694if test "x$ac_cv_func_X509_STORE_add_lookup" = xyes
59695then :
59696  printf "%s\n" "#define HAVE_X509_STORE_ADD_LOOKUP 1" >>confdefs.h
59697
59698fi
59699
59700
59701    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing EVP_MD_CTX_new" >&5
59702printf %s "checking for library containing EVP_MD_CTX_new... " >&6; }
59703if test ${ac_cv_search_EVP_MD_CTX_new+y}
59704then :
59705  printf %s "(cached) " >&6
59706else $as_nop
59707  ac_func_search_save_LIBS=$LIBS
59708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59709/* end confdefs.h.  */
59710
59711/* Override any GCC internal prototype to avoid an error.
59712   Use char because int might match the return type of a GCC
59713   builtin and then its argument prototype would still apply.  */
59714char EVP_MD_CTX_new ();
59715int
59716main (void)
59717{
59718return EVP_MD_CTX_new ();
59719  ;
59720  return 0;
59721}
59722_ACEOF
59723for ac_lib in '' crypto
59724do
59725  if test -z "$ac_lib"; then
59726    ac_res="none required"
59727  else
59728    ac_res=-l$ac_lib
59729    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
59730  fi
59731  if ac_fn_c_try_link "$LINENO"
59732then :
59733  ac_cv_search_EVP_MD_CTX_new=$ac_res
59734fi
59735rm -f core conftest.err conftest.$ac_objext conftest.beam \
59736    conftest$ac_exeext
59737  if test ${ac_cv_search_EVP_MD_CTX_new+y}
59738then :
59739  break
59740fi
59741done
59742if test ${ac_cv_search_EVP_MD_CTX_new+y}
59743then :
59744
59745else $as_nop
59746  ac_cv_search_EVP_MD_CTX_new=no
59747fi
59748rm conftest.$ac_ext
59749LIBS=$ac_func_search_save_LIBS
59750fi
59751{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_EVP_MD_CTX_new" >&5
59752printf "%s\n" "$ac_cv_search_EVP_MD_CTX_new" >&6; }
59753ac_res=$ac_cv_search_EVP_MD_CTX_new
59754if test "$ac_res" != no
59755then :
59756  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
59757  with_libcrypto=yes;
59758printf "%s\n" "#define WITH_LIBCRYPTO 1" >>confdefs.h
59759
59760else $as_nop
59761  with_libcrypto=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** LIBCRYPTO was not found. Fallback to libwolfcrypt for hashing and checksumming." >&5
59762printf "%s\n" "$as_me: WARNING: *** LIBCRYPTO was not found. Fallback to libwolfcrypt for hashing and checksumming." >&2;}
59763
59764fi
59765
59766
59767fi
59768
59769fi
59770
59771if test "$with_ssl" = "wolfssl" || (test "$with_ssl" = "yes" && test "$with_gnutls" != "yes" && test "$with_openssl" != "yes")
59772then :
59773
59774
59775pkg_failed=no
59776{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wolfssl" >&5
59777printf %s "checking for wolfssl... " >&6; }
59778
59779if test -n "$WOLFSSL_CFLAGS"; then
59780    pkg_cv_WOLFSSL_CFLAGS="$WOLFSSL_CFLAGS"
59781 elif test -n "$PKG_CONFIG"; then
59782    if test -n "$PKG_CONFIG" && \
59783    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wolfssl\""; } >&5
59784  ($PKG_CONFIG --exists --print-errors "wolfssl") 2>&5
59785  ac_status=$?
59786  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59787  test $ac_status = 0; }; then
59788  pkg_cv_WOLFSSL_CFLAGS=`$PKG_CONFIG --cflags "wolfssl" 2>/dev/null`
59789		      test "x$?" != "x0" && pkg_failed=yes
59790else
59791  pkg_failed=yes
59792fi
59793 else
59794    pkg_failed=untried
59795fi
59796if test -n "$WOLFSSL_LIBS"; then
59797    pkg_cv_WOLFSSL_LIBS="$WOLFSSL_LIBS"
59798 elif test -n "$PKG_CONFIG"; then
59799    if test -n "$PKG_CONFIG" && \
59800    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"wolfssl\""; } >&5
59801  ($PKG_CONFIG --exists --print-errors "wolfssl") 2>&5
59802  ac_status=$?
59803  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59804  test $ac_status = 0; }; then
59805  pkg_cv_WOLFSSL_LIBS=`$PKG_CONFIG --libs "wolfssl" 2>/dev/null`
59806		      test "x$?" != "x0" && pkg_failed=yes
59807else
59808  pkg_failed=yes
59809fi
59810 else
59811    pkg_failed=untried
59812fi
59813
59814
59815
59816if test $pkg_failed = yes; then
59817        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59818printf "%s\n" "no" >&6; }
59819
59820if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59821        _pkg_short_errors_supported=yes
59822else
59823        _pkg_short_errors_supported=no
59824fi
59825        if test $_pkg_short_errors_supported = yes; then
59826	        WOLFSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "wolfssl" 2>&1`
59827        else
59828	        WOLFSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "wolfssl" 2>&1`
59829        fi
59830	# Put the nasty error message in config.log where it belongs
59831	echo "$WOLFSSL_PKG_ERRORS" >&5
59832
59833
59834    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing wolfSSL_Init" >&5
59835printf %s "checking for library containing wolfSSL_Init... " >&6; }
59836if test ${ac_cv_search_wolfSSL_Init+y}
59837then :
59838  printf %s "(cached) " >&6
59839else $as_nop
59840  ac_func_search_save_LIBS=$LIBS
59841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59842/* end confdefs.h.  */
59843
59844/* Override any GCC internal prototype to avoid an error.
59845   Use char because int might match the return type of a GCC
59846   builtin and then its argument prototype would still apply.  */
59847char wolfSSL_Init ();
59848int
59849main (void)
59850{
59851return wolfSSL_Init ();
59852  ;
59853  return 0;
59854}
59855_ACEOF
59856for ac_lib in '' wolfssl
59857do
59858  if test -z "$ac_lib"; then
59859    ac_res="none required"
59860  else
59861    ac_res=-l$ac_lib
59862    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
59863  fi
59864  if ac_fn_c_try_link "$LINENO"
59865then :
59866  ac_cv_search_wolfSSL_Init=$ac_res
59867fi
59868rm -f core conftest.err conftest.$ac_objext conftest.beam \
59869    conftest$ac_exeext
59870  if test ${ac_cv_search_wolfSSL_Init+y}
59871then :
59872  break
59873fi
59874done
59875if test ${ac_cv_search_wolfSSL_Init+y}
59876then :
59877
59878else $as_nop
59879  ac_cv_search_wolfSSL_Init=no
59880fi
59881rm conftest.$ac_ext
59882LIBS=$ac_func_search_save_LIBS
59883fi
59884{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_wolfSSL_Init" >&5
59885printf "%s\n" "$ac_cv_search_wolfSSL_Init" >&6; }
59886ac_res=$ac_cv_search_wolfSSL_Init
59887if test "$ac_res" != no
59888then :
59889  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
59890  with_wolfssl=yes;
59891printf "%s\n" "#define WITH_WOLFSSL 1" >>confdefs.h
59892
59893else $as_nop
59894  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** WolfSSL was not found." >&5
59895printf "%s\n" "$as_me: WARNING: *** WolfSSL was not found." >&2;}
59896fi
59897
59898
59899elif test $pkg_failed = untried; then
59900        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
59901printf "%s\n" "no" >&6; }
59902
59903    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing wolfSSL_Init" >&5
59904printf %s "checking for library containing wolfSSL_Init... " >&6; }
59905if test ${ac_cv_search_wolfSSL_Init+y}
59906then :
59907  printf %s "(cached) " >&6
59908else $as_nop
59909  ac_func_search_save_LIBS=$LIBS
59910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59911/* end confdefs.h.  */
59912
59913/* Override any GCC internal prototype to avoid an error.
59914   Use char because int might match the return type of a GCC
59915   builtin and then its argument prototype would still apply.  */
59916char wolfSSL_Init ();
59917int
59918main (void)
59919{
59920return wolfSSL_Init ();
59921  ;
59922  return 0;
59923}
59924_ACEOF
59925for ac_lib in '' wolfssl
59926do
59927  if test -z "$ac_lib"; then
59928    ac_res="none required"
59929  else
59930    ac_res=-l$ac_lib
59931    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
59932  fi
59933  if ac_fn_c_try_link "$LINENO"
59934then :
59935  ac_cv_search_wolfSSL_Init=$ac_res
59936fi
59937rm -f core conftest.err conftest.$ac_objext conftest.beam \
59938    conftest$ac_exeext
59939  if test ${ac_cv_search_wolfSSL_Init+y}
59940then :
59941  break
59942fi
59943done
59944if test ${ac_cv_search_wolfSSL_Init+y}
59945then :
59946
59947else $as_nop
59948  ac_cv_search_wolfSSL_Init=no
59949fi
59950rm conftest.$ac_ext
59951LIBS=$ac_func_search_save_LIBS
59952fi
59953{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_wolfSSL_Init" >&5
59954printf "%s\n" "$ac_cv_search_wolfSSL_Init" >&6; }
59955ac_res=$ac_cv_search_wolfSSL_Init
59956if test "$ac_res" != no
59957then :
59958  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
59959  with_wolfssl=yes;
59960printf "%s\n" "#define WITH_WOLFSSL 1" >>confdefs.h
59961
59962else $as_nop
59963  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** WolfSSL was not found." >&5
59964printf "%s\n" "$as_me: WARNING: *** WolfSSL was not found." >&2;}
59965fi
59966
59967
59968else
59969	WOLFSSL_CFLAGS=$pkg_cv_WOLFSSL_CFLAGS
59970	WOLFSSL_LIBS=$pkg_cv_WOLFSSL_LIBS
59971        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59972printf "%s\n" "yes" >&6; }
59973
59974    with_wolfssl=yes
59975    LIBS="$WOLFSSL_LIBS $LIBS"
59976    CFLAGS="$WOLFSSL_CFLAGS $CFLAGS"
59977
59978printf "%s\n" "#define WITH_WOLFSSL 1" >>confdefs.h
59979
59980
59981fi
59982
59983  if test "$with_wolfssl" = "yes"
59984then :
59985
59986    with_libwolfcrypt=yes
59987
59988printf "%s\n" "#define WITH_LIBWOLFCRYPT 1" >>confdefs.h
59989
59990
59991fi
59992
59993fi
59994
59995if test "$with_gnutls" = "yes" || test "$with_wolfssl" = "yes" || test "$with_openssl" = "yes"
59996then :
59997
59998
59999printf "%s\n" "#define WITH_TLS 1" >>confdefs.h
60000
60001  if test "$with_gnutls" = "yes"
60002then :
60003  ssl_enabled="gnutls"
60004elif test "$with_openssl" = "yes"
60005then :
60006  ssl_enabled="openssl"
60007elif test "$with_wolfssl" = "yes"
60008then :
60009  ssl_enabled="wolfssl"
60010else $as_nop
60011  ssl_enabled="(not found)"
60012fi
60013
60014else $as_nop
60015
60016  if test "$with_ssl" != "none"
60017then :
60018
60019    if test "$with_ssl" == "yes"
60020then :
60021  as_fn_error $? "*** No SSL/TLS library not found." "$LINENO" 5
60022else $as_nop
60023  as_fn_error $? "*** SSL/TLS library \"$with_ssl\" not found." "$LINENO" 5
60024fi
60025
60026fi
60027  ssl_enabled="none"
60028
60029fi
60030
60031#AS_IF([test "$with_gnutls" != "yes" && test "$with_openssl" != "yes" && test "$with_wolfssl" != "yes"], [
60032#  AS_IF([test "$with_ssl" != "none"], [
60033#    AC_MSG_ERROR([*** Unsupported value for --with-ssl. Use 'gnutls' (default), 'openssl', 'wolfssl' or 'none'])
60034#  ])
60035#  ssl_enabled="(not found)"
60036#])
60037
60038 if test "$with_gnutls" = "yes"; then
60039  WITH_GNUTLS_TRUE=
60040  WITH_GNUTLS_FALSE='#'
60041else
60042  WITH_GNUTLS_TRUE='#'
60043  WITH_GNUTLS_FALSE=
60044fi
60045
60046 if test "$with_openssl" = "yes"; then
60047  WITH_OPENSSL_TRUE=
60048  WITH_OPENSSL_FALSE='#'
60049else
60050  WITH_OPENSSL_TRUE='#'
60051  WITH_OPENSSL_FALSE=
60052fi
60053
60054 if test "$with_wolfssl" = "yes"; then
60055  WITH_WOLFSSL_TRUE=
60056  WITH_WOLFSSL_FALSE='#'
60057else
60058  WITH_WOLFSSL_TRUE='#'
60059  WITH_WOLFSSL_FALSE=
60060fi
60061
60062
60063 if test "$with_gnutls" = "yes" || test "$with_wolfssl" = "yes" || test "$with_openssl" = "yes"; then
60064  WITH_TLS_TRUE=
60065  WITH_TLS_FALSE='#'
60066else
60067  WITH_TLS_TRUE='#'
60068  WITH_TLS_FALSE=
60069fi
60070
60071
60072if (test "$with_gnutls" != "yes" || test "$with_gnutls_hash" != "yes") && test "$with_libwolfcrypt" != "yes" && test "$with_libcrypto" != "yes"
60073then :
60074
60075
60076pkg_failed=no
60077{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nettle" >&5
60078printf %s "checking for nettle... " >&6; }
60079
60080if test -n "$NETTLE_CFLAGS"; then
60081    pkg_cv_NETTLE_CFLAGS="$NETTLE_CFLAGS"
60082 elif test -n "$PKG_CONFIG"; then
60083    if test -n "$PKG_CONFIG" && \
60084    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nettle\""; } >&5
60085  ($PKG_CONFIG --exists --print-errors "nettle") 2>&5
60086  ac_status=$?
60087  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60088  test $ac_status = 0; }; then
60089  pkg_cv_NETTLE_CFLAGS=`$PKG_CONFIG --cflags "nettle" 2>/dev/null`
60090		      test "x$?" != "x0" && pkg_failed=yes
60091else
60092  pkg_failed=yes
60093fi
60094 else
60095    pkg_failed=untried
60096fi
60097if test -n "$NETTLE_LIBS"; then
60098    pkg_cv_NETTLE_LIBS="$NETTLE_LIBS"
60099 elif test -n "$PKG_CONFIG"; then
60100    if test -n "$PKG_CONFIG" && \
60101    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nettle\""; } >&5
60102  ($PKG_CONFIG --exists --print-errors "nettle") 2>&5
60103  ac_status=$?
60104  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60105  test $ac_status = 0; }; then
60106  pkg_cv_NETTLE_LIBS=`$PKG_CONFIG --libs "nettle" 2>/dev/null`
60107		      test "x$?" != "x0" && pkg_failed=yes
60108else
60109  pkg_failed=yes
60110fi
60111 else
60112    pkg_failed=untried
60113fi
60114
60115
60116
60117if test $pkg_failed = yes; then
60118        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
60119printf "%s\n" "no" >&6; }
60120
60121if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
60122        _pkg_short_errors_supported=yes
60123else
60124        _pkg_short_errors_supported=no
60125fi
60126        if test $_pkg_short_errors_supported = yes; then
60127	        NETTLE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "nettle" 2>&1`
60128        else
60129	        NETTLE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "nettle" 2>&1`
60130        fi
60131	# Put the nasty error message in config.log where it belongs
60132	echo "$NETTLE_PKG_ERRORS" >&5
60133
60134
60135     with_libnettle=no
60136     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** LIBNETTLE was not found. Fallback to libgcrypt for hashing and checksumming." >&5
60137printf "%s\n" "$as_me: WARNING: *** LIBNETTLE was not found. Fallback to libgcrypt for hashing and checksumming." >&2;}
60138
60139elif test $pkg_failed = untried; then
60140        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
60141printf "%s\n" "no" >&6; }
60142
60143     with_libnettle=no
60144     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** LIBNETTLE was not found. Fallback to libgcrypt for hashing and checksumming." >&5
60145printf "%s\n" "$as_me: WARNING: *** LIBNETTLE was not found. Fallback to libgcrypt for hashing and checksumming." >&2;}
60146
60147else
60148	NETTLE_CFLAGS=$pkg_cv_NETTLE_CFLAGS
60149	NETTLE_LIBS=$pkg_cv_NETTLE_LIBS
60150        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60151printf "%s\n" "yes" >&6; }
60152
60153    with_libnettle=yes
60154    LIBS="$NETTLE_LIBS $LIBS"
60155    CFLAGS="$NETTLE_CFLAGS $CFLAGS"
60156
60157printf "%s\n" "#define WITH_LIBNETTLE 1" >>confdefs.h
60158
60159
60160fi
60161
60162  if test "$with_libnettle" != "yes"
60163then :
60164
60165    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gcry_check_version" >&5
60166printf %s "checking for library containing gcry_check_version... " >&6; }
60167if test ${ac_cv_search_gcry_check_version+y}
60168then :
60169  printf %s "(cached) " >&6
60170else $as_nop
60171  ac_func_search_save_LIBS=$LIBS
60172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60173/* end confdefs.h.  */
60174
60175/* Override any GCC internal prototype to avoid an error.
60176   Use char because int might match the return type of a GCC
60177   builtin and then its argument prototype would still apply.  */
60178char gcry_check_version ();
60179int
60180main (void)
60181{
60182return gcry_check_version ();
60183  ;
60184  return 0;
60185}
60186_ACEOF
60187for ac_lib in '' gcrypt
60188do
60189  if test -z "$ac_lib"; then
60190    ac_res="none required"
60191  else
60192    ac_res=-l$ac_lib
60193    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
60194  fi
60195  if ac_fn_c_try_link "$LINENO"
60196then :
60197  ac_cv_search_gcry_check_version=$ac_res
60198fi
60199rm -f core conftest.err conftest.$ac_objext conftest.beam \
60200    conftest$ac_exeext
60201  if test ${ac_cv_search_gcry_check_version+y}
60202then :
60203  break
60204fi
60205done
60206if test ${ac_cv_search_gcry_check_version+y}
60207then :
60208
60209else $as_nop
60210  ac_cv_search_gcry_check_version=no
60211fi
60212rm conftest.$ac_ext
60213LIBS=$ac_func_search_save_LIBS
60214fi
60215{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gcry_check_version" >&5
60216printf "%s\n" "$ac_cv_search_gcry_check_version" >&6; }
60217ac_res=$ac_cv_search_gcry_check_version
60218if test "$ac_res" != no
60219then :
60220  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
60221  with_gcrypt=yes;
60222printf "%s\n" "#define WITH_GCRYPT 1" >>confdefs.h
60223 ac_fn_c_check_header_compile "$LINENO" "gcrypt.h" "ac_cv_header_gcrypt_h" "$ac_includes_default"
60224if test "x$ac_cv_header_gcrypt_h" = xyes
60225then :
60226  printf "%s\n" "#define HAVE_GCRYPT_H 1" >>confdefs.h
60227
60228fi
60229
60230else $as_nop
60231  with_gcrypt=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** LIBGCRYPT was not found. Fallback to gnulib for hashing and checksumming." >&5
60232printf "%s\n" "$as_me: WARNING: *** LIBGCRYPT was not found. Fallback to gnulib for hashing and checksumming." >&2;}
60233fi
60234
60235
60236fi
60237
60238fi
60239
60240 if test "$with_libnettle" = "yes"; then
60241  WITH_LIBNETTLE_TRUE=
60242  WITH_LIBNETTLE_FALSE='#'
60243else
60244  WITH_LIBNETTLE_TRUE='#'
60245  WITH_LIBNETTLE_FALSE=
60246fi
60247
60248 if test "$with_gcrypt" = "yes"; then
60249  WITH_CRYPT_TRUE=
60250  WITH_CRYPT_FALSE='#'
60251else
60252  WITH_CRYPT_TRUE='#'
60253  WITH_CRYPT_FALSE=
60254fi
60255
60256
60257
60258# Check whether --with-libpsl was given.
60259if test ${with_libpsl+y}
60260then :
60261  withval=$with_libpsl; with_libpsl=$withval
60262else $as_nop
60263  with_libpsl=yes
60264fi
60265
60266if test "$with_libpsl" != "no"
60267then :
60268
60269
60270pkg_failed=no
60271{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpsl" >&5
60272printf %s "checking for libpsl... " >&6; }
60273
60274if test -n "$LIBPSL_CFLAGS"; then
60275    pkg_cv_LIBPSL_CFLAGS="$LIBPSL_CFLAGS"
60276 elif test -n "$PKG_CONFIG"; then
60277    if test -n "$PKG_CONFIG" && \
60278    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpsl\""; } >&5
60279  ($PKG_CONFIG --exists --print-errors "libpsl") 2>&5
60280  ac_status=$?
60281  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60282  test $ac_status = 0; }; then
60283  pkg_cv_LIBPSL_CFLAGS=`$PKG_CONFIG --cflags "libpsl" 2>/dev/null`
60284		      test "x$?" != "x0" && pkg_failed=yes
60285else
60286  pkg_failed=yes
60287fi
60288 else
60289    pkg_failed=untried
60290fi
60291if test -n "$LIBPSL_LIBS"; then
60292    pkg_cv_LIBPSL_LIBS="$LIBPSL_LIBS"
60293 elif test -n "$PKG_CONFIG"; then
60294    if test -n "$PKG_CONFIG" && \
60295    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpsl\""; } >&5
60296  ($PKG_CONFIG --exists --print-errors "libpsl") 2>&5
60297  ac_status=$?
60298  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60299  test $ac_status = 0; }; then
60300  pkg_cv_LIBPSL_LIBS=`$PKG_CONFIG --libs "libpsl" 2>/dev/null`
60301		      test "x$?" != "x0" && pkg_failed=yes
60302else
60303  pkg_failed=yes
60304fi
60305 else
60306    pkg_failed=untried
60307fi
60308
60309
60310
60311if test $pkg_failed = yes; then
60312        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
60313printf "%s\n" "no" >&6; }
60314
60315if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
60316        _pkg_short_errors_supported=yes
60317else
60318        _pkg_short_errors_supported=no
60319fi
60320        if test $_pkg_short_errors_supported = yes; then
60321	        LIBPSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpsl" 2>&1`
60322        else
60323	        LIBPSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpsl" 2>&1`
60324        fi
60325	# Put the nasty error message in config.log where it belongs
60326	echo "$LIBPSL_PKG_ERRORS" >&5
60327
60328
60329    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing psl_builtin" >&5
60330printf %s "checking for library containing psl_builtin... " >&6; }
60331if test ${ac_cv_search_psl_builtin+y}
60332then :
60333  printf %s "(cached) " >&6
60334else $as_nop
60335  ac_func_search_save_LIBS=$LIBS
60336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60337/* end confdefs.h.  */
60338
60339/* Override any GCC internal prototype to avoid an error.
60340   Use char because int might match the return type of a GCC
60341   builtin and then its argument prototype would still apply.  */
60342char psl_builtin ();
60343int
60344main (void)
60345{
60346return psl_builtin ();
60347  ;
60348  return 0;
60349}
60350_ACEOF
60351for ac_lib in '' psl
60352do
60353  if test -z "$ac_lib"; then
60354    ac_res="none required"
60355  else
60356    ac_res=-l$ac_lib
60357    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
60358  fi
60359  if ac_fn_c_try_link "$LINENO"
60360then :
60361  ac_cv_search_psl_builtin=$ac_res
60362fi
60363rm -f core conftest.err conftest.$ac_objext conftest.beam \
60364    conftest$ac_exeext
60365  if test ${ac_cv_search_psl_builtin+y}
60366then :
60367  break
60368fi
60369done
60370if test ${ac_cv_search_psl_builtin+y}
60371then :
60372
60373else $as_nop
60374  ac_cv_search_psl_builtin=no
60375fi
60376rm conftest.$ac_ext
60377LIBS=$ac_func_search_save_LIBS
60378fi
60379{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_psl_builtin" >&5
60380printf "%s\n" "$ac_cv_search_psl_builtin" >&6; }
60381ac_res=$ac_cv_search_psl_builtin
60382if test "$ac_res" != no
60383then :
60384  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
60385  with_libpsl=yes;
60386printf "%s\n" "#define WITH_LIBPSL 1" >>confdefs.h
60387
60388else $as_nop
60389  with_libpsl=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libpsl was not found. Fallback to builtin cookie checking." >&5
60390printf "%s\n" "$as_me: WARNING: *** libpsl was not found. Fallback to builtin cookie checking." >&2;}
60391fi
60392
60393
60394elif test $pkg_failed = untried; then
60395        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
60396printf "%s\n" "no" >&6; }
60397
60398    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing psl_builtin" >&5
60399printf %s "checking for library containing psl_builtin... " >&6; }
60400if test ${ac_cv_search_psl_builtin+y}
60401then :
60402  printf %s "(cached) " >&6
60403else $as_nop
60404  ac_func_search_save_LIBS=$LIBS
60405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60406/* end confdefs.h.  */
60407
60408/* Override any GCC internal prototype to avoid an error.
60409   Use char because int might match the return type of a GCC
60410   builtin and then its argument prototype would still apply.  */
60411char psl_builtin ();
60412int
60413main (void)
60414{
60415return psl_builtin ();
60416  ;
60417  return 0;
60418}
60419_ACEOF
60420for ac_lib in '' psl
60421do
60422  if test -z "$ac_lib"; then
60423    ac_res="none required"
60424  else
60425    ac_res=-l$ac_lib
60426    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
60427  fi
60428  if ac_fn_c_try_link "$LINENO"
60429then :
60430  ac_cv_search_psl_builtin=$ac_res
60431fi
60432rm -f core conftest.err conftest.$ac_objext conftest.beam \
60433    conftest$ac_exeext
60434  if test ${ac_cv_search_psl_builtin+y}
60435then :
60436  break
60437fi
60438done
60439if test ${ac_cv_search_psl_builtin+y}
60440then :
60441
60442else $as_nop
60443  ac_cv_search_psl_builtin=no
60444fi
60445rm conftest.$ac_ext
60446LIBS=$ac_func_search_save_LIBS
60447fi
60448{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_psl_builtin" >&5
60449printf "%s\n" "$ac_cv_search_psl_builtin" >&6; }
60450ac_res=$ac_cv_search_psl_builtin
60451if test "$ac_res" != no
60452then :
60453  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
60454  with_libpsl=yes;
60455printf "%s\n" "#define WITH_LIBPSL 1" >>confdefs.h
60456
60457else $as_nop
60458  with_libpsl=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libpsl was not found. Fallback to builtin cookie checking." >&5
60459printf "%s\n" "$as_me: WARNING: *** libpsl was not found. Fallback to builtin cookie checking." >&2;}
60460fi
60461
60462
60463else
60464	LIBPSL_CFLAGS=$pkg_cv_LIBPSL_CFLAGS
60465	LIBPSL_LIBS=$pkg_cv_LIBPSL_LIBS
60466        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60467printf "%s\n" "yes" >&6; }
60468
60469    with_libpsl=yes
60470    # correct $LIBPSL_LIBS (in libpsl <= 0.6.0)
60471    if test "$LIBPSL_LIBS" = "-llibpsl "
60472then :
60473  LIBPSL_LIBS="-lpsl"
60474fi
60475    LIBS="$LIBPSL_LIBS $LIBS"
60476    CFLAGS="$LIBPSL_CFLAGS $CFLAGS"
60477
60478printf "%s\n" "#define WITH_LIBPSL 1" >>confdefs.h
60479
60480
60481fi
60482
60483fi
60484 if test "$with_libpsl" = "yes"; then
60485  WITH_LIBPSL_TRUE=
60486  WITH_LIBPSL_FALSE='#'
60487else
60488  WITH_LIBPSL_TRUE='#'
60489  WITH_LIBPSL_FALSE=
60490fi
60491
60492
60493
60494# Check whether --with-libhsts was given.
60495if test ${with_libhsts+y}
60496then :
60497  withval=$with_libhsts; with_libhsts=$withval
60498else $as_nop
60499  with_libhsts=yes
60500fi
60501
60502if test "$with_libhsts" != "no"
60503then :
60504
60505
60506pkg_failed=no
60507{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libhsts" >&5
60508printf %s "checking for libhsts... " >&6; }
60509
60510if test -n "$LIBHSTS_CFLAGS"; then
60511    pkg_cv_LIBHSTS_CFLAGS="$LIBHSTS_CFLAGS"
60512 elif test -n "$PKG_CONFIG"; then
60513    if test -n "$PKG_CONFIG" && \
60514    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libhsts\""; } >&5
60515  ($PKG_CONFIG --exists --print-errors "libhsts") 2>&5
60516  ac_status=$?
60517  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60518  test $ac_status = 0; }; then
60519  pkg_cv_LIBHSTS_CFLAGS=`$PKG_CONFIG --cflags "libhsts" 2>/dev/null`
60520		      test "x$?" != "x0" && pkg_failed=yes
60521else
60522  pkg_failed=yes
60523fi
60524 else
60525    pkg_failed=untried
60526fi
60527if test -n "$LIBHSTS_LIBS"; then
60528    pkg_cv_LIBHSTS_LIBS="$LIBHSTS_LIBS"
60529 elif test -n "$PKG_CONFIG"; then
60530    if test -n "$PKG_CONFIG" && \
60531    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libhsts\""; } >&5
60532  ($PKG_CONFIG --exists --print-errors "libhsts") 2>&5
60533  ac_status=$?
60534  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60535  test $ac_status = 0; }; then
60536  pkg_cv_LIBHSTS_LIBS=`$PKG_CONFIG --libs "libhsts" 2>/dev/null`
60537		      test "x$?" != "x0" && pkg_failed=yes
60538else
60539  pkg_failed=yes
60540fi
60541 else
60542    pkg_failed=untried
60543fi
60544
60545
60546
60547if test $pkg_failed = yes; then
60548        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
60549printf "%s\n" "no" >&6; }
60550
60551if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
60552        _pkg_short_errors_supported=yes
60553else
60554        _pkg_short_errors_supported=no
60555fi
60556        if test $_pkg_short_errors_supported = yes; then
60557	        LIBHSTS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libhsts" 2>&1`
60558        else
60559	        LIBHSTS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libhsts" 2>&1`
60560        fi
60561	# Put the nasty error message in config.log where it belongs
60562	echo "$LIBHSTS_PKG_ERRORS" >&5
60563
60564
60565    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing hsts_get_version" >&5
60566printf %s "checking for library containing hsts_get_version... " >&6; }
60567if test ${ac_cv_search_hsts_get_version+y}
60568then :
60569  printf %s "(cached) " >&6
60570else $as_nop
60571  ac_func_search_save_LIBS=$LIBS
60572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60573/* end confdefs.h.  */
60574
60575/* Override any GCC internal prototype to avoid an error.
60576   Use char because int might match the return type of a GCC
60577   builtin and then its argument prototype would still apply.  */
60578char hsts_get_version ();
60579int
60580main (void)
60581{
60582return hsts_get_version ();
60583  ;
60584  return 0;
60585}
60586_ACEOF
60587for ac_lib in '' hsts
60588do
60589  if test -z "$ac_lib"; then
60590    ac_res="none required"
60591  else
60592    ac_res=-l$ac_lib
60593    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
60594  fi
60595  if ac_fn_c_try_link "$LINENO"
60596then :
60597  ac_cv_search_hsts_get_version=$ac_res
60598fi
60599rm -f core conftest.err conftest.$ac_objext conftest.beam \
60600    conftest$ac_exeext
60601  if test ${ac_cv_search_hsts_get_version+y}
60602then :
60603  break
60604fi
60605done
60606if test ${ac_cv_search_hsts_get_version+y}
60607then :
60608
60609else $as_nop
60610  ac_cv_search_hsts_get_version=no
60611fi
60612rm conftest.$ac_ext
60613LIBS=$ac_func_search_save_LIBS
60614fi
60615{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_hsts_get_version" >&5
60616printf "%s\n" "$ac_cv_search_hsts_get_version" >&6; }
60617ac_res=$ac_cv_search_hsts_get_version
60618if test "$ac_res" != no
60619then :
60620  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
60621  with_libhsts=yes;
60622printf "%s\n" "#define WITH_LIBHSTS 1" >>confdefs.h
60623
60624else $as_nop
60625  with_libhsts=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libhsts was not found." >&5
60626printf "%s\n" "$as_me: WARNING: *** libhsts was not found." >&2;}
60627fi
60628
60629
60630elif test $pkg_failed = untried; then
60631        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
60632printf "%s\n" "no" >&6; }
60633
60634    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing hsts_get_version" >&5
60635printf %s "checking for library containing hsts_get_version... " >&6; }
60636if test ${ac_cv_search_hsts_get_version+y}
60637then :
60638  printf %s "(cached) " >&6
60639else $as_nop
60640  ac_func_search_save_LIBS=$LIBS
60641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60642/* end confdefs.h.  */
60643
60644/* Override any GCC internal prototype to avoid an error.
60645   Use char because int might match the return type of a GCC
60646   builtin and then its argument prototype would still apply.  */
60647char hsts_get_version ();
60648int
60649main (void)
60650{
60651return hsts_get_version ();
60652  ;
60653  return 0;
60654}
60655_ACEOF
60656for ac_lib in '' hsts
60657do
60658  if test -z "$ac_lib"; then
60659    ac_res="none required"
60660  else
60661    ac_res=-l$ac_lib
60662    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
60663  fi
60664  if ac_fn_c_try_link "$LINENO"
60665then :
60666  ac_cv_search_hsts_get_version=$ac_res
60667fi
60668rm -f core conftest.err conftest.$ac_objext conftest.beam \
60669    conftest$ac_exeext
60670  if test ${ac_cv_search_hsts_get_version+y}
60671then :
60672  break
60673fi
60674done
60675if test ${ac_cv_search_hsts_get_version+y}
60676then :
60677
60678else $as_nop
60679  ac_cv_search_hsts_get_version=no
60680fi
60681rm conftest.$ac_ext
60682LIBS=$ac_func_search_save_LIBS
60683fi
60684{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_hsts_get_version" >&5
60685printf "%s\n" "$ac_cv_search_hsts_get_version" >&6; }
60686ac_res=$ac_cv_search_hsts_get_version
60687if test "$ac_res" != no
60688then :
60689  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
60690  with_libhsts=yes;
60691printf "%s\n" "#define WITH_LIBHSTS 1" >>confdefs.h
60692
60693else $as_nop
60694  with_libhsts=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libhsts was not found." >&5
60695printf "%s\n" "$as_me: WARNING: *** libhsts was not found." >&2;}
60696fi
60697
60698
60699else
60700	LIBHSTS_CFLAGS=$pkg_cv_LIBHSTS_CFLAGS
60701	LIBHSTS_LIBS=$pkg_cv_LIBHSTS_LIBS
60702        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60703printf "%s\n" "yes" >&6; }
60704
60705    with_libhsts=yes
60706    LIBS="$LIBHSTS_LIBS $LIBS"
60707    CFLAGS="$LIBHSTS_CFLAGS $CFLAGS"
60708
60709printf "%s\n" "#define WITH_LIBHSTS 1" >>confdefs.h
60710
60711
60712fi
60713
60714fi
60715 if test "$with_libHSTS" = "yes"; then
60716  WITH_LIBHSTS_TRUE=
60717  WITH_LIBHSTS_FALSE='#'
60718else
60719  WITH_LIBHSTS_TRUE='#'
60720  WITH_LIBHSTS_FALSE=
60721fi
60722
60723
60724
60725# Check whether --with-libnghttp2 was given.
60726if test ${with_libnghttp2+y}
60727then :
60728  withval=$with_libnghttp2; with_libnghttp2=$withval
60729else $as_nop
60730  with_libnghttp2=yes
60731fi
60732
60733if test "$with_libnghttp2" != "no"
60734then :
60735
60736
60737pkg_failed=no
60738{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnghttp2" >&5
60739printf %s "checking for libnghttp2... " >&6; }
60740
60741if test -n "$LIBNGHTTP2_CFLAGS"; then
60742    pkg_cv_LIBNGHTTP2_CFLAGS="$LIBNGHTTP2_CFLAGS"
60743 elif test -n "$PKG_CONFIG"; then
60744    if test -n "$PKG_CONFIG" && \
60745    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnghttp2\""; } >&5
60746  ($PKG_CONFIG --exists --print-errors "libnghttp2") 2>&5
60747  ac_status=$?
60748  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60749  test $ac_status = 0; }; then
60750  pkg_cv_LIBNGHTTP2_CFLAGS=`$PKG_CONFIG --cflags "libnghttp2" 2>/dev/null`
60751		      test "x$?" != "x0" && pkg_failed=yes
60752else
60753  pkg_failed=yes
60754fi
60755 else
60756    pkg_failed=untried
60757fi
60758if test -n "$LIBNGHTTP2_LIBS"; then
60759    pkg_cv_LIBNGHTTP2_LIBS="$LIBNGHTTP2_LIBS"
60760 elif test -n "$PKG_CONFIG"; then
60761    if test -n "$PKG_CONFIG" && \
60762    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnghttp2\""; } >&5
60763  ($PKG_CONFIG --exists --print-errors "libnghttp2") 2>&5
60764  ac_status=$?
60765  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60766  test $ac_status = 0; }; then
60767  pkg_cv_LIBNGHTTP2_LIBS=`$PKG_CONFIG --libs "libnghttp2" 2>/dev/null`
60768		      test "x$?" != "x0" && pkg_failed=yes
60769else
60770  pkg_failed=yes
60771fi
60772 else
60773    pkg_failed=untried
60774fi
60775
60776
60777
60778if test $pkg_failed = yes; then
60779        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
60780printf "%s\n" "no" >&6; }
60781
60782if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
60783        _pkg_short_errors_supported=yes
60784else
60785        _pkg_short_errors_supported=no
60786fi
60787        if test $_pkg_short_errors_supported = yes; then
60788	        LIBNGHTTP2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnghttp2" 2>&1`
60789        else
60790	        LIBNGHTTP2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnghttp2" 2>&1`
60791        fi
60792	# Put the nasty error message in config.log where it belongs
60793	echo "$LIBNGHTTP2_PKG_ERRORS" >&5
60794
60795
60796    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nghttp2_session_client_new" >&5
60797printf %s "checking for library containing nghttp2_session_client_new... " >&6; }
60798if test ${ac_cv_search_nghttp2_session_client_new+y}
60799then :
60800  printf %s "(cached) " >&6
60801else $as_nop
60802  ac_func_search_save_LIBS=$LIBS
60803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60804/* end confdefs.h.  */
60805
60806/* Override any GCC internal prototype to avoid an error.
60807   Use char because int might match the return type of a GCC
60808   builtin and then its argument prototype would still apply.  */
60809char nghttp2_session_client_new ();
60810int
60811main (void)
60812{
60813return nghttp2_session_client_new ();
60814  ;
60815  return 0;
60816}
60817_ACEOF
60818for ac_lib in '' nghttp2
60819do
60820  if test -z "$ac_lib"; then
60821    ac_res="none required"
60822  else
60823    ac_res=-l$ac_lib
60824    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
60825  fi
60826  if ac_fn_c_try_link "$LINENO"
60827then :
60828  ac_cv_search_nghttp2_session_client_new=$ac_res
60829fi
60830rm -f core conftest.err conftest.$ac_objext conftest.beam \
60831    conftest$ac_exeext
60832  if test ${ac_cv_search_nghttp2_session_client_new+y}
60833then :
60834  break
60835fi
60836done
60837if test ${ac_cv_search_nghttp2_session_client_new+y}
60838then :
60839
60840else $as_nop
60841  ac_cv_search_nghttp2_session_client_new=no
60842fi
60843rm conftest.$ac_ext
60844LIBS=$ac_func_search_save_LIBS
60845fi
60846{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nghttp2_session_client_new" >&5
60847printf "%s\n" "$ac_cv_search_nghttp2_session_client_new" >&6; }
60848ac_res=$ac_cv_search_nghttp2_session_client_new
60849if test "$ac_res" != no
60850then :
60851  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
60852  with_libnghttp2=yes;
60853printf "%s\n" "#define WITH_LIBNGHTTP2 1" >>confdefs.h
60854
60855else $as_nop
60856  with_libnghttp2=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libnghttp2 was not found. HTTP/2.0 support disabled." >&5
60857printf "%s\n" "$as_me: WARNING: *** libnghttp2 was not found. HTTP/2.0 support disabled." >&2;}
60858fi
60859
60860
60861elif test $pkg_failed = untried; then
60862        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
60863printf "%s\n" "no" >&6; }
60864
60865    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nghttp2_session_client_new" >&5
60866printf %s "checking for library containing nghttp2_session_client_new... " >&6; }
60867if test ${ac_cv_search_nghttp2_session_client_new+y}
60868then :
60869  printf %s "(cached) " >&6
60870else $as_nop
60871  ac_func_search_save_LIBS=$LIBS
60872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60873/* end confdefs.h.  */
60874
60875/* Override any GCC internal prototype to avoid an error.
60876   Use char because int might match the return type of a GCC
60877   builtin and then its argument prototype would still apply.  */
60878char nghttp2_session_client_new ();
60879int
60880main (void)
60881{
60882return nghttp2_session_client_new ();
60883  ;
60884  return 0;
60885}
60886_ACEOF
60887for ac_lib in '' nghttp2
60888do
60889  if test -z "$ac_lib"; then
60890    ac_res="none required"
60891  else
60892    ac_res=-l$ac_lib
60893    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
60894  fi
60895  if ac_fn_c_try_link "$LINENO"
60896then :
60897  ac_cv_search_nghttp2_session_client_new=$ac_res
60898fi
60899rm -f core conftest.err conftest.$ac_objext conftest.beam \
60900    conftest$ac_exeext
60901  if test ${ac_cv_search_nghttp2_session_client_new+y}
60902then :
60903  break
60904fi
60905done
60906if test ${ac_cv_search_nghttp2_session_client_new+y}
60907then :
60908
60909else $as_nop
60910  ac_cv_search_nghttp2_session_client_new=no
60911fi
60912rm conftest.$ac_ext
60913LIBS=$ac_func_search_save_LIBS
60914fi
60915{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nghttp2_session_client_new" >&5
60916printf "%s\n" "$ac_cv_search_nghttp2_session_client_new" >&6; }
60917ac_res=$ac_cv_search_nghttp2_session_client_new
60918if test "$ac_res" != no
60919then :
60920  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
60921  with_libnghttp2=yes;
60922printf "%s\n" "#define WITH_LIBNGHTTP2 1" >>confdefs.h
60923
60924else $as_nop
60925  with_libnghttp2=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libnghttp2 was not found. HTTP/2.0 support disabled." >&5
60926printf "%s\n" "$as_me: WARNING: *** libnghttp2 was not found. HTTP/2.0 support disabled." >&2;}
60927fi
60928
60929
60930else
60931	LIBNGHTTP2_CFLAGS=$pkg_cv_LIBNGHTTP2_CFLAGS
60932	LIBNGHTTP2_LIBS=$pkg_cv_LIBNGHTTP2_LIBS
60933        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60934printf "%s\n" "yes" >&6; }
60935
60936    with_libnghttp2=yes
60937    LIBS="$LIBNGHTTP2_LIBS $LIBS"
60938    CFLAGS="$LIBNGHTTP2_CFLAGS $CFLAGS"
60939
60940printf "%s\n" "#define WITH_LIBNGHTTP2 1" >>confdefs.h
60941
60942
60943fi
60944
60945fi
60946 if test "$with_libnghttp2" = "yes"; then
60947  WITH_LIBNGHTTP2_TRUE=
60948  WITH_LIBNGHTTP2_FALSE='#'
60949else
60950  WITH_LIBNGHTTP2_TRUE='#'
60951  WITH_LIBNGHTTP2_FALSE=
60952fi
60953
60954
60955
60956# Check whether --with-bzip2 was given.
60957if test ${with_bzip2+y}
60958then :
60959  withval=$with_bzip2; with_bzip2=$withval
60960else $as_nop
60961  with_bzip2=yes
60962fi
60963
60964if test "$with_bzip2" != "no"
60965then :
60966
60967  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing BZ2_bzDecompress" >&5
60968printf %s "checking for library containing BZ2_bzDecompress... " >&6; }
60969if test ${ac_cv_search_BZ2_bzDecompress+y}
60970then :
60971  printf %s "(cached) " >&6
60972else $as_nop
60973  ac_func_search_save_LIBS=$LIBS
60974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60975/* end confdefs.h.  */
60976
60977/* Override any GCC internal prototype to avoid an error.
60978   Use char because int might match the return type of a GCC
60979   builtin and then its argument prototype would still apply.  */
60980char BZ2_bzDecompress ();
60981int
60982main (void)
60983{
60984return BZ2_bzDecompress ();
60985  ;
60986  return 0;
60987}
60988_ACEOF
60989for ac_lib in '' bz2
60990do
60991  if test -z "$ac_lib"; then
60992    ac_res="none required"
60993  else
60994    ac_res=-l$ac_lib
60995    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
60996  fi
60997  if ac_fn_c_try_link "$LINENO"
60998then :
60999  ac_cv_search_BZ2_bzDecompress=$ac_res
61000fi
61001rm -f core conftest.err conftest.$ac_objext conftest.beam \
61002    conftest$ac_exeext
61003  if test ${ac_cv_search_BZ2_bzDecompress+y}
61004then :
61005  break
61006fi
61007done
61008if test ${ac_cv_search_BZ2_bzDecompress+y}
61009then :
61010
61011else $as_nop
61012  ac_cv_search_BZ2_bzDecompress=no
61013fi
61014rm conftest.$ac_ext
61015LIBS=$ac_func_search_save_LIBS
61016fi
61017{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_BZ2_bzDecompress" >&5
61018printf "%s\n" "$ac_cv_search_BZ2_bzDecompress" >&6; }
61019ac_res=$ac_cv_search_BZ2_bzDecompress
61020if test "$ac_res" != no
61021then :
61022  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
61023  with_bzip2=yes; BZ2_LIBS=-lbz2
61024
61025printf "%s\n" "#define WITH_BZIP2 1" >>confdefs.h
61026
61027else $as_nop
61028  with_bzip2=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libbz2 was not found. You will not be able to use BZIP2 (de)compression" >&5
61029printf "%s\n" "$as_me: WARNING: *** libbz2 was not found. You will not be able to use BZIP2 (de)compression" >&2;}
61030fi
61031
61032
61033fi
61034 if test "$with_bzip2" = "yes"; then
61035  WITH_BZIP2_TRUE=
61036  WITH_BZIP2_FALSE='#'
61037else
61038  WITH_BZIP2_TRUE='#'
61039  WITH_BZIP2_FALSE=
61040fi
61041
61042
61043
61044# Check whether --with-gpgme was given.
61045if test ${with_gpgme+y}
61046then :
61047  withval=$with_gpgme; with_gpgme=$withval
61048else $as_nop
61049  with_gpgme=yes
61050fi
61051
61052
61053# Check whether --with-gpgme-prefix was given.
61054if test ${with_gpgme_prefix+y}
61055then :
61056  withval=$with_gpgme_prefix; gpgme_config_prefix="$withval"
61057else $as_nop
61058  gpgme_config_prefix=""
61059fi
61060
61061  if test x"${GPGME_CONFIG}" = x ; then
61062     if test x"${gpgme_config_prefix}" != x ; then
61063        GPGME_CONFIG="${gpgme_config_prefix}/bin/gpgme-config"
61064     else
61065       case "${SYSROOT}" in
61066         /*)
61067           if test -x "${SYSROOT}/bin/gpgme-config" ; then
61068             GPGME_CONFIG="${SYSROOT}/bin/gpgme-config"
61069           fi
61070           ;;
61071         '')
61072           ;;
61073          *)
61074           { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring \$SYSROOT as it is not an absolute path." >&5
61075printf "%s\n" "$as_me: WARNING: Ignoring \$SYSROOT as it is not an absolute path." >&2;}
61076           ;;
61077       esac
61078     fi
61079  fi
61080
61081  use_gpgrt_config=""
61082  if test x"${GPGME_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
61083    if $GPGRT_CONFIG gpgme --exists; then
61084      GPGME_CONFIG="$GPGRT_CONFIG gpgme"
61085      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Use gpgrt-config as gpgme-config" >&5
61086printf "%s\n" "$as_me: Use gpgrt-config as gpgme-config" >&6;}
61087      use_gpgrt_config=yes
61088    fi
61089  fi
61090  if test -z "$use_gpgrt_config"; then
61091    # Extract the first word of "gpgme-config", so it can be a program name with args.
61092set dummy gpgme-config; ac_word=$2
61093{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61094printf %s "checking for $ac_word... " >&6; }
61095if test ${ac_cv_path_GPGME_CONFIG+y}
61096then :
61097  printf %s "(cached) " >&6
61098else $as_nop
61099  case $GPGME_CONFIG in
61100  [\\/]* | ?:[\\/]*)
61101  ac_cv_path_GPGME_CONFIG="$GPGME_CONFIG" # Let the user override the test with a path.
61102  ;;
61103  *)
61104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61105for as_dir in $PATH
61106do
61107  IFS=$as_save_IFS
61108  case $as_dir in #(((
61109    '') as_dir=./ ;;
61110    */) ;;
61111    *) as_dir=$as_dir/ ;;
61112  esac
61113    for ac_exec_ext in '' $ac_executable_extensions; do
61114  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
61115    ac_cv_path_GPGME_CONFIG="$as_dir$ac_word$ac_exec_ext"
61116    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
61117    break 2
61118  fi
61119done
61120  done
61121IFS=$as_save_IFS
61122
61123  test -z "$ac_cv_path_GPGME_CONFIG" && ac_cv_path_GPGME_CONFIG="no"
61124  ;;
61125esac
61126fi
61127GPGME_CONFIG=$ac_cv_path_GPGME_CONFIG
61128if test -n "$GPGME_CONFIG"; then
61129  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GPGME_CONFIG" >&5
61130printf "%s\n" "$GPGME_CONFIG" >&6; }
61131else
61132  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
61133printf "%s\n" "no" >&6; }
61134fi
61135
61136
61137  fi
61138
61139  if test "$GPGME_CONFIG" != "no" ; then
61140    if test -z "$use_gpgrt_config"; then
61141      gpgme_version=`$GPGME_CONFIG --version`
61142    else
61143      gpgme_version=`$GPGME_CONFIG --modversion`
61144    fi
61145  fi
61146  gpgme_version_major=`echo $gpgme_version | \
61147               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'`
61148  gpgme_version_minor=`echo $gpgme_version | \
61149               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'`
61150  gpgme_version_micro=`echo $gpgme_version | \
61151               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'`
61152
61153if test "$with_gpgme" != "no"
61154then :
61155
61156
61157pkg_failed=no
61158{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gpgme" >&5
61159printf %s "checking for gpgme... " >&6; }
61160
61161if test -n "$GPGME_CFLAGS"; then
61162    pkg_cv_GPGME_CFLAGS="$GPGME_CFLAGS"
61163 elif test -n "$PKG_CONFIG"; then
61164    if test -n "$PKG_CONFIG" && \
61165    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gpgme\""; } >&5
61166  ($PKG_CONFIG --exists --print-errors "gpgme") 2>&5
61167  ac_status=$?
61168  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61169  test $ac_status = 0; }; then
61170  pkg_cv_GPGME_CFLAGS=`$PKG_CONFIG --cflags "gpgme" 2>/dev/null`
61171		      test "x$?" != "x0" && pkg_failed=yes
61172else
61173  pkg_failed=yes
61174fi
61175 else
61176    pkg_failed=untried
61177fi
61178if test -n "$GPGME_LIBS"; then
61179    pkg_cv_GPGME_LIBS="$GPGME_LIBS"
61180 elif test -n "$PKG_CONFIG"; then
61181    if test -n "$PKG_CONFIG" && \
61182    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gpgme\""; } >&5
61183  ($PKG_CONFIG --exists --print-errors "gpgme") 2>&5
61184  ac_status=$?
61185  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61186  test $ac_status = 0; }; then
61187  pkg_cv_GPGME_LIBS=`$PKG_CONFIG --libs "gpgme" 2>/dev/null`
61188		      test "x$?" != "x0" && pkg_failed=yes
61189else
61190  pkg_failed=yes
61191fi
61192 else
61193    pkg_failed=untried
61194fi
61195
61196
61197
61198if test $pkg_failed = yes; then
61199        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
61200printf "%s\n" "no" >&6; }
61201
61202if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
61203        _pkg_short_errors_supported=yes
61204else
61205        _pkg_short_errors_supported=no
61206fi
61207        if test $_pkg_short_errors_supported = yes; then
61208	        GPGME_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gpgme" 2>&1`
61209        else
61210	        GPGME_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gpgme" 2>&1`
61211        fi
61212	# Put the nasty error message in config.log where it belongs
61213	echo "$GPGME_PKG_ERRORS" >&5
61214
61215
61216
61217         tmp=1:0.4.2
61218  if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
61219     req_gpgme_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
61220     min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
61221  else
61222     req_gpgme_api=0
61223     min_gpgme_version="$tmp"
61224  fi
61225
61226  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GPGME - version >= $min_gpgme_version" >&5
61227printf %s "checking for GPGME - version >= $min_gpgme_version... " >&6; }
61228  ok=no
61229  if test "$GPGME_CONFIG" != "no" ; then
61230    req_major=`echo $min_gpgme_version | \
61231               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
61232    req_minor=`echo $min_gpgme_version | \
61233               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
61234    req_micro=`echo $min_gpgme_version | \
61235               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
61236    if test "$gpgme_version_major" -gt "$req_major"; then
61237        ok=yes
61238    else
61239        if test "$gpgme_version_major" -eq "$req_major"; then
61240            if test "$gpgme_version_minor" -gt "$req_minor"; then
61241               ok=yes
61242            else
61243               if test "$gpgme_version_minor" -eq "$req_minor"; then
61244                   if test "$gpgme_version_micro" -ge "$req_micro"; then
61245                     ok=yes
61246                   fi
61247               fi
61248            fi
61249        fi
61250    fi
61251  fi
61252  if test $ok = yes; then
61253     # If we have a recent GPGME, we should also check that the
61254     # API is compatible.
61255     if test "$req_gpgme_api" -gt 0 ; then
61256        if test -z "$use_gpgrt_config"; then
61257          tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
61258        else
61259          tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0`
61260        fi
61261        if test "$tmp" -gt 0 ; then
61262           if test "$req_gpgme_api" -ne "$tmp" ; then
61263             ok=no
61264           fi
61265        fi
61266     fi
61267  fi
61268  if test $ok = yes; then
61269    GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
61270    GPGME_LIBS=`$GPGME_CONFIG --libs`
61271    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61272printf "%s\n" "yes" >&6; }
61273
61274        with_gpgme=yes
61275        LIBS="$GPGME_LIBS $LIBS"
61276        CFLAGS="$GPGME_CFLAGS $CFLAGS"
61277
61278printf "%s\n" "#define WITH_GPGME 1" >>confdefs.h
61279
61280
61281
61282    if test -z "$use_gpgrt_config"; then
61283      gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none`
61284    else
61285      gpgme_config_host=`$GPGME_CONFIG --variable=host 2>/dev/null || echo none`
61286    fi
61287    if test x"$gpgme_config_host" != xnone ; then
61288      if test x"$gpgme_config_host" != x"$host" ; then
61289  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:
61290***
61291*** The config script \"$GPGME_CONFIG\" was
61292*** built for $gpgme_config_host and thus may not match the
61293*** used host $host.
61294*** You may want to use the configure option --with-gpgme-prefix
61295*** to specify a matching config script or use \$SYSROOT.
61296***" >&5
61297printf "%s\n" "$as_me: WARNING:
61298***
61299*** The config script \"$GPGME_CONFIG\" was
61300*** built for $gpgme_config_host and thus may not match the
61301*** used host $host.
61302*** You may want to use the configure option --with-gpgme-prefix
61303*** to specify a matching config script or use \$SYSROOT.
61304***" >&2;}
61305        gpg_config_script_warn="$gpg_config_script_warn gpgme"
61306      fi
61307    fi
61308
61309  else
61310    GPGME_CFLAGS=""
61311    GPGME_LIBS=""
61312    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
61313printf "%s\n" "no" >&6; }
61314
61315        with_gpgme=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** GPGME not found." >&5
61316printf "%s\n" "$as_me: WARNING: *** GPGME not found." >&2;}
61317
61318  fi
61319
61320
61321
61322
61323
61324elif test $pkg_failed = untried; then
61325        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
61326printf "%s\n" "no" >&6; }
61327
61328
61329         tmp=1:0.4.2
61330  if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
61331     req_gpgme_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
61332     min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
61333  else
61334     req_gpgme_api=0
61335     min_gpgme_version="$tmp"
61336  fi
61337
61338  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GPGME - version >= $min_gpgme_version" >&5
61339printf %s "checking for GPGME - version >= $min_gpgme_version... " >&6; }
61340  ok=no
61341  if test "$GPGME_CONFIG" != "no" ; then
61342    req_major=`echo $min_gpgme_version | \
61343               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
61344    req_minor=`echo $min_gpgme_version | \
61345               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
61346    req_micro=`echo $min_gpgme_version | \
61347               sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
61348    if test "$gpgme_version_major" -gt "$req_major"; then
61349        ok=yes
61350    else
61351        if test "$gpgme_version_major" -eq "$req_major"; then
61352            if test "$gpgme_version_minor" -gt "$req_minor"; then
61353               ok=yes
61354            else
61355               if test "$gpgme_version_minor" -eq "$req_minor"; then
61356                   if test "$gpgme_version_micro" -ge "$req_micro"; then
61357                     ok=yes
61358                   fi
61359               fi
61360            fi
61361        fi
61362    fi
61363  fi
61364  if test $ok = yes; then
61365     # If we have a recent GPGME, we should also check that the
61366     # API is compatible.
61367     if test "$req_gpgme_api" -gt 0 ; then
61368        if test -z "$use_gpgrt_config"; then
61369          tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
61370        else
61371          tmp=`$GPGME_CONFIG --variable=api_version 2>/dev/null || echo 0`
61372        fi
61373        if test "$tmp" -gt 0 ; then
61374           if test "$req_gpgme_api" -ne "$tmp" ; then
61375             ok=no
61376           fi
61377        fi
61378     fi
61379  fi
61380  if test $ok = yes; then
61381    GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
61382    GPGME_LIBS=`$GPGME_CONFIG --libs`
61383    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61384printf "%s\n" "yes" >&6; }
61385
61386        with_gpgme=yes
61387        LIBS="$GPGME_LIBS $LIBS"
61388        CFLAGS="$GPGME_CFLAGS $CFLAGS"
61389
61390printf "%s\n" "#define WITH_GPGME 1" >>confdefs.h
61391
61392
61393
61394    if test -z "$use_gpgrt_config"; then
61395      gpgme_config_host=`$GPGME_CONFIG --host 2>/dev/null || echo none`
61396    else
61397      gpgme_config_host=`$GPGME_CONFIG --variable=host 2>/dev/null || echo none`
61398    fi
61399    if test x"$gpgme_config_host" != xnone ; then
61400      if test x"$gpgme_config_host" != x"$host" ; then
61401  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:
61402***
61403*** The config script \"$GPGME_CONFIG\" was
61404*** built for $gpgme_config_host and thus may not match the
61405*** used host $host.
61406*** You may want to use the configure option --with-gpgme-prefix
61407*** to specify a matching config script or use \$SYSROOT.
61408***" >&5
61409printf "%s\n" "$as_me: WARNING:
61410***
61411*** The config script \"$GPGME_CONFIG\" was
61412*** built for $gpgme_config_host and thus may not match the
61413*** used host $host.
61414*** You may want to use the configure option --with-gpgme-prefix
61415*** to specify a matching config script or use \$SYSROOT.
61416***" >&2;}
61417        gpg_config_script_warn="$gpg_config_script_warn gpgme"
61418      fi
61419    fi
61420
61421  else
61422    GPGME_CFLAGS=""
61423    GPGME_LIBS=""
61424    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
61425printf "%s\n" "no" >&6; }
61426
61427        with_gpgme=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** GPGME not found." >&5
61428printf "%s\n" "$as_me: WARNING: *** GPGME not found." >&2;}
61429
61430  fi
61431
61432
61433
61434
61435
61436else
61437	GPGME_CFLAGS=$pkg_cv_GPGME_CFLAGS
61438	GPGME_LIBS=$pkg_cv_GPGME_LIBS
61439        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61440printf "%s\n" "yes" >&6; }
61441
61442    with_gpgme=yes
61443    LIBS="$GPGME_LIBS $LIBS"
61444    CFLAGS="$GPGME_CFLAGS $CFLAGS"
61445
61446printf "%s\n" "#define WITH_GPGME 1" >>confdefs.h
61447
61448
61449fi
61450
61451fi
61452 if test "$with_gpgme" = "yes"; then
61453  WITH_GPGME_TRUE=
61454  WITH_GPGME_FALSE='#'
61455else
61456  WITH_GPGME_TRUE='#'
61457  WITH_GPGME_FALSE=
61458fi
61459
61460
61461
61462# Check whether --with-zlib was given.
61463if test ${with_zlib+y}
61464then :
61465  withval=$with_zlib; with_zlib=$withval
61466else $as_nop
61467  with_zlib=yes
61468fi
61469
61470if test "$with_zlib" != "no"
61471then :
61472
61473
61474pkg_failed=no
61475{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5
61476printf %s "checking for zlib... " >&6; }
61477
61478if test -n "$ZLIB_CFLAGS"; then
61479    pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS"
61480 elif test -n "$PKG_CONFIG"; then
61481    if test -n "$PKG_CONFIG" && \
61482    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5
61483  ($PKG_CONFIG --exists --print-errors "zlib") 2>&5
61484  ac_status=$?
61485  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61486  test $ac_status = 0; }; then
61487  pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib" 2>/dev/null`
61488		      test "x$?" != "x0" && pkg_failed=yes
61489else
61490  pkg_failed=yes
61491fi
61492 else
61493    pkg_failed=untried
61494fi
61495if test -n "$ZLIB_LIBS"; then
61496    pkg_cv_ZLIB_LIBS="$ZLIB_LIBS"
61497 elif test -n "$PKG_CONFIG"; then
61498    if test -n "$PKG_CONFIG" && \
61499    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5
61500  ($PKG_CONFIG --exists --print-errors "zlib") 2>&5
61501  ac_status=$?
61502  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61503  test $ac_status = 0; }; then
61504  pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib" 2>/dev/null`
61505		      test "x$?" != "x0" && pkg_failed=yes
61506else
61507  pkg_failed=yes
61508fi
61509 else
61510    pkg_failed=untried
61511fi
61512
61513
61514
61515if test $pkg_failed = yes; then
61516        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
61517printf "%s\n" "no" >&6; }
61518
61519if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
61520        _pkg_short_errors_supported=yes
61521else
61522        _pkg_short_errors_supported=no
61523fi
61524        if test $_pkg_short_errors_supported = yes; then
61525	        ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib" 2>&1`
61526        else
61527	        ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib" 2>&1`
61528        fi
61529	# Put the nasty error message in config.log where it belongs
61530	echo "$ZLIB_PKG_ERRORS" >&5
61531
61532
61533    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing deflate" >&5
61534printf %s "checking for library containing deflate... " >&6; }
61535if test ${ac_cv_search_deflate+y}
61536then :
61537  printf %s "(cached) " >&6
61538else $as_nop
61539  ac_func_search_save_LIBS=$LIBS
61540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61541/* end confdefs.h.  */
61542
61543/* Override any GCC internal prototype to avoid an error.
61544   Use char because int might match the return type of a GCC
61545   builtin and then its argument prototype would still apply.  */
61546char deflate ();
61547int
61548main (void)
61549{
61550return deflate ();
61551  ;
61552  return 0;
61553}
61554_ACEOF
61555for ac_lib in '' z
61556do
61557  if test -z "$ac_lib"; then
61558    ac_res="none required"
61559  else
61560    ac_res=-l$ac_lib
61561    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
61562  fi
61563  if ac_fn_c_try_link "$LINENO"
61564then :
61565  ac_cv_search_deflate=$ac_res
61566fi
61567rm -f core conftest.err conftest.$ac_objext conftest.beam \
61568    conftest$ac_exeext
61569  if test ${ac_cv_search_deflate+y}
61570then :
61571  break
61572fi
61573done
61574if test ${ac_cv_search_deflate+y}
61575then :
61576
61577else $as_nop
61578  ac_cv_search_deflate=no
61579fi
61580rm conftest.$ac_ext
61581LIBS=$ac_func_search_save_LIBS
61582fi
61583{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_deflate" >&5
61584printf "%s\n" "$ac_cv_search_deflate" >&6; }
61585ac_res=$ac_cv_search_deflate
61586if test "$ac_res" != no
61587then :
61588  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
61589  with_zlib=yes;
61590printf "%s\n" "#define WITH_ZLIB 1" >>confdefs.h
61591
61592else $as_nop
61593  with_zlib=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** ZLIB was not found. You will not be able to use gzip (de)compression" >&5
61594printf "%s\n" "$as_me: WARNING: *** ZLIB was not found. You will not be able to use gzip (de)compression" >&2;}
61595fi
61596
61597
61598elif test $pkg_failed = untried; then
61599        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
61600printf "%s\n" "no" >&6; }
61601
61602    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing deflate" >&5
61603printf %s "checking for library containing deflate... " >&6; }
61604if test ${ac_cv_search_deflate+y}
61605then :
61606  printf %s "(cached) " >&6
61607else $as_nop
61608  ac_func_search_save_LIBS=$LIBS
61609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61610/* end confdefs.h.  */
61611
61612/* Override any GCC internal prototype to avoid an error.
61613   Use char because int might match the return type of a GCC
61614   builtin and then its argument prototype would still apply.  */
61615char deflate ();
61616int
61617main (void)
61618{
61619return deflate ();
61620  ;
61621  return 0;
61622}
61623_ACEOF
61624for ac_lib in '' z
61625do
61626  if test -z "$ac_lib"; then
61627    ac_res="none required"
61628  else
61629    ac_res=-l$ac_lib
61630    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
61631  fi
61632  if ac_fn_c_try_link "$LINENO"
61633then :
61634  ac_cv_search_deflate=$ac_res
61635fi
61636rm -f core conftest.err conftest.$ac_objext conftest.beam \
61637    conftest$ac_exeext
61638  if test ${ac_cv_search_deflate+y}
61639then :
61640  break
61641fi
61642done
61643if test ${ac_cv_search_deflate+y}
61644then :
61645
61646else $as_nop
61647  ac_cv_search_deflate=no
61648fi
61649rm conftest.$ac_ext
61650LIBS=$ac_func_search_save_LIBS
61651fi
61652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_deflate" >&5
61653printf "%s\n" "$ac_cv_search_deflate" >&6; }
61654ac_res=$ac_cv_search_deflate
61655if test "$ac_res" != no
61656then :
61657  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
61658  with_zlib=yes;
61659printf "%s\n" "#define WITH_ZLIB 1" >>confdefs.h
61660
61661else $as_nop
61662  with_zlib=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** ZLIB was not found. You will not be able to use gzip (de)compression" >&5
61663printf "%s\n" "$as_me: WARNING: *** ZLIB was not found. You will not be able to use gzip (de)compression" >&2;}
61664fi
61665
61666
61667else
61668	ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS
61669	ZLIB_LIBS=$pkg_cv_ZLIB_LIBS
61670        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61671printf "%s\n" "yes" >&6; }
61672
61673    with_zlib=yes
61674    LIBS="$ZLIB_LIBS $LIBS"
61675    CFLAGS="$ZLIB_CFLAGS $CFLAGS"
61676
61677printf "%s\n" "#define WITH_ZLIB 1" >>confdefs.h
61678
61679
61680fi
61681
61682fi
61683 if test "$with_zlib" = "yes"; then
61684  WITH_ZLIB_TRUE=
61685  WITH_ZLIB_FALSE='#'
61686else
61687  WITH_ZLIB_TRUE='#'
61688  WITH_ZLIB_FALSE=
61689fi
61690
61691
61692
61693# Check whether --with-lzma was given.
61694if test ${with_lzma+y}
61695then :
61696  withval=$with_lzma; with_lzma=$withval
61697else $as_nop
61698  with_lzma=yes
61699fi
61700
61701if test "$with_lzma" != "no"
61702then :
61703
61704
61705pkg_failed=no
61706{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
61707printf %s "checking for liblzma... " >&6; }
61708
61709if test -n "$LZMA_CFLAGS"; then
61710    pkg_cv_LZMA_CFLAGS="$LZMA_CFLAGS"
61711 elif test -n "$PKG_CONFIG"; then
61712    if test -n "$PKG_CONFIG" && \
61713    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5
61714  ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5
61715  ac_status=$?
61716  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61717  test $ac_status = 0; }; then
61718  pkg_cv_LZMA_CFLAGS=`$PKG_CONFIG --cflags "liblzma" 2>/dev/null`
61719		      test "x$?" != "x0" && pkg_failed=yes
61720else
61721  pkg_failed=yes
61722fi
61723 else
61724    pkg_failed=untried
61725fi
61726if test -n "$LZMA_LIBS"; then
61727    pkg_cv_LZMA_LIBS="$LZMA_LIBS"
61728 elif test -n "$PKG_CONFIG"; then
61729    if test -n "$PKG_CONFIG" && \
61730    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5
61731  ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5
61732  ac_status=$?
61733  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61734  test $ac_status = 0; }; then
61735  pkg_cv_LZMA_LIBS=`$PKG_CONFIG --libs "liblzma" 2>/dev/null`
61736		      test "x$?" != "x0" && pkg_failed=yes
61737else
61738  pkg_failed=yes
61739fi
61740 else
61741    pkg_failed=untried
61742fi
61743
61744
61745
61746if test $pkg_failed = yes; then
61747        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
61748printf "%s\n" "no" >&6; }
61749
61750if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
61751        _pkg_short_errors_supported=yes
61752else
61753        _pkg_short_errors_supported=no
61754fi
61755        if test $_pkg_short_errors_supported = yes; then
61756	        LZMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblzma" 2>&1`
61757        else
61758	        LZMA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblzma" 2>&1`
61759        fi
61760	# Put the nasty error message in config.log where it belongs
61761	echo "$LZMA_PKG_ERRORS" >&5
61762
61763
61764    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing lzma_code" >&5
61765printf %s "checking for library containing lzma_code... " >&6; }
61766if test ${ac_cv_search_lzma_code+y}
61767then :
61768  printf %s "(cached) " >&6
61769else $as_nop
61770  ac_func_search_save_LIBS=$LIBS
61771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61772/* end confdefs.h.  */
61773
61774/* Override any GCC internal prototype to avoid an error.
61775   Use char because int might match the return type of a GCC
61776   builtin and then its argument prototype would still apply.  */
61777char lzma_code ();
61778int
61779main (void)
61780{
61781return lzma_code ();
61782  ;
61783  return 0;
61784}
61785_ACEOF
61786for ac_lib in '' lzma
61787do
61788  if test -z "$ac_lib"; then
61789    ac_res="none required"
61790  else
61791    ac_res=-l$ac_lib
61792    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
61793  fi
61794  if ac_fn_c_try_link "$LINENO"
61795then :
61796  ac_cv_search_lzma_code=$ac_res
61797fi
61798rm -f core conftest.err conftest.$ac_objext conftest.beam \
61799    conftest$ac_exeext
61800  if test ${ac_cv_search_lzma_code+y}
61801then :
61802  break
61803fi
61804done
61805if test ${ac_cv_search_lzma_code+y}
61806then :
61807
61808else $as_nop
61809  ac_cv_search_lzma_code=no
61810fi
61811rm conftest.$ac_ext
61812LIBS=$ac_func_search_save_LIBS
61813fi
61814{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_lzma_code" >&5
61815printf "%s\n" "$ac_cv_search_lzma_code" >&6; }
61816ac_res=$ac_cv_search_lzma_code
61817if test "$ac_res" != no
61818then :
61819  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
61820  with_lzma=yes;
61821printf "%s\n" "#define WITH_LZMA 1" >>confdefs.h
61822
61823else $as_nop
61824  with_lzma=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** liblzma was not found. You will not be able to use LZMA (de)compression" >&5
61825printf "%s\n" "$as_me: WARNING: *** liblzma was not found. You will not be able to use LZMA (de)compression" >&2;}
61826fi
61827
61828
61829elif test $pkg_failed = untried; then
61830        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
61831printf "%s\n" "no" >&6; }
61832
61833    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing lzma_code" >&5
61834printf %s "checking for library containing lzma_code... " >&6; }
61835if test ${ac_cv_search_lzma_code+y}
61836then :
61837  printf %s "(cached) " >&6
61838else $as_nop
61839  ac_func_search_save_LIBS=$LIBS
61840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61841/* end confdefs.h.  */
61842
61843/* Override any GCC internal prototype to avoid an error.
61844   Use char because int might match the return type of a GCC
61845   builtin and then its argument prototype would still apply.  */
61846char lzma_code ();
61847int
61848main (void)
61849{
61850return lzma_code ();
61851  ;
61852  return 0;
61853}
61854_ACEOF
61855for ac_lib in '' lzma
61856do
61857  if test -z "$ac_lib"; then
61858    ac_res="none required"
61859  else
61860    ac_res=-l$ac_lib
61861    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
61862  fi
61863  if ac_fn_c_try_link "$LINENO"
61864then :
61865  ac_cv_search_lzma_code=$ac_res
61866fi
61867rm -f core conftest.err conftest.$ac_objext conftest.beam \
61868    conftest$ac_exeext
61869  if test ${ac_cv_search_lzma_code+y}
61870then :
61871  break
61872fi
61873done
61874if test ${ac_cv_search_lzma_code+y}
61875then :
61876
61877else $as_nop
61878  ac_cv_search_lzma_code=no
61879fi
61880rm conftest.$ac_ext
61881LIBS=$ac_func_search_save_LIBS
61882fi
61883{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_lzma_code" >&5
61884printf "%s\n" "$ac_cv_search_lzma_code" >&6; }
61885ac_res=$ac_cv_search_lzma_code
61886if test "$ac_res" != no
61887then :
61888  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
61889  with_lzma=yes;
61890printf "%s\n" "#define WITH_LZMA 1" >>confdefs.h
61891
61892else $as_nop
61893  with_lzma=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** liblzma was not found. You will not be able to use LZMA (de)compression" >&5
61894printf "%s\n" "$as_me: WARNING: *** liblzma was not found. You will not be able to use LZMA (de)compression" >&2;}
61895fi
61896
61897
61898else
61899	LZMA_CFLAGS=$pkg_cv_LZMA_CFLAGS
61900	LZMA_LIBS=$pkg_cv_LZMA_LIBS
61901        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61902printf "%s\n" "yes" >&6; }
61903
61904    with_lzma=yes
61905    LIBS="$LZMA_LIBS $LIBS"
61906    CFLAGS="$LZMA_CFLAGS $CFLAGS"
61907
61908printf "%s\n" "#define WITH_LZMA 1" >>confdefs.h
61909
61910
61911fi
61912
61913fi
61914 if test "$with_lzma" = "yes"; then
61915  WITH_LZMA_TRUE=
61916  WITH_LZMA_FALSE='#'
61917else
61918  WITH_LZMA_TRUE='#'
61919  WITH_LZMA_FALSE=
61920fi
61921
61922
61923
61924# Check whether --with-brotlidec was given.
61925if test ${with_brotlidec+y}
61926then :
61927  withval=$with_brotlidec; with_brotlidec=$withval
61928else $as_nop
61929  with_brotlidec=yes
61930fi
61931
61932if test "$with_brotlidec" != "no"
61933then :
61934
61935
61936pkg_failed=no
61937{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbrotlidec" >&5
61938printf %s "checking for libbrotlidec... " >&6; }
61939
61940if test -n "$BROTLIDEC_CFLAGS"; then
61941    pkg_cv_BROTLIDEC_CFLAGS="$BROTLIDEC_CFLAGS"
61942 elif test -n "$PKG_CONFIG"; then
61943    if test -n "$PKG_CONFIG" && \
61944    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbrotlidec\""; } >&5
61945  ($PKG_CONFIG --exists --print-errors "libbrotlidec") 2>&5
61946  ac_status=$?
61947  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61948  test $ac_status = 0; }; then
61949  pkg_cv_BROTLIDEC_CFLAGS=`$PKG_CONFIG --cflags "libbrotlidec" 2>/dev/null`
61950		      test "x$?" != "x0" && pkg_failed=yes
61951else
61952  pkg_failed=yes
61953fi
61954 else
61955    pkg_failed=untried
61956fi
61957if test -n "$BROTLIDEC_LIBS"; then
61958    pkg_cv_BROTLIDEC_LIBS="$BROTLIDEC_LIBS"
61959 elif test -n "$PKG_CONFIG"; then
61960    if test -n "$PKG_CONFIG" && \
61961    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbrotlidec\""; } >&5
61962  ($PKG_CONFIG --exists --print-errors "libbrotlidec") 2>&5
61963  ac_status=$?
61964  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
61965  test $ac_status = 0; }; then
61966  pkg_cv_BROTLIDEC_LIBS=`$PKG_CONFIG --libs "libbrotlidec" 2>/dev/null`
61967		      test "x$?" != "x0" && pkg_failed=yes
61968else
61969  pkg_failed=yes
61970fi
61971 else
61972    pkg_failed=untried
61973fi
61974
61975
61976
61977if test $pkg_failed = yes; then
61978        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
61979printf "%s\n" "no" >&6; }
61980
61981if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
61982        _pkg_short_errors_supported=yes
61983else
61984        _pkg_short_errors_supported=no
61985fi
61986        if test $_pkg_short_errors_supported = yes; then
61987	        BROTLIDEC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libbrotlidec" 2>&1`
61988        else
61989	        BROTLIDEC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libbrotlidec" 2>&1`
61990        fi
61991	# Put the nasty error message in config.log where it belongs
61992	echo "$BROTLIDEC_PKG_ERRORS" >&5
61993
61994
61995    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing BrotliDecoderCreateInstance" >&5
61996printf %s "checking for library containing BrotliDecoderCreateInstance... " >&6; }
61997if test ${ac_cv_search_BrotliDecoderCreateInstance+y}
61998then :
61999  printf %s "(cached) " >&6
62000else $as_nop
62001  ac_func_search_save_LIBS=$LIBS
62002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62003/* end confdefs.h.  */
62004
62005/* Override any GCC internal prototype to avoid an error.
62006   Use char because int might match the return type of a GCC
62007   builtin and then its argument prototype would still apply.  */
62008char BrotliDecoderCreateInstance ();
62009int
62010main (void)
62011{
62012return BrotliDecoderCreateInstance ();
62013  ;
62014  return 0;
62015}
62016_ACEOF
62017for ac_lib in '' brotlidec
62018do
62019  if test -z "$ac_lib"; then
62020    ac_res="none required"
62021  else
62022    ac_res=-l$ac_lib
62023    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
62024  fi
62025  if ac_fn_c_try_link "$LINENO"
62026then :
62027  ac_cv_search_BrotliDecoderCreateInstance=$ac_res
62028fi
62029rm -f core conftest.err conftest.$ac_objext conftest.beam \
62030    conftest$ac_exeext
62031  if test ${ac_cv_search_BrotliDecoderCreateInstance+y}
62032then :
62033  break
62034fi
62035done
62036if test ${ac_cv_search_BrotliDecoderCreateInstance+y}
62037then :
62038
62039else $as_nop
62040  ac_cv_search_BrotliDecoderCreateInstance=no
62041fi
62042rm conftest.$ac_ext
62043LIBS=$ac_func_search_save_LIBS
62044fi
62045{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_BrotliDecoderCreateInstance" >&5
62046printf "%s\n" "$ac_cv_search_BrotliDecoderCreateInstance" >&6; }
62047ac_res=$ac_cv_search_BrotliDecoderCreateInstance
62048if test "$ac_res" != no
62049then :
62050  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
62051  with_brotlidec=yes;
62052printf "%s\n" "#define WITH_BROTLIDEC 1" >>confdefs.h
62053
62054else $as_nop
62055  with_brotlidec=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libbrotlidec was not found. You will not be able to use Brotli decompression" >&5
62056printf "%s\n" "$as_me: WARNING: *** libbrotlidec was not found. You will not be able to use Brotli decompression" >&2;}
62057fi
62058
62059
62060elif test $pkg_failed = untried; then
62061        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
62062printf "%s\n" "no" >&6; }
62063
62064    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing BrotliDecoderCreateInstance" >&5
62065printf %s "checking for library containing BrotliDecoderCreateInstance... " >&6; }
62066if test ${ac_cv_search_BrotliDecoderCreateInstance+y}
62067then :
62068  printf %s "(cached) " >&6
62069else $as_nop
62070  ac_func_search_save_LIBS=$LIBS
62071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62072/* end confdefs.h.  */
62073
62074/* Override any GCC internal prototype to avoid an error.
62075   Use char because int might match the return type of a GCC
62076   builtin and then its argument prototype would still apply.  */
62077char BrotliDecoderCreateInstance ();
62078int
62079main (void)
62080{
62081return BrotliDecoderCreateInstance ();
62082  ;
62083  return 0;
62084}
62085_ACEOF
62086for ac_lib in '' brotlidec
62087do
62088  if test -z "$ac_lib"; then
62089    ac_res="none required"
62090  else
62091    ac_res=-l$ac_lib
62092    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
62093  fi
62094  if ac_fn_c_try_link "$LINENO"
62095then :
62096  ac_cv_search_BrotliDecoderCreateInstance=$ac_res
62097fi
62098rm -f core conftest.err conftest.$ac_objext conftest.beam \
62099    conftest$ac_exeext
62100  if test ${ac_cv_search_BrotliDecoderCreateInstance+y}
62101then :
62102  break
62103fi
62104done
62105if test ${ac_cv_search_BrotliDecoderCreateInstance+y}
62106then :
62107
62108else $as_nop
62109  ac_cv_search_BrotliDecoderCreateInstance=no
62110fi
62111rm conftest.$ac_ext
62112LIBS=$ac_func_search_save_LIBS
62113fi
62114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_BrotliDecoderCreateInstance" >&5
62115printf "%s\n" "$ac_cv_search_BrotliDecoderCreateInstance" >&6; }
62116ac_res=$ac_cv_search_BrotliDecoderCreateInstance
62117if test "$ac_res" != no
62118then :
62119  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
62120  with_brotlidec=yes;
62121printf "%s\n" "#define WITH_BROTLIDEC 1" >>confdefs.h
62122
62123else $as_nop
62124  with_brotlidec=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libbrotlidec was not found. You will not be able to use Brotli decompression" >&5
62125printf "%s\n" "$as_me: WARNING: *** libbrotlidec was not found. You will not be able to use Brotli decompression" >&2;}
62126fi
62127
62128
62129else
62130	BROTLIDEC_CFLAGS=$pkg_cv_BROTLIDEC_CFLAGS
62131	BROTLIDEC_LIBS=$pkg_cv_BROTLIDEC_LIBS
62132        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62133printf "%s\n" "yes" >&6; }
62134
62135    with_brotlidec=yes
62136    LIBS="$BROTLIDEC_LIBS $LIBS"
62137    CFLAGS="$BROTLIDEC_CFLAGS $CFLAGS"
62138
62139printf "%s\n" "#define WITH_BROTLIDEC 1" >>confdefs.h
62140
62141
62142fi
62143
62144fi
62145 if test "$with_brotlidec" = "yes"; then
62146  WITH_BROTLIDEC_TRUE=
62147  WITH_BROTLIDEC_FALSE='#'
62148else
62149  WITH_BROTLIDEC_TRUE='#'
62150  WITH_BROTLIDEC_FALSE=
62151fi
62152
62153
62154
62155# Check whether --with-zstd was given.
62156if test ${with_zstd+y}
62157then :
62158  withval=$with_zstd; with_zstd=$withval
62159else $as_nop
62160  with_zstd=yes
62161fi
62162
62163if test "$with_zstd" != "no"
62164then :
62165
62166
62167pkg_failed=no
62168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libzstd" >&5
62169printf %s "checking for libzstd... " >&6; }
62170
62171if test -n "$ZSTD_CFLAGS"; then
62172    pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
62173 elif test -n "$PKG_CONFIG"; then
62174    if test -n "$PKG_CONFIG" && \
62175    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd\""; } >&5
62176  ($PKG_CONFIG --exists --print-errors "libzstd") 2>&5
62177  ac_status=$?
62178  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62179  test $ac_status = 0; }; then
62180  pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd" 2>/dev/null`
62181		      test "x$?" != "x0" && pkg_failed=yes
62182else
62183  pkg_failed=yes
62184fi
62185 else
62186    pkg_failed=untried
62187fi
62188if test -n "$ZSTD_LIBS"; then
62189    pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
62190 elif test -n "$PKG_CONFIG"; then
62191    if test -n "$PKG_CONFIG" && \
62192    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd\""; } >&5
62193  ($PKG_CONFIG --exists --print-errors "libzstd") 2>&5
62194  ac_status=$?
62195  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62196  test $ac_status = 0; }; then
62197  pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd" 2>/dev/null`
62198		      test "x$?" != "x0" && pkg_failed=yes
62199else
62200  pkg_failed=yes
62201fi
62202 else
62203    pkg_failed=untried
62204fi
62205
62206
62207
62208if test $pkg_failed = yes; then
62209        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
62210printf "%s\n" "no" >&6; }
62211
62212if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62213        _pkg_short_errors_supported=yes
62214else
62215        _pkg_short_errors_supported=no
62216fi
62217        if test $_pkg_short_errors_supported = yes; then
62218	        ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd" 2>&1`
62219        else
62220	        ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd" 2>&1`
62221        fi
62222	# Put the nasty error message in config.log where it belongs
62223	echo "$ZSTD_PKG_ERRORS" >&5
62224
62225
62226    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing ZSTD_decompressStream" >&5
62227printf %s "checking for library containing ZSTD_decompressStream... " >&6; }
62228if test ${ac_cv_search_ZSTD_decompressStream+y}
62229then :
62230  printf %s "(cached) " >&6
62231else $as_nop
62232  ac_func_search_save_LIBS=$LIBS
62233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62234/* end confdefs.h.  */
62235
62236/* Override any GCC internal prototype to avoid an error.
62237   Use char because int might match the return type of a GCC
62238   builtin and then its argument prototype would still apply.  */
62239char ZSTD_decompressStream ();
62240int
62241main (void)
62242{
62243return ZSTD_decompressStream ();
62244  ;
62245  return 0;
62246}
62247_ACEOF
62248for ac_lib in '' zstd
62249do
62250  if test -z "$ac_lib"; then
62251    ac_res="none required"
62252  else
62253    ac_res=-l$ac_lib
62254    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
62255  fi
62256  if ac_fn_c_try_link "$LINENO"
62257then :
62258  ac_cv_search_ZSTD_decompressStream=$ac_res
62259fi
62260rm -f core conftest.err conftest.$ac_objext conftest.beam \
62261    conftest$ac_exeext
62262  if test ${ac_cv_search_ZSTD_decompressStream+y}
62263then :
62264  break
62265fi
62266done
62267if test ${ac_cv_search_ZSTD_decompressStream+y}
62268then :
62269
62270else $as_nop
62271  ac_cv_search_ZSTD_decompressStream=no
62272fi
62273rm conftest.$ac_ext
62274LIBS=$ac_func_search_save_LIBS
62275fi
62276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ZSTD_decompressStream" >&5
62277printf "%s\n" "$ac_cv_search_ZSTD_decompressStream" >&6; }
62278ac_res=$ac_cv_search_ZSTD_decompressStream
62279if test "$ac_res" != no
62280then :
62281  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
62282  with_zstd=yes;
62283printf "%s\n" "#define WITH_ZSTD 1" >>confdefs.h
62284
62285else $as_nop
62286  with_zstd=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libzstd was not found. You will not be able to use Zstandard decompression" >&5
62287printf "%s\n" "$as_me: WARNING: *** libzstd was not found. You will not be able to use Zstandard decompression" >&2;}
62288fi
62289
62290
62291elif test $pkg_failed = untried; then
62292        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
62293printf "%s\n" "no" >&6; }
62294
62295    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing ZSTD_decompressStream" >&5
62296printf %s "checking for library containing ZSTD_decompressStream... " >&6; }
62297if test ${ac_cv_search_ZSTD_decompressStream+y}
62298then :
62299  printf %s "(cached) " >&6
62300else $as_nop
62301  ac_func_search_save_LIBS=$LIBS
62302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62303/* end confdefs.h.  */
62304
62305/* Override any GCC internal prototype to avoid an error.
62306   Use char because int might match the return type of a GCC
62307   builtin and then its argument prototype would still apply.  */
62308char ZSTD_decompressStream ();
62309int
62310main (void)
62311{
62312return ZSTD_decompressStream ();
62313  ;
62314  return 0;
62315}
62316_ACEOF
62317for ac_lib in '' zstd
62318do
62319  if test -z "$ac_lib"; then
62320    ac_res="none required"
62321  else
62322    ac_res=-l$ac_lib
62323    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
62324  fi
62325  if ac_fn_c_try_link "$LINENO"
62326then :
62327  ac_cv_search_ZSTD_decompressStream=$ac_res
62328fi
62329rm -f core conftest.err conftest.$ac_objext conftest.beam \
62330    conftest$ac_exeext
62331  if test ${ac_cv_search_ZSTD_decompressStream+y}
62332then :
62333  break
62334fi
62335done
62336if test ${ac_cv_search_ZSTD_decompressStream+y}
62337then :
62338
62339else $as_nop
62340  ac_cv_search_ZSTD_decompressStream=no
62341fi
62342rm conftest.$ac_ext
62343LIBS=$ac_func_search_save_LIBS
62344fi
62345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ZSTD_decompressStream" >&5
62346printf "%s\n" "$ac_cv_search_ZSTD_decompressStream" >&6; }
62347ac_res=$ac_cv_search_ZSTD_decompressStream
62348if test "$ac_res" != no
62349then :
62350  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
62351  with_zstd=yes;
62352printf "%s\n" "#define WITH_ZSTD 1" >>confdefs.h
62353
62354else $as_nop
62355  with_zstd=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libzstd was not found. You will not be able to use Zstandard decompression" >&5
62356printf "%s\n" "$as_me: WARNING: *** libzstd was not found. You will not be able to use Zstandard decompression" >&2;}
62357fi
62358
62359
62360else
62361	ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
62362	ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
62363        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62364printf "%s\n" "yes" >&6; }
62365
62366    with_zstd=yes
62367    LIBS="$ZSTD_LIBS $LIBS"
62368    CFLAGS="$ZSTD_CFLAGS $CFLAGS"
62369
62370printf "%s\n" "#define WITH_ZSTD 1" >>confdefs.h
62371
62372
62373fi
62374
62375fi
62376 if test "$with_zstd" = "yes"; then
62377  WITH_ZSTD_TRUE=
62378  WITH_ZSTD_FALSE='#'
62379else
62380  WITH_ZSTD_TRUE='#'
62381  WITH_ZSTD_FALSE=
62382fi
62383
62384
62385
62386# Check whether --with-lz was given.
62387if test ${with_lz+y}
62388then :
62389  withval=$with_lz; with_lzip=$withval
62390else $as_nop
62391  with_lzip=yes
62392fi
62393
62394if test "$with_lzip" != "no"
62395then :
62396
62397
62398pkg_failed=no
62399{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for liblz" >&5
62400printf %s "checking for liblz... " >&6; }
62401
62402if test -n "$LZIP_CFLAGS"; then
62403    pkg_cv_LZIP_CFLAGS="$LZIP_CFLAGS"
62404 elif test -n "$PKG_CONFIG"; then
62405    if test -n "$PKG_CONFIG" && \
62406    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz\""; } >&5
62407  ($PKG_CONFIG --exists --print-errors "liblz") 2>&5
62408  ac_status=$?
62409  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62410  test $ac_status = 0; }; then
62411  pkg_cv_LZIP_CFLAGS=`$PKG_CONFIG --cflags "liblz" 2>/dev/null`
62412		      test "x$?" != "x0" && pkg_failed=yes
62413else
62414  pkg_failed=yes
62415fi
62416 else
62417    pkg_failed=untried
62418fi
62419if test -n "$LZIP_LIBS"; then
62420    pkg_cv_LZIP_LIBS="$LZIP_LIBS"
62421 elif test -n "$PKG_CONFIG"; then
62422    if test -n "$PKG_CONFIG" && \
62423    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz\""; } >&5
62424  ($PKG_CONFIG --exists --print-errors "liblz") 2>&5
62425  ac_status=$?
62426  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62427  test $ac_status = 0; }; then
62428  pkg_cv_LZIP_LIBS=`$PKG_CONFIG --libs "liblz" 2>/dev/null`
62429		      test "x$?" != "x0" && pkg_failed=yes
62430else
62431  pkg_failed=yes
62432fi
62433 else
62434    pkg_failed=untried
62435fi
62436
62437
62438
62439if test $pkg_failed = yes; then
62440        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
62441printf "%s\n" "no" >&6; }
62442
62443if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62444        _pkg_short_errors_supported=yes
62445else
62446        _pkg_short_errors_supported=no
62447fi
62448        if test $_pkg_short_errors_supported = yes; then
62449	        LZIP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz" 2>&1`
62450        else
62451	        LZIP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz" 2>&1`
62452        fi
62453	# Put the nasty error message in config.log where it belongs
62454	echo "$LZIP_PKG_ERRORS" >&5
62455
62456
62457    old_LIBS="$LIBS"
62458    LIBS=
62459    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing LZ_decompress_open" >&5
62460printf %s "checking for library containing LZ_decompress_open... " >&6; }
62461if test ${ac_cv_search_LZ_decompress_open+y}
62462then :
62463  printf %s "(cached) " >&6
62464else $as_nop
62465  ac_func_search_save_LIBS=$LIBS
62466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62467/* end confdefs.h.  */
62468
62469/* Override any GCC internal prototype to avoid an error.
62470   Use char because int might match the return type of a GCC
62471   builtin and then its argument prototype would still apply.  */
62472char LZ_decompress_open ();
62473int
62474main (void)
62475{
62476return LZ_decompress_open ();
62477  ;
62478  return 0;
62479}
62480_ACEOF
62481for ac_lib in '' lz
62482do
62483  if test -z "$ac_lib"; then
62484    ac_res="none required"
62485  else
62486    ac_res=-l$ac_lib
62487    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
62488  fi
62489  if ac_fn_c_try_link "$LINENO"
62490then :
62491  ac_cv_search_LZ_decompress_open=$ac_res
62492fi
62493rm -f core conftest.err conftest.$ac_objext conftest.beam \
62494    conftest$ac_exeext
62495  if test ${ac_cv_search_LZ_decompress_open+y}
62496then :
62497  break
62498fi
62499done
62500if test ${ac_cv_search_LZ_decompress_open+y}
62501then :
62502
62503else $as_nop
62504  ac_cv_search_LZ_decompress_open=no
62505fi
62506rm conftest.$ac_ext
62507LIBS=$ac_func_search_save_LIBS
62508fi
62509{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_LZ_decompress_open" >&5
62510printf "%s\n" "$ac_cv_search_LZ_decompress_open" >&6; }
62511ac_res=$ac_cv_search_LZ_decompress_open
62512if test "$ac_res" != no
62513then :
62514  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
62515  with_lzip=yes; LZIP_LIBS="$LIBS";
62516printf "%s\n" "#define WITH_LZIP 1" >>confdefs.h
62517
62518else $as_nop
62519  with_lzip=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** liblz was not found. You will not be able to use lzip decompression" >&5
62520printf "%s\n" "$as_me: WARNING: *** liblz was not found. You will not be able to use lzip decompression" >&2;}
62521fi
62522
62523    LIBS="$old_LIBS $LZIP_LIBS"
62524
62525elif test $pkg_failed = untried; then
62526        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
62527printf "%s\n" "no" >&6; }
62528
62529    old_LIBS="$LIBS"
62530    LIBS=
62531    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing LZ_decompress_open" >&5
62532printf %s "checking for library containing LZ_decompress_open... " >&6; }
62533if test ${ac_cv_search_LZ_decompress_open+y}
62534then :
62535  printf %s "(cached) " >&6
62536else $as_nop
62537  ac_func_search_save_LIBS=$LIBS
62538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62539/* end confdefs.h.  */
62540
62541/* Override any GCC internal prototype to avoid an error.
62542   Use char because int might match the return type of a GCC
62543   builtin and then its argument prototype would still apply.  */
62544char LZ_decompress_open ();
62545int
62546main (void)
62547{
62548return LZ_decompress_open ();
62549  ;
62550  return 0;
62551}
62552_ACEOF
62553for ac_lib in '' lz
62554do
62555  if test -z "$ac_lib"; then
62556    ac_res="none required"
62557  else
62558    ac_res=-l$ac_lib
62559    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
62560  fi
62561  if ac_fn_c_try_link "$LINENO"
62562then :
62563  ac_cv_search_LZ_decompress_open=$ac_res
62564fi
62565rm -f core conftest.err conftest.$ac_objext conftest.beam \
62566    conftest$ac_exeext
62567  if test ${ac_cv_search_LZ_decompress_open+y}
62568then :
62569  break
62570fi
62571done
62572if test ${ac_cv_search_LZ_decompress_open+y}
62573then :
62574
62575else $as_nop
62576  ac_cv_search_LZ_decompress_open=no
62577fi
62578rm conftest.$ac_ext
62579LIBS=$ac_func_search_save_LIBS
62580fi
62581{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_LZ_decompress_open" >&5
62582printf "%s\n" "$ac_cv_search_LZ_decompress_open" >&6; }
62583ac_res=$ac_cv_search_LZ_decompress_open
62584if test "$ac_res" != no
62585then :
62586  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
62587  with_lzip=yes; LZIP_LIBS="$LIBS";
62588printf "%s\n" "#define WITH_LZIP 1" >>confdefs.h
62589
62590else $as_nop
62591  with_lzip=no;  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** liblz was not found. You will not be able to use lzip decompression" >&5
62592printf "%s\n" "$as_me: WARNING: *** liblz was not found. You will not be able to use lzip decompression" >&2;}
62593fi
62594
62595    LIBS="$old_LIBS $LZIP_LIBS"
62596
62597else
62598	LZIP_CFLAGS=$pkg_cv_LZIP_CFLAGS
62599	LZIP_LIBS=$pkg_cv_LZIP_LIBS
62600        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62601printf "%s\n" "yes" >&6; }
62602
62603    with_lz=yes
62604    LIBS="$LZIP_LIBS $LIBS"
62605    CFLAGS="$LZIP_CFLAGS $CFLAGS"
62606
62607printf "%s\n" "#define WITH_LZIP 1" >>confdefs.h
62608
62609
62610fi
62611
62612fi
62613 if test "$with_lzip" = "yes"; then
62614  WITH_LZIP_TRUE=
62615  WITH_LZIP_FALSE='#'
62616else
62617  WITH_LZIP_TRUE='#'
62618  WITH_LZIP_FALSE=
62619fi
62620
62621
62622# Support for internationalized domain names.
62623# IDN support in Wget2 is provided in multiple ways:
62624#   1. libidn2 >= 0.14.0 (IDNA 2008)
62625#   3. libidn (IDNA 2003)
62626#
62627# If libidn2 is not found at all, we try to fallback to libidn.
62628
62629# Check whether --with-libidn2 was given.
62630if test ${with_libidn2+y}
62631then :
62632  withval=$with_libidn2; with_libidn2=$withval
62633else $as_nop
62634  with_libidn2=yes
62635fi
62636
62637if test "$with_libidn2" != "no"
62638then :
62639
62640
62641pkg_failed=no
62642{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libidn2 >= 0.14.0" >&5
62643printf %s "checking for libidn2 >= 0.14.0... " >&6; }
62644
62645if test -n "$LIBIDN2_CFLAGS"; then
62646    pkg_cv_LIBIDN2_CFLAGS="$LIBIDN2_CFLAGS"
62647 elif test -n "$PKG_CONFIG"; then
62648    if test -n "$PKG_CONFIG" && \
62649    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libidn2 >= 0.14.0\""; } >&5
62650  ($PKG_CONFIG --exists --print-errors "libidn2 >= 0.14.0") 2>&5
62651  ac_status=$?
62652  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62653  test $ac_status = 0; }; then
62654  pkg_cv_LIBIDN2_CFLAGS=`$PKG_CONFIG --cflags "libidn2 >= 0.14.0" 2>/dev/null`
62655		      test "x$?" != "x0" && pkg_failed=yes
62656else
62657  pkg_failed=yes
62658fi
62659 else
62660    pkg_failed=untried
62661fi
62662if test -n "$LIBIDN2_LIBS"; then
62663    pkg_cv_LIBIDN2_LIBS="$LIBIDN2_LIBS"
62664 elif test -n "$PKG_CONFIG"; then
62665    if test -n "$PKG_CONFIG" && \
62666    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libidn2 >= 0.14.0\""; } >&5
62667  ($PKG_CONFIG --exists --print-errors "libidn2 >= 0.14.0") 2>&5
62668  ac_status=$?
62669  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62670  test $ac_status = 0; }; then
62671  pkg_cv_LIBIDN2_LIBS=`$PKG_CONFIG --libs "libidn2 >= 0.14.0" 2>/dev/null`
62672		      test "x$?" != "x0" && pkg_failed=yes
62673else
62674  pkg_failed=yes
62675fi
62676 else
62677    pkg_failed=untried
62678fi
62679
62680
62681
62682if test $pkg_failed = yes; then
62683        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
62684printf "%s\n" "no" >&6; }
62685
62686if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62687        _pkg_short_errors_supported=yes
62688else
62689        _pkg_short_errors_supported=no
62690fi
62691        if test $_pkg_short_errors_supported = yes; then
62692	        LIBIDN2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libidn2 >= 0.14.0" 2>&1`
62693        else
62694	        LIBIDN2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libidn2 >= 0.14.0" 2>&1`
62695        fi
62696	# Put the nasty error message in config.log where it belongs
62697	echo "$LIBIDN2_PKG_ERRORS" >&5
62698
62699
62700    with_libidn2=no
62701    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** LIBIDN2 was not found. You will not be able to use IDN2008 support" >&5
62702printf "%s\n" "$as_me: WARNING: *** LIBIDN2 was not found. You will not be able to use IDN2008 support" >&2;}
62703
62704elif test $pkg_failed = untried; then
62705        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
62706printf "%s\n" "no" >&6; }
62707
62708    with_libidn2=no
62709    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** LIBIDN2 was not found. You will not be able to use IDN2008 support" >&5
62710printf "%s\n" "$as_me: WARNING: *** LIBIDN2 was not found. You will not be able to use IDN2008 support" >&2;}
62711
62712else
62713	LIBIDN2_CFLAGS=$pkg_cv_LIBIDN2_CFLAGS
62714	LIBIDN2_LIBS=$pkg_cv_LIBIDN2_LIBS
62715        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62716printf "%s\n" "yes" >&6; }
62717
62718    with_libidn2=yes
62719    IDNA_INFO="IDNA 2008 (libidn2)"
62720    LIBS="$LIBIDN2_LIBS $LIBS"
62721    CFLAGS="$LIBIDN2_CFLAGS $CFLAGS"
62722
62723printf "%s\n" "#define WITH_LIBIDN2 1" >>confdefs.h
62724
62725
62726fi
62727
62728fi
62729
62730 if test "$with_libidn2" = "yes"; then
62731  WITH_LIBIDN2_TRUE=
62732  WITH_LIBIDN2_FALSE='#'
62733else
62734  WITH_LIBIDN2_TRUE='#'
62735  WITH_LIBIDN2_FALSE=
62736fi
62737
62738
62739if test "$with_libidn2" != "yes"
62740then :
62741
62742
62743# Check whether --with-libidn was given.
62744if test ${with_libidn+y}
62745then :
62746  withval=$with_libidn; with_libidn=$withval
62747else $as_nop
62748  with_libidn=yes
62749fi
62750
62751  if test "$with_libidn" != "no"
62752then :
62753
62754
62755pkg_failed=no
62756{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libidn" >&5
62757printf %s "checking for libidn... " >&6; }
62758
62759if test -n "$LIBIDN_CFLAGS"; then
62760    pkg_cv_LIBIDN_CFLAGS="$LIBIDN_CFLAGS"
62761 elif test -n "$PKG_CONFIG"; then
62762    if test -n "$PKG_CONFIG" && \
62763    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libidn\""; } >&5
62764  ($PKG_CONFIG --exists --print-errors "libidn") 2>&5
62765  ac_status=$?
62766  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62767  test $ac_status = 0; }; then
62768  pkg_cv_LIBIDN_CFLAGS=`$PKG_CONFIG --cflags "libidn" 2>/dev/null`
62769		      test "x$?" != "x0" && pkg_failed=yes
62770else
62771  pkg_failed=yes
62772fi
62773 else
62774    pkg_failed=untried
62775fi
62776if test -n "$LIBIDN_LIBS"; then
62777    pkg_cv_LIBIDN_LIBS="$LIBIDN_LIBS"
62778 elif test -n "$PKG_CONFIG"; then
62779    if test -n "$PKG_CONFIG" && \
62780    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libidn\""; } >&5
62781  ($PKG_CONFIG --exists --print-errors "libidn") 2>&5
62782  ac_status=$?
62783  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62784  test $ac_status = 0; }; then
62785  pkg_cv_LIBIDN_LIBS=`$PKG_CONFIG --libs "libidn" 2>/dev/null`
62786		      test "x$?" != "x0" && pkg_failed=yes
62787else
62788  pkg_failed=yes
62789fi
62790 else
62791    pkg_failed=untried
62792fi
62793
62794
62795
62796if test $pkg_failed = yes; then
62797        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
62798printf "%s\n" "no" >&6; }
62799
62800if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62801        _pkg_short_errors_supported=yes
62802else
62803        _pkg_short_errors_supported=no
62804fi
62805        if test $_pkg_short_errors_supported = yes; then
62806	        LIBIDN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libidn" 2>&1`
62807        else
62808	        LIBIDN_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libidn" 2>&1`
62809        fi
62810	# Put the nasty error message in config.log where it belongs
62811	echo "$LIBIDN_PKG_ERRORS" >&5
62812
62813
62814      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing idna_to_ascii_8z" >&5
62815printf %s "checking for library containing idna_to_ascii_8z... " >&6; }
62816if test ${ac_cv_search_idna_to_ascii_8z+y}
62817then :
62818  printf %s "(cached) " >&6
62819else $as_nop
62820  ac_func_search_save_LIBS=$LIBS
62821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62822/* end confdefs.h.  */
62823
62824/* Override any GCC internal prototype to avoid an error.
62825   Use char because int might match the return type of a GCC
62826   builtin and then its argument prototype would still apply.  */
62827char idna_to_ascii_8z ();
62828int
62829main (void)
62830{
62831return idna_to_ascii_8z ();
62832  ;
62833  return 0;
62834}
62835_ACEOF
62836for ac_lib in '' idn
62837do
62838  if test -z "$ac_lib"; then
62839    ac_res="none required"
62840  else
62841    ac_res=-l$ac_lib
62842    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
62843  fi
62844  if ac_fn_c_try_link "$LINENO"
62845then :
62846  ac_cv_search_idna_to_ascii_8z=$ac_res
62847fi
62848rm -f core conftest.err conftest.$ac_objext conftest.beam \
62849    conftest$ac_exeext
62850  if test ${ac_cv_search_idna_to_ascii_8z+y}
62851then :
62852  break
62853fi
62854done
62855if test ${ac_cv_search_idna_to_ascii_8z+y}
62856then :
62857
62858else $as_nop
62859  ac_cv_search_idna_to_ascii_8z=no
62860fi
62861rm conftest.$ac_ext
62862LIBS=$ac_func_search_save_LIBS
62863fi
62864{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_idna_to_ascii_8z" >&5
62865printf "%s\n" "$ac_cv_search_idna_to_ascii_8z" >&6; }
62866ac_res=$ac_cv_search_idna_to_ascii_8z
62867if test "$ac_res" != no
62868then :
62869  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
62870  with_libidn=yes;
62871printf "%s\n" "#define WITH_LIBIDN 1" >>confdefs.h
62872 IDNA_INFO="IDNA 2003 (libidn)"
62873else $as_nop
62874  with_libidn=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** LIBIDN was not found. You will not be able to use IDN support" >&5
62875printf "%s\n" "$as_me: WARNING: *** LIBIDN was not found. You will not be able to use IDN support" >&2;}
62876fi
62877
62878
62879elif test $pkg_failed = untried; then
62880        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
62881printf "%s\n" "no" >&6; }
62882
62883      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing idna_to_ascii_8z" >&5
62884printf %s "checking for library containing idna_to_ascii_8z... " >&6; }
62885if test ${ac_cv_search_idna_to_ascii_8z+y}
62886then :
62887  printf %s "(cached) " >&6
62888else $as_nop
62889  ac_func_search_save_LIBS=$LIBS
62890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62891/* end confdefs.h.  */
62892
62893/* Override any GCC internal prototype to avoid an error.
62894   Use char because int might match the return type of a GCC
62895   builtin and then its argument prototype would still apply.  */
62896char idna_to_ascii_8z ();
62897int
62898main (void)
62899{
62900return idna_to_ascii_8z ();
62901  ;
62902  return 0;
62903}
62904_ACEOF
62905for ac_lib in '' idn
62906do
62907  if test -z "$ac_lib"; then
62908    ac_res="none required"
62909  else
62910    ac_res=-l$ac_lib
62911    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
62912  fi
62913  if ac_fn_c_try_link "$LINENO"
62914then :
62915  ac_cv_search_idna_to_ascii_8z=$ac_res
62916fi
62917rm -f core conftest.err conftest.$ac_objext conftest.beam \
62918    conftest$ac_exeext
62919  if test ${ac_cv_search_idna_to_ascii_8z+y}
62920then :
62921  break
62922fi
62923done
62924if test ${ac_cv_search_idna_to_ascii_8z+y}
62925then :
62926
62927else $as_nop
62928  ac_cv_search_idna_to_ascii_8z=no
62929fi
62930rm conftest.$ac_ext
62931LIBS=$ac_func_search_save_LIBS
62932fi
62933{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_idna_to_ascii_8z" >&5
62934printf "%s\n" "$ac_cv_search_idna_to_ascii_8z" >&6; }
62935ac_res=$ac_cv_search_idna_to_ascii_8z
62936if test "$ac_res" != no
62937then :
62938  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
62939  with_libidn=yes;
62940printf "%s\n" "#define WITH_LIBIDN 1" >>confdefs.h
62941 IDNA_INFO="IDNA 2003 (libidn)"
62942else $as_nop
62943  with_libidn=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** LIBIDN was not found. You will not be able to use IDN support" >&5
62944printf "%s\n" "$as_me: WARNING: *** LIBIDN was not found. You will not be able to use IDN support" >&2;}
62945fi
62946
62947
62948else
62949	LIBIDN_CFLAGS=$pkg_cv_LIBIDN_CFLAGS
62950	LIBIDN_LIBS=$pkg_cv_LIBIDN_LIBS
62951        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62952printf "%s\n" "yes" >&6; }
62953
62954      with_libidn=yes
62955      LIBS="$LIBIDN_LIBS $LIBS"
62956      CFLAGS="$LIBIDN_CFLAGS $CFLAGS"
62957
62958printf "%s\n" "#define WITH_LIBIDN 1" >>confdefs.h
62959
62960      IDNA_INFO="IDNA 2003 (libidn)"
62961
62962fi
62963
62964fi
62965
62966fi
62967 if test "$with_libidn" = "yes"; then
62968  WITH_LIBIDN_TRUE=
62969  WITH_LIBIDN_FALSE='#'
62970else
62971  WITH_LIBIDN_TRUE='#'
62972  WITH_LIBIDN_FALSE=
62973fi
62974
62975
62976
62977# Check whether --with-libpcre2 was given.
62978if test ${with_libpcre2+y}
62979then :
62980  withval=$with_libpcre2; with_libpcre2=$withval
62981else $as_nop
62982  with_libpcre2=yes
62983fi
62984
62985if test "$with_libpcre2" != "no"
62986then :
62987
62988
62989pkg_failed=no
62990{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpcre2-8" >&5
62991printf %s "checking for libpcre2-8... " >&6; }
62992
62993if test -n "$LIBPCRE2_CFLAGS"; then
62994    pkg_cv_LIBPCRE2_CFLAGS="$LIBPCRE2_CFLAGS"
62995 elif test -n "$PKG_CONFIG"; then
62996    if test -n "$PKG_CONFIG" && \
62997    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8\""; } >&5
62998  ($PKG_CONFIG --exists --print-errors "libpcre2-8") 2>&5
62999  ac_status=$?
63000  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63001  test $ac_status = 0; }; then
63002  pkg_cv_LIBPCRE2_CFLAGS=`$PKG_CONFIG --cflags "libpcre2-8" 2>/dev/null`
63003		      test "x$?" != "x0" && pkg_failed=yes
63004else
63005  pkg_failed=yes
63006fi
63007 else
63008    pkg_failed=untried
63009fi
63010if test -n "$LIBPCRE2_LIBS"; then
63011    pkg_cv_LIBPCRE2_LIBS="$LIBPCRE2_LIBS"
63012 elif test -n "$PKG_CONFIG"; then
63013    if test -n "$PKG_CONFIG" && \
63014    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre2-8\""; } >&5
63015  ($PKG_CONFIG --exists --print-errors "libpcre2-8") 2>&5
63016  ac_status=$?
63017  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63018  test $ac_status = 0; }; then
63019  pkg_cv_LIBPCRE2_LIBS=`$PKG_CONFIG --libs "libpcre2-8" 2>/dev/null`
63020		      test "x$?" != "x0" && pkg_failed=yes
63021else
63022  pkg_failed=yes
63023fi
63024 else
63025    pkg_failed=untried
63026fi
63027
63028
63029
63030if test $pkg_failed = yes; then
63031        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
63032printf "%s\n" "no" >&6; }
63033
63034if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63035        _pkg_short_errors_supported=yes
63036else
63037        _pkg_short_errors_supported=no
63038fi
63039        if test $_pkg_short_errors_supported = yes; then
63040	        LIBPCRE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpcre2-8" 2>&1`
63041        else
63042	        LIBPCRE2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpcre2-8" 2>&1`
63043        fi
63044	# Put the nasty error message in config.log where it belongs
63045	echo "$LIBPCRE2_PKG_ERRORS" >&5
63046
63047
63048    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing pcre2_compile_8" >&5
63049printf %s "checking for library containing pcre2_compile_8... " >&6; }
63050if test ${ac_cv_search_pcre2_compile_8+y}
63051then :
63052  printf %s "(cached) " >&6
63053else $as_nop
63054  ac_func_search_save_LIBS=$LIBS
63055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63056/* end confdefs.h.  */
63057
63058/* Override any GCC internal prototype to avoid an error.
63059   Use char because int might match the return type of a GCC
63060   builtin and then its argument prototype would still apply.  */
63061char pcre2_compile_8 ();
63062int
63063main (void)
63064{
63065return pcre2_compile_8 ();
63066  ;
63067  return 0;
63068}
63069_ACEOF
63070for ac_lib in '' pcre2-8
63071do
63072  if test -z "$ac_lib"; then
63073    ac_res="none required"
63074  else
63075    ac_res=-l$ac_lib
63076    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
63077  fi
63078  if ac_fn_c_try_link "$LINENO"
63079then :
63080  ac_cv_search_pcre2_compile_8=$ac_res
63081fi
63082rm -f core conftest.err conftest.$ac_objext conftest.beam \
63083    conftest$ac_exeext
63084  if test ${ac_cv_search_pcre2_compile_8+y}
63085then :
63086  break
63087fi
63088done
63089if test ${ac_cv_search_pcre2_compile_8+y}
63090then :
63091
63092else $as_nop
63093  ac_cv_search_pcre2_compile_8=no
63094fi
63095rm conftest.$ac_ext
63096LIBS=$ac_func_search_save_LIBS
63097fi
63098{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcre2_compile_8" >&5
63099printf "%s\n" "$ac_cv_search_pcre2_compile_8" >&6; }
63100ac_res=$ac_cv_search_pcre2_compile_8
63101if test "$ac_res" != no
63102then :
63103  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
63104  with_libpcre2=yes;
63105printf "%s\n" "#define WITH_LIBPCRE2 1" >>confdefs.h
63106
63107else $as_nop
63108  with_libpcre2=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libpcre2 was not found. PCRE2 regex support disabled." >&5
63109printf "%s\n" "$as_me: WARNING: *** libpcre2 was not found. PCRE2 regex support disabled." >&2;}
63110fi
63111
63112
63113elif test $pkg_failed = untried; then
63114        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
63115printf "%s\n" "no" >&6; }
63116
63117    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing pcre2_compile_8" >&5
63118printf %s "checking for library containing pcre2_compile_8... " >&6; }
63119if test ${ac_cv_search_pcre2_compile_8+y}
63120then :
63121  printf %s "(cached) " >&6
63122else $as_nop
63123  ac_func_search_save_LIBS=$LIBS
63124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63125/* end confdefs.h.  */
63126
63127/* Override any GCC internal prototype to avoid an error.
63128   Use char because int might match the return type of a GCC
63129   builtin and then its argument prototype would still apply.  */
63130char pcre2_compile_8 ();
63131int
63132main (void)
63133{
63134return pcre2_compile_8 ();
63135  ;
63136  return 0;
63137}
63138_ACEOF
63139for ac_lib in '' pcre2-8
63140do
63141  if test -z "$ac_lib"; then
63142    ac_res="none required"
63143  else
63144    ac_res=-l$ac_lib
63145    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
63146  fi
63147  if ac_fn_c_try_link "$LINENO"
63148then :
63149  ac_cv_search_pcre2_compile_8=$ac_res
63150fi
63151rm -f core conftest.err conftest.$ac_objext conftest.beam \
63152    conftest$ac_exeext
63153  if test ${ac_cv_search_pcre2_compile_8+y}
63154then :
63155  break
63156fi
63157done
63158if test ${ac_cv_search_pcre2_compile_8+y}
63159then :
63160
63161else $as_nop
63162  ac_cv_search_pcre2_compile_8=no
63163fi
63164rm conftest.$ac_ext
63165LIBS=$ac_func_search_save_LIBS
63166fi
63167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcre2_compile_8" >&5
63168printf "%s\n" "$ac_cv_search_pcre2_compile_8" >&6; }
63169ac_res=$ac_cv_search_pcre2_compile_8
63170if test "$ac_res" != no
63171then :
63172  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
63173  with_libpcre2=yes;
63174printf "%s\n" "#define WITH_LIBPCRE2 1" >>confdefs.h
63175
63176else $as_nop
63177  with_libpcre2=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libpcre2 was not found. PCRE2 regex support disabled." >&5
63178printf "%s\n" "$as_me: WARNING: *** libpcre2 was not found. PCRE2 regex support disabled." >&2;}
63179fi
63180
63181
63182else
63183	LIBPCRE2_CFLAGS=$pkg_cv_LIBPCRE2_CFLAGS
63184	LIBPCRE2_LIBS=$pkg_cv_LIBPCRE2_LIBS
63185        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63186printf "%s\n" "yes" >&6; }
63187
63188    with_libpcre2=yes
63189    LIBS="$LIBPCRE2_LIBS $LIBS"
63190    CFLAGS="$LIBPCRE2_CFLAGS $CFLAGS"
63191
63192printf "%s\n" "#define WITH_LIBPCRE2 1" >>confdefs.h
63193
63194
63195fi
63196
63197fi
63198 if test "$with_libpcre2" = "yes"; then
63199  WITH_LIBPCRE2_TRUE=
63200  WITH_LIBPCRE2_FALSE='#'
63201else
63202  WITH_LIBPCRE2_TRUE='#'
63203  WITH_LIBPCRE2_FALSE=
63204fi
63205
63206
63207if test "$with_libpcre2" != "yes"
63208then :
63209
63210
63211# Check whether --with-libpcre was given.
63212if test ${with_libpcre+y}
63213then :
63214  withval=$with_libpcre; with_libpcre=$withval
63215else $as_nop
63216  with_libpcre=yes
63217fi
63218
63219 if test "$with_libpcre" != "no"
63220then :
63221
63222
63223pkg_failed=no
63224{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libpcre" >&5
63225printf %s "checking for libpcre... " >&6; }
63226
63227if test -n "$LIBPCRE_CFLAGS"; then
63228    pkg_cv_LIBPCRE_CFLAGS="$LIBPCRE_CFLAGS"
63229 elif test -n "$PKG_CONFIG"; then
63230    if test -n "$PKG_CONFIG" && \
63231    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre\""; } >&5
63232  ($PKG_CONFIG --exists --print-errors "libpcre") 2>&5
63233  ac_status=$?
63234  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63235  test $ac_status = 0; }; then
63236  pkg_cv_LIBPCRE_CFLAGS=`$PKG_CONFIG --cflags "libpcre" 2>/dev/null`
63237		      test "x$?" != "x0" && pkg_failed=yes
63238else
63239  pkg_failed=yes
63240fi
63241 else
63242    pkg_failed=untried
63243fi
63244if test -n "$LIBPCRE_LIBS"; then
63245    pkg_cv_LIBPCRE_LIBS="$LIBPCRE_LIBS"
63246 elif test -n "$PKG_CONFIG"; then
63247    if test -n "$PKG_CONFIG" && \
63248    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpcre\""; } >&5
63249  ($PKG_CONFIG --exists --print-errors "libpcre") 2>&5
63250  ac_status=$?
63251  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63252  test $ac_status = 0; }; then
63253  pkg_cv_LIBPCRE_LIBS=`$PKG_CONFIG --libs "libpcre" 2>/dev/null`
63254		      test "x$?" != "x0" && pkg_failed=yes
63255else
63256  pkg_failed=yes
63257fi
63258 else
63259    pkg_failed=untried
63260fi
63261
63262
63263
63264if test $pkg_failed = yes; then
63265        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
63266printf "%s\n" "no" >&6; }
63267
63268if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63269        _pkg_short_errors_supported=yes
63270else
63271        _pkg_short_errors_supported=no
63272fi
63273        if test $_pkg_short_errors_supported = yes; then
63274	        LIBPCRE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpcre" 2>&1`
63275        else
63276	        LIBPCRE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpcre" 2>&1`
63277        fi
63278	# Put the nasty error message in config.log where it belongs
63279	echo "$LIBPCRE_PKG_ERRORS" >&5
63280
63281
63282     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing pcre_compile" >&5
63283printf %s "checking for library containing pcre_compile... " >&6; }
63284if test ${ac_cv_search_pcre_compile+y}
63285then :
63286  printf %s "(cached) " >&6
63287else $as_nop
63288  ac_func_search_save_LIBS=$LIBS
63289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63290/* end confdefs.h.  */
63291
63292/* Override any GCC internal prototype to avoid an error.
63293   Use char because int might match the return type of a GCC
63294   builtin and then its argument prototype would still apply.  */
63295char pcre_compile ();
63296int
63297main (void)
63298{
63299return pcre_compile ();
63300  ;
63301  return 0;
63302}
63303_ACEOF
63304for ac_lib in '' pcre
63305do
63306  if test -z "$ac_lib"; then
63307    ac_res="none required"
63308  else
63309    ac_res=-l$ac_lib
63310    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
63311  fi
63312  if ac_fn_c_try_link "$LINENO"
63313then :
63314  ac_cv_search_pcre_compile=$ac_res
63315fi
63316rm -f core conftest.err conftest.$ac_objext conftest.beam \
63317    conftest$ac_exeext
63318  if test ${ac_cv_search_pcre_compile+y}
63319then :
63320  break
63321fi
63322done
63323if test ${ac_cv_search_pcre_compile+y}
63324then :
63325
63326else $as_nop
63327  ac_cv_search_pcre_compile=no
63328fi
63329rm conftest.$ac_ext
63330LIBS=$ac_func_search_save_LIBS
63331fi
63332{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcre_compile" >&5
63333printf "%s\n" "$ac_cv_search_pcre_compile" >&6; }
63334ac_res=$ac_cv_search_pcre_compile
63335if test "$ac_res" != no
63336then :
63337  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
63338  with_libpcre=yes;
63339printf "%s\n" "#define WITH_LIBPCRE 1" >>confdefs.h
63340
63341else $as_nop
63342  with_libpcre=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libpcre was not found. PCRE regex support disabled." >&5
63343printf "%s\n" "$as_me: WARNING: *** libpcre was not found. PCRE regex support disabled." >&2;}
63344fi
63345
63346
63347elif test $pkg_failed = untried; then
63348        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
63349printf "%s\n" "no" >&6; }
63350
63351     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing pcre_compile" >&5
63352printf %s "checking for library containing pcre_compile... " >&6; }
63353if test ${ac_cv_search_pcre_compile+y}
63354then :
63355  printf %s "(cached) " >&6
63356else $as_nop
63357  ac_func_search_save_LIBS=$LIBS
63358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63359/* end confdefs.h.  */
63360
63361/* Override any GCC internal prototype to avoid an error.
63362   Use char because int might match the return type of a GCC
63363   builtin and then its argument prototype would still apply.  */
63364char pcre_compile ();
63365int
63366main (void)
63367{
63368return pcre_compile ();
63369  ;
63370  return 0;
63371}
63372_ACEOF
63373for ac_lib in '' pcre
63374do
63375  if test -z "$ac_lib"; then
63376    ac_res="none required"
63377  else
63378    ac_res=-l$ac_lib
63379    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
63380  fi
63381  if ac_fn_c_try_link "$LINENO"
63382then :
63383  ac_cv_search_pcre_compile=$ac_res
63384fi
63385rm -f core conftest.err conftest.$ac_objext conftest.beam \
63386    conftest$ac_exeext
63387  if test ${ac_cv_search_pcre_compile+y}
63388then :
63389  break
63390fi
63391done
63392if test ${ac_cv_search_pcre_compile+y}
63393then :
63394
63395else $as_nop
63396  ac_cv_search_pcre_compile=no
63397fi
63398rm conftest.$ac_ext
63399LIBS=$ac_func_search_save_LIBS
63400fi
63401{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcre_compile" >&5
63402printf "%s\n" "$ac_cv_search_pcre_compile" >&6; }
63403ac_res=$ac_cv_search_pcre_compile
63404if test "$ac_res" != no
63405then :
63406  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
63407  with_libpcre=yes;
63408printf "%s\n" "#define WITH_LIBPCRE 1" >>confdefs.h
63409
63410else $as_nop
63411  with_libpcre=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** libpcre was not found. PCRE regex support disabled." >&5
63412printf "%s\n" "$as_me: WARNING: *** libpcre was not found. PCRE regex support disabled." >&2;}
63413fi
63414
63415
63416else
63417	LIBPCRE_CFLAGS=$pkg_cv_LIBPCRE_CFLAGS
63418	LIBPCRE_LIBS=$pkg_cv_LIBPCRE_LIBS
63419        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63420printf "%s\n" "yes" >&6; }
63421
63422     with_libpcre=yes
63423     LIBS="$LIBPCRE_LIBS $LIBS"
63424     CFLAGS="$LIBPCRE_CFLAGS $CFLAGS"
63425
63426printf "%s\n" "#define WITH_LIBPCRE 1" >>confdefs.h
63427
63428
63429fi
63430
63431fi
63432
63433fi
63434 if test "$with_libpcre" = "yes"; then
63435  WITH_LIBPCRE_TRUE=
63436  WITH_LIBPCRE_FALSE='#'
63437else
63438  WITH_LIBPCRE_TRUE='#'
63439  WITH_LIBPCRE_FALSE=
63440fi
63441
63442
63443if test "$with_libpcre" = "yes"
63444then :
63445  HAVE_PCRE="yes, via libpcre"
63446elif test "$with_libpcre2" = "yes"
63447then :
63448  HAVE_PCRE="yes, via libpcre2"
63449else $as_nop
63450  HAVE_PCRE=no
63451fi
63452
63453
63454# Check whether --with-libmicrohttpd was given.
63455if test ${with_libmicrohttpd+y}
63456then :
63457  withval=$with_libmicrohttpd; with_libmicrohttpd=$withval
63458else $as_nop
63459  with_libmicrohttpd=yes
63460fi
63461
63462if test "$with_libmicrohttpd" != "no"
63463then :
63464
63465  old_LIBS=$LIBS
63466  old_CFLAGS=$CFLAGS
63467
63468pkg_failed=no
63469{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libmicrohttpd" >&5
63470printf %s "checking for libmicrohttpd... " >&6; }
63471
63472if test -n "$MICROHTTPD_CFLAGS"; then
63473    pkg_cv_MICROHTTPD_CFLAGS="$MICROHTTPD_CFLAGS"
63474 elif test -n "$PKG_CONFIG"; then
63475    if test -n "$PKG_CONFIG" && \
63476    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmicrohttpd\""; } >&5
63477  ($PKG_CONFIG --exists --print-errors "libmicrohttpd") 2>&5
63478  ac_status=$?
63479  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63480  test $ac_status = 0; }; then
63481  pkg_cv_MICROHTTPD_CFLAGS=`$PKG_CONFIG --cflags "libmicrohttpd" 2>/dev/null`
63482		      test "x$?" != "x0" && pkg_failed=yes
63483else
63484  pkg_failed=yes
63485fi
63486 else
63487    pkg_failed=untried
63488fi
63489if test -n "$MICROHTTPD_LIBS"; then
63490    pkg_cv_MICROHTTPD_LIBS="$MICROHTTPD_LIBS"
63491 elif test -n "$PKG_CONFIG"; then
63492    if test -n "$PKG_CONFIG" && \
63493    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmicrohttpd\""; } >&5
63494  ($PKG_CONFIG --exists --print-errors "libmicrohttpd") 2>&5
63495  ac_status=$?
63496  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63497  test $ac_status = 0; }; then
63498  pkg_cv_MICROHTTPD_LIBS=`$PKG_CONFIG --libs "libmicrohttpd" 2>/dev/null`
63499		      test "x$?" != "x0" && pkg_failed=yes
63500else
63501  pkg_failed=yes
63502fi
63503 else
63504    pkg_failed=untried
63505fi
63506
63507
63508
63509if test $pkg_failed = yes; then
63510        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
63511printf "%s\n" "no" >&6; }
63512
63513if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63514        _pkg_short_errors_supported=yes
63515else
63516        _pkg_short_errors_supported=no
63517fi
63518        if test $_pkg_short_errors_supported = yes; then
63519	        MICROHTTPD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libmicrohttpd" 2>&1`
63520        else
63521	        MICROHTTPD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libmicrohttpd" 2>&1`
63522        fi
63523	# Put the nasty error message in config.log where it belongs
63524	echo "$MICROHTTPD_PKG_ERRORS" >&5
63525
63526
63527    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing MHD_start_daemon" >&5
63528printf %s "checking for library containing MHD_start_daemon... " >&6; }
63529if test ${ac_cv_search_MHD_start_daemon+y}
63530then :
63531  printf %s "(cached) " >&6
63532else $as_nop
63533  ac_func_search_save_LIBS=$LIBS
63534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63535/* end confdefs.h.  */
63536
63537/* Override any GCC internal prototype to avoid an error.
63538   Use char because int might match the return type of a GCC
63539   builtin and then its argument prototype would still apply.  */
63540char MHD_start_daemon ();
63541int
63542main (void)
63543{
63544return MHD_start_daemon ();
63545  ;
63546  return 0;
63547}
63548_ACEOF
63549for ac_lib in '' microhttpd
63550do
63551  if test -z "$ac_lib"; then
63552    ac_res="none required"
63553  else
63554    ac_res=-l$ac_lib
63555    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
63556  fi
63557  if ac_fn_c_try_link "$LINENO"
63558then :
63559  ac_cv_search_MHD_start_daemon=$ac_res
63560fi
63561rm -f core conftest.err conftest.$ac_objext conftest.beam \
63562    conftest$ac_exeext
63563  if test ${ac_cv_search_MHD_start_daemon+y}
63564then :
63565  break
63566fi
63567done
63568if test ${ac_cv_search_MHD_start_daemon+y}
63569then :
63570
63571else $as_nop
63572  ac_cv_search_MHD_start_daemon=no
63573fi
63574rm conftest.$ac_ext
63575LIBS=$ac_func_search_save_LIBS
63576fi
63577{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MHD_start_daemon" >&5
63578printf "%s\n" "$ac_cv_search_MHD_start_daemon" >&6; }
63579ac_res=$ac_cv_search_MHD_start_daemon
63580if test "$ac_res" != no
63581then :
63582  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
63583  with_libmicrohttpd=yes;
63584printf "%s\n" "#define WITH_MICROHTTPD 1" >>confdefs.h
63585
63586else $as_nop
63587  with_libmicrohttpd=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** LIBMICROHTTPD was not found. Several tests will not run." >&5
63588printf "%s\n" "$as_me: WARNING: *** LIBMICROHTTPD was not found. Several tests will not run." >&2;}
63589fi
63590
63591    ac_fn_c_check_func "$LINENO" "MHD_free" "ac_cv_func_MHD_free"
63592if test "x$ac_cv_func_MHD_free" = xyes
63593then :
63594  printf "%s\n" "#define HAVE_MHD_FREE 1" >>confdefs.h
63595
63596fi
63597
63598    ac_fn_c_check_header_compile "$LINENO" "microhttpd_http2.h" "ac_cv_header_microhttpd_http2_h" "$ac_includes_default"
63599if test "x$ac_cv_header_microhttpd_http2_h" = xyes
63600then :
63601  printf "%s\n" "#define HAVE_MICROHTTPD_HTTP2_H 1" >>confdefs.h
63602
63603fi
63604
63605    TEST_LIBS=$LIBS
63606    TEST_CFLAGS=$CFLAGS
63607
63608elif test $pkg_failed = untried; then
63609        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
63610printf "%s\n" "no" >&6; }
63611
63612    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing MHD_start_daemon" >&5
63613printf %s "checking for library containing MHD_start_daemon... " >&6; }
63614if test ${ac_cv_search_MHD_start_daemon+y}
63615then :
63616  printf %s "(cached) " >&6
63617else $as_nop
63618  ac_func_search_save_LIBS=$LIBS
63619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63620/* end confdefs.h.  */
63621
63622/* Override any GCC internal prototype to avoid an error.
63623   Use char because int might match the return type of a GCC
63624   builtin and then its argument prototype would still apply.  */
63625char MHD_start_daemon ();
63626int
63627main (void)
63628{
63629return MHD_start_daemon ();
63630  ;
63631  return 0;
63632}
63633_ACEOF
63634for ac_lib in '' microhttpd
63635do
63636  if test -z "$ac_lib"; then
63637    ac_res="none required"
63638  else
63639    ac_res=-l$ac_lib
63640    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
63641  fi
63642  if ac_fn_c_try_link "$LINENO"
63643then :
63644  ac_cv_search_MHD_start_daemon=$ac_res
63645fi
63646rm -f core conftest.err conftest.$ac_objext conftest.beam \
63647    conftest$ac_exeext
63648  if test ${ac_cv_search_MHD_start_daemon+y}
63649then :
63650  break
63651fi
63652done
63653if test ${ac_cv_search_MHD_start_daemon+y}
63654then :
63655
63656else $as_nop
63657  ac_cv_search_MHD_start_daemon=no
63658fi
63659rm conftest.$ac_ext
63660LIBS=$ac_func_search_save_LIBS
63661fi
63662{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MHD_start_daemon" >&5
63663printf "%s\n" "$ac_cv_search_MHD_start_daemon" >&6; }
63664ac_res=$ac_cv_search_MHD_start_daemon
63665if test "$ac_res" != no
63666then :
63667  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
63668  with_libmicrohttpd=yes;
63669printf "%s\n" "#define WITH_MICROHTTPD 1" >>confdefs.h
63670
63671else $as_nop
63672  with_libmicrohttpd=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** LIBMICROHTTPD was not found. Several tests will not run." >&5
63673printf "%s\n" "$as_me: WARNING: *** LIBMICROHTTPD was not found. Several tests will not run." >&2;}
63674fi
63675
63676    ac_fn_c_check_func "$LINENO" "MHD_free" "ac_cv_func_MHD_free"
63677if test "x$ac_cv_func_MHD_free" = xyes
63678then :
63679  printf "%s\n" "#define HAVE_MHD_FREE 1" >>confdefs.h
63680
63681fi
63682
63683    ac_fn_c_check_header_compile "$LINENO" "microhttpd_http2.h" "ac_cv_header_microhttpd_http2_h" "$ac_includes_default"
63684if test "x$ac_cv_header_microhttpd_http2_h" = xyes
63685then :
63686  printf "%s\n" "#define HAVE_MICROHTTPD_HTTP2_H 1" >>confdefs.h
63687
63688fi
63689
63690    TEST_LIBS=$LIBS
63691    TEST_CFLAGS=$CFLAGS
63692
63693else
63694	MICROHTTPD_CFLAGS=$pkg_cv_MICROHTTPD_CFLAGS
63695	MICROHTTPD_LIBS=$pkg_cv_MICROHTTPD_LIBS
63696        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63697printf "%s\n" "yes" >&6; }
63698
63699    with_libmicrohttpd=yes
63700    TEST_LIBS="$MICROHTTPD_LIBS $TEST_LIBS"
63701    TEST_CFLAGS="$MICROHTTPD_CFLAGS $TEST_CFLAGS"
63702
63703printf "%s\n" "#define WITH_MICROHTTPD 1" >>confdefs.h
63704
63705    LIBS="$MICROHTTPD_LIBS $LIBS"
63706    CFLAGS="$MICROHTTPD_CFLAGS $CFLAGS"
63707    ac_fn_c_check_func "$LINENO" "MHD_free" "ac_cv_func_MHD_free"
63708if test "x$ac_cv_func_MHD_free" = xyes
63709then :
63710  printf "%s\n" "#define HAVE_MHD_FREE 1" >>confdefs.h
63711
63712fi
63713
63714    ac_fn_c_check_header_compile "$LINENO" "microhttpd_http2.h" "ac_cv_header_microhttpd_http2_h" "$ac_includes_default"
63715if test "x$ac_cv_header_microhttpd_http2_h" = xyes
63716then :
63717  printf "%s\n" "#define HAVE_MICROHTTPD_HTTP2_H 1" >>confdefs.h
63718
63719fi
63720
63721    LIBS=$old_LIBS
63722    CFLAGS=$old_CFLAGS
63723
63724fi
63725  LIBS=$old_LIBS
63726  CFLAGS=$old_CFLAGS
63727
63728  if test "$with_libmicrohttpd" = "yes" && test "$with_gnutls" != "yes"
63729then :
63730
63731
63732pkg_failed=no
63733{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gnutls" >&5
63734printf %s "checking for gnutls... " >&6; }
63735
63736if test -n "$GNUTLS_CFLAGS"; then
63737    pkg_cv_GNUTLS_CFLAGS="$GNUTLS_CFLAGS"
63738 elif test -n "$PKG_CONFIG"; then
63739    if test -n "$PKG_CONFIG" && \
63740    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls\""; } >&5
63741  ($PKG_CONFIG --exists --print-errors "gnutls") 2>&5
63742  ac_status=$?
63743  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63744  test $ac_status = 0; }; then
63745  pkg_cv_GNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls" 2>/dev/null`
63746		      test "x$?" != "x0" && pkg_failed=yes
63747else
63748  pkg_failed=yes
63749fi
63750 else
63751    pkg_failed=untried
63752fi
63753if test -n "$GNUTLS_LIBS"; then
63754    pkg_cv_GNUTLS_LIBS="$GNUTLS_LIBS"
63755 elif test -n "$PKG_CONFIG"; then
63756    if test -n "$PKG_CONFIG" && \
63757    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls\""; } >&5
63758  ($PKG_CONFIG --exists --print-errors "gnutls") 2>&5
63759  ac_status=$?
63760  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63761  test $ac_status = 0; }; then
63762  pkg_cv_GNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls" 2>/dev/null`
63763		      test "x$?" != "x0" && pkg_failed=yes
63764else
63765  pkg_failed=yes
63766fi
63767 else
63768    pkg_failed=untried
63769fi
63770
63771
63772
63773if test $pkg_failed = yes; then
63774        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
63775printf "%s\n" "no" >&6; }
63776
63777if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63778        _pkg_short_errors_supported=yes
63779else
63780        _pkg_short_errors_supported=no
63781fi
63782        if test $_pkg_short_errors_supported = yes; then
63783	        GNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gnutls" 2>&1`
63784        else
63785	        GNUTLS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gnutls" 2>&1`
63786        fi
63787	# Put the nasty error message in config.log where it belongs
63788	echo "$GNUTLS_PKG_ERRORS" >&5
63789
63790
63791      old_LIBS=$LIBS
63792      old_CFLAGS=$CFLAGS
63793      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gnutls_global_init" >&5
63794printf %s "checking for library containing gnutls_global_init... " >&6; }
63795if test ${ac_cv_search_gnutls_global_init+y}
63796then :
63797  printf %s "(cached) " >&6
63798else $as_nop
63799  ac_func_search_save_LIBS=$LIBS
63800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63801/* end confdefs.h.  */
63802
63803/* Override any GCC internal prototype to avoid an error.
63804   Use char because int might match the return type of a GCC
63805   builtin and then its argument prototype would still apply.  */
63806char gnutls_global_init ();
63807int
63808main (void)
63809{
63810return gnutls_global_init ();
63811  ;
63812  return 0;
63813}
63814_ACEOF
63815for ac_lib in '' gnutls
63816do
63817  if test -z "$ac_lib"; then
63818    ac_res="none required"
63819  else
63820    ac_res=-l$ac_lib
63821    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
63822  fi
63823  if ac_fn_c_try_link "$LINENO"
63824then :
63825  ac_cv_search_gnutls_global_init=$ac_res
63826fi
63827rm -f core conftest.err conftest.$ac_objext conftest.beam \
63828    conftest$ac_exeext
63829  if test ${ac_cv_search_gnutls_global_init+y}
63830then :
63831  break
63832fi
63833done
63834if test ${ac_cv_search_gnutls_global_init+y}
63835then :
63836
63837else $as_nop
63838  ac_cv_search_gnutls_global_init=no
63839fi
63840rm conftest.$ac_ext
63841LIBS=$ac_func_search_save_LIBS
63842fi
63843{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gnutls_global_init" >&5
63844printf "%s\n" "$ac_cv_search_gnutls_global_init" >&6; }
63845ac_res=$ac_cv_search_gnutls_global_init
63846if test "$ac_res" != no
63847then :
63848  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
63849
63850printf "%s\n" "#define WITH_GNUTLS_IN_TESTSUITE 1" >>confdefs.h
63851
63852else $as_nop
63853  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** GnuTLS is not available. Some tests will not run." >&5
63854printf "%s\n" "$as_me: WARNING: *** GnuTLS is not available. Some tests will not run." >&2;}
63855fi
63856
63857      TEST_LIBS=$LIBS
63858      TEST_CFLAGS=$CFLAGS
63859      LIBS=$old_LIBS
63860      CFLAGS=$old_CFLAGS
63861
63862elif test $pkg_failed = untried; then
63863        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
63864printf "%s\n" "no" >&6; }
63865
63866      old_LIBS=$LIBS
63867      old_CFLAGS=$CFLAGS
63868      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gnutls_global_init" >&5
63869printf %s "checking for library containing gnutls_global_init... " >&6; }
63870if test ${ac_cv_search_gnutls_global_init+y}
63871then :
63872  printf %s "(cached) " >&6
63873else $as_nop
63874  ac_func_search_save_LIBS=$LIBS
63875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63876/* end confdefs.h.  */
63877
63878/* Override any GCC internal prototype to avoid an error.
63879   Use char because int might match the return type of a GCC
63880   builtin and then its argument prototype would still apply.  */
63881char gnutls_global_init ();
63882int
63883main (void)
63884{
63885return gnutls_global_init ();
63886  ;
63887  return 0;
63888}
63889_ACEOF
63890for ac_lib in '' gnutls
63891do
63892  if test -z "$ac_lib"; then
63893    ac_res="none required"
63894  else
63895    ac_res=-l$ac_lib
63896    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
63897  fi
63898  if ac_fn_c_try_link "$LINENO"
63899then :
63900  ac_cv_search_gnutls_global_init=$ac_res
63901fi
63902rm -f core conftest.err conftest.$ac_objext conftest.beam \
63903    conftest$ac_exeext
63904  if test ${ac_cv_search_gnutls_global_init+y}
63905then :
63906  break
63907fi
63908done
63909if test ${ac_cv_search_gnutls_global_init+y}
63910then :
63911
63912else $as_nop
63913  ac_cv_search_gnutls_global_init=no
63914fi
63915rm conftest.$ac_ext
63916LIBS=$ac_func_search_save_LIBS
63917fi
63918{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gnutls_global_init" >&5
63919printf "%s\n" "$ac_cv_search_gnutls_global_init" >&6; }
63920ac_res=$ac_cv_search_gnutls_global_init
63921if test "$ac_res" != no
63922then :
63923  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
63924
63925printf "%s\n" "#define WITH_GNUTLS_IN_TESTSUITE 1" >>confdefs.h
63926
63927else $as_nop
63928  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** GnuTLS is not available. Some tests will not run." >&5
63929printf "%s\n" "$as_me: WARNING: *** GnuTLS is not available. Some tests will not run." >&2;}
63930fi
63931
63932      TEST_LIBS=$LIBS
63933      TEST_CFLAGS=$CFLAGS
63934      LIBS=$old_LIBS
63935      CFLAGS=$old_CFLAGS
63936
63937else
63938	GNUTLS_CFLAGS=$pkg_cv_GNUTLS_CFLAGS
63939	GNUTLS_LIBS=$pkg_cv_GNUTLS_LIBS
63940        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63941printf "%s\n" "yes" >&6; }
63942
63943      TEST_LIBS="$TEST_LIBS $GNUTLS_LIBS"
63944      TEST_CFLAGS="$TEST_CFLAGS $GNUTLS_CFLAGS"
63945
63946printf "%s\n" "#define WITH_GNUTLS_IN_TESTSUITE 1" >>confdefs.h
63947
63948             for ac_header in gnutls/ocsp.h
63949do :
63950  ac_fn_c_check_header_compile "$LINENO" "gnutls/ocsp.h" "ac_cv_header_gnutls_ocsp_h" "$ac_includes_default"
63951if test "x$ac_cv_header_gnutls_ocsp_h" = xyes
63952then :
63953  printf "%s\n" "#define HAVE_GNUTLS_OCSP_H 1" >>confdefs.h
63954
63955printf "%s\n" "#define WITH_GNUTLS_OCSP 1" >>confdefs.h
63956
63957else $as_nop
63958  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** Header file gnutls/ocsp.h was not found. OCSP will be disabled for tests." >&5
63959printf "%s\n" "$as_me: WARNING: *** Header file gnutls/ocsp.h was not found. OCSP will be disabled for tests." >&2;}
63960fi
63961
63962done
63963
63964fi
63965
63966fi
63967
63968fi
63969
63970 if test "$with_libmicrohttpd" = "yes"; then
63971  WITH_MICROHTTPD_TRUE=
63972  WITH_MICROHTTPD_FALSE='#'
63973else
63974  WITH_MICROHTTPD_TRUE='#'
63975  WITH_MICROHTTPD_FALSE=
63976fi
63977
63978
63979# Check for plugin support
63980
63981case "$host_os" in
63982	mingw*)
63983		dl_impl="windows";
63984		;;
63985	win32*)
63986		dl_impl="windows";
63987		;;
63988	*)
63989		dl_impl="libdl";
63990		;;
63991esac
63992
63993# Check whether --with-plugin_support was given.
63994if test ${with_plugin_support+y}
63995then :
63996  withval=$with_plugin_support; plugin_support="$withval"
63997else $as_nop
63998  plugin_support="yes"
63999fi
64000
64001FUZZ_LIBS=$LIBS
64002if test "$plugin_support" = "no"; then
64003	OLD_LIBS=$LIBS
64004	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
64005printf %s "checking for library containing dlsym... " >&6; }
64006if test ${ac_cv_search_dlsym+y}
64007then :
64008  printf %s "(cached) " >&6
64009else $as_nop
64010  ac_func_search_save_LIBS=$LIBS
64011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64012/* end confdefs.h.  */
64013
64014/* Override any GCC internal prototype to avoid an error.
64015   Use char because int might match the return type of a GCC
64016   builtin and then its argument prototype would still apply.  */
64017char dlsym ();
64018int
64019main (void)
64020{
64021return dlsym ();
64022  ;
64023  return 0;
64024}
64025_ACEOF
64026for ac_lib in '' dl dld
64027do
64028  if test -z "$ac_lib"; then
64029    ac_res="none required"
64030  else
64031    ac_res=-l$ac_lib
64032    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
64033  fi
64034  if ac_fn_c_try_link "$LINENO"
64035then :
64036  ac_cv_search_dlsym=$ac_res
64037fi
64038rm -f core conftest.err conftest.$ac_objext conftest.beam \
64039    conftest$ac_exeext
64040  if test ${ac_cv_search_dlsym+y}
64041then :
64042  break
64043fi
64044done
64045if test ${ac_cv_search_dlsym+y}
64046then :
64047
64048else $as_nop
64049  ac_cv_search_dlsym=no
64050fi
64051rm conftest.$ac_ext
64052LIBS=$ac_func_search_save_LIBS
64053fi
64054{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
64055printf "%s\n" "$ac_cv_search_dlsym" >&6; }
64056ac_res=$ac_cv_search_dlsym
64057if test "$ac_res" != no
64058then :
64059  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
64060
64061fi
64062
64063	FUZZ_LIBS=$LIBS
64064	LIBS=$OLD_LIBS
64065elif test "$dl_impl" = "libdl"; then
64066	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
64067printf %s "checking for library containing dlsym... " >&6; }
64068if test ${ac_cv_search_dlsym+y}
64069then :
64070  printf %s "(cached) " >&6
64071else $as_nop
64072  ac_func_search_save_LIBS=$LIBS
64073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64074/* end confdefs.h.  */
64075
64076/* Override any GCC internal prototype to avoid an error.
64077   Use char because int might match the return type of a GCC
64078   builtin and then its argument prototype would still apply.  */
64079char dlsym ();
64080int
64081main (void)
64082{
64083return dlsym ();
64084  ;
64085  return 0;
64086}
64087_ACEOF
64088for ac_lib in '' dl ldl
64089do
64090  if test -z "$ac_lib"; then
64091    ac_res="none required"
64092  else
64093    ac_res=-l$ac_lib
64094    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
64095  fi
64096  if ac_fn_c_try_link "$LINENO"
64097then :
64098  ac_cv_search_dlsym=$ac_res
64099fi
64100rm -f core conftest.err conftest.$ac_objext conftest.beam \
64101    conftest$ac_exeext
64102  if test ${ac_cv_search_dlsym+y}
64103then :
64104  break
64105fi
64106done
64107if test ${ac_cv_search_dlsym+y}
64108then :
64109
64110else $as_nop
64111  ac_cv_search_dlsym=no
64112fi
64113rm conftest.$ac_ext
64114LIBS=$ac_func_search_save_LIBS
64115fi
64116{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
64117printf "%s\n" "$ac_cv_search_dlsym" >&6; }
64118ac_res=$ac_cv_search_dlsym
64119if test "$ac_res" != no
64120then :
64121  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
64122  :
64123else $as_nop
64124  dl_impl="none"
64125fi
64126
64127	FUZZ_LIBS=$LIBS
64128fi
64129
64130if test "$plugin_support" = "yes" && test "$dl_impl" = "none"; then
64131	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** No working backend for plugin support found" >&5
64132printf "%s\n" "$as_me: WARNING: *** No working backend for plugin support found" >&2;}
64133	plugin_support="no"
64134fi
64135if test "$plugin_support" = "yes"; then
64136
64137printf "%s\n" "#define PLUGIN_SUPPORT 1" >>confdefs.h
64138
64139	if test "$dl_impl" = "windows"; then
64140
64141printf "%s\n" "#define PLUGIN_SUPPORT_WINDOWS 1" >>confdefs.h
64142
64143	else
64144
64145printf "%s\n" "#define PLUGIN_SUPPORT_LIBDL 1" >>confdefs.h
64146
64147	fi
64148fi
64149 if test "$plugin_support" = "yes"; then
64150  PLUGIN_SUPPORT_TRUE=
64151  PLUGIN_SUPPORT_FALSE='#'
64152else
64153  PLUGIN_SUPPORT_TRUE='#'
64154  PLUGIN_SUPPORT_FALSE=
64155fi
64156
64157
64158
64159
64160ALL_LIBS=$LIBS
64161
64162
64163# Checks for header files.
64164ac_fn_c_check_header_compile "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default"
64165if test "x$ac_cv_header_crypt_h" = xyes
64166then :
64167  printf "%s\n" "#define HAVE_CRYPT_H 1" >>confdefs.h
64168
64169fi
64170ac_fn_c_check_header_compile "$LINENO" "idna.h" "ac_cv_header_idna_h" "$ac_includes_default"
64171if test "x$ac_cv_header_idna_h" = xyes
64172then :
64173  printf "%s\n" "#define HAVE_IDNA_H 1" >>confdefs.h
64174
64175fi
64176ac_fn_c_check_header_compile "$LINENO" "idn/idna.h" "ac_cv_header_idn_idna_h" "$ac_includes_default"
64177if test "x$ac_cv_header_idn_idna_h" = xyes
64178then :
64179  printf "%s\n" "#define HAVE_IDN_IDNA_H 1" >>confdefs.h
64180
64181fi
64182ac_fn_c_check_header_compile "$LINENO" "idn2.h" "ac_cv_header_idn2_h" "$ac_includes_default"
64183if test "x$ac_cv_header_idn2_h" = xyes
64184then :
64185  printf "%s\n" "#define HAVE_IDN2_H 1" >>confdefs.h
64186
64187fi
64188ac_fn_c_check_header_compile "$LINENO" "unicase.h" "ac_cv_header_unicase_h" "$ac_includes_default"
64189if test "x$ac_cv_header_unicase_h" = xyes
64190then :
64191  printf "%s\n" "#define HAVE_UNICASE_H 1" >>confdefs.h
64192
64193fi
64194ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default"
64195if test "x$ac_cv_header_netinet_tcp_h" = xyes
64196then :
64197  printf "%s\n" "#define HAVE_NETINET_TCP_H 1" >>confdefs.h
64198
64199fi
64200
64201
64202# Checks for library functions.
64203
64204
64205
64206
64207
64208if test "x$ac_cv_func_fork" = xyes; then
64209  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
64210printf %s "checking for working fork... " >&6; }
64211if test ${ac_cv_func_fork_works+y}
64212then :
64213  printf %s "(cached) " >&6
64214else $as_nop
64215  if test "$cross_compiling" = yes
64216then :
64217  ac_cv_func_fork_works=cross
64218else $as_nop
64219  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64220/* end confdefs.h.  */
64221$ac_includes_default
64222int
64223main (void)
64224{
64225
64226	  /* By Ruediger Kuhlmann. */
64227	  return fork () < 0;
64228
64229  ;
64230  return 0;
64231}
64232_ACEOF
64233if ac_fn_c_try_run "$LINENO"
64234then :
64235  ac_cv_func_fork_works=yes
64236else $as_nop
64237  ac_cv_func_fork_works=no
64238fi
64239rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
64240  conftest.$ac_objext conftest.beam conftest.$ac_ext
64241fi
64242
64243fi
64244{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
64245printf "%s\n" "$ac_cv_func_fork_works" >&6; }
64246
64247else
64248  ac_cv_func_fork_works=$ac_cv_func_fork
64249fi
64250if test "x$ac_cv_func_fork_works" = xcross; then
64251  case $host in
64252    *-*-amigaos* | *-*-msdosdjgpp*)
64253      # Override, as these systems have only a dummy fork() stub
64254      ac_cv_func_fork_works=no
64255      ;;
64256    *)
64257      ac_cv_func_fork_works=yes
64258      ;;
64259  esac
64260  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
64261printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
64262fi
64263ac_cv_func_vfork_works=$ac_cv_func_vfork
64264if test "x$ac_cv_func_vfork" = xyes; then
64265  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
64266printf %s "checking for working vfork... " >&6; }
64267if test ${ac_cv_func_vfork_works+y}
64268then :
64269  printf %s "(cached) " >&6
64270else $as_nop
64271  if test "$cross_compiling" = yes
64272then :
64273  ac_cv_func_vfork_works=cross
64274else $as_nop
64275  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64276/* end confdefs.h.  */
64277/* Thanks to Paul Eggert for this test.  */
64278$ac_includes_default
64279#include <signal.h>
64280#include <sys/wait.h>
64281#ifdef HAVE_VFORK_H
64282# include <vfork.h>
64283#endif
64284
64285static void
64286do_nothing (int sig)
64287{
64288  (void) sig;
64289}
64290
64291/* On some sparc systems, changes by the child to local and incoming
64292   argument registers are propagated back to the parent.  The compiler
64293   is told about this with #include <vfork.h>, but some compilers
64294   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
64295   static variable whose address is put into a register that is
64296   clobbered by the vfork.  */
64297static void
64298sparc_address_test (int arg)
64299{
64300  static pid_t child;
64301  if (!child) {
64302    child = vfork ();
64303    if (child < 0) {
64304      perror ("vfork");
64305      _exit(2);
64306    }
64307    if (!child) {
64308      arg = getpid();
64309      write(-1, "", 0);
64310      _exit (arg);
64311    }
64312  }
64313}
64314
64315int
64316main (void)
64317{
64318  pid_t parent = getpid ();
64319  pid_t child;
64320
64321  sparc_address_test (0);
64322
64323  /* On Solaris 2.4, changes by the child to the signal handler
64324     also munge signal handlers in the parent.  To detect this,
64325     start by putting the parent's handler in a known state.  */
64326  signal (SIGTERM, SIG_DFL);
64327
64328  child = vfork ();
64329
64330  if (child == 0) {
64331    /* Here is another test for sparc vfork register problems.  This
64332       test uses lots of local variables, at least as many local
64333       variables as main has allocated so far including compiler
64334       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
64335       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
64336       reuse the register of parent for one of the local variables,
64337       since it will think that parent can't possibly be used any more
64338       in this routine.  Assigning to the local variable will thus
64339       munge parent in the parent process.  */
64340    pid_t
64341      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
64342      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
64343    /* Convince the compiler that p..p7 are live; otherwise, it might
64344       use the same hardware register for all 8 local variables.  */
64345    if (p != p1 || p != p2 || p != p3 || p != p4
64346	|| p != p5 || p != p6 || p != p7)
64347      _exit(1);
64348
64349    /* Alter the child's signal handler.  */
64350    if (signal (SIGTERM, do_nothing) != SIG_DFL)
64351      _exit(1);
64352
64353    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
64354       from child file descriptors.  If the child closes a descriptor
64355       before it execs or exits, this munges the parent's descriptor
64356       as well.  Test for this by closing stdout in the child.  */
64357    _exit(close(fileno(stdout)) != 0);
64358  } else {
64359    int status;
64360    struct stat st;
64361
64362    while (wait(&status) != child)
64363      ;
64364    return (
64365	 /* Was there some problem with vforking?  */
64366	 child < 0
64367
64368	 /* Did the child munge the parent's signal handler?  */
64369	 || signal (SIGTERM, SIG_DFL) != SIG_DFL
64370
64371	 /* Did the child fail?  (This shouldn't happen.)  */
64372	 || status
64373
64374	 /* Did the vfork/compiler bug occur?  */
64375	 || parent != getpid()
64376
64377	 /* Did the file descriptor bug occur?  */
64378	 || fstat(fileno(stdout), &st) != 0
64379	 );
64380  }
64381}
64382_ACEOF
64383if ac_fn_c_try_run "$LINENO"
64384then :
64385  ac_cv_func_vfork_works=yes
64386else $as_nop
64387  ac_cv_func_vfork_works=no
64388fi
64389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
64390  conftest.$ac_objext conftest.beam conftest.$ac_ext
64391fi
64392
64393fi
64394{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
64395printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
64396
64397fi;
64398if test "x$ac_cv_func_fork_works" = xcross; then
64399  ac_cv_func_vfork_works=$ac_cv_func_vfork
64400  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
64401printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
64402fi
64403
64404if test "x$ac_cv_func_vfork_works" = xyes; then
64405
64406printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
64407
64408else
64409
64410printf "%s\n" "#define vfork fork" >>confdefs.h
64411
64412fi
64413if test "x$ac_cv_func_fork_works" = xyes; then
64414
64415printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
64416
64417fi
64418
64419
64420
64421
64422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
64423printf %s "checking for working mmap... " >&6; }
64424if test ${ac_cv_func_mmap_fixed_mapped+y}
64425then :
64426  printf %s "(cached) " >&6
64427else $as_nop
64428  if test "$cross_compiling" = yes
64429then :
64430  case "$host_os" in # ((
64431			  # Guess yes on platforms where we know the result.
64432		  linux*) ac_cv_func_mmap_fixed_mapped=yes ;;
64433			  # If we don't know, assume the worst.
64434		  *)      ac_cv_func_mmap_fixed_mapped=no ;;
64435		esac
64436else $as_nop
64437  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64438/* end confdefs.h.  */
64439$ac_includes_default
64440/* malloc might have been renamed as rpl_malloc. */
64441#undef malloc
64442
64443/* Thanks to Mike Haertel and Jim Avera for this test.
64444   Here is a matrix of mmap possibilities:
64445	mmap private not fixed
64446	mmap private fixed at somewhere currently unmapped
64447	mmap private fixed at somewhere already mapped
64448	mmap shared not fixed
64449	mmap shared fixed at somewhere currently unmapped
64450	mmap shared fixed at somewhere already mapped
64451   For private mappings, we should verify that changes cannot be read()
64452   back from the file, nor mmap's back from the file at a different
64453   address.  (There have been systems where private was not correctly
64454   implemented like the infamous i386 svr4.0, and systems where the
64455   VM page cache was not coherent with the file system buffer cache
64456   like early versions of FreeBSD and possibly contemporary NetBSD.)
64457   For shared mappings, we should conversely verify that changes get
64458   propagated back to all the places they're supposed to be.
64459
64460   Grep wants private fixed already mapped.
64461   The main things grep needs to know about mmap are:
64462   * does it exist and is it safe to write into the mmap'd area
64463   * how to use it (BSD variants)  */
64464
64465#include <fcntl.h>
64466#include <sys/mman.h>
64467
64468/* This mess was copied from the GNU getpagesize.h.  */
64469#ifndef HAVE_GETPAGESIZE
64470# ifdef _SC_PAGESIZE
64471#  define getpagesize() sysconf(_SC_PAGESIZE)
64472# else /* no _SC_PAGESIZE */
64473#  ifdef HAVE_SYS_PARAM_H
64474#   include <sys/param.h>
64475#   ifdef EXEC_PAGESIZE
64476#    define getpagesize() EXEC_PAGESIZE
64477#   else /* no EXEC_PAGESIZE */
64478#    ifdef NBPG
64479#     define getpagesize() NBPG * CLSIZE
64480#     ifndef CLSIZE
64481#      define CLSIZE 1
64482#     endif /* no CLSIZE */
64483#    else /* no NBPG */
64484#     ifdef NBPC
64485#      define getpagesize() NBPC
64486#     else /* no NBPC */
64487#      ifdef PAGESIZE
64488#       define getpagesize() PAGESIZE
64489#      endif /* PAGESIZE */
64490#     endif /* no NBPC */
64491#    endif /* no NBPG */
64492#   endif /* no EXEC_PAGESIZE */
64493#  else /* no HAVE_SYS_PARAM_H */
64494#   define getpagesize() 8192	/* punt totally */
64495#  endif /* no HAVE_SYS_PARAM_H */
64496# endif /* no _SC_PAGESIZE */
64497
64498#endif /* no HAVE_GETPAGESIZE */
64499
64500int
64501main (void)
64502{
64503  char *data, *data2, *data3;
64504  const char *cdata2;
64505  int i, pagesize;
64506  int fd, fd2;
64507
64508  pagesize = getpagesize ();
64509
64510  /* First, make a file with some known garbage in it. */
64511  data = (char *) malloc (pagesize);
64512  if (!data)
64513    return 1;
64514  for (i = 0; i < pagesize; ++i)
64515    *(data + i) = rand ();
64516  umask (0);
64517  fd = creat ("conftest.mmap", 0600);
64518  if (fd < 0)
64519    return 2;
64520  if (write (fd, data, pagesize) != pagesize)
64521    return 3;
64522  close (fd);
64523
64524  /* Next, check that the tail of a page is zero-filled.  File must have
64525     non-zero length, otherwise we risk SIGBUS for entire page.  */
64526  fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
64527  if (fd2 < 0)
64528    return 4;
64529  cdata2 = "";
64530  if (write (fd2, cdata2, 1) != 1)
64531    return 5;
64532  data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
64533  if (data2 == MAP_FAILED)
64534    return 6;
64535  for (i = 0; i < pagesize; ++i)
64536    if (*(data2 + i))
64537      return 7;
64538  close (fd2);
64539  if (munmap (data2, pagesize))
64540    return 8;
64541
64542  /* Next, try to mmap the file at a fixed address which already has
64543     something else allocated at it.  If we can, also make sure that
64544     we see the same garbage.  */
64545  fd = open ("conftest.mmap", O_RDWR);
64546  if (fd < 0)
64547    return 9;
64548  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
64549		     MAP_PRIVATE | MAP_FIXED, fd, 0L))
64550    return 10;
64551  for (i = 0; i < pagesize; ++i)
64552    if (*(data + i) != *(data2 + i))
64553      return 11;
64554
64555  /* Finally, make sure that changes to the mapped area do not
64556     percolate back to the file as seen by read().  (This is a bug on
64557     some variants of i386 svr4.0.)  */
64558  for (i = 0; i < pagesize; ++i)
64559    *(data2 + i) = *(data2 + i) + 1;
64560  data3 = (char *) malloc (pagesize);
64561  if (!data3)
64562    return 12;
64563  if (read (fd, data3, pagesize) != pagesize)
64564    return 13;
64565  for (i = 0; i < pagesize; ++i)
64566    if (*(data + i) != *(data3 + i))
64567      return 14;
64568  close (fd);
64569  free (data);
64570  free (data3);
64571  return 0;
64572}
64573_ACEOF
64574if ac_fn_c_try_run "$LINENO"
64575then :
64576  ac_cv_func_mmap_fixed_mapped=yes
64577else $as_nop
64578  ac_cv_func_mmap_fixed_mapped=no
64579fi
64580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
64581  conftest.$ac_objext conftest.beam conftest.$ac_ext
64582fi
64583
64584fi
64585{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
64586printf "%s\n" "$ac_cv_func_mmap_fixed_mapped" >&6; }
64587if test $ac_cv_func_mmap_fixed_mapped = yes; then
64588
64589printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
64590
64591fi
64592rm -f conftest.mmap conftest.txt
64593
64594ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
64595if test "x$ac_cv_func_strlcpy" = xyes
64596then :
64597  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
64598
64599fi
64600ac_fn_c_check_func "$LINENO" "getuid" "ac_cv_func_getuid"
64601if test "x$ac_cv_func_getuid" = xyes
64602then :
64603  printf "%s\n" "#define HAVE_GETUID 1" >>confdefs.h
64604
64605fi
64606ac_fn_c_check_func "$LINENO" "fmemopen" "ac_cv_func_fmemopen"
64607if test "x$ac_cv_func_fmemopen" = xyes
64608then :
64609  printf "%s\n" "#define HAVE_FMEMOPEN 1" >>confdefs.h
64610
64611fi
64612
64613
64614ac_config_files="$ac_config_files Makefile lib/Makefile include/Makefile include/wget/Makefile libwget/Makefile src/Makefile examples/Makefile unit-tests/Makefile tests/Makefile fuzz/Makefile libwget.pc docs/Makefile docs/libwget.doxy docs/wget2_md2man.sh"
64615
64616cat >confcache <<\_ACEOF
64617# This file is a shell script that caches the results of configure
64618# tests run on this system so they can be shared between configure
64619# scripts and configure runs, see configure's option --config-cache.
64620# It is not useful on other systems.  If it contains results you don't
64621# want to keep, you may remove or edit it.
64622#
64623# config.status only pays attention to the cache file if you give it
64624# the --recheck option to rerun configure.
64625#
64626# `ac_cv_env_foo' variables (set or unset) will be overridden when
64627# loading this file, other *unset* `ac_cv_foo' will be assigned the
64628# following values.
64629
64630_ACEOF
64631
64632# The following way of writing the cache mishandles newlines in values,
64633# but we know of no workaround that is simple, portable, and efficient.
64634# So, we kill variables containing newlines.
64635# Ultrix sh set writes to stderr and can't be redirected directly,
64636# and sets the high bit in the cache file unless we assign to the vars.
64637(
64638  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
64639    eval ac_val=\$$ac_var
64640    case $ac_val in #(
64641    *${as_nl}*)
64642      case $ac_var in #(
64643      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
64644printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
64645      esac
64646      case $ac_var in #(
64647      _ | IFS | as_nl) ;; #(
64648      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
64649      *) { eval $ac_var=; unset $ac_var;} ;;
64650      esac ;;
64651    esac
64652  done
64653
64654  (set) 2>&1 |
64655    case $as_nl`(ac_space=' '; set) 2>&1` in #(
64656    *${as_nl}ac_space=\ *)
64657      # `set' does not quote correctly, so add quotes: double-quote
64658      # substitution turns \\\\ into \\, and sed turns \\ into \.
64659      sed -n \
64660	"s/'/'\\\\''/g;
64661	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
64662      ;; #(
64663    *)
64664      # `set' quotes correctly as required by POSIX, so do not add quotes.
64665      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
64666      ;;
64667    esac |
64668    sort
64669) |
64670  sed '
64671     /^ac_cv_env_/b end
64672     t clear
64673     :clear
64674     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
64675     t end
64676     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
64677     :end' >>confcache
64678if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
64679  if test -w "$cache_file"; then
64680    if test "x$cache_file" != "x/dev/null"; then
64681      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
64682printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
64683      if test ! -f "$cache_file" || test -h "$cache_file"; then
64684	cat confcache >"$cache_file"
64685      else
64686        case $cache_file in #(
64687        */* | ?:*)
64688	  mv -f confcache "$cache_file"$$ &&
64689	  mv -f "$cache_file"$$ "$cache_file" ;; #(
64690        *)
64691	  mv -f confcache "$cache_file" ;;
64692	esac
64693      fi
64694    fi
64695  else
64696    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
64697printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
64698  fi
64699fi
64700rm -f confcache
64701
64702test "x$prefix" = xNONE && prefix=$ac_default_prefix
64703# Let make expand exec_prefix.
64704test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
64705
64706DEFS=-DHAVE_CONFIG_H
64707
64708ac_libobjs=
64709ac_ltlibobjs=
64710U=
64711for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
64712  # 1. Remove the extension, and $U if already installed.
64713  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
64714  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
64715  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
64716  #    will be set to the directory where LIBOBJS objects are built.
64717  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
64718  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
64719done
64720LIBOBJS=$ac_libobjs
64721
64722LTLIBOBJS=$ac_ltlibobjs
64723
64724
64725{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
64726printf %s "checking that generated files are newer than configure... " >&6; }
64727   if test -n "$am_sleep_pid"; then
64728     # Hide warnings about reused PIDs.
64729     wait $am_sleep_pid 2>/dev/null
64730   fi
64731   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
64732printf "%s\n" "done" >&6; }
64733 if test -n "$EXEEXT"; then
64734  am__EXEEXT_TRUE=
64735  am__EXEEXT_FALSE='#'
64736else
64737  am__EXEEXT_TRUE='#'
64738  am__EXEEXT_FALSE=
64739fi
64740
64741if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
64742  as_fn_error $? "conditional \"AMDEP\" was never defined.
64743Usually this means the macro was only invoked conditionally." "$LINENO" 5
64744fi
64745if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
64746  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
64747Usually this means the macro was only invoked conditionally." "$LINENO" 5
64748fi
64749if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
64750  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
64751Usually this means the macro was only invoked conditionally." "$LINENO" 5
64752fi
64753if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
64754  as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
64755Usually this means the macro was only invoked conditionally." "$LINENO" 5
64756fi
64757if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
64758  as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
64759Usually this means the macro was only invoked conditionally." "$LINENO" 5
64760fi
64761if test -z "${GL_GENERATE_BYTESWAP_H_TRUE}" && test -z "${GL_GENERATE_BYTESWAP_H_FALSE}"; then
64762  as_fn_error $? "conditional \"GL_GENERATE_BYTESWAP_H\" was never defined.
64763Usually this means the macro was only invoked conditionally." "$LINENO" 5
64764fi
64765
64766if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
64767  as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
64768Usually this means the macro was only invoked conditionally." "$LINENO" 5
64769fi
64770if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
64771  as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
64772Usually this means the macro was only invoked conditionally." "$LINENO" 5
64773fi
64774if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
64775  as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
64776Usually this means the macro was only invoked conditionally." "$LINENO" 5
64777fi
64778if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
64779  as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
64780Usually this means the macro was only invoked conditionally." "$LINENO" 5
64781fi
64782if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
64783  as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
64784Usually this means the macro was only invoked conditionally." "$LINENO" 5
64785fi
64786if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
64787  as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
64788Usually this means the macro was only invoked conditionally." "$LINENO" 5
64789fi
64790if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
64791  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
64792Usually this means the macro was only invoked conditionally." "$LINENO" 5
64793fi
64794if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
64795  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
64796Usually this means the macro was only invoked conditionally." "$LINENO" 5
64797fi
64798if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
64799  as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
64800Usually this means the macro was only invoked conditionally." "$LINENO" 5
64801fi
64802if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
64803  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
64804Usually this means the macro was only invoked conditionally." "$LINENO" 5
64805fi
64806CONFIG_INCLUDE=config.h
64807
64808if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
64809  as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
64810Usually this means the macro was only invoked conditionally." "$LINENO" 5
64811fi
64812if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
64813  as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
64814Usually this means the macro was only invoked conditionally." "$LINENO" 5
64815fi
64816if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
64817  as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
64818Usually this means the macro was only invoked conditionally." "$LINENO" 5
64819fi
64820if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
64821  as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
64822Usually this means the macro was only invoked conditionally." "$LINENO" 5
64823fi
64824if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
64825  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
64826Usually this means the macro was only invoked conditionally." "$LINENO" 5
64827fi
64828if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
64829  as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
64830Usually this means the macro was only invoked conditionally." "$LINENO" 5
64831fi
64832
64833
64834    gl_libobjs=
64835    gl_ltlibobjs=
64836    if test -n "$gl_LIBOBJS"; then
64837      # Remove the extension.
64838      sed_drop_objext='s/\.o$//;s/\.obj$//'
64839      for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
64840        gl_libobjs="$gl_libobjs $i.$ac_objext"
64841        gl_ltlibobjs="$gl_ltlibobjs $i.lo"
64842      done
64843    fi
64844    gl_LIBOBJS=$gl_libobjs
64845
64846    gl_LTLIBOBJS=$gl_ltlibobjs
64847
64848
64849
64850    gltests_libobjs=
64851    gltests_ltlibobjs=
64852    if test -n "$gltests_LIBOBJS"; then
64853      # Remove the extension.
64854      sed_drop_objext='s/\.o$//;s/\.obj$//'
64855      for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
64856        gltests_libobjs="$gltests_libobjs $i.$ac_objext"
64857        gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
64858      done
64859    fi
64860    gltests_LIBOBJS=$gltests_libobjs
64861
64862    gltests_LTLIBOBJS=$gltests_ltlibobjs
64863
64864
64865if test -z "${CODE_COVERAGE_ENABLED_TRUE}" && test -z "${CODE_COVERAGE_ENABLED_FALSE}"; then
64866  as_fn_error $? "conditional \"CODE_COVERAGE_ENABLED\" was never defined.
64867Usually this means the macro was only invoked conditionally." "$LINENO" 5
64868fi
64869if test -z "${ENABLE_MANYLIBS_TRUE}" && test -z "${ENABLE_MANYLIBS_FALSE}"; then
64870  as_fn_error $? "conditional \"ENABLE_MANYLIBS\" was never defined.
64871Usually this means the macro was only invoked conditionally." "$LINENO" 5
64872fi
64873if test -z "${FUZZING_TRUE}" && test -z "${FUZZING_FALSE}"; then
64874  as_fn_error $? "conditional \"FUZZING\" was never defined.
64875Usually this means the macro was only invoked conditionally." "$LINENO" 5
64876fi
64877if test -z "${HAVE_PO_TRUE}" && test -z "${HAVE_PO_FALSE}"; then
64878  as_fn_error $? "conditional \"HAVE_PO\" was never defined.
64879Usually this means the macro was only invoked conditionally." "$LINENO" 5
64880fi
64881if test -z "${WITH_DOCS_TRUE}" && test -z "${WITH_DOCS_FALSE}"; then
64882  as_fn_error $? "conditional \"WITH_DOCS\" was never defined.
64883Usually this means the macro was only invoked conditionally." "$LINENO" 5
64884fi
64885if test -z "${WITH_DOXYGEN_TRUE}" && test -z "${WITH_DOXYGEN_FALSE}"; then
64886  as_fn_error $? "conditional \"WITH_DOXYGEN\" was never defined.
64887Usually this means the macro was only invoked conditionally." "$LINENO" 5
64888fi
64889if test -z "${WITH_PANDOC_TRUE}" && test -z "${WITH_PANDOC_FALSE}"; then
64890  as_fn_error $? "conditional \"WITH_PANDOC\" was never defined.
64891Usually this means the macro was only invoked conditionally." "$LINENO" 5
64892fi
64893if test -z "${WITH_GNUTLS_TRUE}" && test -z "${WITH_GNUTLS_FALSE}"; then
64894  as_fn_error $? "conditional \"WITH_GNUTLS\" was never defined.
64895Usually this means the macro was only invoked conditionally." "$LINENO" 5
64896fi
64897if test -z "${WITH_OPENSSL_TRUE}" && test -z "${WITH_OPENSSL_FALSE}"; then
64898  as_fn_error $? "conditional \"WITH_OPENSSL\" was never defined.
64899Usually this means the macro was only invoked conditionally." "$LINENO" 5
64900fi
64901if test -z "${WITH_WOLFSSL_TRUE}" && test -z "${WITH_WOLFSSL_FALSE}"; then
64902  as_fn_error $? "conditional \"WITH_WOLFSSL\" was never defined.
64903Usually this means the macro was only invoked conditionally." "$LINENO" 5
64904fi
64905if test -z "${WITH_TLS_TRUE}" && test -z "${WITH_TLS_FALSE}"; then
64906  as_fn_error $? "conditional \"WITH_TLS\" was never defined.
64907Usually this means the macro was only invoked conditionally." "$LINENO" 5
64908fi
64909if test -z "${WITH_LIBNETTLE_TRUE}" && test -z "${WITH_LIBNETTLE_FALSE}"; then
64910  as_fn_error $? "conditional \"WITH_LIBNETTLE\" was never defined.
64911Usually this means the macro was only invoked conditionally." "$LINENO" 5
64912fi
64913if test -z "${WITH_CRYPT_TRUE}" && test -z "${WITH_CRYPT_FALSE}"; then
64914  as_fn_error $? "conditional \"WITH_CRYPT\" was never defined.
64915Usually this means the macro was only invoked conditionally." "$LINENO" 5
64916fi
64917if test -z "${WITH_LIBPSL_TRUE}" && test -z "${WITH_LIBPSL_FALSE}"; then
64918  as_fn_error $? "conditional \"WITH_LIBPSL\" was never defined.
64919Usually this means the macro was only invoked conditionally." "$LINENO" 5
64920fi
64921if test -z "${WITH_LIBHSTS_TRUE}" && test -z "${WITH_LIBHSTS_FALSE}"; then
64922  as_fn_error $? "conditional \"WITH_LIBHSTS\" was never defined.
64923Usually this means the macro was only invoked conditionally." "$LINENO" 5
64924fi
64925if test -z "${WITH_LIBNGHTTP2_TRUE}" && test -z "${WITH_LIBNGHTTP2_FALSE}"; then
64926  as_fn_error $? "conditional \"WITH_LIBNGHTTP2\" was never defined.
64927Usually this means the macro was only invoked conditionally." "$LINENO" 5
64928fi
64929if test -z "${WITH_BZIP2_TRUE}" && test -z "${WITH_BZIP2_FALSE}"; then
64930  as_fn_error $? "conditional \"WITH_BZIP2\" was never defined.
64931Usually this means the macro was only invoked conditionally." "$LINENO" 5
64932fi
64933if test -z "${WITH_GPGME_TRUE}" && test -z "${WITH_GPGME_FALSE}"; then
64934  as_fn_error $? "conditional \"WITH_GPGME\" was never defined.
64935Usually this means the macro was only invoked conditionally." "$LINENO" 5
64936fi
64937if test -z "${WITH_ZLIB_TRUE}" && test -z "${WITH_ZLIB_FALSE}"; then
64938  as_fn_error $? "conditional \"WITH_ZLIB\" was never defined.
64939Usually this means the macro was only invoked conditionally." "$LINENO" 5
64940fi
64941if test -z "${WITH_LZMA_TRUE}" && test -z "${WITH_LZMA_FALSE}"; then
64942  as_fn_error $? "conditional \"WITH_LZMA\" was never defined.
64943Usually this means the macro was only invoked conditionally." "$LINENO" 5
64944fi
64945if test -z "${WITH_BROTLIDEC_TRUE}" && test -z "${WITH_BROTLIDEC_FALSE}"; then
64946  as_fn_error $? "conditional \"WITH_BROTLIDEC\" was never defined.
64947Usually this means the macro was only invoked conditionally." "$LINENO" 5
64948fi
64949if test -z "${WITH_ZSTD_TRUE}" && test -z "${WITH_ZSTD_FALSE}"; then
64950  as_fn_error $? "conditional \"WITH_ZSTD\" was never defined.
64951Usually this means the macro was only invoked conditionally." "$LINENO" 5
64952fi
64953if test -z "${WITH_LZIP_TRUE}" && test -z "${WITH_LZIP_FALSE}"; then
64954  as_fn_error $? "conditional \"WITH_LZIP\" was never defined.
64955Usually this means the macro was only invoked conditionally." "$LINENO" 5
64956fi
64957if test -z "${WITH_LIBIDN2_TRUE}" && test -z "${WITH_LIBIDN2_FALSE}"; then
64958  as_fn_error $? "conditional \"WITH_LIBIDN2\" was never defined.
64959Usually this means the macro was only invoked conditionally." "$LINENO" 5
64960fi
64961if test -z "${WITH_LIBIDN_TRUE}" && test -z "${WITH_LIBIDN_FALSE}"; then
64962  as_fn_error $? "conditional \"WITH_LIBIDN\" was never defined.
64963Usually this means the macro was only invoked conditionally." "$LINENO" 5
64964fi
64965if test -z "${WITH_LIBPCRE2_TRUE}" && test -z "${WITH_LIBPCRE2_FALSE}"; then
64966  as_fn_error $? "conditional \"WITH_LIBPCRE2\" was never defined.
64967Usually this means the macro was only invoked conditionally." "$LINENO" 5
64968fi
64969if test -z "${WITH_LIBPCRE_TRUE}" && test -z "${WITH_LIBPCRE_FALSE}"; then
64970  as_fn_error $? "conditional \"WITH_LIBPCRE\" was never defined.
64971Usually this means the macro was only invoked conditionally." "$LINENO" 5
64972fi
64973if test -z "${WITH_MICROHTTPD_TRUE}" && test -z "${WITH_MICROHTTPD_FALSE}"; then
64974  as_fn_error $? "conditional \"WITH_MICROHTTPD\" was never defined.
64975Usually this means the macro was only invoked conditionally." "$LINENO" 5
64976fi
64977if test -z "${PLUGIN_SUPPORT_TRUE}" && test -z "${PLUGIN_SUPPORT_FALSE}"; then
64978  as_fn_error $? "conditional \"PLUGIN_SUPPORT\" was never defined.
64979Usually this means the macro was only invoked conditionally." "$LINENO" 5
64980fi
64981
64982: "${CONFIG_STATUS=./config.status}"
64983ac_write_fail=0
64984ac_clean_files_save=$ac_clean_files
64985ac_clean_files="$ac_clean_files $CONFIG_STATUS"
64986{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
64987printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
64988as_write_fail=0
64989cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
64990#! $SHELL
64991# Generated by $as_me.
64992# Run this file to recreate the current configuration.
64993# Compiler output produced by configure, useful for debugging
64994# configure, is in config.log if it exists.
64995
64996debug=false
64997ac_cs_recheck=false
64998ac_cs_silent=false
64999
65000SHELL=\${CONFIG_SHELL-$SHELL}
65001export SHELL
65002_ASEOF
65003cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65004## -------------------- ##
65005## M4sh Initialization. ##
65006## -------------------- ##
65007
65008# Be more Bourne compatible
65009DUALCASE=1; export DUALCASE # for MKS sh
65010as_nop=:
65011if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
65012then :
65013  emulate sh
65014  NULLCMD=:
65015  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65016  # is contrary to our usage.  Disable this feature.
65017  alias -g '${1+"$@"}'='"$@"'
65018  setopt NO_GLOB_SUBST
65019else $as_nop
65020  case `(set -o) 2>/dev/null` in #(
65021  *posix*) :
65022    set -o posix ;; #(
65023  *) :
65024     ;;
65025esac
65026fi
65027
65028
65029
65030# Reset variables that may have inherited troublesome values from
65031# the environment.
65032
65033# IFS needs to be set, to space, tab, and newline, in precisely that order.
65034# (If _AS_PATH_WALK were called with IFS unset, it would have the
65035# side effect of setting IFS to empty, thus disabling word splitting.)
65036# Quoting is to prevent editors from complaining about space-tab.
65037as_nl='
65038'
65039export as_nl
65040IFS=" ""	$as_nl"
65041
65042PS1='$ '
65043PS2='> '
65044PS4='+ '
65045
65046# Ensure predictable behavior from utilities with locale-dependent output.
65047LC_ALL=C
65048export LC_ALL
65049LANGUAGE=C
65050export LANGUAGE
65051
65052# We cannot yet rely on "unset" to work, but we need these variables
65053# to be unset--not just set to an empty or harmless value--now, to
65054# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
65055# also avoids known problems related to "unset" and subshell syntax
65056# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
65057for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
65058do eval test \${$as_var+y} \
65059  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65060done
65061
65062# Ensure that fds 0, 1, and 2 are open.
65063if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
65064if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
65065if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
65066
65067# The user is always right.
65068if ${PATH_SEPARATOR+false} :; then
65069  PATH_SEPARATOR=:
65070  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65071    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65072      PATH_SEPARATOR=';'
65073  }
65074fi
65075
65076
65077# Find who we are.  Look in the path if we contain no directory separator.
65078as_myself=
65079case $0 in #((
65080  *[\\/]* ) as_myself=$0 ;;
65081  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65082for as_dir in $PATH
65083do
65084  IFS=$as_save_IFS
65085  case $as_dir in #(((
65086    '') as_dir=./ ;;
65087    */) ;;
65088    *) as_dir=$as_dir/ ;;
65089  esac
65090    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
65091  done
65092IFS=$as_save_IFS
65093
65094     ;;
65095esac
65096# We did not find ourselves, most probably we were run as `sh COMMAND'
65097# in which case we are not to be found in the path.
65098if test "x$as_myself" = x; then
65099  as_myself=$0
65100fi
65101if test ! -f "$as_myself"; then
65102  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65103  exit 1
65104fi
65105
65106
65107
65108# as_fn_error STATUS ERROR [LINENO LOG_FD]
65109# ----------------------------------------
65110# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65111# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65112# script with STATUS, using 1 if that was 0.
65113as_fn_error ()
65114{
65115  as_status=$1; test $as_status -eq 0 && as_status=1
65116  if test "$4"; then
65117    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65118    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65119  fi
65120  printf "%s\n" "$as_me: error: $2" >&2
65121  as_fn_exit $as_status
65122} # as_fn_error
65123
65124
65125
65126# as_fn_set_status STATUS
65127# -----------------------
65128# Set $? to STATUS, without forking.
65129as_fn_set_status ()
65130{
65131  return $1
65132} # as_fn_set_status
65133
65134# as_fn_exit STATUS
65135# -----------------
65136# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65137as_fn_exit ()
65138{
65139  set +e
65140  as_fn_set_status $1
65141  exit $1
65142} # as_fn_exit
65143
65144# as_fn_unset VAR
65145# ---------------
65146# Portably unset VAR.
65147as_fn_unset ()
65148{
65149  { eval $1=; unset $1;}
65150}
65151as_unset=as_fn_unset
65152
65153# as_fn_append VAR VALUE
65154# ----------------------
65155# Append the text in VALUE to the end of the definition contained in VAR. Take
65156# advantage of any shell optimizations that allow amortized linear growth over
65157# repeated appends, instead of the typical quadratic growth present in naive
65158# implementations.
65159if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
65160then :
65161  eval 'as_fn_append ()
65162  {
65163    eval $1+=\$2
65164  }'
65165else $as_nop
65166  as_fn_append ()
65167  {
65168    eval $1=\$$1\$2
65169  }
65170fi # as_fn_append
65171
65172# as_fn_arith ARG...
65173# ------------------
65174# Perform arithmetic evaluation on the ARGs, and store the result in the
65175# global $as_val. Take advantage of shells that can avoid forks. The arguments
65176# must be portable across $(()) and expr.
65177if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
65178then :
65179  eval 'as_fn_arith ()
65180  {
65181    as_val=$(( $* ))
65182  }'
65183else $as_nop
65184  as_fn_arith ()
65185  {
65186    as_val=`expr "$@" || test $? -eq 1`
65187  }
65188fi # as_fn_arith
65189
65190
65191if expr a : '\(a\)' >/dev/null 2>&1 &&
65192   test "X`expr 00001 : '.*\(...\)'`" = X001; then
65193  as_expr=expr
65194else
65195  as_expr=false
65196fi
65197
65198if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
65199  as_basename=basename
65200else
65201  as_basename=false
65202fi
65203
65204if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
65205  as_dirname=dirname
65206else
65207  as_dirname=false
65208fi
65209
65210as_me=`$as_basename -- "$0" ||
65211$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
65212	 X"$0" : 'X\(//\)$' \| \
65213	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
65214printf "%s\n" X/"$0" |
65215    sed '/^.*\/\([^/][^/]*\)\/*$/{
65216	    s//\1/
65217	    q
65218	  }
65219	  /^X\/\(\/\/\)$/{
65220	    s//\1/
65221	    q
65222	  }
65223	  /^X\/\(\/\).*/{
65224	    s//\1/
65225	    q
65226	  }
65227	  s/.*/./; q'`
65228
65229# Avoid depending upon Character Ranges.
65230as_cr_letters='abcdefghijklmnopqrstuvwxyz'
65231as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
65232as_cr_Letters=$as_cr_letters$as_cr_LETTERS
65233as_cr_digits='0123456789'
65234as_cr_alnum=$as_cr_Letters$as_cr_digits
65235
65236
65237# Determine whether it's possible to make 'echo' print without a newline.
65238# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
65239# for compatibility with existing Makefiles.
65240ECHO_C= ECHO_N= ECHO_T=
65241case `echo -n x` in #(((((
65242-n*)
65243  case `echo 'xy\c'` in
65244  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
65245  xy)  ECHO_C='\c';;
65246  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
65247       ECHO_T='	';;
65248  esac;;
65249*)
65250  ECHO_N='-n';;
65251esac
65252
65253# For backward compatibility with old third-party macros, we provide
65254# the shell variables $as_echo and $as_echo_n.  New code should use
65255# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
65256as_echo='printf %s\n'
65257as_echo_n='printf %s'
65258
65259rm -f conf$$ conf$$.exe conf$$.file
65260if test -d conf$$.dir; then
65261  rm -f conf$$.dir/conf$$.file
65262else
65263  rm -f conf$$.dir
65264  mkdir conf$$.dir 2>/dev/null
65265fi
65266if (echo >conf$$.file) 2>/dev/null; then
65267  if ln -s conf$$.file conf$$ 2>/dev/null; then
65268    as_ln_s='ln -s'
65269    # ... but there are two gotchas:
65270    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
65271    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
65272    # In both cases, we have to default to `cp -pR'.
65273    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
65274      as_ln_s='cp -pR'
65275  elif ln conf$$.file conf$$ 2>/dev/null; then
65276    as_ln_s=ln
65277  else
65278    as_ln_s='cp -pR'
65279  fi
65280else
65281  as_ln_s='cp -pR'
65282fi
65283rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
65284rmdir conf$$.dir 2>/dev/null
65285
65286
65287# as_fn_mkdir_p
65288# -------------
65289# Create "$as_dir" as a directory, including parents if necessary.
65290as_fn_mkdir_p ()
65291{
65292
65293  case $as_dir in #(
65294  -*) as_dir=./$as_dir;;
65295  esac
65296  test -d "$as_dir" || eval $as_mkdir_p || {
65297    as_dirs=
65298    while :; do
65299      case $as_dir in #(
65300      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
65301      *) as_qdir=$as_dir;;
65302      esac
65303      as_dirs="'$as_qdir' $as_dirs"
65304      as_dir=`$as_dirname -- "$as_dir" ||
65305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
65306	 X"$as_dir" : 'X\(//\)[^/]' \| \
65307	 X"$as_dir" : 'X\(//\)$' \| \
65308	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
65309printf "%s\n" X"$as_dir" |
65310    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
65311	    s//\1/
65312	    q
65313	  }
65314	  /^X\(\/\/\)[^/].*/{
65315	    s//\1/
65316	    q
65317	  }
65318	  /^X\(\/\/\)$/{
65319	    s//\1/
65320	    q
65321	  }
65322	  /^X\(\/\).*/{
65323	    s//\1/
65324	    q
65325	  }
65326	  s/.*/./; q'`
65327      test -d "$as_dir" && break
65328    done
65329    test -z "$as_dirs" || eval "mkdir $as_dirs"
65330  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
65331
65332
65333} # as_fn_mkdir_p
65334if mkdir -p . 2>/dev/null; then
65335  as_mkdir_p='mkdir -p "$as_dir"'
65336else
65337  test -d ./-p && rmdir ./-p
65338  as_mkdir_p=false
65339fi
65340
65341
65342# as_fn_executable_p FILE
65343# -----------------------
65344# Test if FILE is an executable regular file.
65345as_fn_executable_p ()
65346{
65347  test -f "$1" && test -x "$1"
65348} # as_fn_executable_p
65349as_test_x='test -x'
65350as_executable_p=as_fn_executable_p
65351
65352# Sed expression to map a string onto a valid CPP name.
65353as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
65354
65355# Sed expression to map a string onto a valid variable name.
65356as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
65357
65358
65359exec 6>&1
65360## ----------------------------------- ##
65361## Main body of $CONFIG_STATUS script. ##
65362## ----------------------------------- ##
65363_ASEOF
65364test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
65365
65366cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
65367# Save the log message, to keep $0 and so on meaningful, and to
65368# report actual input values of CONFIG_FILES etc. instead of their
65369# values after options handling.
65370ac_log="
65371This file was extended by wget2 $as_me 2.0.0, which was
65372generated by GNU Autoconf 2.71.  Invocation command line was
65373
65374  CONFIG_FILES    = $CONFIG_FILES
65375  CONFIG_HEADERS  = $CONFIG_HEADERS
65376  CONFIG_LINKS    = $CONFIG_LINKS
65377  CONFIG_COMMANDS = $CONFIG_COMMANDS
65378  $ $0 $@
65379
65380on `(hostname || uname -n) 2>/dev/null | sed 1q`
65381"
65382
65383_ACEOF
65384
65385case $ac_config_files in *"
65386"*) set x $ac_config_files; shift; ac_config_files=$*;;
65387esac
65388
65389case $ac_config_headers in *"
65390"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
65391esac
65392
65393
65394cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
65395# Files that config.status was made for.
65396config_files="$ac_config_files"
65397config_headers="$ac_config_headers"
65398config_links="$ac_config_links"
65399config_commands="$ac_config_commands"
65400
65401_ACEOF
65402
65403cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
65404ac_cs_usage="\
65405\`$as_me' instantiates files and other configuration actions
65406from templates according to the current configuration.  Unless the files
65407and actions are specified as TAGs, all are instantiated by default.
65408
65409Usage: $0 [OPTION]... [TAG]...
65410
65411  -h, --help       print this help, then exit
65412  -V, --version    print version number and configuration settings, then exit
65413      --config     print configuration, then exit
65414  -q, --quiet, --silent
65415                   do not print progress messages
65416  -d, --debug      don't remove temporary files
65417      --recheck    update $as_me by reconfiguring in the same conditions
65418      --file=FILE[:TEMPLATE]
65419                   instantiate the configuration file FILE
65420      --header=FILE[:TEMPLATE]
65421                   instantiate the configuration header FILE
65422
65423Configuration files:
65424$config_files
65425
65426Configuration headers:
65427$config_headers
65428
65429Configuration links:
65430$config_links
65431
65432Configuration commands:
65433$config_commands
65434
65435Report bugs to <bug-wget@gnu.org>.
65436wget2 home page: <https://savannah.gnu.org/projects/wget>."
65437
65438_ACEOF
65439ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
65440ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
65441cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
65442ac_cs_config='$ac_cs_config_escaped'
65443ac_cs_version="\\
65444wget2 config.status 2.0.0
65445configured by $0, generated by GNU Autoconf 2.71,
65446  with options \\"\$ac_cs_config\\"
65447
65448Copyright (C) 2021 Free Software Foundation, Inc.
65449This config.status script is free software; the Free Software Foundation
65450gives unlimited permission to copy, distribute and modify it."
65451
65452ac_pwd='$ac_pwd'
65453srcdir='$srcdir'
65454INSTALL='$INSTALL'
65455MKDIR_P='$MKDIR_P'
65456AWK='$AWK'
65457test -n "\$AWK" || AWK=awk
65458_ACEOF
65459
65460cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
65461# The default lists apply if the user does not specify any file.
65462ac_need_defaults=:
65463while test $# != 0
65464do
65465  case $1 in
65466  --*=?*)
65467    ac_option=`expr "X$1" : 'X\([^=]*\)='`
65468    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
65469    ac_shift=:
65470    ;;
65471  --*=)
65472    ac_option=`expr "X$1" : 'X\([^=]*\)='`
65473    ac_optarg=
65474    ac_shift=:
65475    ;;
65476  *)
65477    ac_option=$1
65478    ac_optarg=$2
65479    ac_shift=shift
65480    ;;
65481  esac
65482
65483  case $ac_option in
65484  # Handling of the options.
65485  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
65486    ac_cs_recheck=: ;;
65487  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
65488    printf "%s\n" "$ac_cs_version"; exit ;;
65489  --config | --confi | --conf | --con | --co | --c )
65490    printf "%s\n" "$ac_cs_config"; exit ;;
65491  --debug | --debu | --deb | --de | --d | -d )
65492    debug=: ;;
65493  --file | --fil | --fi | --f )
65494    $ac_shift
65495    case $ac_optarg in
65496    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
65497    '') as_fn_error $? "missing file argument" ;;
65498    esac
65499    as_fn_append CONFIG_FILES " '$ac_optarg'"
65500    ac_need_defaults=false;;
65501  --header | --heade | --head | --hea )
65502    $ac_shift
65503    case $ac_optarg in
65504    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
65505    esac
65506    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
65507    ac_need_defaults=false;;
65508  --he | --h)
65509    # Conflict between --help and --header
65510    as_fn_error $? "ambiguous option: \`$1'
65511Try \`$0 --help' for more information.";;
65512  --help | --hel | -h )
65513    printf "%s\n" "$ac_cs_usage"; exit ;;
65514  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
65515  | -silent | --silent | --silen | --sile | --sil | --si | --s)
65516    ac_cs_silent=: ;;
65517
65518  # This is an error.
65519  -*) as_fn_error $? "unrecognized option: \`$1'
65520Try \`$0 --help' for more information." ;;
65521
65522  *) as_fn_append ac_config_targets " $1"
65523     ac_need_defaults=false ;;
65524
65525  esac
65526  shift
65527done
65528
65529ac_configure_extra_args=
65530
65531if $ac_cs_silent; then
65532  exec 6>/dev/null
65533  ac_configure_extra_args="$ac_configure_extra_args --silent"
65534fi
65535
65536_ACEOF
65537cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
65538if \$ac_cs_recheck; then
65539  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
65540  shift
65541  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
65542  CONFIG_SHELL='$SHELL'
65543  export CONFIG_SHELL
65544  exec "\$@"
65545fi
65546
65547_ACEOF
65548cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
65549exec 5>>config.log
65550{
65551  echo
65552  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
65553## Running $as_me. ##
65554_ASBOX
65555  printf "%s\n" "$ac_log"
65556} >&5
65557
65558_ACEOF
65559cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
65560#
65561# INIT-COMMANDS
65562#
65563AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
65564GNUmakefile=$GNUmakefile
65565
65566
65567# The HP-UX ksh and POSIX shell print the target directory to stdout
65568# if CDPATH is set.
65569(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65570
65571sed_quote_subst='$sed_quote_subst'
65572double_quote_subst='$double_quote_subst'
65573delay_variable_subst='$delay_variable_subst'
65574macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
65575macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
65576enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
65577enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
65578pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
65579enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
65580shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
65581SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
65582ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
65583PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
65584host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
65585host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
65586host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
65587build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
65588build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
65589build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
65590SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
65591Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
65592GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
65593EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
65594FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
65595LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
65596NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
65597LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
65598max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
65599ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
65600exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
65601lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
65602lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
65603lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
65604lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
65605lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
65606reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
65607reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
65608OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
65609deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
65610file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
65611file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
65612want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
65613DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
65614sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
65615AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
65616AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
65617archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
65618STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
65619RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
65620old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
65621old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
65622old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
65623lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
65624CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
65625CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
65626compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
65627GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
65628lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
65629lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
65630lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
65631lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
65632lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
65633lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
65634nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
65635lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
65636lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
65637objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
65638MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
65639lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
65640lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
65641lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
65642lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
65643lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
65644need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
65645MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
65646DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
65647NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
65648LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
65649OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
65650OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
65651libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
65652shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
65653extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
65654archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
65655enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
65656export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
65657whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
65658compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
65659old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
65660old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
65661archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
65662archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
65663module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
65664module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
65665with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
65666allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
65667no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
65668hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
65669hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
65670hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
65671hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
65672hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
65673hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
65674hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
65675inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
65676link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
65677always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
65678export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
65679exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
65680include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
65681prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
65682postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
65683file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
65684variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
65685need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
65686need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
65687version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
65688runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
65689shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
65690shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
65691libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
65692library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
65693soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
65694install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
65695postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
65696postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
65697finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
65698finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
65699hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
65700sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
65701configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
65702configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
65703hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
65704enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
65705enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
65706enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
65707old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
65708striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
65709
65710LTCC='$LTCC'
65711LTCFLAGS='$LTCFLAGS'
65712compiler='$compiler_DEFAULT'
65713
65714# A function that is used when there is no print builtin or printf.
65715func_fallback_echo ()
65716{
65717  eval 'cat <<_LTECHO_EOF
65718\$1
65719_LTECHO_EOF'
65720}
65721
65722# Quote evaled strings.
65723for var in SHELL \
65724ECHO \
65725PATH_SEPARATOR \
65726SED \
65727GREP \
65728EGREP \
65729FGREP \
65730LD \
65731NM \
65732LN_S \
65733lt_SP2NL \
65734lt_NL2SP \
65735reload_flag \
65736OBJDUMP \
65737deplibs_check_method \
65738file_magic_cmd \
65739file_magic_glob \
65740want_nocaseglob \
65741DLLTOOL \
65742sharedlib_from_linklib_cmd \
65743AR \
65744AR_FLAGS \
65745archiver_list_spec \
65746STRIP \
65747RANLIB \
65748CC \
65749CFLAGS \
65750compiler \
65751lt_cv_sys_global_symbol_pipe \
65752lt_cv_sys_global_symbol_to_cdecl \
65753lt_cv_sys_global_symbol_to_import \
65754lt_cv_sys_global_symbol_to_c_name_address \
65755lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
65756lt_cv_nm_interface \
65757nm_file_list_spec \
65758lt_cv_truncate_bin \
65759lt_prog_compiler_no_builtin_flag \
65760lt_prog_compiler_pic \
65761lt_prog_compiler_wl \
65762lt_prog_compiler_static \
65763lt_cv_prog_compiler_c_o \
65764need_locks \
65765MANIFEST_TOOL \
65766DSYMUTIL \
65767NMEDIT \
65768LIPO \
65769OTOOL \
65770OTOOL64 \
65771shrext_cmds \
65772export_dynamic_flag_spec \
65773whole_archive_flag_spec \
65774compiler_needs_object \
65775with_gnu_ld \
65776allow_undefined_flag \
65777no_undefined_flag \
65778hardcode_libdir_flag_spec \
65779hardcode_libdir_separator \
65780exclude_expsyms \
65781include_expsyms \
65782file_list_spec \
65783variables_saved_for_relink \
65784libname_spec \
65785library_names_spec \
65786soname_spec \
65787install_override_mode \
65788finish_eval \
65789old_striplib \
65790striplib; do
65791    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
65792    *[\\\\\\\`\\"\\\$]*)
65793      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
65794      ;;
65795    *)
65796      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
65797      ;;
65798    esac
65799done
65800
65801# Double-quote double-evaled strings.
65802for var in reload_cmds \
65803old_postinstall_cmds \
65804old_postuninstall_cmds \
65805old_archive_cmds \
65806extract_expsyms_cmds \
65807old_archive_from_new_cmds \
65808old_archive_from_expsyms_cmds \
65809archive_cmds \
65810archive_expsym_cmds \
65811module_cmds \
65812module_expsym_cmds \
65813export_symbols_cmds \
65814prelink_cmds \
65815postlink_cmds \
65816postinstall_cmds \
65817postuninstall_cmds \
65818finish_cmds \
65819sys_lib_search_path_spec \
65820configure_time_dlsearch_path \
65821configure_time_lt_sys_library_path; do
65822    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
65823    *[\\\\\\\`\\"\\\$]*)
65824      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
65825      ;;
65826    *)
65827      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
65828      ;;
65829    esac
65830done
65831
65832ac_aux_dir='$ac_aux_dir'
65833
65834# See if we are running on zsh, and set the options that allow our
65835# commands through without removal of \ escapes INIT.
65836if test -n "\${ZSH_VERSION+set}"; then
65837   setopt NO_GLOB_SUBST
65838fi
65839
65840
65841    PACKAGE='$PACKAGE'
65842    VERSION='$VERSION'
65843    RM='$RM'
65844    ofile='$ofile'
65845
65846
65847
65848# Capture the value of obsolete ALL_LINGUAS because we need it to compute
65849    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
65850    # from automake < 1.5.
65851    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
65852    # Capture the value of LINGUAS because we need it to compute CATALOGS.
65853    LINGUAS="${LINGUAS-%UNSET%}"
65854
65855
65856_ACEOF
65857
65858cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
65859
65860# Handling of arguments.
65861for ac_config_target in $ac_config_targets
65862do
65863  case $ac_config_target in
65864    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
65865    "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
65866    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
65867    "include/wget/wgetver.h") CONFIG_FILES="$CONFIG_FILES include/wget/wgetver.h" ;;
65868    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
65869    "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
65870    "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
65871    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
65872    "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
65873    "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
65874    "include/wget/Makefile") CONFIG_FILES="$CONFIG_FILES include/wget/Makefile" ;;
65875    "libwget/Makefile") CONFIG_FILES="$CONFIG_FILES libwget/Makefile" ;;
65876    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
65877    "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
65878    "unit-tests/Makefile") CONFIG_FILES="$CONFIG_FILES unit-tests/Makefile" ;;
65879    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
65880    "fuzz/Makefile") CONFIG_FILES="$CONFIG_FILES fuzz/Makefile" ;;
65881    "libwget.pc") CONFIG_FILES="$CONFIG_FILES libwget.pc" ;;
65882    "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
65883    "docs/libwget.doxy") CONFIG_FILES="$CONFIG_FILES docs/libwget.doxy" ;;
65884    "docs/wget2_md2man.sh") CONFIG_FILES="$CONFIG_FILES docs/wget2_md2man.sh" ;;
65885
65886  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
65887  esac
65888done
65889
65890
65891# If the user did not use the arguments to specify the items to instantiate,
65892# then the envvar interface is used.  Set only those that are not.
65893# We use the long form for the default assignment because of an extremely
65894# bizarre bug on SunOS 4.1.3.
65895if $ac_need_defaults; then
65896  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
65897  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
65898  test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
65899  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
65900fi
65901
65902# Have a temporary directory for convenience.  Make it in the build tree
65903# simply because there is no reason against having it here, and in addition,
65904# creating and moving files from /tmp can sometimes cause problems.
65905# Hook for its removal unless debugging.
65906# Note that there is a small window in which the directory will not be cleaned:
65907# after its creation but before its name has been assigned to `$tmp'.
65908$debug ||
65909{
65910  tmp= ac_tmp=
65911  trap 'exit_status=$?
65912  : "${ac_tmp:=$tmp}"
65913  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
65914' 0
65915  trap 'as_fn_exit 1' 1 2 13 15
65916}
65917# Create a (secure) tmp directory for tmp files.
65918
65919{
65920  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
65921  test -d "$tmp"
65922}  ||
65923{
65924  tmp=./conf$$-$RANDOM
65925  (umask 077 && mkdir "$tmp")
65926} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
65927ac_tmp=$tmp
65928
65929# Set up the scripts for CONFIG_FILES section.
65930# No need to generate them if there are no CONFIG_FILES.
65931# This happens for instance with `./config.status config.h'.
65932if test -n "$CONFIG_FILES"; then
65933
65934
65935ac_cr=`echo X | tr X '\015'`
65936# On cygwin, bash can eat \r inside `` if the user requested igncr.
65937# But we know of no other shell where ac_cr would be empty at this
65938# point, so we can use a bashism as a fallback.
65939if test "x$ac_cr" = x; then
65940  eval ac_cr=\$\'\\r\'
65941fi
65942ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
65943if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
65944  ac_cs_awk_cr='\\r'
65945else
65946  ac_cs_awk_cr=$ac_cr
65947fi
65948
65949echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
65950_ACEOF
65951
65952
65953{
65954  echo "cat >conf$$subs.awk <<_ACEOF" &&
65955  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
65956  echo "_ACEOF"
65957} >conf$$subs.sh ||
65958  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
65959ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
65960ac_delim='%!_!# '
65961for ac_last_try in false false false false false :; do
65962  . ./conf$$subs.sh ||
65963    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
65964
65965  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
65966  if test $ac_delim_n = $ac_delim_num; then
65967    break
65968  elif $ac_last_try; then
65969    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
65970  else
65971    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
65972  fi
65973done
65974rm -f conf$$subs.sh
65975
65976cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
65977cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
65978_ACEOF
65979sed -n '
65980h
65981s/^/S["/; s/!.*/"]=/
65982p
65983g
65984s/^[^!]*!//
65985:repl
65986t repl
65987s/'"$ac_delim"'$//
65988t delim
65989:nl
65990h
65991s/\(.\{148\}\)..*/\1/
65992t more1
65993s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
65994p
65995n
65996b repl
65997:more1
65998s/["\\]/\\&/g; s/^/"/; s/$/"\\/
65999p
66000g
66001s/.\{148\}//
66002t nl
66003:delim
66004h
66005s/\(.\{148\}\)..*/\1/
66006t more2
66007s/["\\]/\\&/g; s/^/"/; s/$/"/
66008p
66009b
66010:more2
66011s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66012p
66013g
66014s/.\{148\}//
66015t delim
66016' <conf$$subs.awk | sed '
66017/^[^""]/{
66018  N
66019  s/\n//
66020}
66021' >>$CONFIG_STATUS || ac_write_fail=1
66022rm -f conf$$subs.awk
66023cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66024_ACAWK
66025cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66026  for (key in S) S_is_set[key] = 1
66027  FS = ""
66028
66029}
66030{
66031  line = $ 0
66032  nfields = split(line, field, "@")
66033  substed = 0
66034  len = length(field[1])
66035  for (i = 2; i < nfields; i++) {
66036    key = field[i]
66037    keylen = length(key)
66038    if (S_is_set[key]) {
66039      value = S[key]
66040      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66041      len += length(value) + length(field[++i])
66042      substed = 1
66043    } else
66044      len += 1 + keylen
66045  }
66046
66047  print line
66048}
66049
66050_ACAWK
66051_ACEOF
66052cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66053if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66054  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66055else
66056  cat
66057fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66058  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66059_ACEOF
66060
66061# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66062# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66063# trailing colons and then remove the whole line if VPATH becomes empty
66064# (actually we leave an empty line to preserve line numbers).
66065if test "x$srcdir" = x.; then
66066  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66067h
66068s///
66069s/^/:/
66070s/[	 ]*$/:/
66071s/:\$(srcdir):/:/g
66072s/:\${srcdir}:/:/g
66073s/:@srcdir@:/:/g
66074s/^:*//
66075s/:*$//
66076x
66077s/\(=[	 ]*\).*/\1/
66078G
66079s/\n//
66080s/^[^=]*=[	 ]*$//
66081}'
66082fi
66083
66084cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66085fi # test -n "$CONFIG_FILES"
66086
66087# Set up the scripts for CONFIG_HEADERS section.
66088# No need to generate them if there are no CONFIG_HEADERS.
66089# This happens for instance with `./config.status Makefile'.
66090if test -n "$CONFIG_HEADERS"; then
66091cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
66092BEGIN {
66093_ACEOF
66094
66095# Transform confdefs.h into an awk script `defines.awk', embedded as
66096# here-document in config.status, that substitutes the proper values into
66097# config.h.in to produce config.h.
66098
66099# Create a delimiter string that does not exist in confdefs.h, to ease
66100# handling of long lines.
66101ac_delim='%!_!# '
66102for ac_last_try in false false :; do
66103  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
66104  if test -z "$ac_tt"; then
66105    break
66106  elif $ac_last_try; then
66107    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
66108  else
66109    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66110  fi
66111done
66112
66113# For the awk script, D is an array of macro values keyed by name,
66114# likewise P contains macro parameters if any.  Preserve backslash
66115# newline sequences.
66116
66117ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
66118sed -n '
66119s/.\{148\}/&'"$ac_delim"'/g
66120t rset
66121:rset
66122s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
66123t def
66124d
66125:def
66126s/\\$//
66127t bsnl
66128s/["\\]/\\&/g
66129s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
66130D["\1"]=" \3"/p
66131s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
66132d
66133:bsnl
66134s/["\\]/\\&/g
66135s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
66136D["\1"]=" \3\\\\\\n"\\/p
66137t cont
66138s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
66139t cont
66140d
66141:cont
66142n
66143s/.\{148\}/&'"$ac_delim"'/g
66144t clear
66145:clear
66146s/\\$//
66147t bsnlc
66148s/["\\]/\\&/g; s/^/"/; s/$/"/p
66149d
66150:bsnlc
66151s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
66152b cont
66153' <confdefs.h | sed '
66154s/'"$ac_delim"'/"\\\
66155"/g' >>$CONFIG_STATUS || ac_write_fail=1
66156
66157cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66158  for (key in D) D_is_set[key] = 1
66159  FS = ""
66160}
66161/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
66162  line = \$ 0
66163  split(line, arg, " ")
66164  if (arg[1] == "#") {
66165    defundef = arg[2]
66166    mac1 = arg[3]
66167  } else {
66168    defundef = substr(arg[1], 2)
66169    mac1 = arg[2]
66170  }
66171  split(mac1, mac2, "(") #)
66172  macro = mac2[1]
66173  prefix = substr(line, 1, index(line, defundef) - 1)
66174  if (D_is_set[macro]) {
66175    # Preserve the white space surrounding the "#".
66176    print prefix "define", macro P[macro] D[macro]
66177    next
66178  } else {
66179    # Replace #undef with comments.  This is necessary, for example,
66180    # in the case of _POSIX_SOURCE, which is predefined and required
66181    # on some systems where configure will not decide to define it.
66182    if (defundef == "undef") {
66183      print "/*", prefix defundef, macro, "*/"
66184      next
66185    }
66186  }
66187}
66188{ print }
66189_ACAWK
66190_ACEOF
66191cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66192  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
66193fi # test -n "$CONFIG_HEADERS"
66194
66195
66196eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
66197shift
66198for ac_tag
66199do
66200  case $ac_tag in
66201  :[FHLC]) ac_mode=$ac_tag; continue;;
66202  esac
66203  case $ac_mode$ac_tag in
66204  :[FHL]*:*);;
66205  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66206  :[FH]-) ac_tag=-:-;;
66207  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66208  esac
66209  ac_save_IFS=$IFS
66210  IFS=:
66211  set x $ac_tag
66212  IFS=$ac_save_IFS
66213  shift
66214  ac_file=$1
66215  shift
66216
66217  case $ac_mode in
66218  :L) ac_source=$1;;
66219  :[FH])
66220    ac_file_inputs=
66221    for ac_f
66222    do
66223      case $ac_f in
66224      -) ac_f="$ac_tmp/stdin";;
66225      *) # Look for the file first in the build tree, then in the source tree
66226	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66227	 # because $ac_f cannot contain `:'.
66228	 test -f "$ac_f" ||
66229	   case $ac_f in
66230	   [\\/$]*) false;;
66231	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66232	   esac ||
66233	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66234      esac
66235      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66236      as_fn_append ac_file_inputs " '$ac_f'"
66237    done
66238
66239    # Let's still pretend it is `configure' which instantiates (i.e., don't
66240    # use $as_me), people would be surprised to read:
66241    #    /* config.h.  Generated by config.status.  */
66242    configure_input='Generated from '`
66243	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66244	`' by configure.'
66245    if test x"$ac_file" != x-; then
66246      configure_input="$ac_file.  $configure_input"
66247      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66248printf "%s\n" "$as_me: creating $ac_file" >&6;}
66249    fi
66250    # Neutralize special characters interpreted by sed in replacement strings.
66251    case $configure_input in #(
66252    *\&* | *\|* | *\\* )
66253       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
66254       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66255    *) ac_sed_conf_input=$configure_input;;
66256    esac
66257
66258    case $ac_tag in
66259    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66260      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66261    esac
66262    ;;
66263  esac
66264
66265  ac_dir=`$as_dirname -- "$ac_file" ||
66266$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66267	 X"$ac_file" : 'X\(//\)[^/]' \| \
66268	 X"$ac_file" : 'X\(//\)$' \| \
66269	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66270printf "%s\n" X"$ac_file" |
66271    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66272	    s//\1/
66273	    q
66274	  }
66275	  /^X\(\/\/\)[^/].*/{
66276	    s//\1/
66277	    q
66278	  }
66279	  /^X\(\/\/\)$/{
66280	    s//\1/
66281	    q
66282	  }
66283	  /^X\(\/\).*/{
66284	    s//\1/
66285	    q
66286	  }
66287	  s/.*/./; q'`
66288  as_dir="$ac_dir"; as_fn_mkdir_p
66289  ac_builddir=.
66290
66291case "$ac_dir" in
66292.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66293*)
66294  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
66295  # A ".." for each directory in $ac_dir_suffix.
66296  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66297  case $ac_top_builddir_sub in
66298  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66299  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66300  esac ;;
66301esac
66302ac_abs_top_builddir=$ac_pwd
66303ac_abs_builddir=$ac_pwd$ac_dir_suffix
66304# for backward compatibility:
66305ac_top_builddir=$ac_top_build_prefix
66306
66307case $srcdir in
66308  .)  # We are building in place.
66309    ac_srcdir=.
66310    ac_top_srcdir=$ac_top_builddir_sub
66311    ac_abs_top_srcdir=$ac_pwd ;;
66312  [\\/]* | ?:[\\/]* )  # Absolute name.
66313    ac_srcdir=$srcdir$ac_dir_suffix;
66314    ac_top_srcdir=$srcdir
66315    ac_abs_top_srcdir=$srcdir ;;
66316  *) # Relative name.
66317    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66318    ac_top_srcdir=$ac_top_build_prefix$srcdir
66319    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66320esac
66321ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66322
66323
66324  case $ac_mode in
66325  :F)
66326  #
66327  # CONFIG_FILE
66328  #
66329
66330  case $INSTALL in
66331  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
66332  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
66333  esac
66334  ac_MKDIR_P=$MKDIR_P
66335  case $MKDIR_P in
66336  [\\/$]* | ?:[\\/]* ) ;;
66337  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
66338  esac
66339_ACEOF
66340
66341cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66342# If the template does not know about datarootdir, expand it.
66343# FIXME: This hack should be removed a few years after 2.60.
66344ac_datarootdir_hack=; ac_datarootdir_seen=
66345ac_sed_dataroot='
66346/datarootdir/ {
66347  p
66348  q
66349}
66350/@datadir@/p
66351/@docdir@/p
66352/@infodir@/p
66353/@localedir@/p
66354/@mandir@/p'
66355case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66356*datarootdir*) ac_datarootdir_seen=yes;;
66357*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66358  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66359printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66360_ACEOF
66361cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66362  ac_datarootdir_hack='
66363  s&@datadir@&$datadir&g
66364  s&@docdir@&$docdir&g
66365  s&@infodir@&$infodir&g
66366  s&@localedir@&$localedir&g
66367  s&@mandir@&$mandir&g
66368  s&\\\${datarootdir}&$datarootdir&g' ;;
66369esac
66370_ACEOF
66371
66372# Neutralize VPATH when `$srcdir' = `.'.
66373# Shell code in configure.ac might set extrasub.
66374# FIXME: do we really want to maintain this feature?
66375cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66376ac_sed_extra="$ac_vpsub
66377$extrasub
66378_ACEOF
66379cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66380:t
66381/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66382s|@configure_input@|$ac_sed_conf_input|;t t
66383s&@top_builddir@&$ac_top_builddir_sub&;t t
66384s&@top_build_prefix@&$ac_top_build_prefix&;t t
66385s&@srcdir@&$ac_srcdir&;t t
66386s&@abs_srcdir@&$ac_abs_srcdir&;t t
66387s&@top_srcdir@&$ac_top_srcdir&;t t
66388s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66389s&@builddir@&$ac_builddir&;t t
66390s&@abs_builddir@&$ac_abs_builddir&;t t
66391s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66392s&@INSTALL@&$ac_INSTALL&;t t
66393s&@MKDIR_P@&$ac_MKDIR_P&;t t
66394$ac_datarootdir_hack
66395"
66396eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66397  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66398
66399test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66400  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66401  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66402      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66403  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66404which seems to be undefined.  Please make sure it is defined" >&5
66405printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66406which seems to be undefined.  Please make sure it is defined" >&2;}
66407
66408  rm -f "$ac_tmp/stdin"
66409  case $ac_file in
66410  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66411  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66412  esac \
66413  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66414 ;;
66415  :H)
66416  #
66417  # CONFIG_HEADER
66418  #
66419  if test x"$ac_file" != x-; then
66420    {
66421      printf "%s\n" "/* $configure_input  */" >&1 \
66422      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
66423    } >"$ac_tmp/config.h" \
66424      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66425    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
66426      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
66427printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
66428    else
66429      rm -f "$ac_file"
66430      mv "$ac_tmp/config.h" "$ac_file" \
66431	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
66432    fi
66433  else
66434    printf "%s\n" "/* $configure_input  */" >&1 \
66435      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
66436      || as_fn_error $? "could not create -" "$LINENO" 5
66437  fi
66438# Compute "$ac_file"'s index in $config_headers.
66439_am_arg="$ac_file"
66440_am_stamp_count=1
66441for _am_header in $config_headers :; do
66442  case $_am_header in
66443    $_am_arg | $_am_arg:* )
66444      break ;;
66445    * )
66446      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
66447  esac
66448done
66449echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
66450$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66451	 X"$_am_arg" : 'X\(//\)[^/]' \| \
66452	 X"$_am_arg" : 'X\(//\)$' \| \
66453	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
66454printf "%s\n" X"$_am_arg" |
66455    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66456	    s//\1/
66457	    q
66458	  }
66459	  /^X\(\/\/\)[^/].*/{
66460	    s//\1/
66461	    q
66462	  }
66463	  /^X\(\/\/\)$/{
66464	    s//\1/
66465	    q
66466	  }
66467	  /^X\(\/\).*/{
66468	    s//\1/
66469	    q
66470	  }
66471	  s/.*/./; q'`/stamp-h$_am_stamp_count
66472 ;;
66473  :L)
66474  #
66475  # CONFIG_LINK
66476  #
66477
66478  if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
66479    :
66480  else
66481    # Prefer the file from the source tree if names are identical.
66482    if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
66483      ac_source=$srcdir/$ac_source
66484    fi
66485
66486    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
66487printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
66488
66489    if test ! -r "$ac_source"; then
66490      as_fn_error $? "$ac_source: file not found" "$LINENO" 5
66491    fi
66492    rm -f "$ac_file"
66493
66494    # Try a relative symlink, then a hard link, then a copy.
66495    case $ac_source in
66496    [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
66497	*) ac_rel_source=$ac_top_build_prefix$ac_source ;;
66498    esac
66499    ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
66500      ln "$ac_source" "$ac_file" 2>/dev/null ||
66501      cp -p "$ac_source" "$ac_file" ||
66502      as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
66503  fi
66504 ;;
66505  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
66506printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
66507 ;;
66508  esac
66509
66510
66511  case $ac_file$ac_mode in
66512    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
66513  # Older Autoconf quotes --file arguments for eval, but not when files
66514  # are listed without --file.  Let's play safe and only enable the eval
66515  # if we detect the quoting.
66516  # TODO: see whether this extra hack can be removed once we start
66517  # requiring Autoconf 2.70 or later.
66518  case $CONFIG_FILES in #(
66519  *\'*) :
66520    eval set x "$CONFIG_FILES" ;; #(
66521  *) :
66522    set x $CONFIG_FILES ;; #(
66523  *) :
66524     ;;
66525esac
66526  shift
66527  # Used to flag and report bootstrapping failures.
66528  am_rc=0
66529  for am_mf
66530  do
66531    # Strip MF so we end up with the name of the file.
66532    am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
66533    # Check whether this is an Automake generated Makefile which includes
66534    # dependency-tracking related rules and includes.
66535    # Grep'ing the whole file directly is not great: AIX grep has a line
66536    # limit of 2048, but all sed's we know have understand at least 4000.
66537    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
66538      || continue
66539    am_dirpart=`$as_dirname -- "$am_mf" ||
66540$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66541	 X"$am_mf" : 'X\(//\)[^/]' \| \
66542	 X"$am_mf" : 'X\(//\)$' \| \
66543	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
66544printf "%s\n" X"$am_mf" |
66545    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66546	    s//\1/
66547	    q
66548	  }
66549	  /^X\(\/\/\)[^/].*/{
66550	    s//\1/
66551	    q
66552	  }
66553	  /^X\(\/\/\)$/{
66554	    s//\1/
66555	    q
66556	  }
66557	  /^X\(\/\).*/{
66558	    s//\1/
66559	    q
66560	  }
66561	  s/.*/./; q'`
66562    am_filepart=`$as_basename -- "$am_mf" ||
66563$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
66564	 X"$am_mf" : 'X\(//\)$' \| \
66565	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
66566printf "%s\n" X/"$am_mf" |
66567    sed '/^.*\/\([^/][^/]*\)\/*$/{
66568	    s//\1/
66569	    q
66570	  }
66571	  /^X\/\(\/\/\)$/{
66572	    s//\1/
66573	    q
66574	  }
66575	  /^X\/\(\/\).*/{
66576	    s//\1/
66577	    q
66578	  }
66579	  s/.*/./; q'`
66580    { echo "$as_me:$LINENO: cd "$am_dirpart" \
66581      && sed -e '/# am--include-marker/d' "$am_filepart" \
66582        | $MAKE -f - am--depfiles" >&5
66583   (cd "$am_dirpart" \
66584      && sed -e '/# am--include-marker/d' "$am_filepart" \
66585        | $MAKE -f - am--depfiles) >&5 2>&5
66586   ac_status=$?
66587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
66588   (exit $ac_status); } || am_rc=$?
66589  done
66590  if test $am_rc -ne 0; then
66591    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
66592printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
66593as_fn_error $? "Something went wrong bootstrapping makefile fragments
66594    for automatic dependency tracking.  If GNU make was not used, consider
66595    re-running the configure script with MAKE=\"gmake\" (or whatever is
66596    necessary).  You can also try re-running configure with the
66597    '--disable-dependency-tracking' option to at least be able to build
66598    the package (albeit without support for automatic dependency tracking).
66599See \`config.log' for more details" "$LINENO" 5; }
66600  fi
66601  { am_dirpart=; unset am_dirpart;}
66602  { am_filepart=; unset am_filepart;}
66603  { am_mf=; unset am_mf;}
66604  { am_rc=; unset am_rc;}
66605  rm -f conftest-deps.mk
66606}
66607 ;;
66608    "libtool":C)
66609
66610    # See if we are running on zsh, and set the options that allow our
66611    # commands through without removal of \ escapes.
66612    if test -n "${ZSH_VERSION+set}"; then
66613      setopt NO_GLOB_SUBST
66614    fi
66615
66616    cfgfile=${ofile}T
66617    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
66618    $RM "$cfgfile"
66619
66620    cat <<_LT_EOF >> "$cfgfile"
66621#! $SHELL
66622# Generated automatically by $as_me ($PACKAGE) $VERSION
66623# NOTE: Changes made to this file will be lost: look at ltmain.sh.
66624
66625# Provide generalized library-building support services.
66626# Written by Gordon Matzigkeit, 1996
66627
66628# Copyright (C) 2014 Free Software Foundation, Inc.
66629# This is free software; see the source for copying conditions.  There is NO
66630# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
66631
66632# GNU Libtool is free software; you can redistribute it and/or modify
66633# it under the terms of the GNU General Public License as published by
66634# the Free Software Foundation; either version 2 of of the License, or
66635# (at your option) any later version.
66636#
66637# As a special exception to the GNU General Public License, if you
66638# distribute this file as part of a program or library that is built
66639# using GNU Libtool, you may include this file under the  same
66640# distribution terms that you use for the rest of that program.
66641#
66642# GNU Libtool is distributed in the hope that it will be useful, but
66643# WITHOUT ANY WARRANTY; without even the implied warranty of
66644# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
66645# GNU General Public License for more details.
66646#
66647# You should have received a copy of the GNU General Public License
66648# along with this program.  If not, see <http://www.gnu.org/licenses/>.
66649
66650
66651# The names of the tagged configurations supported by this script.
66652available_tags=''
66653
66654# Configured defaults for sys_lib_dlsearch_path munging.
66655: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
66656
66657# ### BEGIN LIBTOOL CONFIG
66658
66659# Which release of libtool.m4 was used?
66660macro_version=$macro_version
66661macro_revision=$macro_revision
66662
66663# Whether or not to build shared libraries.
66664build_libtool_libs=$enable_shared
66665
66666# Whether or not to build static libraries.
66667build_old_libs=$enable_static
66668
66669# What type of objects to build.
66670pic_mode=$pic_mode
66671
66672# Whether or not to optimize for fast installation.
66673fast_install=$enable_fast_install
66674
66675# Shared archive member basename,for filename based shared library versioning on AIX.
66676shared_archive_member_spec=$shared_archive_member_spec
66677
66678# Shell to use when invoking shell scripts.
66679SHELL=$lt_SHELL
66680
66681# An echo program that protects backslashes.
66682ECHO=$lt_ECHO
66683
66684# The PATH separator for the build system.
66685PATH_SEPARATOR=$lt_PATH_SEPARATOR
66686
66687# The host system.
66688host_alias=$host_alias
66689host=$host
66690host_os=$host_os
66691
66692# The build system.
66693build_alias=$build_alias
66694build=$build
66695build_os=$build_os
66696
66697# A sed program that does not truncate output.
66698SED=$lt_SED
66699
66700# Sed that helps us avoid accidentally triggering echo(1) options like -n.
66701Xsed="\$SED -e 1s/^X//"
66702
66703# A grep program that handles long lines.
66704GREP=$lt_GREP
66705
66706# An ERE matcher.
66707EGREP=$lt_EGREP
66708
66709# A literal string matcher.
66710FGREP=$lt_FGREP
66711
66712# A BSD- or MS-compatible name lister.
66713NM=$lt_NM
66714
66715# Whether we need soft or hard links.
66716LN_S=$lt_LN_S
66717
66718# What is the maximum length of a command?
66719max_cmd_len=$max_cmd_len
66720
66721# Object file suffix (normally "o").
66722objext=$ac_objext
66723
66724# Executable file suffix (normally "").
66725exeext=$exeext
66726
66727# whether the shell understands "unset".
66728lt_unset=$lt_unset
66729
66730# turn spaces into newlines.
66731SP2NL=$lt_lt_SP2NL
66732
66733# turn newlines into spaces.
66734NL2SP=$lt_lt_NL2SP
66735
66736# convert \$build file names to \$host format.
66737to_host_file_cmd=$lt_cv_to_host_file_cmd
66738
66739# convert \$build files to toolchain format.
66740to_tool_file_cmd=$lt_cv_to_tool_file_cmd
66741
66742# An object symbol dumper.
66743OBJDUMP=$lt_OBJDUMP
66744
66745# Method to check whether dependent libraries are shared objects.
66746deplibs_check_method=$lt_deplibs_check_method
66747
66748# Command to use when deplibs_check_method = "file_magic".
66749file_magic_cmd=$lt_file_magic_cmd
66750
66751# How to find potential files when deplibs_check_method = "file_magic".
66752file_magic_glob=$lt_file_magic_glob
66753
66754# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
66755want_nocaseglob=$lt_want_nocaseglob
66756
66757# DLL creation program.
66758DLLTOOL=$lt_DLLTOOL
66759
66760# Command to associate shared and link libraries.
66761sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
66762
66763# The archiver.
66764AR=$lt_AR
66765
66766# Flags to create an archive.
66767AR_FLAGS=$lt_AR_FLAGS
66768
66769# How to feed a file listing to the archiver.
66770archiver_list_spec=$lt_archiver_list_spec
66771
66772# A symbol stripping program.
66773STRIP=$lt_STRIP
66774
66775# Commands used to install an old-style archive.
66776RANLIB=$lt_RANLIB
66777old_postinstall_cmds=$lt_old_postinstall_cmds
66778old_postuninstall_cmds=$lt_old_postuninstall_cmds
66779
66780# Whether to use a lock for old archive extraction.
66781lock_old_archive_extraction=$lock_old_archive_extraction
66782
66783# A C compiler.
66784LTCC=$lt_CC
66785
66786# LTCC compiler flags.
66787LTCFLAGS=$lt_CFLAGS
66788
66789# Take the output of nm and produce a listing of raw symbols and C names.
66790global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
66791
66792# Transform the output of nm in a proper C declaration.
66793global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
66794
66795# Transform the output of nm into a list of symbols to manually relocate.
66796global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
66797
66798# Transform the output of nm in a C name address pair.
66799global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
66800
66801# Transform the output of nm in a C name address pair when lib prefix is needed.
66802global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
66803
66804# The name lister interface.
66805nm_interface=$lt_lt_cv_nm_interface
66806
66807# Specify filename containing input files for \$NM.
66808nm_file_list_spec=$lt_nm_file_list_spec
66809
66810# The root where to search for dependent libraries,and where our libraries should be installed.
66811lt_sysroot=$lt_sysroot
66812
66813# Command to truncate a binary pipe.
66814lt_truncate_bin=$lt_lt_cv_truncate_bin
66815
66816# The name of the directory that contains temporary libtool files.
66817objdir=$objdir
66818
66819# Used to examine libraries when file_magic_cmd begins with "file".
66820MAGIC_CMD=$MAGIC_CMD
66821
66822# Must we lock files when doing compilation?
66823need_locks=$lt_need_locks
66824
66825# Manifest tool.
66826MANIFEST_TOOL=$lt_MANIFEST_TOOL
66827
66828# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
66829DSYMUTIL=$lt_DSYMUTIL
66830
66831# Tool to change global to local symbols on Mac OS X.
66832NMEDIT=$lt_NMEDIT
66833
66834# Tool to manipulate fat objects and archives on Mac OS X.
66835LIPO=$lt_LIPO
66836
66837# ldd/readelf like tool for Mach-O binaries on Mac OS X.
66838OTOOL=$lt_OTOOL
66839
66840# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
66841OTOOL64=$lt_OTOOL64
66842
66843# Old archive suffix (normally "a").
66844libext=$libext
66845
66846# Shared library suffix (normally ".so").
66847shrext_cmds=$lt_shrext_cmds
66848
66849# The commands to extract the exported symbol list from a shared archive.
66850extract_expsyms_cmds=$lt_extract_expsyms_cmds
66851
66852# Variables whose values should be saved in libtool wrapper scripts and
66853# restored at link time.
66854variables_saved_for_relink=$lt_variables_saved_for_relink
66855
66856# Do we need the "lib" prefix for modules?
66857need_lib_prefix=$need_lib_prefix
66858
66859# Do we need a version for libraries?
66860need_version=$need_version
66861
66862# Library versioning type.
66863version_type=$version_type
66864
66865# Shared library runtime path variable.
66866runpath_var=$runpath_var
66867
66868# Shared library path variable.
66869shlibpath_var=$shlibpath_var
66870
66871# Is shlibpath searched before the hard-coded library search path?
66872shlibpath_overrides_runpath=$shlibpath_overrides_runpath
66873
66874# Format of library name prefix.
66875libname_spec=$lt_libname_spec
66876
66877# List of archive names.  First name is the real one, the rest are links.
66878# The last name is the one that the linker finds with -lNAME
66879library_names_spec=$lt_library_names_spec
66880
66881# The coded name of the library, if different from the real name.
66882soname_spec=$lt_soname_spec
66883
66884# Permission mode override for installation of shared libraries.
66885install_override_mode=$lt_install_override_mode
66886
66887# Command to use after installation of a shared archive.
66888postinstall_cmds=$lt_postinstall_cmds
66889
66890# Command to use after uninstallation of a shared archive.
66891postuninstall_cmds=$lt_postuninstall_cmds
66892
66893# Commands used to finish a libtool library installation in a directory.
66894finish_cmds=$lt_finish_cmds
66895
66896# As "finish_cmds", except a single script fragment to be evaled but
66897# not shown.
66898finish_eval=$lt_finish_eval
66899
66900# Whether we should hardcode library paths into libraries.
66901hardcode_into_libs=$hardcode_into_libs
66902
66903# Compile-time system search path for libraries.
66904sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
66905
66906# Detected run-time system search path for libraries.
66907sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
66908
66909# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
66910configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
66911
66912# Whether dlopen is supported.
66913dlopen_support=$enable_dlopen
66914
66915# Whether dlopen of programs is supported.
66916dlopen_self=$enable_dlopen_self
66917
66918# Whether dlopen of statically linked programs is supported.
66919dlopen_self_static=$enable_dlopen_self_static
66920
66921# Commands to strip libraries.
66922old_striplib=$lt_old_striplib
66923striplib=$lt_striplib
66924
66925
66926# The linker used to build libraries.
66927LD=$lt_LD
66928
66929# How to create reloadable object files.
66930reload_flag=$lt_reload_flag
66931reload_cmds=$lt_reload_cmds
66932
66933# Commands used to build an old-style archive.
66934old_archive_cmds=$lt_old_archive_cmds
66935
66936# A language specific compiler.
66937CC=$lt_compiler
66938
66939# Is the compiler the GNU compiler?
66940with_gcc=$GCC
66941
66942# Compiler flag to turn off builtin functions.
66943no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
66944
66945# Additional compiler flags for building library objects.
66946pic_flag=$lt_lt_prog_compiler_pic
66947
66948# How to pass a linker flag through the compiler.
66949wl=$lt_lt_prog_compiler_wl
66950
66951# Compiler flag to prevent dynamic linking.
66952link_static_flag=$lt_lt_prog_compiler_static
66953
66954# Does compiler simultaneously support -c and -o options?
66955compiler_c_o=$lt_lt_cv_prog_compiler_c_o
66956
66957# Whether or not to add -lc for building shared libraries.
66958build_libtool_need_lc=$archive_cmds_need_lc
66959
66960# Whether or not to disallow shared libs when runtime libs are static.
66961allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
66962
66963# Compiler flag to allow reflexive dlopens.
66964export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
66965
66966# Compiler flag to generate shared objects directly from archives.
66967whole_archive_flag_spec=$lt_whole_archive_flag_spec
66968
66969# Whether the compiler copes with passing no objects directly.
66970compiler_needs_object=$lt_compiler_needs_object
66971
66972# Create an old-style archive from a shared archive.
66973old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
66974
66975# Create a temporary old-style archive to link instead of a shared archive.
66976old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
66977
66978# Commands used to build a shared archive.
66979archive_cmds=$lt_archive_cmds
66980archive_expsym_cmds=$lt_archive_expsym_cmds
66981
66982# Commands used to build a loadable module if different from building
66983# a shared archive.
66984module_cmds=$lt_module_cmds
66985module_expsym_cmds=$lt_module_expsym_cmds
66986
66987# Whether we are building with GNU ld or not.
66988with_gnu_ld=$lt_with_gnu_ld
66989
66990# Flag that allows shared libraries with undefined symbols to be built.
66991allow_undefined_flag=$lt_allow_undefined_flag
66992
66993# Flag that enforces no undefined symbols.
66994no_undefined_flag=$lt_no_undefined_flag
66995
66996# Flag to hardcode \$libdir into a binary during linking.
66997# This must work even if \$libdir does not exist
66998hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
66999
67000# Whether we need a single "-rpath" flag with a separated argument.
67001hardcode_libdir_separator=$lt_hardcode_libdir_separator
67002
67003# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
67004# DIR into the resulting binary.
67005hardcode_direct=$hardcode_direct
67006
67007# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
67008# DIR into the resulting binary and the resulting library dependency is
67009# "absolute",i.e impossible to change by setting \$shlibpath_var if the
67010# library is relocated.
67011hardcode_direct_absolute=$hardcode_direct_absolute
67012
67013# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
67014# into the resulting binary.
67015hardcode_minus_L=$hardcode_minus_L
67016
67017# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
67018# into the resulting binary.
67019hardcode_shlibpath_var=$hardcode_shlibpath_var
67020
67021# Set to "yes" if building a shared library automatically hardcodes DIR
67022# into the library and all subsequent libraries and executables linked
67023# against it.
67024hardcode_automatic=$hardcode_automatic
67025
67026# Set to yes if linker adds runtime paths of dependent libraries
67027# to runtime path list.
67028inherit_rpath=$inherit_rpath
67029
67030# Whether libtool must link a program against all its dependency libraries.
67031link_all_deplibs=$link_all_deplibs
67032
67033# Set to "yes" if exported symbols are required.
67034always_export_symbols=$always_export_symbols
67035
67036# The commands to list exported symbols.
67037export_symbols_cmds=$lt_export_symbols_cmds
67038
67039# Symbols that should not be listed in the preloaded symbols.
67040exclude_expsyms=$lt_exclude_expsyms
67041
67042# Symbols that must always be exported.
67043include_expsyms=$lt_include_expsyms
67044
67045# Commands necessary for linking programs (against libraries) with templates.
67046prelink_cmds=$lt_prelink_cmds
67047
67048# Commands necessary for finishing linking programs.
67049postlink_cmds=$lt_postlink_cmds
67050
67051# Specify filename containing input files.
67052file_list_spec=$lt_file_list_spec
67053
67054# How to hardcode a shared library path into an executable.
67055hardcode_action=$hardcode_action
67056
67057# ### END LIBTOOL CONFIG
67058
67059_LT_EOF
67060
67061    cat <<'_LT_EOF' >> "$cfgfile"
67062
67063# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
67064
67065# func_munge_path_list VARIABLE PATH
67066# -----------------------------------
67067# VARIABLE is name of variable containing _space_ separated list of
67068# directories to be munged by the contents of PATH, which is string
67069# having a format:
67070# "DIR[:DIR]:"
67071#       string "DIR[ DIR]" will be prepended to VARIABLE
67072# ":DIR[:DIR]"
67073#       string "DIR[ DIR]" will be appended to VARIABLE
67074# "DIRP[:DIRP]::[DIRA:]DIRA"
67075#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
67076#       "DIRA[ DIRA]" will be appended to VARIABLE
67077# "DIR[:DIR]"
67078#       VARIABLE will be replaced by "DIR[ DIR]"
67079func_munge_path_list ()
67080{
67081    case x$2 in
67082    x)
67083        ;;
67084    *:)
67085        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
67086        ;;
67087    x:*)
67088        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
67089        ;;
67090    *::*)
67091        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
67092        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
67093        ;;
67094    *)
67095        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
67096        ;;
67097    esac
67098}
67099
67100
67101# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
67102func_cc_basename ()
67103{
67104    for cc_temp in $*""; do
67105      case $cc_temp in
67106        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
67107        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
67108        \-*) ;;
67109        *) break;;
67110      esac
67111    done
67112    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
67113}
67114
67115
67116# ### END FUNCTIONS SHARED WITH CONFIGURE
67117
67118_LT_EOF
67119
67120  case $host_os in
67121  aix3*)
67122    cat <<\_LT_EOF >> "$cfgfile"
67123# AIX sometimes has problems with the GCC collect2 program.  For some
67124# reason, if we set the COLLECT_NAMES environment variable, the problems
67125# vanish in a puff of smoke.
67126if test set != "${COLLECT_NAMES+set}"; then
67127  COLLECT_NAMES=
67128  export COLLECT_NAMES
67129fi
67130_LT_EOF
67131    ;;
67132  esac
67133
67134
67135
67136ltmain=$ac_aux_dir/ltmain.sh
67137
67138
67139  # We use sed instead of cat because bash on DJGPP gets confused if
67140  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
67141  # text mode, it properly converts lines to CR/LF.  This bash problem
67142  # is reportedly fixed, but why not run on old versions too?
67143  sed '$q' "$ltmain" >> "$cfgfile" \
67144     || (rm -f "$cfgfile"; exit 1)
67145
67146   mv -f "$cfgfile" "$ofile" ||
67147    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
67148  chmod +x "$ofile"
67149
67150 ;;
67151    "po-directories":C)
67152    for ac_file in $CONFIG_FILES; do
67153      # Support "outfile[:infile[:infile...]]"
67154      case "$ac_file" in
67155        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
67156      esac
67157      # PO directories have a Makefile.in generated from Makefile.in.in.
67158      case "$ac_file" in */Makefile.in)
67159        # Adjust a relative srcdir.
67160        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
67161        ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
67162        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
67163        # In autoconf-2.13 it is called $ac_given_srcdir.
67164        # In autoconf-2.50 it is called $srcdir.
67165        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
67166        case "$ac_given_srcdir" in
67167          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
67168          /*) top_srcdir="$ac_given_srcdir" ;;
67169          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
67170        esac
67171        # Treat a directory as a PO directory if and only if it has a
67172        # POTFILES.in file. This allows packages to have multiple PO
67173        # directories under different names or in different locations.
67174        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
67175          rm -f "$ac_dir/POTFILES"
67176          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
67177          gt_tab=`printf '\t'`
67178          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"
67179          POMAKEFILEDEPS="POTFILES.in"
67180          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
67181          # on $ac_dir but don't depend on user-specified configuration
67182          # parameters.
67183          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
67184            # The LINGUAS file contains the set of available languages.
67185            if test -n "$OBSOLETE_ALL_LINGUAS"; then
67186              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
67187            fi
67188            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
67189            # Hide the ALL_LINGUAS assignment from automake < 1.5.
67190            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
67191            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
67192          else
67193            # The set of available languages was given in configure.in.
67194            # Hide the ALL_LINGUAS assignment from automake < 1.5.
67195            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
67196          fi
67197          # Compute POFILES
67198          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
67199          # Compute UPDATEPOFILES
67200          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
67201          # Compute DUMMYPOFILES
67202          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
67203          # Compute GMOFILES
67204          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
67205          case "$ac_given_srcdir" in
67206            .) srcdirpre= ;;
67207            *) srcdirpre='$(srcdir)/' ;;
67208          esac
67209          POFILES=
67210          UPDATEPOFILES=
67211          DUMMYPOFILES=
67212          GMOFILES=
67213          for lang in $ALL_LINGUAS; do
67214            POFILES="$POFILES $srcdirpre$lang.po"
67215            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
67216            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
67217            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
67218          done
67219          # CATALOGS depends on both $ac_dir and the user's LINGUAS
67220          # environment variable.
67221          INST_LINGUAS=
67222          if test -n "$ALL_LINGUAS"; then
67223            for presentlang in $ALL_LINGUAS; do
67224              useit=no
67225              if test "%UNSET%" != "$LINGUAS"; then
67226                desiredlanguages="$LINGUAS"
67227              else
67228                desiredlanguages="$ALL_LINGUAS"
67229              fi
67230              for desiredlang in $desiredlanguages; do
67231                # Use the presentlang catalog if desiredlang is
67232                #   a. equal to presentlang, or
67233                #   b. a variant of presentlang (because in this case,
67234                #      presentlang can be used as a fallback for messages
67235                #      which are not translated in the desiredlang catalog).
67236                case "$desiredlang" in
67237                  "$presentlang"*) useit=yes;;
67238                esac
67239              done
67240              if test $useit = yes; then
67241                INST_LINGUAS="$INST_LINGUAS $presentlang"
67242              fi
67243            done
67244          fi
67245          CATALOGS=
67246          if test -n "$INST_LINGUAS"; then
67247            for lang in $INST_LINGUAS; do
67248              CATALOGS="$CATALOGS $lang.gmo"
67249            done
67250          fi
67251          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
67252          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"
67253          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
67254            if test -f "$f"; then
67255              case "$f" in
67256                *.orig | *.bak | *~) ;;
67257                *) cat "$f" >> "$ac_dir/Makefile" ;;
67258              esac
67259            fi
67260          done
67261        fi
67262        ;;
67263      esac
67264    done ;;
67265
67266  esac
67267done # for ac_tag
67268
67269
67270as_fn_exit 0
67271_ACEOF
67272ac_clean_files=$ac_clean_files_save
67273
67274test $ac_write_fail = 0 ||
67275  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67276
67277
67278# configure is writing to config.log, and then calls config.status.
67279# config.status does its own redirection, appending to config.log.
67280# Unfortunately, on DOS this fails, as config.log is still kept open
67281# by configure, so config.status won't be able to write to it; its
67282# output is simply discarded.  So we exec the FD to /dev/null,
67283# effectively closing config.log, so it can be properly (re)opened and
67284# appended to by config.status.  When coming back to configure, we
67285# need to make the FD available again.
67286if test "$no_create" != yes; then
67287  ac_cs_success=:
67288  ac_config_status_args=
67289  test "$silent" = yes &&
67290    ac_config_status_args="$ac_config_status_args --quiet"
67291  exec 5>/dev/null
67292  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67293  exec 5>>config.log
67294  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67295  # would make configure fail if this is the last instruction.
67296  $ac_cs_success || as_fn_exit 1
67297fi
67298if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67299  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67300printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67301fi
67302
67303
67304# patching libtool, generated when coming here
67305patch libtool contrib/libtool.patch
67306
67307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Summary of build options:
67308
67309  Version:            ${PACKAGE_VERSION}
67310  Host OS:            ${host_os}
67311  Install prefix:     ${prefix}
67312  Compiler:           ${CC}
67313  CFlags:             ${CFLAGS} ${CPPFLAGS} ${WARN_CFLAGS}
67314  LDFlags:            ${LDFLAGS}
67315  Libs:               ${LIBS}
67316  Library types:      shared=${enable_shared}, static=${enable_static}
67317  Small libraries:    $enable_manylibs
67318  SSL/TLS support:    $ssl_enabled
67319  GZIP compression:   $with_zlib
67320  BZIP2 compression:  $with_bzip2
67321  LZMA compression:   $with_lzma
67322  Brotli compression: $with_brotlidec
67323  Zstd compression:   $with_zstd
67324  Lzip compression:   $with_lzip
67325  IDNA support:       $IDNA_INFO
67326  PSL support:        $with_libpsl
67327  HSTS support:       $with_libhsts
67328  HTTP/2.0 support:   $with_libnghttp2
67329  Documentation:      $DOCS_INFO
67330  Wget2 docs:         $WGET2_DOCS_INFO
67331  Libwget docs:       $LIBWGET_DOCS_INFO
67332  PCRE support:       ${HAVE_PCRE}
67333  Tests:              ${TESTS_INFO}
67334  Assertions:         $ENABLE_ASSERT
67335  POSIX xattr:        $ENABLE_XATTR
67336  Microhttpd support: $with_libmicrohttpd (CFLAGS: ${TEST_CFLAGS}. LIBS: ${TEST_LIBS})
67337  Fuzzing build:      $enable_fuzzing, $LIB_FUZZING_ENGINE
67338  GPGME:              $with_gpgme
67339" >&5
67340printf "%s\n" "$as_me: Summary of build options:
67341
67342  Version:            ${PACKAGE_VERSION}
67343  Host OS:            ${host_os}
67344  Install prefix:     ${prefix}
67345  Compiler:           ${CC}
67346  CFlags:             ${CFLAGS} ${CPPFLAGS} ${WARN_CFLAGS}
67347  LDFlags:            ${LDFLAGS}
67348  Libs:               ${LIBS}
67349  Library types:      shared=${enable_shared}, static=${enable_static}
67350  Small libraries:    $enable_manylibs
67351  SSL/TLS support:    $ssl_enabled
67352  GZIP compression:   $with_zlib
67353  BZIP2 compression:  $with_bzip2
67354  LZMA compression:   $with_lzma
67355  Brotli compression: $with_brotlidec
67356  Zstd compression:   $with_zstd
67357  Lzip compression:   $with_lzip
67358  IDNA support:       $IDNA_INFO
67359  PSL support:        $with_libpsl
67360  HSTS support:       $with_libhsts
67361  HTTP/2.0 support:   $with_libnghttp2
67362  Documentation:      $DOCS_INFO
67363  Wget2 docs:         $WGET2_DOCS_INFO
67364  Libwget docs:       $LIBWGET_DOCS_INFO
67365  PCRE support:       ${HAVE_PCRE}
67366  Tests:              ${TESTS_INFO}
67367  Assertions:         $ENABLE_ASSERT
67368  POSIX xattr:        $ENABLE_XATTR
67369  Microhttpd support: $with_libmicrohttpd (CFLAGS: ${TEST_CFLAGS}. LIBS: ${TEST_LIBS})
67370  Fuzzing build:      $enable_fuzzing, $LIB_FUZZING_ENGINE
67371  GPGME:              $with_gpgme
67372" >&6;}
67373
67374