1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for GNU cpio 2.13.
4#
5# Report bugs to <bug-cpio@gnu.org>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-cpio@gnu.org
270$0: about your system, including any error possibly output
271$0: before this message. Then install a modern shell, or
272$0: manually run the script under such a shell if you do
273$0: have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='GNU cpio'
582PACKAGE_TARNAME='cpio'
583PACKAGE_VERSION='2.13'
584PACKAGE_STRING='GNU cpio 2.13'
585PACKAGE_BUGREPORT='bug-cpio@gnu.org'
586PACKAGE_URL='http://www.gnu.org/software/cpio'
587
588ac_unique_file="src/cpio.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
592#ifdef HAVE_SYS_TYPES_H
593# include <sys/types.h>
594#endif
595#ifdef HAVE_SYS_STAT_H
596# include <sys/stat.h>
597#endif
598#ifdef STDC_HEADERS
599# include <stdlib.h>
600# include <stddef.h>
601#else
602# ifdef HAVE_STDLIB_H
603#  include <stdlib.h>
604# endif
605#endif
606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
608#  include <memory.h>
609# endif
610# include <string.h>
611#endif
612#ifdef HAVE_STRINGS_H
613# include <strings.h>
614#endif
615#ifdef HAVE_INTTYPES_H
616# include <inttypes.h>
617#endif
618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
622# include <unistd.h>
623#endif"
624
625ac_header_list=
626ac_func_list=
627gl_fnmatch_required=POSIX
628gl_getopt_required=POSIX
629gl_getopt_required=POSIX
630gt_needs=
631ac_subst_vars='gltests_LTLIBOBJS
632gltests_LIBOBJS
633gl_LTLIBOBJS
634gl_LIBOBJS
635am__EXEEXT_FALSE
636am__EXEEXT_TRUE
637LTLIBOBJS
638LIBOBJS
639AUTOM4TE
640POSUB
641INTLLIBS
642INTL_MACOSX_LIBS
643XGETTEXT_EXTRA_OPTIONS
644MSGMERGE
645XGETTEXT_015
646XGETTEXT
647GMSGFMT_015
648MSGFMT_015
649GMSGFMT
650MSGFMT
651GETTEXT_MACRO_VERSION
652USE_NLS
653SED
654LTLIBICONV
655LIBICONV
656CPIO_MT_COND_FALSE
657CPIO_MT_COND_TRUE
658DEFAULT_QUOTING_STYLE
659PU_RMT_COND_FALSE
660PU_RMT_COND_TRUE
661DEFAULT_RMT_COMMAND
662DEFAULT_RMT_DIR
663PU_RMT_PROG
664LIB_SETSOCKOPT
665LIBGNU_LTLIBDEPS
666LIBGNU_LIBDEPS
667gltests_WITNESS
668REPLACE_TOWLOWER
669REPLACE_ISWCNTRL
670HAVE_WCTYPE_H
671NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
672NEXT_WCTYPE_H
673HAVE_ISWCNTRL
674REPLACE_ISWBLANK
675HAVE_WCTRANS_T
676HAVE_WCTYPE_T
677HAVE_ISWBLANK
678GNULIB_TOWCTRANS
679GNULIB_WCTRANS
680GNULIB_ISWCTYPE
681GNULIB_WCTYPE
682GNULIB_ISWBLANK
683HAVE_WINT_T
684NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
685NEXT_WCHAR_H
686HAVE_FEATURES_H
687HAVE_UNISTD_H
688NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
689NEXT_UNISTD_H
690UNISTD_H_DEFINES_STRUCT_TIMESPEC
691PTHREAD_H_DEFINES_STRUCT_TIMESPEC
692SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
693TIME_H_DEFINES_STRUCT_TIMESPEC
694NEXT_AS_FIRST_DIRECTIVE_TIME_H
695NEXT_TIME_H
696GL_GENERATE_SYSEXITS_H_FALSE
697GL_GENERATE_SYSEXITS_H_TRUE
698SYSEXITS_H
699HAVE_SYSEXITS_H
700NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H
701NEXT_SYSEXITS_H
702HAVE_STRINGS_H
703NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
704NEXT_STRINGS_H
705NEXT_AS_FIRST_DIRECTIVE_STRING_H
706NEXT_STRING_H
707HAVE_DECL_STRNCASECMP
708HAVE_STRCASECMP
709HAVE_FFS
710GNULIB_FFS
711NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
712NEXT_STDLIB_H
713NEXT_AS_FIRST_DIRECTIVE_STDIO_H
714NEXT_STDIO_H
715NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
716NEXT_STDDEF_H
717GL_GENERATE_STDDEF_H_FALSE
718GL_GENERATE_STDDEF_H_TRUE
719STDDEF_H
720HAVE_WCHAR_T
721HAVE_MAX_ALIGN_T
722REPLACE_NULL
723GL_GENERATE_STDARG_H_FALSE
724GL_GENERATE_STDARG_H_TRUE
725STDARG_H
726NEXT_AS_FIRST_DIRECTIVE_STDARG_H
727NEXT_STDARG_H
728GL_GENERATE_STDALIGN_H_FALSE
729GL_GENERATE_STDALIGN_H_TRUE
730STDALIGN_H
731NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
732NEXT_SIGNAL_H
733REPLACE_RAISE
734REPLACE_PTHREAD_SIGMASK
735HAVE_SIGHANDLER_T
736HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
737HAVE_STRUCT_SIGACTION_SA_SIGACTION
738HAVE_SIGACTION
739HAVE_SIGINFO_T
740HAVE_SIGSET_T
741HAVE_RAISE
742HAVE_PTHREAD_SIGMASK
743HAVE_POSIX_SIGNALBLOCKING
744GNULIB_SIGACTION
745GNULIB_SIGPROCMASK
746GNULIB_SIGNAL_H_SIGPIPE
747GNULIB_RAISE
748GNULIB_PTHREAD_SIGMASK
749HAVE__BOOL
750GL_GENERATE_STDBOOL_H_FALSE
751GL_GENERATE_STDBOOL_H_TRUE
752STDBOOL_H
753REPLACE_LOCALTIME
754REPLACE_GMTIME
755REPLACE_TIMEGM
756REPLACE_NANOSLEEP
757REPLACE_MKTIME
758REPLACE_LOCALTIME_R
759HAVE_TIMEGM
760HAVE_STRPTIME
761HAVE_NANOSLEEP
762HAVE_DECL_LOCALTIME_R
763GNULIB_TIME_RZ
764GNULIB_TIME_R
765GNULIB_TIMEGM
766GNULIB_STRPTIME
767GNULIB_NANOSLEEP
768GNULIB_MKTIME
769UNDEFINE_STRTOK_R
770REPLACE_STRTOK_R
771REPLACE_STRSIGNAL
772REPLACE_STRNLEN
773REPLACE_STRNDUP
774REPLACE_STRNCAT
775REPLACE_STRERROR_R
776REPLACE_STRERROR
777REPLACE_STRCHRNUL
778REPLACE_STRCASESTR
779REPLACE_STRSTR
780REPLACE_STRDUP
781REPLACE_STPNCPY
782REPLACE_MEMMEM
783REPLACE_MEMCHR
784HAVE_STRVERSCMP
785HAVE_DECL_STRSIGNAL
786HAVE_DECL_STRERROR_R
787HAVE_DECL_STRTOK_R
788HAVE_STRCASESTR
789HAVE_STRSEP
790HAVE_STRPBRK
791HAVE_DECL_STRNLEN
792HAVE_DECL_STRNDUP
793HAVE_DECL_STRDUP
794HAVE_STRCHRNUL
795HAVE_STPNCPY
796HAVE_STPCPY
797HAVE_RAWMEMCHR
798HAVE_DECL_MEMRCHR
799HAVE_MEMPCPY
800HAVE_DECL_MEMMEM
801HAVE_MEMCHR
802HAVE_FFSLL
803HAVE_FFSL
804HAVE_MBSLEN
805GNULIB_STRVERSCMP
806GNULIB_STRSIGNAL
807GNULIB_STRERROR_R
808GNULIB_STRERROR
809GNULIB_MBSTOK_R
810GNULIB_MBSSEP
811GNULIB_MBSSPN
812GNULIB_MBSPBRK
813GNULIB_MBSCSPN
814GNULIB_MBSCASESTR
815GNULIB_MBSPCASECMP
816GNULIB_MBSNCASECMP
817GNULIB_MBSCASECMP
818GNULIB_MBSSTR
819GNULIB_MBSRCHR
820GNULIB_MBSCHR
821GNULIB_MBSNLEN
822GNULIB_MBSLEN
823GNULIB_STRTOK_R
824GNULIB_STRCASESTR
825GNULIB_STRSTR
826GNULIB_STRSEP
827GNULIB_STRPBRK
828GNULIB_STRNLEN
829GNULIB_STRNDUP
830GNULIB_STRNCAT
831GNULIB_STRDUP
832GNULIB_STRCHRNUL
833GNULIB_STPNCPY
834GNULIB_STPCPY
835GNULIB_RAWMEMCHR
836GNULIB_MEMRCHR
837GNULIB_MEMPCPY
838GNULIB_MEMMEM
839GNULIB_MEMCHR
840GNULIB_FFSLL
841GNULIB_FFSL
842LOCALE_FR
843LOCALE_FR_UTF8
844LOCALE_ZH_CN
845LOCALE_JA
846REPLACE_WCSWIDTH
847REPLACE_WCWIDTH
848REPLACE_WCSNRTOMBS
849REPLACE_WCSRTOMBS
850REPLACE_WCRTOMB
851REPLACE_MBSNRTOWCS
852REPLACE_MBSRTOWCS
853REPLACE_MBRLEN
854REPLACE_MBRTOWC
855REPLACE_MBSINIT
856REPLACE_WCTOB
857REPLACE_BTOWC
858REPLACE_MBSTATE_T
859HAVE_DECL_WCWIDTH
860HAVE_DECL_WCTOB
861HAVE_WCSWIDTH
862HAVE_WCSTOK
863HAVE_WCSSTR
864HAVE_WCSPBRK
865HAVE_WCSSPN
866HAVE_WCSCSPN
867HAVE_WCSRCHR
868HAVE_WCSCHR
869HAVE_WCSDUP
870HAVE_WCSXFRM
871HAVE_WCSCOLL
872HAVE_WCSNCASECMP
873HAVE_WCSCASECMP
874HAVE_WCSNCMP
875HAVE_WCSCMP
876HAVE_WCSNCAT
877HAVE_WCSCAT
878HAVE_WCPNCPY
879HAVE_WCSNCPY
880HAVE_WCPCPY
881HAVE_WCSCPY
882HAVE_WCSNLEN
883HAVE_WCSLEN
884HAVE_WMEMSET
885HAVE_WMEMMOVE
886HAVE_WMEMCPY
887HAVE_WMEMCMP
888HAVE_WMEMCHR
889HAVE_WCSNRTOMBS
890HAVE_WCSRTOMBS
891HAVE_WCRTOMB
892HAVE_MBSNRTOWCS
893HAVE_MBSRTOWCS
894HAVE_MBRLEN
895HAVE_MBRTOWC
896HAVE_MBSINIT
897HAVE_BTOWC
898GNULIB_WCSWIDTH
899GNULIB_WCSTOK
900GNULIB_WCSSTR
901GNULIB_WCSPBRK
902GNULIB_WCSSPN
903GNULIB_WCSCSPN
904GNULIB_WCSRCHR
905GNULIB_WCSCHR
906GNULIB_WCSDUP
907GNULIB_WCSXFRM
908GNULIB_WCSCOLL
909GNULIB_WCSNCASECMP
910GNULIB_WCSCASECMP
911GNULIB_WCSNCMP
912GNULIB_WCSCMP
913GNULIB_WCSNCAT
914GNULIB_WCSCAT
915GNULIB_WCPNCPY
916GNULIB_WCSNCPY
917GNULIB_WCPCPY
918GNULIB_WCSCPY
919GNULIB_WCSNLEN
920GNULIB_WCSLEN
921GNULIB_WMEMSET
922GNULIB_WMEMMOVE
923GNULIB_WMEMCPY
924GNULIB_WMEMCMP
925GNULIB_WMEMCHR
926GNULIB_WCWIDTH
927GNULIB_WCSNRTOMBS
928GNULIB_WCSRTOMBS
929GNULIB_WCRTOMB
930GNULIB_MBSNRTOWCS
931GNULIB_MBSRTOWCS
932GNULIB_MBRLEN
933GNULIB_MBRTOWC
934GNULIB_MBSINIT
935GNULIB_WCTOB
936GNULIB_BTOWC
937REPLACE_WCTOMB
938REPLACE_UNSETENV
939REPLACE_STRTOD
940REPLACE_SETENV
941REPLACE_REALPATH
942REPLACE_REALLOC
943REPLACE_RANDOM_R
944REPLACE_QSORT_R
945REPLACE_PUTENV
946REPLACE_PTSNAME_R
947REPLACE_PTSNAME
948REPLACE_MKSTEMP
949REPLACE_MBTOWC
950REPLACE_MALLOC
951REPLACE_CANONICALIZE_FILE_NAME
952REPLACE_CALLOC
953HAVE_DECL_UNSETENV
954HAVE_UNLOCKPT
955HAVE_SYS_LOADAVG_H
956HAVE_STRUCT_RANDOM_DATA
957HAVE_STRTOULL
958HAVE_STRTOLL
959HAVE_STRTOD
960HAVE_DECL_SETENV
961HAVE_SETENV
962HAVE_SECURE_GETENV
963HAVE_RPMATCH
964HAVE_REALPATH
965HAVE_RANDOM_R
966HAVE_RANDOM_H
967HAVE_RANDOM
968HAVE_QSORT_R
969HAVE_PTSNAME_R
970HAVE_PTSNAME
971HAVE_POSIX_OPENPT
972HAVE_MKSTEMPS
973HAVE_MKSTEMP
974HAVE_MKOSTEMPS
975HAVE_MKOSTEMP
976HAVE_MKDTEMP
977HAVE_GRANTPT
978HAVE_GETSUBOPT
979HAVE_DECL_GETLOADAVG
980HAVE_CANONICALIZE_FILE_NAME
981HAVE_ATOLL
982HAVE__EXIT
983GNULIB_WCTOMB
984GNULIB_UNSETENV
985GNULIB_UNLOCKPT
986GNULIB_SYSTEM_POSIX
987GNULIB_STRTOULL
988GNULIB_STRTOLL
989GNULIB_STRTOD
990GNULIB_SETENV
991GNULIB_SECURE_GETENV
992GNULIB_RPMATCH
993GNULIB_REALPATH
994GNULIB_REALLOC_POSIX
995GNULIB_RANDOM_R
996GNULIB_RANDOM
997GNULIB_QSORT_R
998GNULIB_PUTENV
999GNULIB_PTSNAME_R
1000GNULIB_PTSNAME
1001GNULIB_POSIX_OPENPT
1002GNULIB_MKSTEMPS
1003GNULIB_MKSTEMP
1004GNULIB_MKOSTEMPS
1005GNULIB_MKOSTEMP
1006GNULIB_MKDTEMP
1007GNULIB_MBTOWC
1008GNULIB_MALLOC_POSIX
1009GNULIB_GRANTPT
1010GNULIB_GETSUBOPT
1011GNULIB_GETLOADAVG
1012GNULIB_CANONICALIZE_FILE_NAME
1013GNULIB_CALLOC_POSIX
1014GNULIB_ATOLL
1015GNULIB__EXIT
1016LOCALCHARSET_TESTS_ENVIRONMENT
1017GLIBC21
1018NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1019NEXT_INTTYPES_H
1020UINT64_MAX_EQ_ULONG_MAX
1021UINT32_MAX_LT_UINTMAX_MAX
1022PRIPTR_PREFIX
1023PRI_MACROS_BROKEN
1024INT64_MAX_EQ_LONG_MAX
1025INT32_MAX_LT_INTMAX_MAX
1026REPLACE_STRTOUMAX
1027REPLACE_STRTOIMAX
1028HAVE_DECL_STRTOUMAX
1029HAVE_DECL_STRTOIMAX
1030HAVE_DECL_IMAXDIV
1031HAVE_DECL_IMAXABS
1032GNULIB_STRTOUMAX
1033GNULIB_STRTOIMAX
1034GNULIB_IMAXDIV
1035GNULIB_IMAXABS
1036GL_GENERATE_STDINT_H_FALSE
1037GL_GENERATE_STDINT_H_TRUE
1038STDINT_H
1039HAVE_SYS_INTTYPES_H
1040HAVE_SYS_BITYPES_H
1041HAVE_C99_STDINT_H
1042WINT_T_SUFFIX
1043WCHAR_T_SUFFIX
1044SIG_ATOMIC_T_SUFFIX
1045SIZE_T_SUFFIX
1046PTRDIFF_T_SUFFIX
1047HAVE_SIGNED_WINT_T
1048HAVE_SIGNED_WCHAR_T
1049HAVE_SIGNED_SIG_ATOMIC_T
1050BITSIZEOF_WINT_T
1051BITSIZEOF_WCHAR_T
1052BITSIZEOF_SIG_ATOMIC_T
1053BITSIZEOF_SIZE_T
1054BITSIZEOF_PTRDIFF_T
1055APPLE_UNIVERSAL_BUILD
1056HAVE_STDINT_H
1057NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1058NEXT_STDINT_H
1059HAVE_SYS_TYPES_H
1060HAVE_INTTYPES_H
1061HAVE_WCHAR_H
1062HAVE_UNSIGNED_LONG_LONG_INT
1063HAVE_LONG_LONG_INT
1064GNULIB_OVERRIDES_WINT_T
1065GL_GENERATE_LIMITS_H_FALSE
1066GL_GENERATE_LIMITS_H_TRUE
1067LIMITS_H
1068NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1069NEXT_LIMITS_H
1070NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1071NEXT_SYS_TIME_H
1072REPLACE_STRUCT_TIMEVAL
1073REPLACE_GETTIMEOFDAY
1074HAVE_TIMEZONE_T
1075HAVE_SYS_TIME_H
1076HAVE_STRUCT_TIMEVAL
1077HAVE_GETTIMEOFDAY
1078GNULIB_GETTIMEOFDAY
1079LTLIBINTL
1080LIBINTL
1081GNULIB_GL_UNISTD_H_GETOPT
1082GETOPT_H
1083HAVE_GETOPT_H
1084NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1085NEXT_GETOPT_H
1086WINDOWS_64_BIT_ST_SIZE
1087NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1088NEXT_SYS_STAT_H
1089REPLACE_UTIMENSAT
1090REPLACE_STAT
1091REPLACE_MKNOD
1092REPLACE_MKFIFO
1093REPLACE_MKDIR
1094REPLACE_LSTAT
1095REPLACE_FUTIMENS
1096REPLACE_FSTATAT
1097REPLACE_FSTAT
1098HAVE_UTIMENSAT
1099HAVE_MKNODAT
1100HAVE_MKNOD
1101HAVE_MKFIFOAT
1102HAVE_MKFIFO
1103HAVE_MKDIRAT
1104HAVE_LSTAT
1105HAVE_LCHMOD
1106HAVE_FUTIMENS
1107HAVE_FSTATAT
1108HAVE_FCHMODAT
1109GNULIB_UTIMENSAT
1110GNULIB_STAT
1111GNULIB_MKNODAT
1112GNULIB_MKNOD
1113GNULIB_MKFIFOAT
1114GNULIB_MKFIFO
1115GNULIB_MKDIRAT
1116GNULIB_LSTAT
1117GNULIB_LCHMOD
1118GNULIB_FUTIMENS
1119GNULIB_FSTATAT
1120GNULIB_FSTAT
1121GNULIB_FCHMODAT
1122WINDOWS_64_BIT_OFF_T
1123NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
1124NEXT_SYS_TYPES_H
1125REPLACE_VSPRINTF
1126REPLACE_VSNPRINTF
1127REPLACE_VPRINTF
1128REPLACE_VFPRINTF
1129REPLACE_VDPRINTF
1130REPLACE_VASPRINTF
1131REPLACE_TMPFILE
1132REPLACE_STDIO_WRITE_FUNCS
1133REPLACE_STDIO_READ_FUNCS
1134REPLACE_SPRINTF
1135REPLACE_SNPRINTF
1136REPLACE_RENAMEAT
1137REPLACE_RENAME
1138REPLACE_REMOVE
1139REPLACE_PRINTF
1140REPLACE_POPEN
1141REPLACE_PERROR
1142REPLACE_OBSTACK_PRINTF
1143REPLACE_GETLINE
1144REPLACE_GETDELIM
1145REPLACE_FTELLO
1146REPLACE_FTELL
1147REPLACE_FSEEKO
1148REPLACE_FSEEK
1149REPLACE_FREOPEN
1150REPLACE_FPURGE
1151REPLACE_FPRINTF
1152REPLACE_FOPEN
1153REPLACE_FFLUSH
1154REPLACE_FDOPEN
1155REPLACE_FCLOSE
1156REPLACE_DPRINTF
1157HAVE_VDPRINTF
1158HAVE_VASPRINTF
1159HAVE_RENAMEAT
1160HAVE_POPEN
1161HAVE_PCLOSE
1162HAVE_FTELLO
1163HAVE_FSEEKO
1164HAVE_DPRINTF
1165HAVE_DECL_VSNPRINTF
1166HAVE_DECL_SNPRINTF
1167HAVE_DECL_OBSTACK_PRINTF
1168HAVE_DECL_GETLINE
1169HAVE_DECL_GETDELIM
1170HAVE_DECL_FTELLO
1171HAVE_DECL_FSEEKO
1172HAVE_DECL_FPURGE
1173GNULIB_VSPRINTF_POSIX
1174GNULIB_VSNPRINTF
1175GNULIB_VPRINTF_POSIX
1176GNULIB_VPRINTF
1177GNULIB_VFPRINTF_POSIX
1178GNULIB_VFPRINTF
1179GNULIB_VDPRINTF
1180GNULIB_VSCANF
1181GNULIB_VFSCANF
1182GNULIB_VASPRINTF
1183GNULIB_TMPFILE
1184GNULIB_STDIO_H_SIGPIPE
1185GNULIB_STDIO_H_NONBLOCKING
1186GNULIB_SPRINTF_POSIX
1187GNULIB_SNPRINTF
1188GNULIB_SCANF
1189GNULIB_RENAMEAT
1190GNULIB_RENAME
1191GNULIB_REMOVE
1192GNULIB_PUTS
1193GNULIB_PUTCHAR
1194GNULIB_PUTC
1195GNULIB_PRINTF_POSIX
1196GNULIB_PRINTF
1197GNULIB_POPEN
1198GNULIB_PERROR
1199GNULIB_PCLOSE
1200GNULIB_OBSTACK_PRINTF_POSIX
1201GNULIB_OBSTACK_PRINTF
1202GNULIB_GETLINE
1203GNULIB_GETDELIM
1204GNULIB_GETCHAR
1205GNULIB_GETC
1206GNULIB_FWRITE
1207GNULIB_FTELLO
1208GNULIB_FTELL
1209GNULIB_FSEEKO
1210GNULIB_FSEEK
1211GNULIB_FSCANF
1212GNULIB_FREOPEN
1213GNULIB_FREAD
1214GNULIB_FPUTS
1215GNULIB_FPUTC
1216GNULIB_FPURGE
1217GNULIB_FPRINTF_POSIX
1218GNULIB_FPRINTF
1219GNULIB_FOPEN
1220GNULIB_FGETS
1221GNULIB_FGETC
1222GNULIB_FFLUSH
1223GNULIB_FDOPEN
1224GNULIB_FCLOSE
1225GNULIB_DPRINTF
1226GL_GENERATE_FNMATCH_H_FALSE
1227GL_GENERATE_FNMATCH_H_TRUE
1228FNMATCH_H
1229REPLACE_ITOLD
1230GL_GENERATE_FLOAT_H_FALSE
1231GL_GENERATE_FLOAT_H_TRUE
1232FLOAT_H
1233NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1234NEXT_FLOAT_H
1235NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1236NEXT_FCNTL_H
1237REPLACE_OPENAT
1238REPLACE_OPEN
1239REPLACE_FCNTL
1240HAVE_OPENAT
1241HAVE_FCNTL
1242GNULIB_OPENAT
1243GNULIB_OPEN
1244GNULIB_NONBLOCKING
1245GNULIB_FCNTL
1246EOVERFLOW_VALUE
1247EOVERFLOW_HIDDEN
1248ENOLINK_VALUE
1249ENOLINK_HIDDEN
1250EMULTIHOP_VALUE
1251EMULTIHOP_HIDDEN
1252GL_GENERATE_ERRNO_H_FALSE
1253GL_GENERATE_ERRNO_H_TRUE
1254ERRNO_H
1255NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1256NEXT_ERRNO_H
1257HAVE_DIRENT_H
1258NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1259NEXT_DIRENT_H
1260PRAGMA_COLUMNS
1261PRAGMA_SYSTEM_HEADER
1262INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1263INCLUDE_NEXT
1264pkglibexecdir
1265runstatedir
1266lispdir
1267REPLACE_FDOPENDIR
1268REPLACE_DIRFD
1269REPLACE_CLOSEDIR
1270REPLACE_OPENDIR
1271HAVE_ALPHASORT
1272HAVE_SCANDIR
1273HAVE_FDOPENDIR
1274HAVE_DECL_FDOPENDIR
1275HAVE_DECL_DIRFD
1276HAVE_CLOSEDIR
1277HAVE_REWINDDIR
1278HAVE_READDIR
1279HAVE_OPENDIR
1280GNULIB_ALPHASORT
1281GNULIB_SCANDIR
1282GNULIB_FDOPENDIR
1283GNULIB_DIRFD
1284GNULIB_CLOSEDIR
1285GNULIB_REWINDDIR
1286GNULIB_READDIR
1287GNULIB_OPENDIR
1288HAVE_WINSOCK2_H
1289HAVE_MSVC_INVALID_PARAMETER_HANDLER
1290LIB_CLOCK_GETTIME
1291host_os
1292host_vendor
1293host_cpu
1294host
1295build_os
1296build_vendor
1297build_cpu
1298build
1299UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1300UNISTD_H_HAVE_WINSOCK2_H
1301REPLACE_WRITE
1302REPLACE_USLEEP
1303REPLACE_UNLINKAT
1304REPLACE_UNLINK
1305REPLACE_TTYNAME_R
1306REPLACE_SYMLINKAT
1307REPLACE_SYMLINK
1308REPLACE_SLEEP
1309REPLACE_RMDIR
1310REPLACE_READLINKAT
1311REPLACE_READLINK
1312REPLACE_READ
1313REPLACE_PWRITE
1314REPLACE_PREAD
1315REPLACE_LSEEK
1316REPLACE_LINKAT
1317REPLACE_LINK
1318REPLACE_LCHOWN
1319REPLACE_ISATTY
1320REPLACE_GETPAGESIZE
1321REPLACE_GETGROUPS
1322REPLACE_GETLOGIN_R
1323REPLACE_GETDTABLESIZE
1324REPLACE_GETDOMAINNAME
1325REPLACE_GETCWD
1326REPLACE_FTRUNCATE
1327REPLACE_FCHOWNAT
1328REPLACE_DUP2
1329REPLACE_DUP
1330REPLACE_CLOSE
1331REPLACE_CHOWN
1332HAVE_SYS_PARAM_H
1333HAVE_OS_H
1334HAVE_DECL_TTYNAME_R
1335HAVE_DECL_SETHOSTNAME
1336HAVE_DECL_GETUSERSHELL
1337HAVE_DECL_GETPAGESIZE
1338HAVE_DECL_GETLOGIN_R
1339HAVE_DECL_GETLOGIN
1340HAVE_DECL_GETDOMAINNAME
1341HAVE_DECL_FDATASYNC
1342HAVE_DECL_FCHDIR
1343HAVE_DECL_ENVIRON
1344HAVE_USLEEP
1345HAVE_UNLINKAT
1346HAVE_SYMLINKAT
1347HAVE_SYMLINK
1348HAVE_SLEEP
1349HAVE_SETHOSTNAME
1350HAVE_READLINKAT
1351HAVE_READLINK
1352HAVE_PWRITE
1353HAVE_PREAD
1354HAVE_PIPE2
1355HAVE_PIPE
1356HAVE_LINKAT
1357HAVE_LINK
1358HAVE_LCHOWN
1359HAVE_GROUP_MEMBER
1360HAVE_GETPAGESIZE
1361HAVE_GETLOGIN
1362HAVE_GETHOSTNAME
1363HAVE_GETGROUPS
1364HAVE_GETDTABLESIZE
1365HAVE_FTRUNCATE
1366HAVE_FSYNC
1367HAVE_FDATASYNC
1368HAVE_FCHOWNAT
1369HAVE_FCHDIR
1370HAVE_FACCESSAT
1371HAVE_EUIDACCESS
1372HAVE_DUP3
1373HAVE_DUP2
1374HAVE_CHOWN
1375GNULIB_WRITE
1376GNULIB_USLEEP
1377GNULIB_UNLINKAT
1378GNULIB_UNLINK
1379GNULIB_UNISTD_H_SIGPIPE
1380GNULIB_UNISTD_H_NONBLOCKING
1381GNULIB_TTYNAME_R
1382GNULIB_SYMLINKAT
1383GNULIB_SYMLINK
1384GNULIB_SLEEP
1385GNULIB_SETHOSTNAME
1386GNULIB_RMDIR
1387GNULIB_READLINKAT
1388GNULIB_READLINK
1389GNULIB_READ
1390GNULIB_PWRITE
1391GNULIB_PREAD
1392GNULIB_PIPE2
1393GNULIB_PIPE
1394GNULIB_LSEEK
1395GNULIB_LINKAT
1396GNULIB_LINK
1397GNULIB_LCHOWN
1398GNULIB_ISATTY
1399GNULIB_GROUP_MEMBER
1400GNULIB_GETUSERSHELL
1401GNULIB_GETPAGESIZE
1402GNULIB_GETLOGIN_R
1403GNULIB_GETLOGIN
1404GNULIB_GETHOSTNAME
1405GNULIB_GETGROUPS
1406GNULIB_GETDTABLESIZE
1407GNULIB_GETDOMAINNAME
1408GNULIB_GETCWD
1409GNULIB_FTRUNCATE
1410GNULIB_FSYNC
1411GNULIB_FDATASYNC
1412GNULIB_FCHOWNAT
1413GNULIB_FCHDIR
1414GNULIB_FACCESSAT
1415GNULIB_EUIDACCESS
1416GNULIB_ENVIRON
1417GNULIB_DUP3
1418GNULIB_DUP2
1419GNULIB_DUP
1420GNULIB_CLOSE
1421GNULIB_CHOWN
1422GNULIB_CHDIR
1423GL_GENERATE_ALLOCA_H_FALSE
1424GL_GENERATE_ALLOCA_H_TRUE
1425ALLOCA_H
1426ALLOCA
1427GL_COND_LIBTOOL_FALSE
1428GL_COND_LIBTOOL_TRUE
1429ARFLAGS
1430ac_ct_AR
1431AR
1432YFLAGS
1433YACC
1434RANLIB
1435EGREP
1436GREP
1437CPP
1438am__fastdepCC_FALSE
1439am__fastdepCC_TRUE
1440CCDEPMODE
1441am__nodep
1442AMDEPBACKSLASH
1443AMDEP_FALSE
1444AMDEP_TRUE
1445am__quote
1446am__include
1447DEPDIR
1448OBJEXT
1449EXEEXT
1450ac_ct_CC
1451CPPFLAGS
1452LDFLAGS
1453CFLAGS
1454CC
1455AM_BACKSLASH
1456AM_DEFAULT_VERBOSITY
1457AM_DEFAULT_V
1458AM_V
1459am__untar
1460am__tar
1461AMTAR
1462am__leading_dot
1463SET_MAKE
1464AWK
1465mkdir_p
1466MKDIR_P
1467INSTALL_STRIP_PROGRAM
1468STRIP
1469install_sh
1470MAKEINFO
1471AUTOHEADER
1472AUTOMAKE
1473AUTOCONF
1474ACLOCAL
1475VERSION
1476PACKAGE
1477CYGPATH_W
1478am__isrc
1479INSTALL_DATA
1480INSTALL_SCRIPT
1481INSTALL_PROGRAM
1482target_alias
1483host_alias
1484build_alias
1485LIBS
1486ECHO_T
1487ECHO_N
1488ECHO_C
1489DEFS
1490mandir
1491localedir
1492libdir
1493psdir
1494pdfdir
1495dvidir
1496htmldir
1497infodir
1498docdir
1499oldincludedir
1500includedir
1501localstatedir
1502sharedstatedir
1503sysconfdir
1504datadir
1505datarootdir
1506libexecdir
1507sbindir
1508bindir
1509program_transform_name
1510prefix
1511exec_prefix
1512PACKAGE_URL
1513PACKAGE_BUGREPORT
1514PACKAGE_STRING
1515PACKAGE_VERSION
1516PACKAGE_TARNAME
1517PACKAGE_NAME
1518PATH_SEPARATOR
1519SHELL'
1520ac_subst_files=''
1521ac_user_opts='
1522enable_option_checking
1523enable_silent_rules
1524enable_dependency_tracking
1525enable_largefile
1526with_packager
1527with_packager_version
1528with_packager_bug_reports
1529with_rmt
1530enable_mt
1531with_gnu_ld
1532enable_rpath
1533with_libiconv_prefix
1534enable_nls
1535with_libintl_prefix
1536'
1537      ac_precious_vars='build_alias
1538host_alias
1539target_alias
1540CC
1541CFLAGS
1542LDFLAGS
1543LIBS
1544CPPFLAGS
1545CPP
1546YACC
1547YFLAGS
1548DEFAULT_RMT_DIR
1549DEFAULT_QUOTING_STYLE'
1550
1551
1552# Initialize some variables set by options.
1553ac_init_help=
1554ac_init_version=false
1555ac_unrecognized_opts=
1556ac_unrecognized_sep=
1557# The variables have the same names as the options, with
1558# dashes changed to underlines.
1559cache_file=/dev/null
1560exec_prefix=NONE
1561no_create=
1562no_recursion=
1563prefix=NONE
1564program_prefix=NONE
1565program_suffix=NONE
1566program_transform_name=s,x,x,
1567silent=
1568site=
1569srcdir=
1570verbose=
1571x_includes=NONE
1572x_libraries=NONE
1573
1574# Installation directory options.
1575# These are left unexpanded so users can "make install exec_prefix=/foo"
1576# and all the variables that are supposed to be based on exec_prefix
1577# by default will actually change.
1578# Use braces instead of parens because sh, perl, etc. also accept them.
1579# (The list follows the same order as the GNU Coding Standards.)
1580bindir='${exec_prefix}/bin'
1581sbindir='${exec_prefix}/sbin'
1582libexecdir='${exec_prefix}/libexec'
1583datarootdir='${prefix}/share'
1584datadir='${datarootdir}'
1585sysconfdir='${prefix}/etc'
1586sharedstatedir='${prefix}/com'
1587localstatedir='${prefix}/var'
1588includedir='${prefix}/include'
1589oldincludedir='/usr/include'
1590docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1591infodir='${datarootdir}/info'
1592htmldir='${docdir}'
1593dvidir='${docdir}'
1594pdfdir='${docdir}'
1595psdir='${docdir}'
1596libdir='${exec_prefix}/lib'
1597localedir='${datarootdir}/locale'
1598mandir='${datarootdir}/man'
1599
1600ac_prev=
1601ac_dashdash=
1602for ac_option
1603do
1604  # If the previous option needs an argument, assign it.
1605  if test -n "$ac_prev"; then
1606    eval $ac_prev=\$ac_option
1607    ac_prev=
1608    continue
1609  fi
1610
1611  case $ac_option in
1612  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1613  *=)   ac_optarg= ;;
1614  *)    ac_optarg=yes ;;
1615  esac
1616
1617  # Accept the important Cygnus configure options, so we can diagnose typos.
1618
1619  case $ac_dashdash$ac_option in
1620  --)
1621    ac_dashdash=yes ;;
1622
1623  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1624    ac_prev=bindir ;;
1625  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1626    bindir=$ac_optarg ;;
1627
1628  -build | --build | --buil | --bui | --bu)
1629    ac_prev=build_alias ;;
1630  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1631    build_alias=$ac_optarg ;;
1632
1633  -cache-file | --cache-file | --cache-fil | --cache-fi \
1634  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1635    ac_prev=cache_file ;;
1636  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1637  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1638    cache_file=$ac_optarg ;;
1639
1640  --config-cache | -C)
1641    cache_file=config.cache ;;
1642
1643  -datadir | --datadir | --datadi | --datad)
1644    ac_prev=datadir ;;
1645  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1646    datadir=$ac_optarg ;;
1647
1648  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1649  | --dataroo | --dataro | --datar)
1650    ac_prev=datarootdir ;;
1651  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1652  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1653    datarootdir=$ac_optarg ;;
1654
1655  -disable-* | --disable-*)
1656    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1657    # Reject names that are not valid shell variable names.
1658    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1659      as_fn_error $? "invalid feature name: $ac_useropt"
1660    ac_useropt_orig=$ac_useropt
1661    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1662    case $ac_user_opts in
1663      *"
1664"enable_$ac_useropt"
1665"*) ;;
1666      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1667	 ac_unrecognized_sep=', ';;
1668    esac
1669    eval enable_$ac_useropt=no ;;
1670
1671  -docdir | --docdir | --docdi | --doc | --do)
1672    ac_prev=docdir ;;
1673  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1674    docdir=$ac_optarg ;;
1675
1676  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1677    ac_prev=dvidir ;;
1678  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1679    dvidir=$ac_optarg ;;
1680
1681  -enable-* | --enable-*)
1682    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1683    # Reject names that are not valid shell variable names.
1684    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1685      as_fn_error $? "invalid feature name: $ac_useropt"
1686    ac_useropt_orig=$ac_useropt
1687    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1688    case $ac_user_opts in
1689      *"
1690"enable_$ac_useropt"
1691"*) ;;
1692      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1693	 ac_unrecognized_sep=', ';;
1694    esac
1695    eval enable_$ac_useropt=\$ac_optarg ;;
1696
1697  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1698  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1699  | --exec | --exe | --ex)
1700    ac_prev=exec_prefix ;;
1701  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1702  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1703  | --exec=* | --exe=* | --ex=*)
1704    exec_prefix=$ac_optarg ;;
1705
1706  -gas | --gas | --ga | --g)
1707    # Obsolete; use --with-gas.
1708    with_gas=yes ;;
1709
1710  -help | --help | --hel | --he | -h)
1711    ac_init_help=long ;;
1712  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1713    ac_init_help=recursive ;;
1714  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1715    ac_init_help=short ;;
1716
1717  -host | --host | --hos | --ho)
1718    ac_prev=host_alias ;;
1719  -host=* | --host=* | --hos=* | --ho=*)
1720    host_alias=$ac_optarg ;;
1721
1722  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1723    ac_prev=htmldir ;;
1724  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1725  | --ht=*)
1726    htmldir=$ac_optarg ;;
1727
1728  -includedir | --includedir | --includedi | --included | --include \
1729  | --includ | --inclu | --incl | --inc)
1730    ac_prev=includedir ;;
1731  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1732  | --includ=* | --inclu=* | --incl=* | --inc=*)
1733    includedir=$ac_optarg ;;
1734
1735  -infodir | --infodir | --infodi | --infod | --info | --inf)
1736    ac_prev=infodir ;;
1737  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1738    infodir=$ac_optarg ;;
1739
1740  -libdir | --libdir | --libdi | --libd)
1741    ac_prev=libdir ;;
1742  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1743    libdir=$ac_optarg ;;
1744
1745  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1746  | --libexe | --libex | --libe)
1747    ac_prev=libexecdir ;;
1748  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1749  | --libexe=* | --libex=* | --libe=*)
1750    libexecdir=$ac_optarg ;;
1751
1752  -localedir | --localedir | --localedi | --localed | --locale)
1753    ac_prev=localedir ;;
1754  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1755    localedir=$ac_optarg ;;
1756
1757  -localstatedir | --localstatedir | --localstatedi | --localstated \
1758  | --localstate | --localstat | --localsta | --localst | --locals)
1759    ac_prev=localstatedir ;;
1760  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1761  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1762    localstatedir=$ac_optarg ;;
1763
1764  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1765    ac_prev=mandir ;;
1766  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1767    mandir=$ac_optarg ;;
1768
1769  -nfp | --nfp | --nf)
1770    # Obsolete; use --without-fp.
1771    with_fp=no ;;
1772
1773  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1774  | --no-cr | --no-c | -n)
1775    no_create=yes ;;
1776
1777  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1778  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1779    no_recursion=yes ;;
1780
1781  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1782  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1783  | --oldin | --oldi | --old | --ol | --o)
1784    ac_prev=oldincludedir ;;
1785  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1786  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1787  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1788    oldincludedir=$ac_optarg ;;
1789
1790  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1791    ac_prev=prefix ;;
1792  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1793    prefix=$ac_optarg ;;
1794
1795  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1796  | --program-pre | --program-pr | --program-p)
1797    ac_prev=program_prefix ;;
1798  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1799  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1800    program_prefix=$ac_optarg ;;
1801
1802  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1803  | --program-suf | --program-su | --program-s)
1804    ac_prev=program_suffix ;;
1805  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1806  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1807    program_suffix=$ac_optarg ;;
1808
1809  -program-transform-name | --program-transform-name \
1810  | --program-transform-nam | --program-transform-na \
1811  | --program-transform-n | --program-transform- \
1812  | --program-transform | --program-transfor \
1813  | --program-transfo | --program-transf \
1814  | --program-trans | --program-tran \
1815  | --progr-tra | --program-tr | --program-t)
1816    ac_prev=program_transform_name ;;
1817  -program-transform-name=* | --program-transform-name=* \
1818  | --program-transform-nam=* | --program-transform-na=* \
1819  | --program-transform-n=* | --program-transform-=* \
1820  | --program-transform=* | --program-transfor=* \
1821  | --program-transfo=* | --program-transf=* \
1822  | --program-trans=* | --program-tran=* \
1823  | --progr-tra=* | --program-tr=* | --program-t=*)
1824    program_transform_name=$ac_optarg ;;
1825
1826  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1827    ac_prev=pdfdir ;;
1828  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1829    pdfdir=$ac_optarg ;;
1830
1831  -psdir | --psdir | --psdi | --psd | --ps)
1832    ac_prev=psdir ;;
1833  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1834    psdir=$ac_optarg ;;
1835
1836  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1837  | -silent | --silent | --silen | --sile | --sil)
1838    silent=yes ;;
1839
1840  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1841    ac_prev=sbindir ;;
1842  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1843  | --sbi=* | --sb=*)
1844    sbindir=$ac_optarg ;;
1845
1846  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1847  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1848  | --sharedst | --shareds | --shared | --share | --shar \
1849  | --sha | --sh)
1850    ac_prev=sharedstatedir ;;
1851  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1852  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1853  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1854  | --sha=* | --sh=*)
1855    sharedstatedir=$ac_optarg ;;
1856
1857  -site | --site | --sit)
1858    ac_prev=site ;;
1859  -site=* | --site=* | --sit=*)
1860    site=$ac_optarg ;;
1861
1862  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1863    ac_prev=srcdir ;;
1864  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1865    srcdir=$ac_optarg ;;
1866
1867  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1868  | --syscon | --sysco | --sysc | --sys | --sy)
1869    ac_prev=sysconfdir ;;
1870  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1871  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1872    sysconfdir=$ac_optarg ;;
1873
1874  -target | --target | --targe | --targ | --tar | --ta | --t)
1875    ac_prev=target_alias ;;
1876  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1877    target_alias=$ac_optarg ;;
1878
1879  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1880    verbose=yes ;;
1881
1882  -version | --version | --versio | --versi | --vers | -V)
1883    ac_init_version=: ;;
1884
1885  -with-* | --with-*)
1886    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1887    # Reject names that are not valid shell variable names.
1888    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1889      as_fn_error $? "invalid package name: $ac_useropt"
1890    ac_useropt_orig=$ac_useropt
1891    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1892    case $ac_user_opts in
1893      *"
1894"with_$ac_useropt"
1895"*) ;;
1896      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1897	 ac_unrecognized_sep=', ';;
1898    esac
1899    eval with_$ac_useropt=\$ac_optarg ;;
1900
1901  -without-* | --without-*)
1902    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1903    # Reject names that are not valid shell variable names.
1904    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1905      as_fn_error $? "invalid package name: $ac_useropt"
1906    ac_useropt_orig=$ac_useropt
1907    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1908    case $ac_user_opts in
1909      *"
1910"with_$ac_useropt"
1911"*) ;;
1912      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1913	 ac_unrecognized_sep=', ';;
1914    esac
1915    eval with_$ac_useropt=no ;;
1916
1917  --x)
1918    # Obsolete; use --with-x.
1919    with_x=yes ;;
1920
1921  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1922  | --x-incl | --x-inc | --x-in | --x-i)
1923    ac_prev=x_includes ;;
1924  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1925  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1926    x_includes=$ac_optarg ;;
1927
1928  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1929  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1930    ac_prev=x_libraries ;;
1931  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1932  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1933    x_libraries=$ac_optarg ;;
1934
1935  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1936Try \`$0 --help' for more information"
1937    ;;
1938
1939  *=*)
1940    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1941    # Reject names that are not valid shell variable names.
1942    case $ac_envvar in #(
1943      '' | [0-9]* | *[!_$as_cr_alnum]* )
1944      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1945    esac
1946    eval $ac_envvar=\$ac_optarg
1947    export $ac_envvar ;;
1948
1949  *)
1950    # FIXME: should be removed in autoconf 3.0.
1951    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1952    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1953      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1954    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1955    ;;
1956
1957  esac
1958done
1959
1960if test -n "$ac_prev"; then
1961  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1962  as_fn_error $? "missing argument to $ac_option"
1963fi
1964
1965if test -n "$ac_unrecognized_opts"; then
1966  case $enable_option_checking in
1967    no) ;;
1968    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1969    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1970  esac
1971fi
1972
1973# Check all directory arguments for consistency.
1974for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1975		datadir sysconfdir sharedstatedir localstatedir includedir \
1976		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1977		libdir localedir mandir
1978do
1979  eval ac_val=\$$ac_var
1980  # Remove trailing slashes.
1981  case $ac_val in
1982    */ )
1983      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1984      eval $ac_var=\$ac_val;;
1985  esac
1986  # Be sure to have absolute directory names.
1987  case $ac_val in
1988    [\\/$]* | ?:[\\/]* )  continue;;
1989    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1990  esac
1991  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1992done
1993
1994# There might be people who depend on the old broken behavior: `$host'
1995# used to hold the argument of --host etc.
1996# FIXME: To remove some day.
1997build=$build_alias
1998host=$host_alias
1999target=$target_alias
2000
2001# FIXME: To remove some day.
2002if test "x$host_alias" != x; then
2003  if test "x$build_alias" = x; then
2004    cross_compiling=maybe
2005  elif test "x$build_alias" != "x$host_alias"; then
2006    cross_compiling=yes
2007  fi
2008fi
2009
2010ac_tool_prefix=
2011test -n "$host_alias" && ac_tool_prefix=$host_alias-
2012
2013test "$silent" = yes && exec 6>/dev/null
2014
2015
2016ac_pwd=`pwd` && test -n "$ac_pwd" &&
2017ac_ls_di=`ls -di .` &&
2018ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2019  as_fn_error $? "working directory cannot be determined"
2020test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2021  as_fn_error $? "pwd does not report name of working directory"
2022
2023
2024# Find the source files, if location was not specified.
2025if test -z "$srcdir"; then
2026  ac_srcdir_defaulted=yes
2027  # Try the directory containing this script, then the parent directory.
2028  ac_confdir=`$as_dirname -- "$as_myself" ||
2029$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2030	 X"$as_myself" : 'X\(//\)[^/]' \| \
2031	 X"$as_myself" : 'X\(//\)$' \| \
2032	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2033$as_echo X"$as_myself" |
2034    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2035	    s//\1/
2036	    q
2037	  }
2038	  /^X\(\/\/\)[^/].*/{
2039	    s//\1/
2040	    q
2041	  }
2042	  /^X\(\/\/\)$/{
2043	    s//\1/
2044	    q
2045	  }
2046	  /^X\(\/\).*/{
2047	    s//\1/
2048	    q
2049	  }
2050	  s/.*/./; q'`
2051  srcdir=$ac_confdir
2052  if test ! -r "$srcdir/$ac_unique_file"; then
2053    srcdir=..
2054  fi
2055else
2056  ac_srcdir_defaulted=no
2057fi
2058if test ! -r "$srcdir/$ac_unique_file"; then
2059  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2060  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2061fi
2062ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2063ac_abs_confdir=`(
2064	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2065	pwd)`
2066# When building in place, set srcdir=.
2067if test "$ac_abs_confdir" = "$ac_pwd"; then
2068  srcdir=.
2069fi
2070# Remove unnecessary trailing slashes from srcdir.
2071# Double slashes in file names in object file debugging info
2072# mess up M-x gdb in Emacs.
2073case $srcdir in
2074*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2075esac
2076for ac_var in $ac_precious_vars; do
2077  eval ac_env_${ac_var}_set=\${${ac_var}+set}
2078  eval ac_env_${ac_var}_value=\$${ac_var}
2079  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2080  eval ac_cv_env_${ac_var}_value=\$${ac_var}
2081done
2082
2083#
2084# Report the --help message.
2085#
2086if test "$ac_init_help" = "long"; then
2087  # Omit some internal or obsolete options to make the list less imposing.
2088  # This message is too long to be a string in the A/UX 3.1 sh.
2089  cat <<_ACEOF
2090\`configure' configures GNU cpio 2.13 to adapt to many kinds of systems.
2091
2092Usage: $0 [OPTION]... [VAR=VALUE]...
2093
2094To assign environment variables (e.g., CC, CFLAGS...), specify them as
2095VAR=VALUE.  See below for descriptions of some of the useful variables.
2096
2097Defaults for the options are specified in brackets.
2098
2099Configuration:
2100  -h, --help              display this help and exit
2101      --help=short        display options specific to this package
2102      --help=recursive    display the short help of all the included packages
2103  -V, --version           display version information and exit
2104  -q, --quiet, --silent   do not print \`checking ...' messages
2105      --cache-file=FILE   cache test results in FILE [disabled]
2106  -C, --config-cache      alias for \`--cache-file=config.cache'
2107  -n, --no-create         do not create output files
2108      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2109
2110Installation directories:
2111  --prefix=PREFIX         install architecture-independent files in PREFIX
2112                          [$ac_default_prefix]
2113  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2114                          [PREFIX]
2115
2116By default, \`make install' will install all the files in
2117\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2118an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2119for instance \`--prefix=\$HOME'.
2120
2121For better control, use the options below.
2122
2123Fine tuning of the installation directories:
2124  --bindir=DIR            user executables [EPREFIX/bin]
2125  --sbindir=DIR           system admin executables [EPREFIX/sbin]
2126  --libexecdir=DIR        program executables [EPREFIX/libexec]
2127  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2128  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2129  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2130  --libdir=DIR            object code libraries [EPREFIX/lib]
2131  --includedir=DIR        C header files [PREFIX/include]
2132  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2133  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2134  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2135  --infodir=DIR           info documentation [DATAROOTDIR/info]
2136  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2137  --mandir=DIR            man documentation [DATAROOTDIR/man]
2138  --docdir=DIR            documentation root [DATAROOTDIR/doc/cpio]
2139  --htmldir=DIR           html documentation [DOCDIR]
2140  --dvidir=DIR            dvi documentation [DOCDIR]
2141  --pdfdir=DIR            pdf documentation [DOCDIR]
2142  --psdir=DIR             ps documentation [DOCDIR]
2143_ACEOF
2144
2145  cat <<\_ACEOF
2146
2147Program names:
2148  --program-prefix=PREFIX            prepend PREFIX to installed program names
2149  --program-suffix=SUFFIX            append SUFFIX to installed program names
2150  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2151
2152System types:
2153  --build=BUILD     configure for building on BUILD [guessed]
2154  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2155_ACEOF
2156fi
2157
2158if test -n "$ac_init_help"; then
2159  case $ac_init_help in
2160     short | recursive ) echo "Configuration of GNU cpio 2.13:";;
2161   esac
2162  cat <<\_ACEOF
2163
2164Optional Features:
2165  --disable-option-checking  ignore unrecognized --enable/--with options
2166  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2167  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2168  --enable-silent-rules   less verbose build output (undo: "make V=1")
2169  --disable-silent-rules  verbose build output (undo: "make V=0")
2170  --enable-dependency-tracking
2171                          do not reject slow dependency extractors
2172  --disable-dependency-tracking
2173                          speeds up one-time build
2174  --disable-largefile     omit support for large files
2175  --enable-mt             Enable building of mt program
2176  --disable-rpath         do not hardcode runtime library paths
2177  --disable-nls           do not use Native Language Support
2178
2179Optional Packages:
2180  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2181  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2182  --with-packager         String identifying the packager of this software
2183  --with-packager-version Packager-specific version information
2184  --with-packager-bug-reports
2185                          Packager info for bug reports (URL/e-mail/...)
2186  --with-rmt=FILE         Use FILE as the default `rmt' program. Do not build
2187                          included copy of `rmt'.
2188  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2189  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2190  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2191  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2192  --without-libintl-prefix     don't search for libintl in includedir and libdir
2193
2194Some influential environment variables:
2195  CC          C compiler command
2196  CFLAGS      C compiler flags
2197  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2198              nonstandard directory <lib dir>
2199  LIBS        libraries to pass to the linker, e.g. -l<library>
2200  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2201              you have headers in a nonstandard directory <include dir>
2202  CPP         C preprocessor
2203  YACC        The `Yet Another Compiler Compiler' implementation to use.
2204              Defaults to the first program found out of: `bison -y', `byacc',
2205              `yacc'.
2206  YFLAGS      The list of arguments that will be passed by default to $YACC.
2207              This script will default YFLAGS to the empty string to avoid a
2208              default value of `-d' given by some make applications.
2209  DEFAULT_RMT_DIR
2210              Define full file name of the directory where to install `rmt'.
2211              (default: $(libexecdir))
2212  DEFAULT_QUOTING_STYLE
2213              Set the default quoting style. Allowed values are: QU
2214              OTING_STYLES . Default is "escape".
2215
2216Use these variables to override the choices made by `configure' or to help
2217it to find libraries and programs with nonstandard names/locations.
2218
2219Report bugs to <bug-cpio@gnu.org>.
2220GNU cpio home page: <http://www.gnu.org/software/cpio>.
2221General help using GNU software: <http://www.gnu.org/gethelp/>.
2222_ACEOF
2223ac_status=$?
2224fi
2225
2226if test "$ac_init_help" = "recursive"; then
2227  # If there are subdirs, report their specific --help.
2228  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2229    test -d "$ac_dir" ||
2230      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2231      continue
2232    ac_builddir=.
2233
2234case "$ac_dir" in
2235.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2236*)
2237  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2238  # A ".." for each directory in $ac_dir_suffix.
2239  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2240  case $ac_top_builddir_sub in
2241  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2242  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2243  esac ;;
2244esac
2245ac_abs_top_builddir=$ac_pwd
2246ac_abs_builddir=$ac_pwd$ac_dir_suffix
2247# for backward compatibility:
2248ac_top_builddir=$ac_top_build_prefix
2249
2250case $srcdir in
2251  .)  # We are building in place.
2252    ac_srcdir=.
2253    ac_top_srcdir=$ac_top_builddir_sub
2254    ac_abs_top_srcdir=$ac_pwd ;;
2255  [\\/]* | ?:[\\/]* )  # Absolute name.
2256    ac_srcdir=$srcdir$ac_dir_suffix;
2257    ac_top_srcdir=$srcdir
2258    ac_abs_top_srcdir=$srcdir ;;
2259  *) # Relative name.
2260    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2261    ac_top_srcdir=$ac_top_build_prefix$srcdir
2262    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2263esac
2264ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2265
2266    cd "$ac_dir" || { ac_status=$?; continue; }
2267    # Check for guested configure.
2268    if test -f "$ac_srcdir/configure.gnu"; then
2269      echo &&
2270      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2271    elif test -f "$ac_srcdir/configure"; then
2272      echo &&
2273      $SHELL "$ac_srcdir/configure" --help=recursive
2274    else
2275      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2276    fi || ac_status=$?
2277    cd "$ac_pwd" || { ac_status=$?; break; }
2278  done
2279fi
2280
2281test -n "$ac_init_help" && exit $ac_status
2282if $ac_init_version; then
2283  cat <<\_ACEOF
2284GNU cpio configure 2.13
2285generated by GNU Autoconf 2.69
2286
2287Copyright (C) 2012 Free Software Foundation, Inc.
2288This configure script is free software; the Free Software Foundation
2289gives unlimited permission to copy, distribute and modify it.
2290_ACEOF
2291  exit
2292fi
2293
2294## ------------------------ ##
2295## Autoconf initialization. ##
2296## ------------------------ ##
2297
2298# ac_fn_c_try_compile LINENO
2299# --------------------------
2300# Try to compile conftest.$ac_ext, and return whether this succeeded.
2301ac_fn_c_try_compile ()
2302{
2303  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2304  rm -f conftest.$ac_objext
2305  if { { ac_try="$ac_compile"
2306case "(($ac_try" in
2307  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2308  *) ac_try_echo=$ac_try;;
2309esac
2310eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2311$as_echo "$ac_try_echo"; } >&5
2312  (eval "$ac_compile") 2>conftest.err
2313  ac_status=$?
2314  if test -s conftest.err; then
2315    grep -v '^ *+' conftest.err >conftest.er1
2316    cat conftest.er1 >&5
2317    mv -f conftest.er1 conftest.err
2318  fi
2319  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2320  test $ac_status = 0; } && {
2321	 test -z "$ac_c_werror_flag" ||
2322	 test ! -s conftest.err
2323       } && test -s conftest.$ac_objext; then :
2324  ac_retval=0
2325else
2326  $as_echo "$as_me: failed program was:" >&5
2327sed 's/^/| /' conftest.$ac_ext >&5
2328
2329	ac_retval=1
2330fi
2331  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2332  as_fn_set_status $ac_retval
2333
2334} # ac_fn_c_try_compile
2335
2336# ac_fn_c_try_cpp LINENO
2337# ----------------------
2338# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2339ac_fn_c_try_cpp ()
2340{
2341  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2342  if { { ac_try="$ac_cpp conftest.$ac_ext"
2343case "(($ac_try" in
2344  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2345  *) ac_try_echo=$ac_try;;
2346esac
2347eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2348$as_echo "$ac_try_echo"; } >&5
2349  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2350  ac_status=$?
2351  if test -s conftest.err; then
2352    grep -v '^ *+' conftest.err >conftest.er1
2353    cat conftest.er1 >&5
2354    mv -f conftest.er1 conftest.err
2355  fi
2356  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2357  test $ac_status = 0; } > conftest.i && {
2358	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2359	 test ! -s conftest.err
2360       }; then :
2361  ac_retval=0
2362else
2363  $as_echo "$as_me: failed program was:" >&5
2364sed 's/^/| /' conftest.$ac_ext >&5
2365
2366    ac_retval=1
2367fi
2368  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2369  as_fn_set_status $ac_retval
2370
2371} # ac_fn_c_try_cpp
2372
2373# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2374# -------------------------------------------------------
2375# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2376# the include files in INCLUDES and setting the cache variable VAR
2377# accordingly.
2378ac_fn_c_check_header_mongrel ()
2379{
2380  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2381  if eval \${$3+:} false; then :
2382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2383$as_echo_n "checking for $2... " >&6; }
2384if eval \${$3+:} false; then :
2385  $as_echo_n "(cached) " >&6
2386fi
2387eval ac_res=\$$3
2388	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2389$as_echo "$ac_res" >&6; }
2390else
2391  # Is the header compilable?
2392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2393$as_echo_n "checking $2 usability... " >&6; }
2394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2395/* end confdefs.h.  */
2396$4
2397#include <$2>
2398_ACEOF
2399if ac_fn_c_try_compile "$LINENO"; then :
2400  ac_header_compiler=yes
2401else
2402  ac_header_compiler=no
2403fi
2404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2406$as_echo "$ac_header_compiler" >&6; }
2407
2408# Is the header present?
2409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2410$as_echo_n "checking $2 presence... " >&6; }
2411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2412/* end confdefs.h.  */
2413#include <$2>
2414_ACEOF
2415if ac_fn_c_try_cpp "$LINENO"; then :
2416  ac_header_preproc=yes
2417else
2418  ac_header_preproc=no
2419fi
2420rm -f conftest.err conftest.i conftest.$ac_ext
2421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2422$as_echo "$ac_header_preproc" >&6; }
2423
2424# So?  What about this header?
2425case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2426  yes:no: )
2427    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2428$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2429    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2430$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2431    ;;
2432  no:yes:* )
2433    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2434$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2435    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2436$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2437    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2438$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2439    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2440$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2441    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2442$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2443( $as_echo "## ------------------------------- ##
2444## Report this to bug-cpio@gnu.org ##
2445## ------------------------------- ##"
2446     ) | sed "s/^/$as_me: WARNING:     /" >&2
2447    ;;
2448esac
2449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2450$as_echo_n "checking for $2... " >&6; }
2451if eval \${$3+:} false; then :
2452  $as_echo_n "(cached) " >&6
2453else
2454  eval "$3=\$ac_header_compiler"
2455fi
2456eval ac_res=\$$3
2457	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2458$as_echo "$ac_res" >&6; }
2459fi
2460  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2461
2462} # ac_fn_c_check_header_mongrel
2463
2464# ac_fn_c_try_run LINENO
2465# ----------------------
2466# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2467# that executables *can* be run.
2468ac_fn_c_try_run ()
2469{
2470  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2471  if { { ac_try="$ac_link"
2472case "(($ac_try" in
2473  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2474  *) ac_try_echo=$ac_try;;
2475esac
2476eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2477$as_echo "$ac_try_echo"; } >&5
2478  (eval "$ac_link") 2>&5
2479  ac_status=$?
2480  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2481  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2482  { { case "(($ac_try" in
2483  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2484  *) ac_try_echo=$ac_try;;
2485esac
2486eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2487$as_echo "$ac_try_echo"; } >&5
2488  (eval "$ac_try") 2>&5
2489  ac_status=$?
2490  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2491  test $ac_status = 0; }; }; then :
2492  ac_retval=0
2493else
2494  $as_echo "$as_me: program exited with status $ac_status" >&5
2495       $as_echo "$as_me: failed program was:" >&5
2496sed 's/^/| /' conftest.$ac_ext >&5
2497
2498       ac_retval=$ac_status
2499fi
2500  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2501  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2502  as_fn_set_status $ac_retval
2503
2504} # ac_fn_c_try_run
2505
2506# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2507# -------------------------------------------------------
2508# Tests whether HEADER exists and can be compiled using the include files in
2509# INCLUDES, setting the cache variable VAR accordingly.
2510ac_fn_c_check_header_compile ()
2511{
2512  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2514$as_echo_n "checking for $2... " >&6; }
2515if eval \${$3+:} false; then :
2516  $as_echo_n "(cached) " >&6
2517else
2518  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2519/* end confdefs.h.  */
2520$4
2521#include <$2>
2522_ACEOF
2523if ac_fn_c_try_compile "$LINENO"; then :
2524  eval "$3=yes"
2525else
2526  eval "$3=no"
2527fi
2528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2529fi
2530eval ac_res=\$$3
2531	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2532$as_echo "$ac_res" >&6; }
2533  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2534
2535} # ac_fn_c_check_header_compile
2536
2537# ac_fn_c_try_link LINENO
2538# -----------------------
2539# Try to link conftest.$ac_ext, and return whether this succeeded.
2540ac_fn_c_try_link ()
2541{
2542  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2543  rm -f conftest.$ac_objext conftest$ac_exeext
2544  if { { ac_try="$ac_link"
2545case "(($ac_try" in
2546  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2547  *) ac_try_echo=$ac_try;;
2548esac
2549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2550$as_echo "$ac_try_echo"; } >&5
2551  (eval "$ac_link") 2>conftest.err
2552  ac_status=$?
2553  if test -s conftest.err; then
2554    grep -v '^ *+' conftest.err >conftest.er1
2555    cat conftest.er1 >&5
2556    mv -f conftest.er1 conftest.err
2557  fi
2558  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2559  test $ac_status = 0; } && {
2560	 test -z "$ac_c_werror_flag" ||
2561	 test ! -s conftest.err
2562       } && test -s conftest$ac_exeext && {
2563	 test "$cross_compiling" = yes ||
2564	 test -x conftest$ac_exeext
2565       }; then :
2566  ac_retval=0
2567else
2568  $as_echo "$as_me: failed program was:" >&5
2569sed 's/^/| /' conftest.$ac_ext >&5
2570
2571	ac_retval=1
2572fi
2573  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2574  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2575  # interfere with the next link command; also delete a directory that is
2576  # left behind by Apple's compiler.  We do this before executing the actions.
2577  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2578  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2579  as_fn_set_status $ac_retval
2580
2581} # ac_fn_c_try_link
2582
2583# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2584# -------------------------------------------
2585# Tests whether TYPE exists after having included INCLUDES, setting cache
2586# variable VAR accordingly.
2587ac_fn_c_check_type ()
2588{
2589  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2590  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2591$as_echo_n "checking for $2... " >&6; }
2592if eval \${$3+:} false; then :
2593  $as_echo_n "(cached) " >&6
2594else
2595  eval "$3=no"
2596  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2597/* end confdefs.h.  */
2598$4
2599int
2600main ()
2601{
2602if (sizeof ($2))
2603	 return 0;
2604  ;
2605  return 0;
2606}
2607_ACEOF
2608if ac_fn_c_try_compile "$LINENO"; then :
2609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2610/* end confdefs.h.  */
2611$4
2612int
2613main ()
2614{
2615if (sizeof (($2)))
2616	    return 0;
2617  ;
2618  return 0;
2619}
2620_ACEOF
2621if ac_fn_c_try_compile "$LINENO"; then :
2622
2623else
2624  eval "$3=yes"
2625fi
2626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2627fi
2628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2629fi
2630eval ac_res=\$$3
2631	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2632$as_echo "$ac_res" >&6; }
2633  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2634
2635} # ac_fn_c_check_type
2636
2637# ac_fn_c_check_func LINENO FUNC VAR
2638# ----------------------------------
2639# Tests whether FUNC exists, setting the cache variable VAR accordingly
2640ac_fn_c_check_func ()
2641{
2642  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2643  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2644$as_echo_n "checking for $2... " >&6; }
2645if eval \${$3+:} false; then :
2646  $as_echo_n "(cached) " >&6
2647else
2648  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2649/* end confdefs.h.  */
2650/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2651   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2652#define $2 innocuous_$2
2653
2654/* System header to define __stub macros and hopefully few prototypes,
2655    which can conflict with char $2 (); below.
2656    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2657    <limits.h> exists even on freestanding compilers.  */
2658
2659#ifdef __STDC__
2660# include <limits.h>
2661#else
2662# include <assert.h>
2663#endif
2664
2665#undef $2
2666
2667/* Override any GCC internal prototype to avoid an error.
2668   Use char because int might match the return type of a GCC
2669   builtin and then its argument prototype would still apply.  */
2670#ifdef __cplusplus
2671extern "C"
2672#endif
2673char $2 ();
2674/* The GNU C library defines this for functions which it implements
2675    to always fail with ENOSYS.  Some functions are actually named
2676    something starting with __ and the normal name is an alias.  */
2677#if defined __stub_$2 || defined __stub___$2
2678choke me
2679#endif
2680
2681int
2682main ()
2683{
2684return $2 ();
2685  ;
2686  return 0;
2687}
2688_ACEOF
2689if ac_fn_c_try_link "$LINENO"; then :
2690  eval "$3=yes"
2691else
2692  eval "$3=no"
2693fi
2694rm -f core conftest.err conftest.$ac_objext \
2695    conftest$ac_exeext conftest.$ac_ext
2696fi
2697eval ac_res=\$$3
2698	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2699$as_echo "$ac_res" >&6; }
2700  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2701
2702} # ac_fn_c_check_func
2703
2704# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2705# ---------------------------------------------
2706# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2707# accordingly.
2708ac_fn_c_check_decl ()
2709{
2710  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2711  as_decl_name=`echo $2|sed 's/ *(.*//'`
2712  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2714$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2715if eval \${$3+:} false; then :
2716  $as_echo_n "(cached) " >&6
2717else
2718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2719/* end confdefs.h.  */
2720$4
2721int
2722main ()
2723{
2724#ifndef $as_decl_name
2725#ifdef __cplusplus
2726  (void) $as_decl_use;
2727#else
2728  (void) $as_decl_name;
2729#endif
2730#endif
2731
2732  ;
2733  return 0;
2734}
2735_ACEOF
2736if ac_fn_c_try_compile "$LINENO"; then :
2737  eval "$3=yes"
2738else
2739  eval "$3=no"
2740fi
2741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2742fi
2743eval ac_res=\$$3
2744	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2745$as_echo "$ac_res" >&6; }
2746  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2747
2748} # ac_fn_c_check_decl
2749
2750# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2751# --------------------------------------------
2752# Tries to find the compile-time value of EXPR in a program that includes
2753# INCLUDES, setting VAR accordingly. Returns whether the value could be
2754# computed
2755ac_fn_c_compute_int ()
2756{
2757  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2758  if test "$cross_compiling" = yes; then
2759    # Depending upon the size, compute the lo and hi bounds.
2760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2761/* end confdefs.h.  */
2762$4
2763int
2764main ()
2765{
2766static int test_array [1 - 2 * !(($2) >= 0)];
2767test_array [0] = 0;
2768return test_array [0];
2769
2770  ;
2771  return 0;
2772}
2773_ACEOF
2774if ac_fn_c_try_compile "$LINENO"; then :
2775  ac_lo=0 ac_mid=0
2776  while :; do
2777    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2778/* end confdefs.h.  */
2779$4
2780int
2781main ()
2782{
2783static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2784test_array [0] = 0;
2785return test_array [0];
2786
2787  ;
2788  return 0;
2789}
2790_ACEOF
2791if ac_fn_c_try_compile "$LINENO"; then :
2792  ac_hi=$ac_mid; break
2793else
2794  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2795			if test $ac_lo -le $ac_mid; then
2796			  ac_lo= ac_hi=
2797			  break
2798			fi
2799			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2800fi
2801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2802  done
2803else
2804  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2805/* end confdefs.h.  */
2806$4
2807int
2808main ()
2809{
2810static int test_array [1 - 2 * !(($2) < 0)];
2811test_array [0] = 0;
2812return test_array [0];
2813
2814  ;
2815  return 0;
2816}
2817_ACEOF
2818if ac_fn_c_try_compile "$LINENO"; then :
2819  ac_hi=-1 ac_mid=-1
2820  while :; do
2821    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2822/* end confdefs.h.  */
2823$4
2824int
2825main ()
2826{
2827static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2828test_array [0] = 0;
2829return test_array [0];
2830
2831  ;
2832  return 0;
2833}
2834_ACEOF
2835if ac_fn_c_try_compile "$LINENO"; then :
2836  ac_lo=$ac_mid; break
2837else
2838  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2839			if test $ac_mid -le $ac_hi; then
2840			  ac_lo= ac_hi=
2841			  break
2842			fi
2843			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2844fi
2845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2846  done
2847else
2848  ac_lo= ac_hi=
2849fi
2850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2851fi
2852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2853# Binary search between lo and hi bounds.
2854while test "x$ac_lo" != "x$ac_hi"; do
2855  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2856  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2857/* end confdefs.h.  */
2858$4
2859int
2860main ()
2861{
2862static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2863test_array [0] = 0;
2864return test_array [0];
2865
2866  ;
2867  return 0;
2868}
2869_ACEOF
2870if ac_fn_c_try_compile "$LINENO"; then :
2871  ac_hi=$ac_mid
2872else
2873  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2874fi
2875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2876done
2877case $ac_lo in #((
2878?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2879'') ac_retval=1 ;;
2880esac
2881  else
2882    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2883/* end confdefs.h.  */
2884$4
2885static long int longval () { return $2; }
2886static unsigned long int ulongval () { return $2; }
2887#include <stdio.h>
2888#include <stdlib.h>
2889int
2890main ()
2891{
2892
2893  FILE *f = fopen ("conftest.val", "w");
2894  if (! f)
2895    return 1;
2896  if (($2) < 0)
2897    {
2898      long int i = longval ();
2899      if (i != ($2))
2900	return 1;
2901      fprintf (f, "%ld", i);
2902    }
2903  else
2904    {
2905      unsigned long int i = ulongval ();
2906      if (i != ($2))
2907	return 1;
2908      fprintf (f, "%lu", i);
2909    }
2910  /* Do not output a trailing newline, as this causes \r\n confusion
2911     on some platforms.  */
2912  return ferror (f) || fclose (f) != 0;
2913
2914  ;
2915  return 0;
2916}
2917_ACEOF
2918if ac_fn_c_try_run "$LINENO"; then :
2919  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2920else
2921  ac_retval=1
2922fi
2923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2924  conftest.$ac_objext conftest.beam conftest.$ac_ext
2925rm -f conftest.val
2926
2927  fi
2928  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2929  as_fn_set_status $ac_retval
2930
2931} # ac_fn_c_compute_int
2932
2933# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2934# ----------------------------------------------------
2935# Tries to find if the field MEMBER exists in type AGGR, after including
2936# INCLUDES, setting cache variable VAR accordingly.
2937ac_fn_c_check_member ()
2938{
2939  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2940  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2941$as_echo_n "checking for $2.$3... " >&6; }
2942if eval \${$4+:} false; then :
2943  $as_echo_n "(cached) " >&6
2944else
2945  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2946/* end confdefs.h.  */
2947$5
2948int
2949main ()
2950{
2951static $2 ac_aggr;
2952if (ac_aggr.$3)
2953return 0;
2954  ;
2955  return 0;
2956}
2957_ACEOF
2958if ac_fn_c_try_compile "$LINENO"; then :
2959  eval "$4=yes"
2960else
2961  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2962/* end confdefs.h.  */
2963$5
2964int
2965main ()
2966{
2967static $2 ac_aggr;
2968if (sizeof ac_aggr.$3)
2969return 0;
2970  ;
2971  return 0;
2972}
2973_ACEOF
2974if ac_fn_c_try_compile "$LINENO"; then :
2975  eval "$4=yes"
2976else
2977  eval "$4=no"
2978fi
2979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2980fi
2981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2982fi
2983eval ac_res=\$$4
2984	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2985$as_echo "$ac_res" >&6; }
2986  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2987
2988} # ac_fn_c_check_member
2989cat >config.log <<_ACEOF
2990This file contains any messages produced by compilers while
2991running configure, to aid debugging if configure makes a mistake.
2992
2993It was created by GNU cpio $as_me 2.13, which was
2994generated by GNU Autoconf 2.69.  Invocation command line was
2995
2996  $ $0 $@
2997
2998_ACEOF
2999exec 5>>config.log
3000{
3001cat <<_ASUNAME
3002## --------- ##
3003## Platform. ##
3004## --------- ##
3005
3006hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3007uname -m = `(uname -m) 2>/dev/null || echo unknown`
3008uname -r = `(uname -r) 2>/dev/null || echo unknown`
3009uname -s = `(uname -s) 2>/dev/null || echo unknown`
3010uname -v = `(uname -v) 2>/dev/null || echo unknown`
3011
3012/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3013/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3014
3015/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3016/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3017/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3018/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3019/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3020/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3021/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3022
3023_ASUNAME
3024
3025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3026for as_dir in $PATH
3027do
3028  IFS=$as_save_IFS
3029  test -z "$as_dir" && as_dir=.
3030    $as_echo "PATH: $as_dir"
3031  done
3032IFS=$as_save_IFS
3033
3034} >&5
3035
3036cat >&5 <<_ACEOF
3037
3038
3039## ----------- ##
3040## Core tests. ##
3041## ----------- ##
3042
3043_ACEOF
3044
3045
3046# Keep a trace of the command line.
3047# Strip out --no-create and --no-recursion so they do not pile up.
3048# Strip out --silent because we don't want to record it for future runs.
3049# Also quote any args containing shell meta-characters.
3050# Make two passes to allow for proper duplicate-argument suppression.
3051ac_configure_args=
3052ac_configure_args0=
3053ac_configure_args1=
3054ac_must_keep_next=false
3055for ac_pass in 1 2
3056do
3057  for ac_arg
3058  do
3059    case $ac_arg in
3060    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3061    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3062    | -silent | --silent | --silen | --sile | --sil)
3063      continue ;;
3064    *\'*)
3065      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3066    esac
3067    case $ac_pass in
3068    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3069    2)
3070      as_fn_append ac_configure_args1 " '$ac_arg'"
3071      if test $ac_must_keep_next = true; then
3072	ac_must_keep_next=false # Got value, back to normal.
3073      else
3074	case $ac_arg in
3075	  *=* | --config-cache | -C | -disable-* | --disable-* \
3076	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3077	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3078	  | -with-* | --with-* | -without-* | --without-* | --x)
3079	    case "$ac_configure_args0 " in
3080	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3081	    esac
3082	    ;;
3083	  -* ) ac_must_keep_next=true ;;
3084	esac
3085      fi
3086      as_fn_append ac_configure_args " '$ac_arg'"
3087      ;;
3088    esac
3089  done
3090done
3091{ ac_configure_args0=; unset ac_configure_args0;}
3092{ ac_configure_args1=; unset ac_configure_args1;}
3093
3094# When interrupted or exit'd, cleanup temporary files, and complete
3095# config.log.  We remove comments because anyway the quotes in there
3096# would cause problems or look ugly.
3097# WARNING: Use '\'' to represent an apostrophe within the trap.
3098# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3099trap 'exit_status=$?
3100  # Save into config.log some information that might help in debugging.
3101  {
3102    echo
3103
3104    $as_echo "## ---------------- ##
3105## Cache variables. ##
3106## ---------------- ##"
3107    echo
3108    # The following way of writing the cache mishandles newlines in values,
3109(
3110  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3111    eval ac_val=\$$ac_var
3112    case $ac_val in #(
3113    *${as_nl}*)
3114      case $ac_var in #(
3115      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3116$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3117      esac
3118      case $ac_var in #(
3119      _ | IFS | as_nl) ;; #(
3120      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3121      *) { eval $ac_var=; unset $ac_var;} ;;
3122      esac ;;
3123    esac
3124  done
3125  (set) 2>&1 |
3126    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3127    *${as_nl}ac_space=\ *)
3128      sed -n \
3129	"s/'\''/'\''\\\\'\'''\''/g;
3130	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3131      ;; #(
3132    *)
3133      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3134      ;;
3135    esac |
3136    sort
3137)
3138    echo
3139
3140    $as_echo "## ----------------- ##
3141## Output variables. ##
3142## ----------------- ##"
3143    echo
3144    for ac_var in $ac_subst_vars
3145    do
3146      eval ac_val=\$$ac_var
3147      case $ac_val in
3148      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3149      esac
3150      $as_echo "$ac_var='\''$ac_val'\''"
3151    done | sort
3152    echo
3153
3154    if test -n "$ac_subst_files"; then
3155      $as_echo "## ------------------- ##
3156## File substitutions. ##
3157## ------------------- ##"
3158      echo
3159      for ac_var in $ac_subst_files
3160      do
3161	eval ac_val=\$$ac_var
3162	case $ac_val in
3163	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3164	esac
3165	$as_echo "$ac_var='\''$ac_val'\''"
3166      done | sort
3167      echo
3168    fi
3169
3170    if test -s confdefs.h; then
3171      $as_echo "## ----------- ##
3172## confdefs.h. ##
3173## ----------- ##"
3174      echo
3175      cat confdefs.h
3176      echo
3177    fi
3178    test "$ac_signal" != 0 &&
3179      $as_echo "$as_me: caught signal $ac_signal"
3180    $as_echo "$as_me: exit $exit_status"
3181  } >&5
3182  rm -f core *.core core.conftest.* &&
3183    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3184    exit $exit_status
3185' 0
3186for ac_signal in 1 2 13 15; do
3187  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3188done
3189ac_signal=0
3190
3191# confdefs.h avoids OS command line length limits that DEFS can exceed.
3192rm -f -r conftest* confdefs.h
3193
3194$as_echo "/* confdefs.h */" > confdefs.h
3195
3196# Predefined preprocessor variables.
3197
3198cat >>confdefs.h <<_ACEOF
3199#define PACKAGE_NAME "$PACKAGE_NAME"
3200_ACEOF
3201
3202cat >>confdefs.h <<_ACEOF
3203#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3204_ACEOF
3205
3206cat >>confdefs.h <<_ACEOF
3207#define PACKAGE_VERSION "$PACKAGE_VERSION"
3208_ACEOF
3209
3210cat >>confdefs.h <<_ACEOF
3211#define PACKAGE_STRING "$PACKAGE_STRING"
3212_ACEOF
3213
3214cat >>confdefs.h <<_ACEOF
3215#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3216_ACEOF
3217
3218cat >>confdefs.h <<_ACEOF
3219#define PACKAGE_URL "$PACKAGE_URL"
3220_ACEOF
3221
3222
3223# Let the site file select an alternate cache file if it wants to.
3224# Prefer an explicitly selected file to automatically selected ones.
3225ac_site_file1=NONE
3226ac_site_file2=NONE
3227if test -n "$CONFIG_SITE"; then
3228  # We do not want a PATH search for config.site.
3229  case $CONFIG_SITE in #((
3230    -*)  ac_site_file1=./$CONFIG_SITE;;
3231    */*) ac_site_file1=$CONFIG_SITE;;
3232    *)   ac_site_file1=./$CONFIG_SITE;;
3233  esac
3234elif test "x$prefix" != xNONE; then
3235  ac_site_file1=$prefix/share/config.site
3236  ac_site_file2=$prefix/etc/config.site
3237else
3238  ac_site_file1=$ac_default_prefix/share/config.site
3239  ac_site_file2=$ac_default_prefix/etc/config.site
3240fi
3241for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3242do
3243  test "x$ac_site_file" = xNONE && continue
3244  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3245    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3246$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3247    sed 's/^/| /' "$ac_site_file" >&5
3248    . "$ac_site_file" \
3249      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3250$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3251as_fn_error $? "failed to load site script $ac_site_file
3252See \`config.log' for more details" "$LINENO" 5; }
3253  fi
3254done
3255
3256if test -r "$cache_file"; then
3257  # Some versions of bash will fail to source /dev/null (special files
3258  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3259  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3260    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3261$as_echo "$as_me: loading cache $cache_file" >&6;}
3262    case $cache_file in
3263      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3264      *)                      . "./$cache_file";;
3265    esac
3266  fi
3267else
3268  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3269$as_echo "$as_me: creating cache $cache_file" >&6;}
3270  >$cache_file
3271fi
3272
3273as_fn_append ac_header_list " sys/types.h"
3274as_fn_append ac_func_list " flockfile"
3275as_fn_append ac_func_list " funlockfile"
3276as_fn_append ac_header_list " features.h"
3277as_fn_append ac_header_list " linewrap.h"
3278as_fn_append ac_header_list " unistd.h"
3279as_fn_append ac_header_list " sys/param.h"
3280as_fn_append ac_func_list " chown"
3281as_fn_append ac_func_list " fchown"
3282as_fn_append ac_func_list " _set_invalid_parameter_handler"
3283as_fn_append ac_header_list " sys/socket.h"
3284as_fn_append ac_func_list " fchdir"
3285as_fn_append ac_header_list " dirent.h"
3286as_fn_append ac_func_list " fdopendir"
3287as_fn_append ac_func_list " fcntl"
3288as_fn_append ac_func_list " symlink"
3289as_fn_append ac_func_list " mempcpy"
3290as_fn_append ac_func_list " btowc"
3291as_fn_append ac_func_list " isblank"
3292as_fn_append ac_func_list " iswctype"
3293as_fn_append ac_func_list " mbsrtowcs"
3294as_fn_append ac_func_list " wmemchr"
3295as_fn_append ac_func_list " wmemcpy"
3296as_fn_append ac_func_list " wmempcpy"
3297as_fn_append ac_header_list " wctype.h"
3298gl_fnmatch_required=GNU
3299as_fn_append ac_header_list " stdio_ext.h"
3300as_fn_append ac_header_list " sys/stat.h"
3301as_fn_append ac_func_list " fstatat"
3302as_fn_append ac_func_list " getdelim"
3303as_fn_append ac_func_list " getdtablesize"
3304gl_getopt_required=GNU
3305as_fn_append ac_header_list " getopt.h"
3306as_fn_append ac_func_list " getprogname"
3307as_fn_append ac_func_list " getexecname"
3308as_fn_append ac_func_list " gettimeofday"
3309as_fn_append ac_func_list " nanotime"
3310as_fn_append ac_header_list " sys/time.h"
3311as_fn_append ac_header_list " limits.h"
3312as_fn_append ac_header_list " wchar.h"
3313as_fn_append ac_header_list " stdint.h"
3314as_fn_append ac_header_list " inttypes.h"
3315as_fn_append ac_func_list " lchmod"
3316as_fn_append ac_func_list " lstat"
3317as_fn_append ac_func_list " mbsinit"
3318as_fn_append ac_func_list " mbrtowc"
3319as_fn_append ac_header_list " sys/mman.h"
3320as_fn_append ac_func_list " mprotect"
3321as_fn_append ac_func_list " tzset"
3322as_fn_append ac_func_list " openat"
3323as_fn_append ac_func_list " setenv"
3324as_fn_append ac_func_list " sleep"
3325as_fn_append ac_func_list " strdup"
3326as_fn_append ac_header_list " strings.h"
3327as_fn_append ac_func_list " strndup"
3328as_fn_append ac_header_list " sysexits.h"
3329as_fn_append ac_func_list " localtime_r"
3330as_fn_append ac_func_list " timegm"
3331as_fn_append ac_func_list " pipe"
3332as_fn_append ac_header_list " utime.h"
3333as_fn_append ac_func_list " futimes"
3334as_fn_append ac_func_list " futimesat"
3335as_fn_append ac_func_list " futimens"
3336as_fn_append ac_func_list " utimensat"
3337as_fn_append ac_func_list " lutimes"
3338as_fn_append ac_func_list " vasnprintf"
3339as_fn_append ac_func_list " snprintf"
3340as_fn_append ac_func_list " iswcntrl"
3341as_fn_append ac_header_list " net/errno.h"
3342as_fn_append ac_header_list " sys/inet.h"
3343as_fn_append ac_header_list " netdb.h"
3344as_fn_append ac_header_list " string.h"
3345as_fn_append ac_header_list " memory.h"
3346as_fn_append ac_header_list " fcntl.h"
3347as_fn_append ac_header_list " sys/wait.h"
3348as_fn_append ac_header_list " sys/gentape.h"
3349as_fn_append ac_header_list " sys/tape.h"
3350as_fn_append ac_header_list " sys/device.h"
3351as_fn_append ac_header_list " sys/tprintf.h"
3352as_fn_append ac_header_list " sys/mtio.h"
3353as_fn_append ac_header_list " sgtty.h"
3354as_fn_append ac_header_list " sys/io/trioctl.h"
3355as_fn_append ac_header_list " locale.h"
3356as_fn_append ac_header_list " pwd.h"
3357as_fn_append ac_header_list " grp.h"
3358as_fn_append ac_func_list " mkfifo"
3359as_fn_append ac_func_list " setlocale"
3360gt_needs="$gt_needs need-formatstring-macros"
3361# Check that the precious variables saved in the cache have kept the same
3362# value.
3363ac_cache_corrupted=false
3364for ac_var in $ac_precious_vars; do
3365  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3366  eval ac_new_set=\$ac_env_${ac_var}_set
3367  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3368  eval ac_new_val=\$ac_env_${ac_var}_value
3369  case $ac_old_set,$ac_new_set in
3370    set,)
3371      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3372$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3373      ac_cache_corrupted=: ;;
3374    ,set)
3375      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3376$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3377      ac_cache_corrupted=: ;;
3378    ,);;
3379    *)
3380      if test "x$ac_old_val" != "x$ac_new_val"; then
3381	# differences in whitespace do not lead to failure.
3382	ac_old_val_w=`echo x $ac_old_val`
3383	ac_new_val_w=`echo x $ac_new_val`
3384	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3385	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3386$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3387	  ac_cache_corrupted=:
3388	else
3389	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3390$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3391	  eval $ac_var=\$ac_old_val
3392	fi
3393	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3394$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3395	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3396$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3397      fi;;
3398  esac
3399  # Pass precious variables to config.status.
3400  if test "$ac_new_set" = set; then
3401    case $ac_new_val in
3402    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3403    *) ac_arg=$ac_var=$ac_new_val ;;
3404    esac
3405    case " $ac_configure_args " in
3406      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3407      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3408    esac
3409  fi
3410done
3411if $ac_cache_corrupted; then
3412  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3414  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3415$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3416  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3417fi
3418## -------------------- ##
3419## Main body of script. ##
3420## -------------------- ##
3421
3422ac_ext=c
3423ac_cpp='$CPP $CPPFLAGS'
3424ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3425ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3426ac_compiler_gnu=$ac_cv_c_compiler_gnu
3427
3428
3429
3430ac_aux_dir=
3431for ac_dir in build-aux "$srcdir"/build-aux; do
3432  if test -f "$ac_dir/install-sh"; then
3433    ac_aux_dir=$ac_dir
3434    ac_install_sh="$ac_aux_dir/install-sh -c"
3435    break
3436  elif test -f "$ac_dir/install.sh"; then
3437    ac_aux_dir=$ac_dir
3438    ac_install_sh="$ac_aux_dir/install.sh -c"
3439    break
3440  elif test -f "$ac_dir/shtool"; then
3441    ac_aux_dir=$ac_dir
3442    ac_install_sh="$ac_aux_dir/shtool install -c"
3443    break
3444  fi
3445done
3446if test -z "$ac_aux_dir"; then
3447  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3448fi
3449
3450# These three variables are undocumented and unsupported,
3451# and are intended to be withdrawn in a future Autoconf release.
3452# They can cause serious problems if a builder's source tree is in a directory
3453# whose full name contains unusual characters.
3454ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3455ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3456ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3457
3458
3459ac_config_headers="$ac_config_headers config.h"
3460
3461
3462am__api_version='1.15'
3463
3464# Find a good install program.  We prefer a C program (faster),
3465# so one script is as good as another.  But avoid the broken or
3466# incompatible versions:
3467# SysV /etc/install, /usr/sbin/install
3468# SunOS /usr/etc/install
3469# IRIX /sbin/install
3470# AIX /bin/install
3471# AmigaOS /C/install, which installs bootblocks on floppy discs
3472# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3473# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3474# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3475# OS/2's system install, which has a completely different semantic
3476# ./install, which can be erroneously created by make from ./install.sh.
3477# Reject install programs that cannot install multiple files.
3478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3479$as_echo_n "checking for a BSD-compatible install... " >&6; }
3480if test -z "$INSTALL"; then
3481if ${ac_cv_path_install+:} false; then :
3482  $as_echo_n "(cached) " >&6
3483else
3484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3485for as_dir in $PATH
3486do
3487  IFS=$as_save_IFS
3488  test -z "$as_dir" && as_dir=.
3489    # Account for people who put trailing slashes in PATH elements.
3490case $as_dir/ in #((
3491  ./ | .// | /[cC]/* | \
3492  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3493  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3494  /usr/ucb/* ) ;;
3495  *)
3496    # OSF1 and SCO ODT 3.0 have their own names for install.
3497    # Don't use installbsd from OSF since it installs stuff as root
3498    # by default.
3499    for ac_prog in ginstall scoinst install; do
3500      for ac_exec_ext in '' $ac_executable_extensions; do
3501	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3502	  if test $ac_prog = install &&
3503	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3504	    # AIX install.  It has an incompatible calling convention.
3505	    :
3506	  elif test $ac_prog = install &&
3507	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3508	    # program-specific install script used by HP pwplus--don't use.
3509	    :
3510	  else
3511	    rm -rf conftest.one conftest.two conftest.dir
3512	    echo one > conftest.one
3513	    echo two > conftest.two
3514	    mkdir conftest.dir
3515	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3516	      test -s conftest.one && test -s conftest.two &&
3517	      test -s conftest.dir/conftest.one &&
3518	      test -s conftest.dir/conftest.two
3519	    then
3520	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3521	      break 3
3522	    fi
3523	  fi
3524	fi
3525      done
3526    done
3527    ;;
3528esac
3529
3530  done
3531IFS=$as_save_IFS
3532
3533rm -rf conftest.one conftest.two conftest.dir
3534
3535fi
3536  if test "${ac_cv_path_install+set}" = set; then
3537    INSTALL=$ac_cv_path_install
3538  else
3539    # As a last resort, use the slow shell script.  Don't cache a
3540    # value for INSTALL within a source directory, because that will
3541    # break other packages using the cache if that directory is
3542    # removed, or if the value is a relative name.
3543    INSTALL=$ac_install_sh
3544  fi
3545fi
3546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3547$as_echo "$INSTALL" >&6; }
3548
3549# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3550# It thinks the first close brace ends the variable substitution.
3551test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3552
3553test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3554
3555test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3556
3557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3558$as_echo_n "checking whether build environment is sane... " >&6; }
3559# Reject unsafe characters in $srcdir or the absolute working directory
3560# name.  Accept space and tab only in the latter.
3561am_lf='
3562'
3563case `pwd` in
3564  *[\\\"\#\$\&\'\`$am_lf]*)
3565    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3566esac
3567case $srcdir in
3568  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
3569    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3570esac
3571
3572# Do 'set' in a subshell so we don't clobber the current shell's
3573# arguments.  Must try -L first in case configure is actually a
3574# symlink; some systems play weird games with the mod time of symlinks
3575# (eg FreeBSD returns the mod time of the symlink's containing
3576# directory).
3577if (
3578   am_has_slept=no
3579   for am_try in 1 2; do
3580     echo "timestamp, slept: $am_has_slept" > conftest.file
3581     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3582     if test "$*" = "X"; then
3583	# -L didn't work.
3584	set X `ls -t "$srcdir/configure" conftest.file`
3585     fi
3586     if test "$*" != "X $srcdir/configure conftest.file" \
3587	&& test "$*" != "X conftest.file $srcdir/configure"; then
3588
3589	# If neither matched, then we have a broken ls.  This can happen
3590	# if, for instance, CONFIG_SHELL is bash and it inherits a
3591	# broken ls alias from the environment.  This has actually
3592	# happened.  Such a system could not be considered "sane".
3593	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3594  alias in your environment" "$LINENO" 5
3595     fi
3596     if test "$2" = conftest.file || test $am_try -eq 2; then
3597       break
3598     fi
3599     # Just in case.
3600     sleep 1
3601     am_has_slept=yes
3602   done
3603   test "$2" = conftest.file
3604   )
3605then
3606   # Ok.
3607   :
3608else
3609   as_fn_error $? "newly created file is older than distributed files!
3610Check your system clock" "$LINENO" 5
3611fi
3612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3613$as_echo "yes" >&6; }
3614# If we didn't sleep, we still need to ensure time stamps of config.status and
3615# generated files are strictly newer.
3616am_sleep_pid=
3617if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3618  ( sleep 1 ) &
3619  am_sleep_pid=$!
3620fi
3621
3622rm -f conftest.file
3623
3624test "$program_prefix" != NONE &&
3625  program_transform_name="s&^&$program_prefix&;$program_transform_name"
3626# Use a double $ so make ignores it.
3627test "$program_suffix" != NONE &&
3628  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3629# Double any \ or $.
3630# By default was `s,x,x', remove it if useless.
3631ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3632program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3633
3634# Expand $ac_aux_dir to an absolute path.
3635am_aux_dir=`cd "$ac_aux_dir" && pwd`
3636
3637if test x"${MISSING+set}" != xset; then
3638  case $am_aux_dir in
3639  *\ * | *\	*)
3640    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3641  *)
3642    MISSING="\${SHELL} $am_aux_dir/missing" ;;
3643  esac
3644fi
3645# Use eval to expand $SHELL
3646if eval "$MISSING --is-lightweight"; then
3647  am_missing_run="$MISSING "
3648else
3649  am_missing_run=
3650  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3651$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3652fi
3653
3654if test x"${install_sh+set}" != xset; then
3655  case $am_aux_dir in
3656  *\ * | *\	*)
3657    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3658  *)
3659    install_sh="\${SHELL} $am_aux_dir/install-sh"
3660  esac
3661fi
3662
3663# Installed binaries are usually stripped using 'strip' when the user
3664# run "make install-strip".  However 'strip' might not be the right
3665# tool to use in cross-compilation environments, therefore Automake
3666# will honor the 'STRIP' environment variable to overrule this program.
3667if test "$cross_compiling" != no; then
3668  if test -n "$ac_tool_prefix"; then
3669  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3670set dummy ${ac_tool_prefix}strip; ac_word=$2
3671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3672$as_echo_n "checking for $ac_word... " >&6; }
3673if ${ac_cv_prog_STRIP+:} false; then :
3674  $as_echo_n "(cached) " >&6
3675else
3676  if test -n "$STRIP"; then
3677  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3678else
3679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3680for as_dir in $PATH
3681do
3682  IFS=$as_save_IFS
3683  test -z "$as_dir" && as_dir=.
3684    for ac_exec_ext in '' $ac_executable_extensions; do
3685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3686    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3688    break 2
3689  fi
3690done
3691  done
3692IFS=$as_save_IFS
3693
3694fi
3695fi
3696STRIP=$ac_cv_prog_STRIP
3697if test -n "$STRIP"; then
3698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3699$as_echo "$STRIP" >&6; }
3700else
3701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3702$as_echo "no" >&6; }
3703fi
3704
3705
3706fi
3707if test -z "$ac_cv_prog_STRIP"; then
3708  ac_ct_STRIP=$STRIP
3709  # Extract the first word of "strip", so it can be a program name with args.
3710set dummy strip; ac_word=$2
3711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712$as_echo_n "checking for $ac_word... " >&6; }
3713if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3714  $as_echo_n "(cached) " >&6
3715else
3716  if test -n "$ac_ct_STRIP"; then
3717  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3718else
3719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3720for as_dir in $PATH
3721do
3722  IFS=$as_save_IFS
3723  test -z "$as_dir" && as_dir=.
3724    for ac_exec_ext in '' $ac_executable_extensions; do
3725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3726    ac_cv_prog_ac_ct_STRIP="strip"
3727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3728    break 2
3729  fi
3730done
3731  done
3732IFS=$as_save_IFS
3733
3734fi
3735fi
3736ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3737if test -n "$ac_ct_STRIP"; then
3738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3739$as_echo "$ac_ct_STRIP" >&6; }
3740else
3741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3742$as_echo "no" >&6; }
3743fi
3744
3745  if test "x$ac_ct_STRIP" = x; then
3746    STRIP=":"
3747  else
3748    case $cross_compiling:$ac_tool_warned in
3749yes:)
3750{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3751$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3752ac_tool_warned=yes ;;
3753esac
3754    STRIP=$ac_ct_STRIP
3755  fi
3756else
3757  STRIP="$ac_cv_prog_STRIP"
3758fi
3759
3760fi
3761INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3762
3763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3764$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3765if test -z "$MKDIR_P"; then
3766  if ${ac_cv_path_mkdir+:} false; then :
3767  $as_echo_n "(cached) " >&6
3768else
3769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3770for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3771do
3772  IFS=$as_save_IFS
3773  test -z "$as_dir" && as_dir=.
3774    for ac_prog in mkdir gmkdir; do
3775	 for ac_exec_ext in '' $ac_executable_extensions; do
3776	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3777	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3778	     'mkdir (GNU coreutils) '* | \
3779	     'mkdir (coreutils) '* | \
3780	     'mkdir (fileutils) '4.1*)
3781	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3782	       break 3;;
3783	   esac
3784	 done
3785       done
3786  done
3787IFS=$as_save_IFS
3788
3789fi
3790
3791  test -d ./--version && rmdir ./--version
3792  if test "${ac_cv_path_mkdir+set}" = set; then
3793    MKDIR_P="$ac_cv_path_mkdir -p"
3794  else
3795    # As a last resort, use the slow shell script.  Don't cache a
3796    # value for MKDIR_P within a source directory, because that will
3797    # break other packages using the cache if that directory is
3798    # removed, or if the value is a relative name.
3799    MKDIR_P="$ac_install_sh -d"
3800  fi
3801fi
3802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3803$as_echo "$MKDIR_P" >&6; }
3804
3805for ac_prog in gawk mawk nawk awk
3806do
3807  # Extract the first word of "$ac_prog", so it can be a program name with args.
3808set dummy $ac_prog; ac_word=$2
3809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3810$as_echo_n "checking for $ac_word... " >&6; }
3811if ${ac_cv_prog_AWK+:} false; then :
3812  $as_echo_n "(cached) " >&6
3813else
3814  if test -n "$AWK"; then
3815  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3816else
3817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3818for as_dir in $PATH
3819do
3820  IFS=$as_save_IFS
3821  test -z "$as_dir" && as_dir=.
3822    for ac_exec_ext in '' $ac_executable_extensions; do
3823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3824    ac_cv_prog_AWK="$ac_prog"
3825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3826    break 2
3827  fi
3828done
3829  done
3830IFS=$as_save_IFS
3831
3832fi
3833fi
3834AWK=$ac_cv_prog_AWK
3835if test -n "$AWK"; then
3836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3837$as_echo "$AWK" >&6; }
3838else
3839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3840$as_echo "no" >&6; }
3841fi
3842
3843
3844  test -n "$AWK" && break
3845done
3846
3847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3848$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3849set x ${MAKE-make}
3850ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3851if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3852  $as_echo_n "(cached) " >&6
3853else
3854  cat >conftest.make <<\_ACEOF
3855SHELL = /bin/sh
3856all:
3857	@echo '@@@%%%=$(MAKE)=@@@%%%'
3858_ACEOF
3859# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3860case `${MAKE-make} -f conftest.make 2>/dev/null` in
3861  *@@@%%%=?*=@@@%%%*)
3862    eval ac_cv_prog_make_${ac_make}_set=yes;;
3863  *)
3864    eval ac_cv_prog_make_${ac_make}_set=no;;
3865esac
3866rm -f conftest.make
3867fi
3868if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3870$as_echo "yes" >&6; }
3871  SET_MAKE=
3872else
3873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3874$as_echo "no" >&6; }
3875  SET_MAKE="MAKE=${MAKE-make}"
3876fi
3877
3878rm -rf .tst 2>/dev/null
3879mkdir .tst 2>/dev/null
3880if test -d .tst; then
3881  am__leading_dot=.
3882else
3883  am__leading_dot=_
3884fi
3885rmdir .tst 2>/dev/null
3886
3887# Check whether --enable-silent-rules was given.
3888if test "${enable_silent_rules+set}" = set; then :
3889  enableval=$enable_silent_rules;
3890fi
3891
3892case $enable_silent_rules in # (((
3893  yes) AM_DEFAULT_VERBOSITY=0;;
3894   no) AM_DEFAULT_VERBOSITY=1;;
3895    *) AM_DEFAULT_VERBOSITY=1;;
3896esac
3897am_make=${MAKE-make}
3898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3899$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3900if ${am_cv_make_support_nested_variables+:} false; then :
3901  $as_echo_n "(cached) " >&6
3902else
3903  if $as_echo 'TRUE=$(BAR$(V))
3904BAR0=false
3905BAR1=true
3906V=1
3907am__doit:
3908	@$(TRUE)
3909.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3910  am_cv_make_support_nested_variables=yes
3911else
3912  am_cv_make_support_nested_variables=no
3913fi
3914fi
3915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3916$as_echo "$am_cv_make_support_nested_variables" >&6; }
3917if test $am_cv_make_support_nested_variables = yes; then
3918    AM_V='$(V)'
3919  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3920else
3921  AM_V=$AM_DEFAULT_VERBOSITY
3922  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3923fi
3924AM_BACKSLASH='\'
3925
3926if test "`cd $srcdir && pwd`" != "`pwd`"; then
3927  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3928  # is not polluted with repeated "-I."
3929  am__isrc=' -I$(srcdir)'
3930  # test to see if srcdir already configured
3931  if test -f $srcdir/config.status; then
3932    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3933  fi
3934fi
3935
3936# test whether we have cygpath
3937if test -z "$CYGPATH_W"; then
3938  if (cygpath --version) >/dev/null 2>/dev/null; then
3939    CYGPATH_W='cygpath -w'
3940  else
3941    CYGPATH_W=echo
3942  fi
3943fi
3944
3945
3946# Define the identity of the package.
3947 PACKAGE='cpio'
3948 VERSION='2.13'
3949
3950
3951cat >>confdefs.h <<_ACEOF
3952#define PACKAGE "$PACKAGE"
3953_ACEOF
3954
3955
3956cat >>confdefs.h <<_ACEOF
3957#define VERSION "$VERSION"
3958_ACEOF
3959
3960# Some tools Automake needs.
3961
3962ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3963
3964
3965AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3966
3967
3968AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3969
3970
3971AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3972
3973
3974MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3975
3976# For better backward compatibility.  To be removed once Automake 1.9.x
3977# dies out for good.  For more background, see:
3978# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3979# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3980mkdir_p='$(MKDIR_P)'
3981
3982# We need awk for the "check" target (and possibly the TAP driver).  The
3983# system "awk" is bad on some platforms.
3984# Always define AMTAR for backward compatibility.  Yes, it's still used
3985# in the wild :-(  We should find a proper way to deprecate it ...
3986AMTAR='$${TAR-tar}'
3987
3988
3989# We'll loop over all known methods to create a tar archive until one works.
3990_am_tools='gnutar plaintar pax cpio none'
3991
3992# The POSIX 1988 'ustar' format is defined with fixed-size fields.
3993      # There is notably a 21 bits limit for the UID and the GID.  In fact,
3994      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
3995      # and bug#13588).
3996      am_max_uid=2097151 # 2^21 - 1
3997      am_max_gid=$am_max_uid
3998      # The $UID and $GID variables are not portable, so we need to resort
3999      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
4000      # below are definitely unexpected, so allow the users to see them
4001      # (that is, avoid stderr redirection).
4002      am_uid=`id -u || echo unknown`
4003      am_gid=`id -g || echo unknown`
4004      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
4005$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
4006      if test $am_uid -le $am_max_uid; then
4007         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4008$as_echo "yes" >&6; }
4009      else
4010         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4011$as_echo "no" >&6; }
4012         _am_tools=none
4013      fi
4014      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
4015$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
4016      if test $am_gid -le $am_max_gid; then
4017         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4018$as_echo "yes" >&6; }
4019      else
4020        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4021$as_echo "no" >&6; }
4022        _am_tools=none
4023      fi
4024
4025  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
4026$as_echo_n "checking how to create a ustar tar archive... " >&6; }
4027
4028  # Go ahead even if we have the value already cached.  We do so because we
4029  # need to set the values for the 'am__tar' and 'am__untar' variables.
4030  _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
4031
4032  for _am_tool in $_am_tools; do
4033    case $_am_tool in
4034    gnutar)
4035      for _am_tar in tar gnutar gtar; do
4036        { echo "$as_me:$LINENO: $_am_tar --version" >&5
4037   ($_am_tar --version) >&5 2>&5
4038   ac_status=$?
4039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4040   (exit $ac_status); } && break
4041      done
4042      am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
4043      am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
4044      am__untar="$_am_tar -xf -"
4045      ;;
4046    plaintar)
4047      # Must skip GNU tar: if it does not support --format= it doesn't create
4048      # ustar tarball either.
4049      (tar --version) >/dev/null 2>&1 && continue
4050      am__tar='tar chf - "$$tardir"'
4051      am__tar_='tar chf - "$tardir"'
4052      am__untar='tar xf -'
4053      ;;
4054    pax)
4055      am__tar='pax -L -x ustar -w "$$tardir"'
4056      am__tar_='pax -L -x ustar -w "$tardir"'
4057      am__untar='pax -r'
4058      ;;
4059    cpio)
4060      am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
4061      am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
4062      am__untar='cpio -i -H ustar -d'
4063      ;;
4064    none)
4065      am__tar=false
4066      am__tar_=false
4067      am__untar=false
4068      ;;
4069    esac
4070
4071    # If the value was cached, stop now.  We just wanted to have am__tar
4072    # and am__untar set.
4073    test -n "${am_cv_prog_tar_ustar}" && break
4074
4075    # tar/untar a dummy directory, and stop if the command works.
4076    rm -rf conftest.dir
4077    mkdir conftest.dir
4078    echo GrepMe > conftest.dir/file
4079    { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
4080   (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
4081   ac_status=$?
4082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4083   (exit $ac_status); }
4084    rm -rf conftest.dir
4085    if test -s conftest.tar; then
4086      { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
4087   ($am__untar <conftest.tar) >&5 2>&5
4088   ac_status=$?
4089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4090   (exit $ac_status); }
4091      { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
4092   (cat conftest.dir/file) >&5 2>&5
4093   ac_status=$?
4094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4095   (exit $ac_status); }
4096      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
4097    fi
4098  done
4099  rm -rf conftest.dir
4100
4101  if ${am_cv_prog_tar_ustar+:} false; then :
4102  $as_echo_n "(cached) " >&6
4103else
4104  am_cv_prog_tar_ustar=$_am_tool
4105fi
4106
4107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
4108$as_echo "$am_cv_prog_tar_ustar" >&6; }
4109
4110
4111
4112
4113
4114
4115# POSIX will say in a future version that running "rm -f" with no argument
4116# is OK; and we want to be able to make that assumption in our Makefile
4117# recipes.  So use an aggressive probe to check that the usage we want is
4118# actually supported "in the wild" to an acceptable degree.
4119# See automake bug#10828.
4120# To make any issue more visible, cause the running configure to be aborted
4121# by default if the 'rm' program in use doesn't match our expectations; the
4122# user can still override this though.
4123if rm -f && rm -fr && rm -rf; then : OK; else
4124  cat >&2 <<'END'
4125Oops!
4126
4127Your 'rm' program seems unable to run without file operands specified
4128on the command line, even when the '-f' option is present.  This is contrary
4129to the behaviour of most rm programs out there, and not conforming with
4130the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4131
4132Please tell bug-automake@gnu.org about your system, including the value
4133of your $PATH and any error possibly output before this message.  This
4134can help us improve future automake versions.
4135
4136END
4137  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4138    echo 'Configuration will proceed anyway, since you have set the' >&2
4139    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4140    echo >&2
4141  else
4142    cat >&2 <<'END'
4143Aborting the configuration process, to ensure you take notice of the issue.
4144
4145You can download and install GNU coreutils to get an 'rm' implementation
4146that behaves properly: <http://www.gnu.org/software/coreutils/>.
4147
4148If you want to complete the configuration process using your problematic
4149'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4150to "yes", and re-run configure.
4151
4152END
4153    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4154  fi
4155fi
4156
4157
4158# Enable silent rules by default:
4159# Check whether --enable-silent-rules was given.
4160if test "${enable_silent_rules+set}" = set; then :
4161  enableval=$enable_silent_rules;
4162fi
4163
4164case $enable_silent_rules in # (((
4165  yes) AM_DEFAULT_VERBOSITY=0;;
4166   no) AM_DEFAULT_VERBOSITY=1;;
4167    *) AM_DEFAULT_VERBOSITY=0;;
4168esac
4169am_make=${MAKE-make}
4170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4171$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4172if ${am_cv_make_support_nested_variables+:} false; then :
4173  $as_echo_n "(cached) " >&6
4174else
4175  if $as_echo 'TRUE=$(BAR$(V))
4176BAR0=false
4177BAR1=true
4178V=1
4179am__doit:
4180	@$(TRUE)
4181.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4182  am_cv_make_support_nested_variables=yes
4183else
4184  am_cv_make_support_nested_variables=no
4185fi
4186fi
4187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4188$as_echo "$am_cv_make_support_nested_variables" >&6; }
4189if test $am_cv_make_support_nested_variables = yes; then
4190    AM_V='$(V)'
4191  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4192else
4193  AM_V=$AM_DEFAULT_VERBOSITY
4194  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4195fi
4196AM_BACKSLASH='\'
4197
4198
4199ac_ext=c
4200ac_cpp='$CPP $CPPFLAGS'
4201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4203ac_compiler_gnu=$ac_cv_c_compiler_gnu
4204if test -n "$ac_tool_prefix"; then
4205  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4206set dummy ${ac_tool_prefix}gcc; ac_word=$2
4207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4208$as_echo_n "checking for $ac_word... " >&6; }
4209if ${ac_cv_prog_CC+:} false; then :
4210  $as_echo_n "(cached) " >&6
4211else
4212  if test -n "$CC"; then
4213  ac_cv_prog_CC="$CC" # Let the user override the test.
4214else
4215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4216for as_dir in $PATH
4217do
4218  IFS=$as_save_IFS
4219  test -z "$as_dir" && as_dir=.
4220    for ac_exec_ext in '' $ac_executable_extensions; do
4221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4222    ac_cv_prog_CC="${ac_tool_prefix}gcc"
4223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4224    break 2
4225  fi
4226done
4227  done
4228IFS=$as_save_IFS
4229
4230fi
4231fi
4232CC=$ac_cv_prog_CC
4233if test -n "$CC"; then
4234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4235$as_echo "$CC" >&6; }
4236else
4237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4238$as_echo "no" >&6; }
4239fi
4240
4241
4242fi
4243if test -z "$ac_cv_prog_CC"; then
4244  ac_ct_CC=$CC
4245  # Extract the first word of "gcc", so it can be a program name with args.
4246set dummy gcc; ac_word=$2
4247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4248$as_echo_n "checking for $ac_word... " >&6; }
4249if ${ac_cv_prog_ac_ct_CC+:} false; then :
4250  $as_echo_n "(cached) " >&6
4251else
4252  if test -n "$ac_ct_CC"; then
4253  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4254else
4255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4256for as_dir in $PATH
4257do
4258  IFS=$as_save_IFS
4259  test -z "$as_dir" && as_dir=.
4260    for ac_exec_ext in '' $ac_executable_extensions; do
4261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4262    ac_cv_prog_ac_ct_CC="gcc"
4263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4264    break 2
4265  fi
4266done
4267  done
4268IFS=$as_save_IFS
4269
4270fi
4271fi
4272ac_ct_CC=$ac_cv_prog_ac_ct_CC
4273if test -n "$ac_ct_CC"; then
4274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4275$as_echo "$ac_ct_CC" >&6; }
4276else
4277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4278$as_echo "no" >&6; }
4279fi
4280
4281  if test "x$ac_ct_CC" = x; then
4282    CC=""
4283  else
4284    case $cross_compiling:$ac_tool_warned in
4285yes:)
4286{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4287$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4288ac_tool_warned=yes ;;
4289esac
4290    CC=$ac_ct_CC
4291  fi
4292else
4293  CC="$ac_cv_prog_CC"
4294fi
4295
4296if test -z "$CC"; then
4297          if test -n "$ac_tool_prefix"; then
4298    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4299set dummy ${ac_tool_prefix}cc; ac_word=$2
4300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4301$as_echo_n "checking for $ac_word... " >&6; }
4302if ${ac_cv_prog_CC+:} false; then :
4303  $as_echo_n "(cached) " >&6
4304else
4305  if test -n "$CC"; then
4306  ac_cv_prog_CC="$CC" # Let the user override the test.
4307else
4308as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4309for as_dir in $PATH
4310do
4311  IFS=$as_save_IFS
4312  test -z "$as_dir" && as_dir=.
4313    for ac_exec_ext in '' $ac_executable_extensions; do
4314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4315    ac_cv_prog_CC="${ac_tool_prefix}cc"
4316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4317    break 2
4318  fi
4319done
4320  done
4321IFS=$as_save_IFS
4322
4323fi
4324fi
4325CC=$ac_cv_prog_CC
4326if test -n "$CC"; then
4327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4328$as_echo "$CC" >&6; }
4329else
4330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4331$as_echo "no" >&6; }
4332fi
4333
4334
4335  fi
4336fi
4337if test -z "$CC"; then
4338  # Extract the first word of "cc", so it can be a program name with args.
4339set dummy cc; ac_word=$2
4340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4341$as_echo_n "checking for $ac_word... " >&6; }
4342if ${ac_cv_prog_CC+:} false; then :
4343  $as_echo_n "(cached) " >&6
4344else
4345  if test -n "$CC"; then
4346  ac_cv_prog_CC="$CC" # Let the user override the test.
4347else
4348  ac_prog_rejected=no
4349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4350for as_dir in $PATH
4351do
4352  IFS=$as_save_IFS
4353  test -z "$as_dir" && as_dir=.
4354    for ac_exec_ext in '' $ac_executable_extensions; do
4355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4356    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4357       ac_prog_rejected=yes
4358       continue
4359     fi
4360    ac_cv_prog_CC="cc"
4361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4362    break 2
4363  fi
4364done
4365  done
4366IFS=$as_save_IFS
4367
4368if test $ac_prog_rejected = yes; then
4369  # We found a bogon in the path, so make sure we never use it.
4370  set dummy $ac_cv_prog_CC
4371  shift
4372  if test $# != 0; then
4373    # We chose a different compiler from the bogus one.
4374    # However, it has the same basename, so the bogon will be chosen
4375    # first if we set CC to just the basename; use the full file name.
4376    shift
4377    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4378  fi
4379fi
4380fi
4381fi
4382CC=$ac_cv_prog_CC
4383if test -n "$CC"; then
4384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4385$as_echo "$CC" >&6; }
4386else
4387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4388$as_echo "no" >&6; }
4389fi
4390
4391
4392fi
4393if test -z "$CC"; then
4394  if test -n "$ac_tool_prefix"; then
4395  for ac_prog in cl.exe
4396  do
4397    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4398set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4400$as_echo_n "checking for $ac_word... " >&6; }
4401if ${ac_cv_prog_CC+:} false; then :
4402  $as_echo_n "(cached) " >&6
4403else
4404  if test -n "$CC"; then
4405  ac_cv_prog_CC="$CC" # Let the user override the test.
4406else
4407as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4408for as_dir in $PATH
4409do
4410  IFS=$as_save_IFS
4411  test -z "$as_dir" && as_dir=.
4412    for ac_exec_ext in '' $ac_executable_extensions; do
4413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4414    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4416    break 2
4417  fi
4418done
4419  done
4420IFS=$as_save_IFS
4421
4422fi
4423fi
4424CC=$ac_cv_prog_CC
4425if test -n "$CC"; then
4426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4427$as_echo "$CC" >&6; }
4428else
4429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4430$as_echo "no" >&6; }
4431fi
4432
4433
4434    test -n "$CC" && break
4435  done
4436fi
4437if test -z "$CC"; then
4438  ac_ct_CC=$CC
4439  for ac_prog in cl.exe
4440do
4441  # Extract the first word of "$ac_prog", so it can be a program name with args.
4442set dummy $ac_prog; ac_word=$2
4443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4444$as_echo_n "checking for $ac_word... " >&6; }
4445if ${ac_cv_prog_ac_ct_CC+:} false; then :
4446  $as_echo_n "(cached) " >&6
4447else
4448  if test -n "$ac_ct_CC"; then
4449  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4450else
4451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4452for as_dir in $PATH
4453do
4454  IFS=$as_save_IFS
4455  test -z "$as_dir" && as_dir=.
4456    for ac_exec_ext in '' $ac_executable_extensions; do
4457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4458    ac_cv_prog_ac_ct_CC="$ac_prog"
4459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4460    break 2
4461  fi
4462done
4463  done
4464IFS=$as_save_IFS
4465
4466fi
4467fi
4468ac_ct_CC=$ac_cv_prog_ac_ct_CC
4469if test -n "$ac_ct_CC"; then
4470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4471$as_echo "$ac_ct_CC" >&6; }
4472else
4473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4474$as_echo "no" >&6; }
4475fi
4476
4477
4478  test -n "$ac_ct_CC" && break
4479done
4480
4481  if test "x$ac_ct_CC" = x; then
4482    CC=""
4483  else
4484    case $cross_compiling:$ac_tool_warned in
4485yes:)
4486{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4487$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4488ac_tool_warned=yes ;;
4489esac
4490    CC=$ac_ct_CC
4491  fi
4492fi
4493
4494fi
4495
4496
4497test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4498$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4499as_fn_error $? "no acceptable C compiler found in \$PATH
4500See \`config.log' for more details" "$LINENO" 5; }
4501
4502# Provide some information about the compiler.
4503$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4504set X $ac_compile
4505ac_compiler=$2
4506for ac_option in --version -v -V -qversion; do
4507  { { ac_try="$ac_compiler $ac_option >&5"
4508case "(($ac_try" in
4509  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4510  *) ac_try_echo=$ac_try;;
4511esac
4512eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4513$as_echo "$ac_try_echo"; } >&5
4514  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4515  ac_status=$?
4516  if test -s conftest.err; then
4517    sed '10a\
4518... rest of stderr output deleted ...
4519         10q' conftest.err >conftest.er1
4520    cat conftest.er1 >&5
4521  fi
4522  rm -f conftest.er1 conftest.err
4523  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4524  test $ac_status = 0; }
4525done
4526
4527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4528/* end confdefs.h.  */
4529
4530int
4531main ()
4532{
4533
4534  ;
4535  return 0;
4536}
4537_ACEOF
4538ac_clean_files_save=$ac_clean_files
4539ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4540# Try to create an executable without -o first, disregard a.out.
4541# It will help us diagnose broken compilers, and finding out an intuition
4542# of exeext.
4543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4544$as_echo_n "checking whether the C compiler works... " >&6; }
4545ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4546
4547# The possible output files:
4548ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4549
4550ac_rmfiles=
4551for ac_file in $ac_files
4552do
4553  case $ac_file in
4554    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4555    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4556  esac
4557done
4558rm -f $ac_rmfiles
4559
4560if { { ac_try="$ac_link_default"
4561case "(($ac_try" in
4562  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4563  *) ac_try_echo=$ac_try;;
4564esac
4565eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4566$as_echo "$ac_try_echo"; } >&5
4567  (eval "$ac_link_default") 2>&5
4568  ac_status=$?
4569  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4570  test $ac_status = 0; }; then :
4571  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4572# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4573# in a Makefile.  We should not override ac_cv_exeext if it was cached,
4574# so that the user can short-circuit this test for compilers unknown to
4575# Autoconf.
4576for ac_file in $ac_files ''
4577do
4578  test -f "$ac_file" || continue
4579  case $ac_file in
4580    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4581	;;
4582    [ab].out )
4583	# We found the default executable, but exeext='' is most
4584	# certainly right.
4585	break;;
4586    *.* )
4587	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4588	then :; else
4589	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4590	fi
4591	# We set ac_cv_exeext here because the later test for it is not
4592	# safe: cross compilers may not add the suffix if given an `-o'
4593	# argument, so we may need to know it at that point already.
4594	# Even if this section looks crufty: it has the advantage of
4595	# actually working.
4596	break;;
4597    * )
4598	break;;
4599  esac
4600done
4601test "$ac_cv_exeext" = no && ac_cv_exeext=
4602
4603else
4604  ac_file=''
4605fi
4606if test -z "$ac_file"; then :
4607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4608$as_echo "no" >&6; }
4609$as_echo "$as_me: failed program was:" >&5
4610sed 's/^/| /' conftest.$ac_ext >&5
4611
4612{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4613$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4614as_fn_error 77 "C compiler cannot create executables
4615See \`config.log' for more details" "$LINENO" 5; }
4616else
4617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4618$as_echo "yes" >&6; }
4619fi
4620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4621$as_echo_n "checking for C compiler default output file name... " >&6; }
4622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4623$as_echo "$ac_file" >&6; }
4624ac_exeext=$ac_cv_exeext
4625
4626rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4627ac_clean_files=$ac_clean_files_save
4628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4629$as_echo_n "checking for suffix of executables... " >&6; }
4630if { { ac_try="$ac_link"
4631case "(($ac_try" in
4632  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4633  *) ac_try_echo=$ac_try;;
4634esac
4635eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4636$as_echo "$ac_try_echo"; } >&5
4637  (eval "$ac_link") 2>&5
4638  ac_status=$?
4639  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4640  test $ac_status = 0; }; then :
4641  # If both `conftest.exe' and `conftest' are `present' (well, observable)
4642# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4643# work properly (i.e., refer to `conftest.exe'), while it won't with
4644# `rm'.
4645for ac_file in conftest.exe conftest conftest.*; do
4646  test -f "$ac_file" || continue
4647  case $ac_file in
4648    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4649    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4650	  break;;
4651    * ) break;;
4652  esac
4653done
4654else
4655  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4657as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4658See \`config.log' for more details" "$LINENO" 5; }
4659fi
4660rm -f conftest conftest$ac_cv_exeext
4661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4662$as_echo "$ac_cv_exeext" >&6; }
4663
4664rm -f conftest.$ac_ext
4665EXEEXT=$ac_cv_exeext
4666ac_exeext=$EXEEXT
4667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4668/* end confdefs.h.  */
4669#include <stdio.h>
4670int
4671main ()
4672{
4673FILE *f = fopen ("conftest.out", "w");
4674 return ferror (f) || fclose (f) != 0;
4675
4676  ;
4677  return 0;
4678}
4679_ACEOF
4680ac_clean_files="$ac_clean_files conftest.out"
4681# Check that the compiler produces executables we can run.  If not, either
4682# the compiler is broken, or we cross compile.
4683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4684$as_echo_n "checking whether we are cross compiling... " >&6; }
4685if test "$cross_compiling" != yes; then
4686  { { ac_try="$ac_link"
4687case "(($ac_try" in
4688  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4689  *) ac_try_echo=$ac_try;;
4690esac
4691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4692$as_echo "$ac_try_echo"; } >&5
4693  (eval "$ac_link") 2>&5
4694  ac_status=$?
4695  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4696  test $ac_status = 0; }
4697  if { ac_try='./conftest$ac_cv_exeext'
4698  { { case "(($ac_try" in
4699  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4700  *) ac_try_echo=$ac_try;;
4701esac
4702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4703$as_echo "$ac_try_echo"; } >&5
4704  (eval "$ac_try") 2>&5
4705  ac_status=$?
4706  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4707  test $ac_status = 0; }; }; then
4708    cross_compiling=no
4709  else
4710    if test "$cross_compiling" = maybe; then
4711	cross_compiling=yes
4712    else
4713	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4714$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4715as_fn_error $? "cannot run C compiled programs.
4716If you meant to cross compile, use \`--host'.
4717See \`config.log' for more details" "$LINENO" 5; }
4718    fi
4719  fi
4720fi
4721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4722$as_echo "$cross_compiling" >&6; }
4723
4724rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4725ac_clean_files=$ac_clean_files_save
4726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4727$as_echo_n "checking for suffix of object files... " >&6; }
4728if ${ac_cv_objext+:} false; then :
4729  $as_echo_n "(cached) " >&6
4730else
4731  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4732/* end confdefs.h.  */
4733
4734int
4735main ()
4736{
4737
4738  ;
4739  return 0;
4740}
4741_ACEOF
4742rm -f conftest.o conftest.obj
4743if { { ac_try="$ac_compile"
4744case "(($ac_try" in
4745  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4746  *) ac_try_echo=$ac_try;;
4747esac
4748eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4749$as_echo "$ac_try_echo"; } >&5
4750  (eval "$ac_compile") 2>&5
4751  ac_status=$?
4752  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4753  test $ac_status = 0; }; then :
4754  for ac_file in conftest.o conftest.obj conftest.*; do
4755  test -f "$ac_file" || continue;
4756  case $ac_file in
4757    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4758    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4759       break;;
4760  esac
4761done
4762else
4763  $as_echo "$as_me: failed program was:" >&5
4764sed 's/^/| /' conftest.$ac_ext >&5
4765
4766{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4768as_fn_error $? "cannot compute suffix of object files: cannot compile
4769See \`config.log' for more details" "$LINENO" 5; }
4770fi
4771rm -f conftest.$ac_cv_objext conftest.$ac_ext
4772fi
4773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4774$as_echo "$ac_cv_objext" >&6; }
4775OBJEXT=$ac_cv_objext
4776ac_objext=$OBJEXT
4777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4778$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4779if ${ac_cv_c_compiler_gnu+:} false; then :
4780  $as_echo_n "(cached) " >&6
4781else
4782  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4783/* end confdefs.h.  */
4784
4785int
4786main ()
4787{
4788#ifndef __GNUC__
4789       choke me
4790#endif
4791
4792  ;
4793  return 0;
4794}
4795_ACEOF
4796if ac_fn_c_try_compile "$LINENO"; then :
4797  ac_compiler_gnu=yes
4798else
4799  ac_compiler_gnu=no
4800fi
4801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4802ac_cv_c_compiler_gnu=$ac_compiler_gnu
4803
4804fi
4805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4806$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4807if test $ac_compiler_gnu = yes; then
4808  GCC=yes
4809else
4810  GCC=
4811fi
4812ac_test_CFLAGS=${CFLAGS+set}
4813ac_save_CFLAGS=$CFLAGS
4814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4815$as_echo_n "checking whether $CC accepts -g... " >&6; }
4816if ${ac_cv_prog_cc_g+:} false; then :
4817  $as_echo_n "(cached) " >&6
4818else
4819  ac_save_c_werror_flag=$ac_c_werror_flag
4820   ac_c_werror_flag=yes
4821   ac_cv_prog_cc_g=no
4822   CFLAGS="-g"
4823   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4824/* end confdefs.h.  */
4825
4826int
4827main ()
4828{
4829
4830  ;
4831  return 0;
4832}
4833_ACEOF
4834if ac_fn_c_try_compile "$LINENO"; then :
4835  ac_cv_prog_cc_g=yes
4836else
4837  CFLAGS=""
4838      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4839/* end confdefs.h.  */
4840
4841int
4842main ()
4843{
4844
4845  ;
4846  return 0;
4847}
4848_ACEOF
4849if ac_fn_c_try_compile "$LINENO"; then :
4850
4851else
4852  ac_c_werror_flag=$ac_save_c_werror_flag
4853	 CFLAGS="-g"
4854	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4855/* end confdefs.h.  */
4856
4857int
4858main ()
4859{
4860
4861  ;
4862  return 0;
4863}
4864_ACEOF
4865if ac_fn_c_try_compile "$LINENO"; then :
4866  ac_cv_prog_cc_g=yes
4867fi
4868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4869fi
4870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4871fi
4872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4873   ac_c_werror_flag=$ac_save_c_werror_flag
4874fi
4875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4876$as_echo "$ac_cv_prog_cc_g" >&6; }
4877if test "$ac_test_CFLAGS" = set; then
4878  CFLAGS=$ac_save_CFLAGS
4879elif test $ac_cv_prog_cc_g = yes; then
4880  if test "$GCC" = yes; then
4881    CFLAGS="-g -O2"
4882  else
4883    CFLAGS="-g"
4884  fi
4885else
4886  if test "$GCC" = yes; then
4887    CFLAGS="-O2"
4888  else
4889    CFLAGS=
4890  fi
4891fi
4892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4893$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4894if ${ac_cv_prog_cc_c89+:} false; then :
4895  $as_echo_n "(cached) " >&6
4896else
4897  ac_cv_prog_cc_c89=no
4898ac_save_CC=$CC
4899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4900/* end confdefs.h.  */
4901#include <stdarg.h>
4902#include <stdio.h>
4903struct stat;
4904/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4905struct buf { int x; };
4906FILE * (*rcsopen) (struct buf *, struct stat *, int);
4907static char *e (p, i)
4908     char **p;
4909     int i;
4910{
4911  return p[i];
4912}
4913static char *f (char * (*g) (char **, int), char **p, ...)
4914{
4915  char *s;
4916  va_list v;
4917  va_start (v,p);
4918  s = g (p, va_arg (v,int));
4919  va_end (v);
4920  return s;
4921}
4922
4923/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4924   function prototypes and stuff, but not '\xHH' hex character constants.
4925   These don't provoke an error unfortunately, instead are silently treated
4926   as 'x'.  The following induces an error, until -std is added to get
4927   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4928   array size at least.  It's necessary to write '\x00'==0 to get something
4929   that's true only with -std.  */
4930int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4931
4932/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4933   inside strings and character constants.  */
4934#define FOO(x) 'x'
4935int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4936
4937int test (int i, double x);
4938struct s1 {int (*f) (int a);};
4939struct s2 {int (*f) (double a);};
4940int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4941int argc;
4942char **argv;
4943int
4944main ()
4945{
4946return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4947  ;
4948  return 0;
4949}
4950_ACEOF
4951for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4952	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4953do
4954  CC="$ac_save_CC $ac_arg"
4955  if ac_fn_c_try_compile "$LINENO"; then :
4956  ac_cv_prog_cc_c89=$ac_arg
4957fi
4958rm -f core conftest.err conftest.$ac_objext
4959  test "x$ac_cv_prog_cc_c89" != "xno" && break
4960done
4961rm -f conftest.$ac_ext
4962CC=$ac_save_CC
4963
4964fi
4965# AC_CACHE_VAL
4966case "x$ac_cv_prog_cc_c89" in
4967  x)
4968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4969$as_echo "none needed" >&6; } ;;
4970  xno)
4971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4972$as_echo "unsupported" >&6; } ;;
4973  *)
4974    CC="$CC $ac_cv_prog_cc_c89"
4975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4976$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4977esac
4978if test "x$ac_cv_prog_cc_c89" != xno; then :
4979
4980fi
4981
4982ac_ext=c
4983ac_cpp='$CPP $CPPFLAGS'
4984ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4985ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4986ac_compiler_gnu=$ac_cv_c_compiler_gnu
4987
4988ac_ext=c
4989ac_cpp='$CPP $CPPFLAGS'
4990ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4991ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4992ac_compiler_gnu=$ac_cv_c_compiler_gnu
4993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4994$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4995if ${am_cv_prog_cc_c_o+:} false; then :
4996  $as_echo_n "(cached) " >&6
4997else
4998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4999/* end confdefs.h.  */
5000
5001int
5002main ()
5003{
5004
5005  ;
5006  return 0;
5007}
5008_ACEOF
5009  # Make sure it works both with $CC and with simple cc.
5010  # Following AC_PROG_CC_C_O, we do the test twice because some
5011  # compilers refuse to overwrite an existing .o file with -o,
5012  # though they will create one.
5013  am_cv_prog_cc_c_o=yes
5014  for am_i in 1 2; do
5015    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5016   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5017   ac_status=$?
5018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5019   (exit $ac_status); } \
5020         && test -f conftest2.$ac_objext; then
5021      : OK
5022    else
5023      am_cv_prog_cc_c_o=no
5024      break
5025    fi
5026  done
5027  rm -f core conftest*
5028  unset am_i
5029fi
5030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5031$as_echo "$am_cv_prog_cc_c_o" >&6; }
5032if test "$am_cv_prog_cc_c_o" != yes; then
5033   # Losing compiler, so override with the script.
5034   # FIXME: It is wrong to rewrite CC.
5035   # But if we don't then we get into trouble of one sort or another.
5036   # A longer-term fix would be to have automake use am__CC in this case,
5037   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5038   CC="$am_aux_dir/compile $CC"
5039fi
5040ac_ext=c
5041ac_cpp='$CPP $CPPFLAGS'
5042ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5043ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5044ac_compiler_gnu=$ac_cv_c_compiler_gnu
5045
5046DEPDIR="${am__leading_dot}deps"
5047
5048ac_config_commands="$ac_config_commands depfiles"
5049
5050
5051am_make=${MAKE-make}
5052cat > confinc << 'END'
5053am__doit:
5054	@echo this is the am__doit target
5055.PHONY: am__doit
5056END
5057# If we don't find an include directive, just comment out the code.
5058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5059$as_echo_n "checking for style of include used by $am_make... " >&6; }
5060am__include="#"
5061am__quote=
5062_am_result=none
5063# First try GNU make style include.
5064echo "include confinc" > confmf
5065# Ignore all kinds of additional output from 'make'.
5066case `$am_make -s -f confmf 2> /dev/null` in #(
5067*the\ am__doit\ target*)
5068  am__include=include
5069  am__quote=
5070  _am_result=GNU
5071  ;;
5072esac
5073# Now try BSD make style include.
5074if test "$am__include" = "#"; then
5075   echo '.include "confinc"' > confmf
5076   case `$am_make -s -f confmf 2> /dev/null` in #(
5077   *the\ am__doit\ target*)
5078     am__include=.include
5079     am__quote="\""
5080     _am_result=BSD
5081     ;;
5082   esac
5083fi
5084
5085
5086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5087$as_echo "$_am_result" >&6; }
5088rm -f confinc confmf
5089
5090# Check whether --enable-dependency-tracking was given.
5091if test "${enable_dependency_tracking+set}" = set; then :
5092  enableval=$enable_dependency_tracking;
5093fi
5094
5095if test "x$enable_dependency_tracking" != xno; then
5096  am_depcomp="$ac_aux_dir/depcomp"
5097  AMDEPBACKSLASH='\'
5098  am__nodep='_no'
5099fi
5100 if test "x$enable_dependency_tracking" != xno; then
5101  AMDEP_TRUE=
5102  AMDEP_FALSE='#'
5103else
5104  AMDEP_TRUE='#'
5105  AMDEP_FALSE=
5106fi
5107
5108
5109
5110depcc="$CC"   am_compiler_list=
5111
5112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5113$as_echo_n "checking dependency style of $depcc... " >&6; }
5114if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5115  $as_echo_n "(cached) " >&6
5116else
5117  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5118  # We make a subdir and do the tests there.  Otherwise we can end up
5119  # making bogus files that we don't know about and never remove.  For
5120  # instance it was reported that on HP-UX the gcc test will end up
5121  # making a dummy file named 'D' -- because '-MD' means "put the output
5122  # in D".
5123  rm -rf conftest.dir
5124  mkdir conftest.dir
5125  # Copy depcomp to subdir because otherwise we won't find it if we're
5126  # using a relative directory.
5127  cp "$am_depcomp" conftest.dir
5128  cd conftest.dir
5129  # We will build objects and dependencies in a subdirectory because
5130  # it helps to detect inapplicable dependency modes.  For instance
5131  # both Tru64's cc and ICC support -MD to output dependencies as a
5132  # side effect of compilation, but ICC will put the dependencies in
5133  # the current directory while Tru64 will put them in the object
5134  # directory.
5135  mkdir sub
5136
5137  am_cv_CC_dependencies_compiler_type=none
5138  if test "$am_compiler_list" = ""; then
5139     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5140  fi
5141  am__universal=false
5142  case " $depcc " in #(
5143     *\ -arch\ *\ -arch\ *) am__universal=true ;;
5144     esac
5145
5146  for depmode in $am_compiler_list; do
5147    # Setup a source with many dependencies, because some compilers
5148    # like to wrap large dependency lists on column 80 (with \), and
5149    # we should not choose a depcomp mode which is confused by this.
5150    #
5151    # We need to recreate these files for each test, as the compiler may
5152    # overwrite some of them when testing with obscure command lines.
5153    # This happens at least with the AIX C compiler.
5154    : > sub/conftest.c
5155    for i in 1 2 3 4 5 6; do
5156      echo '#include "conftst'$i'.h"' >> sub/conftest.c
5157      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5158      # Solaris 10 /bin/sh.
5159      echo '/* dummy */' > sub/conftst$i.h
5160    done
5161    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5162
5163    # We check with '-c' and '-o' for the sake of the "dashmstdout"
5164    # mode.  It turns out that the SunPro C++ compiler does not properly
5165    # handle '-M -o', and we need to detect this.  Also, some Intel
5166    # versions had trouble with output in subdirs.
5167    am__obj=sub/conftest.${OBJEXT-o}
5168    am__minus_obj="-o $am__obj"
5169    case $depmode in
5170    gcc)
5171      # This depmode causes a compiler race in universal mode.
5172      test "$am__universal" = false || continue
5173      ;;
5174    nosideeffect)
5175      # After this tag, mechanisms are not by side-effect, so they'll
5176      # only be used when explicitly requested.
5177      if test "x$enable_dependency_tracking" = xyes; then
5178	continue
5179      else
5180	break
5181      fi
5182      ;;
5183    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5184      # This compiler won't grok '-c -o', but also, the minuso test has
5185      # not run yet.  These depmodes are late enough in the game, and
5186      # so weak that their functioning should not be impacted.
5187      am__obj=conftest.${OBJEXT-o}
5188      am__minus_obj=
5189      ;;
5190    none) break ;;
5191    esac
5192    if depmode=$depmode \
5193       source=sub/conftest.c object=$am__obj \
5194       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5195       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5196         >/dev/null 2>conftest.err &&
5197       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5198       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5199       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5200       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5201      # icc doesn't choke on unknown options, it will just issue warnings
5202      # or remarks (even with -Werror).  So we grep stderr for any message
5203      # that says an option was ignored or not supported.
5204      # When given -MP, icc 7.0 and 7.1 complain thusly:
5205      #   icc: Command line warning: ignoring option '-M'; no argument required
5206      # The diagnosis changed in icc 8.0:
5207      #   icc: Command line remark: option '-MP' not supported
5208      if (grep 'ignoring option' conftest.err ||
5209          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5210        am_cv_CC_dependencies_compiler_type=$depmode
5211        break
5212      fi
5213    fi
5214  done
5215
5216  cd ..
5217  rm -rf conftest.dir
5218else
5219  am_cv_CC_dependencies_compiler_type=none
5220fi
5221
5222fi
5223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5224$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5225CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5226
5227 if
5228  test "x$enable_dependency_tracking" != xno \
5229  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5230  am__fastdepCC_TRUE=
5231  am__fastdepCC_FALSE='#'
5232else
5233  am__fastdepCC_TRUE='#'
5234  am__fastdepCC_FALSE=
5235fi
5236
5237
5238ac_ext=c
5239ac_cpp='$CPP $CPPFLAGS'
5240ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5241ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5242ac_compiler_gnu=$ac_cv_c_compiler_gnu
5243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5244$as_echo_n "checking how to run the C preprocessor... " >&6; }
5245# On Suns, sometimes $CPP names a directory.
5246if test -n "$CPP" && test -d "$CPP"; then
5247  CPP=
5248fi
5249if test -z "$CPP"; then
5250  if ${ac_cv_prog_CPP+:} false; then :
5251  $as_echo_n "(cached) " >&6
5252else
5253      # Double quotes because CPP needs to be expanded
5254    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5255    do
5256      ac_preproc_ok=false
5257for ac_c_preproc_warn_flag in '' yes
5258do
5259  # Use a header file that comes with gcc, so configuring glibc
5260  # with a fresh cross-compiler works.
5261  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5262  # <limits.h> exists even on freestanding compilers.
5263  # On the NeXT, cc -E runs the code through the compiler's parser,
5264  # not just through cpp. "Syntax error" is here to catch this case.
5265  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5266/* end confdefs.h.  */
5267#ifdef __STDC__
5268# include <limits.h>
5269#else
5270# include <assert.h>
5271#endif
5272		     Syntax error
5273_ACEOF
5274if ac_fn_c_try_cpp "$LINENO"; then :
5275
5276else
5277  # Broken: fails on valid input.
5278continue
5279fi
5280rm -f conftest.err conftest.i conftest.$ac_ext
5281
5282  # OK, works on sane cases.  Now check whether nonexistent headers
5283  # can be detected and how.
5284  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5285/* end confdefs.h.  */
5286#include <ac_nonexistent.h>
5287_ACEOF
5288if ac_fn_c_try_cpp "$LINENO"; then :
5289  # Broken: success on invalid input.
5290continue
5291else
5292  # Passes both tests.
5293ac_preproc_ok=:
5294break
5295fi
5296rm -f conftest.err conftest.i conftest.$ac_ext
5297
5298done
5299# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5300rm -f conftest.i conftest.err conftest.$ac_ext
5301if $ac_preproc_ok; then :
5302  break
5303fi
5304
5305    done
5306    ac_cv_prog_CPP=$CPP
5307
5308fi
5309  CPP=$ac_cv_prog_CPP
5310else
5311  ac_cv_prog_CPP=$CPP
5312fi
5313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5314$as_echo "$CPP" >&6; }
5315ac_preproc_ok=false
5316for ac_c_preproc_warn_flag in '' yes
5317do
5318  # Use a header file that comes with gcc, so configuring glibc
5319  # with a fresh cross-compiler works.
5320  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5321  # <limits.h> exists even on freestanding compilers.
5322  # On the NeXT, cc -E runs the code through the compiler's parser,
5323  # not just through cpp. "Syntax error" is here to catch this case.
5324  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5325/* end confdefs.h.  */
5326#ifdef __STDC__
5327# include <limits.h>
5328#else
5329# include <assert.h>
5330#endif
5331		     Syntax error
5332_ACEOF
5333if ac_fn_c_try_cpp "$LINENO"; then :
5334
5335else
5336  # Broken: fails on valid input.
5337continue
5338fi
5339rm -f conftest.err conftest.i conftest.$ac_ext
5340
5341  # OK, works on sane cases.  Now check whether nonexistent headers
5342  # can be detected and how.
5343  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5344/* end confdefs.h.  */
5345#include <ac_nonexistent.h>
5346_ACEOF
5347if ac_fn_c_try_cpp "$LINENO"; then :
5348  # Broken: success on invalid input.
5349continue
5350else
5351  # Passes both tests.
5352ac_preproc_ok=:
5353break
5354fi
5355rm -f conftest.err conftest.i conftest.$ac_ext
5356
5357done
5358# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5359rm -f conftest.i conftest.err conftest.$ac_ext
5360if $ac_preproc_ok; then :
5361
5362else
5363  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5364$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5365as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5366See \`config.log' for more details" "$LINENO" 5; }
5367fi
5368
5369ac_ext=c
5370ac_cpp='$CPP $CPPFLAGS'
5371ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5372ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5373ac_compiler_gnu=$ac_cv_c_compiler_gnu
5374
5375
5376
5377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5378$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5379if ${ac_cv_path_GREP+:} false; then :
5380  $as_echo_n "(cached) " >&6
5381else
5382  if test -z "$GREP"; then
5383  ac_path_GREP_found=false
5384  # Loop through the user's path and test for each of PROGNAME-LIST
5385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5386for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5387do
5388  IFS=$as_save_IFS
5389  test -z "$as_dir" && as_dir=.
5390    for ac_prog in grep ggrep; do
5391    for ac_exec_ext in '' $ac_executable_extensions; do
5392      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5393      as_fn_executable_p "$ac_path_GREP" || continue
5394# Check for GNU ac_path_GREP and select it if it is found.
5395  # Check for GNU $ac_path_GREP
5396case `"$ac_path_GREP" --version 2>&1` in
5397*GNU*)
5398  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5399*)
5400  ac_count=0
5401  $as_echo_n 0123456789 >"conftest.in"
5402  while :
5403  do
5404    cat "conftest.in" "conftest.in" >"conftest.tmp"
5405    mv "conftest.tmp" "conftest.in"
5406    cp "conftest.in" "conftest.nl"
5407    $as_echo 'GREP' >> "conftest.nl"
5408    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5409    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5410    as_fn_arith $ac_count + 1 && ac_count=$as_val
5411    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5412      # Best one so far, save it but keep looking for a better one
5413      ac_cv_path_GREP="$ac_path_GREP"
5414      ac_path_GREP_max=$ac_count
5415    fi
5416    # 10*(2^10) chars as input seems more than enough
5417    test $ac_count -gt 10 && break
5418  done
5419  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5420esac
5421
5422      $ac_path_GREP_found && break 3
5423    done
5424  done
5425  done
5426IFS=$as_save_IFS
5427  if test -z "$ac_cv_path_GREP"; then
5428    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5429  fi
5430else
5431  ac_cv_path_GREP=$GREP
5432fi
5433
5434fi
5435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5436$as_echo "$ac_cv_path_GREP" >&6; }
5437 GREP="$ac_cv_path_GREP"
5438
5439
5440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5441$as_echo_n "checking for egrep... " >&6; }
5442if ${ac_cv_path_EGREP+:} false; then :
5443  $as_echo_n "(cached) " >&6
5444else
5445  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5446   then ac_cv_path_EGREP="$GREP -E"
5447   else
5448     if test -z "$EGREP"; then
5449  ac_path_EGREP_found=false
5450  # Loop through the user's path and test for each of PROGNAME-LIST
5451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5452for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5453do
5454  IFS=$as_save_IFS
5455  test -z "$as_dir" && as_dir=.
5456    for ac_prog in egrep; do
5457    for ac_exec_ext in '' $ac_executable_extensions; do
5458      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5459      as_fn_executable_p "$ac_path_EGREP" || continue
5460# Check for GNU ac_path_EGREP and select it if it is found.
5461  # Check for GNU $ac_path_EGREP
5462case `"$ac_path_EGREP" --version 2>&1` in
5463*GNU*)
5464  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5465*)
5466  ac_count=0
5467  $as_echo_n 0123456789 >"conftest.in"
5468  while :
5469  do
5470    cat "conftest.in" "conftest.in" >"conftest.tmp"
5471    mv "conftest.tmp" "conftest.in"
5472    cp "conftest.in" "conftest.nl"
5473    $as_echo 'EGREP' >> "conftest.nl"
5474    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5475    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5476    as_fn_arith $ac_count + 1 && ac_count=$as_val
5477    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5478      # Best one so far, save it but keep looking for a better one
5479      ac_cv_path_EGREP="$ac_path_EGREP"
5480      ac_path_EGREP_max=$ac_count
5481    fi
5482    # 10*(2^10) chars as input seems more than enough
5483    test $ac_count -gt 10 && break
5484  done
5485  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5486esac
5487
5488      $ac_path_EGREP_found && break 3
5489    done
5490  done
5491  done
5492IFS=$as_save_IFS
5493  if test -z "$ac_cv_path_EGREP"; then
5494    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5495  fi
5496else
5497  ac_cv_path_EGREP=$EGREP
5498fi
5499
5500   fi
5501fi
5502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5503$as_echo "$ac_cv_path_EGREP" >&6; }
5504 EGREP="$ac_cv_path_EGREP"
5505
5506
5507if test $ac_cv_c_compiler_gnu = yes; then
5508    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
5509$as_echo_n "checking whether $CC needs -traditional... " >&6; }
5510if ${ac_cv_prog_gcc_traditional+:} false; then :
5511  $as_echo_n "(cached) " >&6
5512else
5513    ac_pattern="Autoconf.*'x'"
5514  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5515/* end confdefs.h.  */
5516#include <sgtty.h>
5517Autoconf TIOCGETP
5518_ACEOF
5519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5520  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
5521  ac_cv_prog_gcc_traditional=yes
5522else
5523  ac_cv_prog_gcc_traditional=no
5524fi
5525rm -f conftest*
5526
5527
5528  if test $ac_cv_prog_gcc_traditional = no; then
5529    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5530/* end confdefs.h.  */
5531#include <termio.h>
5532Autoconf TCGETA
5533_ACEOF
5534if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5535  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
5536  ac_cv_prog_gcc_traditional=yes
5537fi
5538rm -f conftest*
5539
5540  fi
5541fi
5542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
5543$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
5544  if test $ac_cv_prog_gcc_traditional = yes; then
5545    CC="$CC -traditional"
5546  fi
5547fi
5548
5549
5550if test -n "$ac_tool_prefix"; then
5551  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5552set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5554$as_echo_n "checking for $ac_word... " >&6; }
5555if ${ac_cv_prog_RANLIB+:} false; then :
5556  $as_echo_n "(cached) " >&6
5557else
5558  if test -n "$RANLIB"; then
5559  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5560else
5561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5562for as_dir in $PATH
5563do
5564  IFS=$as_save_IFS
5565  test -z "$as_dir" && as_dir=.
5566    for ac_exec_ext in '' $ac_executable_extensions; do
5567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5568    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5570    break 2
5571  fi
5572done
5573  done
5574IFS=$as_save_IFS
5575
5576fi
5577fi
5578RANLIB=$ac_cv_prog_RANLIB
5579if test -n "$RANLIB"; then
5580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5581$as_echo "$RANLIB" >&6; }
5582else
5583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584$as_echo "no" >&6; }
5585fi
5586
5587
5588fi
5589if test -z "$ac_cv_prog_RANLIB"; then
5590  ac_ct_RANLIB=$RANLIB
5591  # Extract the first word of "ranlib", so it can be a program name with args.
5592set dummy ranlib; ac_word=$2
5593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5594$as_echo_n "checking for $ac_word... " >&6; }
5595if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5596  $as_echo_n "(cached) " >&6
5597else
5598  if test -n "$ac_ct_RANLIB"; then
5599  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5600else
5601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5602for as_dir in $PATH
5603do
5604  IFS=$as_save_IFS
5605  test -z "$as_dir" && as_dir=.
5606    for ac_exec_ext in '' $ac_executable_extensions; do
5607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5608    ac_cv_prog_ac_ct_RANLIB="ranlib"
5609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5610    break 2
5611  fi
5612done
5613  done
5614IFS=$as_save_IFS
5615
5616fi
5617fi
5618ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5619if test -n "$ac_ct_RANLIB"; then
5620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5621$as_echo "$ac_ct_RANLIB" >&6; }
5622else
5623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5624$as_echo "no" >&6; }
5625fi
5626
5627  if test "x$ac_ct_RANLIB" = x; then
5628    RANLIB=":"
5629  else
5630    case $cross_compiling:$ac_tool_warned in
5631yes:)
5632{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5633$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5634ac_tool_warned=yes ;;
5635esac
5636    RANLIB=$ac_ct_RANLIB
5637  fi
5638else
5639  RANLIB="$ac_cv_prog_RANLIB"
5640fi
5641
5642for ac_prog in 'bison -y' byacc
5643do
5644  # Extract the first word of "$ac_prog", so it can be a program name with args.
5645set dummy $ac_prog; ac_word=$2
5646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5647$as_echo_n "checking for $ac_word... " >&6; }
5648if ${ac_cv_prog_YACC+:} false; then :
5649  $as_echo_n "(cached) " >&6
5650else
5651  if test -n "$YACC"; then
5652  ac_cv_prog_YACC="$YACC" # Let the user override the test.
5653else
5654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5655for as_dir in $PATH
5656do
5657  IFS=$as_save_IFS
5658  test -z "$as_dir" && as_dir=.
5659    for ac_exec_ext in '' $ac_executable_extensions; do
5660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5661    ac_cv_prog_YACC="$ac_prog"
5662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5663    break 2
5664  fi
5665done
5666  done
5667IFS=$as_save_IFS
5668
5669fi
5670fi
5671YACC=$ac_cv_prog_YACC
5672if test -n "$YACC"; then
5673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5674$as_echo "$YACC" >&6; }
5675else
5676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5677$as_echo "no" >&6; }
5678fi
5679
5680
5681  test -n "$YACC" && break
5682done
5683test -n "$YACC" || YACC="yacc"
5684
5685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5686$as_echo_n "checking for ANSI C header files... " >&6; }
5687if ${ac_cv_header_stdc+:} false; then :
5688  $as_echo_n "(cached) " >&6
5689else
5690  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5691/* end confdefs.h.  */
5692#include <stdlib.h>
5693#include <stdarg.h>
5694#include <string.h>
5695#include <float.h>
5696
5697int
5698main ()
5699{
5700
5701  ;
5702  return 0;
5703}
5704_ACEOF
5705if ac_fn_c_try_compile "$LINENO"; then :
5706  ac_cv_header_stdc=yes
5707else
5708  ac_cv_header_stdc=no
5709fi
5710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5711
5712if test $ac_cv_header_stdc = yes; then
5713  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5714  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5715/* end confdefs.h.  */
5716#include <string.h>
5717
5718_ACEOF
5719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5720  $EGREP "memchr" >/dev/null 2>&1; then :
5721
5722else
5723  ac_cv_header_stdc=no
5724fi
5725rm -f conftest*
5726
5727fi
5728
5729if test $ac_cv_header_stdc = yes; then
5730  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5731  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5732/* end confdefs.h.  */
5733#include <stdlib.h>
5734
5735_ACEOF
5736if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5737  $EGREP "free" >/dev/null 2>&1; then :
5738
5739else
5740  ac_cv_header_stdc=no
5741fi
5742rm -f conftest*
5743
5744fi
5745
5746if test $ac_cv_header_stdc = yes; then
5747  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5748  if test "$cross_compiling" = yes; then :
5749  :
5750else
5751  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5752/* end confdefs.h.  */
5753#include <ctype.h>
5754#include <stdlib.h>
5755#if ((' ' & 0x0FF) == 0x020)
5756# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5757# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5758#else
5759# define ISLOWER(c) \
5760		   (('a' <= (c) && (c) <= 'i') \
5761		     || ('j' <= (c) && (c) <= 'r') \
5762		     || ('s' <= (c) && (c) <= 'z'))
5763# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5764#endif
5765
5766#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5767int
5768main ()
5769{
5770  int i;
5771  for (i = 0; i < 256; i++)
5772    if (XOR (islower (i), ISLOWER (i))
5773	|| toupper (i) != TOUPPER (i))
5774      return 2;
5775  return 0;
5776}
5777_ACEOF
5778if ac_fn_c_try_run "$LINENO"; then :
5779
5780else
5781  ac_cv_header_stdc=no
5782fi
5783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5784  conftest.$ac_objext conftest.beam conftest.$ac_ext
5785fi
5786
5787fi
5788fi
5789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5790$as_echo "$ac_cv_header_stdc" >&6; }
5791if test $ac_cv_header_stdc = yes; then
5792
5793$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5794
5795fi
5796
5797# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5798for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5799		  inttypes.h stdint.h unistd.h
5800do :
5801  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5802ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5803"
5804if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5805  cat >>confdefs.h <<_ACEOF
5806#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5807_ACEOF
5808
5809fi
5810
5811done
5812
5813
5814
5815  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5816if test "x$ac_cv_header_minix_config_h" = xyes; then :
5817  MINIX=yes
5818else
5819  MINIX=
5820fi
5821
5822
5823  if test "$MINIX" = yes; then
5824
5825$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5826
5827
5828$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5829
5830
5831$as_echo "#define _MINIX 1" >>confdefs.h
5832
5833
5834$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
5835
5836  fi
5837
5838
5839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5840$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5841if ${ac_cv_safe_to_define___extensions__+:} false; then :
5842  $as_echo_n "(cached) " >&6
5843else
5844  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5845/* end confdefs.h.  */
5846
5847#         define __EXTENSIONS__ 1
5848          $ac_includes_default
5849int
5850main ()
5851{
5852
5853  ;
5854  return 0;
5855}
5856_ACEOF
5857if ac_fn_c_try_compile "$LINENO"; then :
5858  ac_cv_safe_to_define___extensions__=yes
5859else
5860  ac_cv_safe_to_define___extensions__=no
5861fi
5862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5863fi
5864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5865$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5866  test $ac_cv_safe_to_define___extensions__ = yes &&
5867    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5868
5869  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5870
5871  $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5872
5873  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5874
5875  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5876
5877  $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5878
5879  $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5880
5881  $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5882
5883  $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5884
5885  $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5886
5887  $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5888
5889  $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5890
5891  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5892
5893  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5894$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5895if ${ac_cv_should_define__xopen_source+:} false; then :
5896  $as_echo_n "(cached) " >&6
5897else
5898  ac_cv_should_define__xopen_source=no
5899     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5900/* end confdefs.h.  */
5901
5902          #include <wchar.h>
5903          mbstate_t x;
5904int
5905main ()
5906{
5907
5908  ;
5909  return 0;
5910}
5911_ACEOF
5912if ac_fn_c_try_compile "$LINENO"; then :
5913
5914else
5915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5916/* end confdefs.h.  */
5917
5918             #define _XOPEN_SOURCE 500
5919             #include <wchar.h>
5920             mbstate_t x;
5921int
5922main ()
5923{
5924
5925  ;
5926  return 0;
5927}
5928_ACEOF
5929if ac_fn_c_try_compile "$LINENO"; then :
5930  ac_cv_should_define__xopen_source=yes
5931fi
5932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5933fi
5934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5935fi
5936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5937$as_echo "$ac_cv_should_define__xopen_source" >&6; }
5938  test $ac_cv_should_define__xopen_source = yes &&
5939    $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5952$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5953if ${gl_cv_c_amsterdam_compiler+:} false; then :
5954  $as_echo_n "(cached) " >&6
5955else
5956
5957      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5958/* end confdefs.h.  */
5959
5960#ifdef __ACK__
5961Amsterdam
5962#endif
5963
5964_ACEOF
5965if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5966  $EGREP "Amsterdam" >/dev/null 2>&1; then :
5967  gl_cv_c_amsterdam_compiler=yes
5968else
5969  gl_cv_c_amsterdam_compiler=no
5970fi
5971rm -f conftest*
5972
5973
5974fi
5975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5976$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5977
5978      if test $gl_cv_c_amsterdam_compiler = yes; then
5979    if test -z "$AR"; then
5980      AR='cc -c.a'
5981    fi
5982    if test -z "$ARFLAGS"; then
5983      ARFLAGS='-o'
5984    fi
5985  else
5986                                        if test -n "$ac_tool_prefix"; then
5987  for ac_prog in ar lib "link -lib"
5988  do
5989    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5990set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5992$as_echo_n "checking for $ac_word... " >&6; }
5993if ${ac_cv_prog_AR+:} false; then :
5994  $as_echo_n "(cached) " >&6
5995else
5996  if test -n "$AR"; then
5997  ac_cv_prog_AR="$AR" # Let the user override the test.
5998else
5999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6000for as_dir in $PATH
6001do
6002  IFS=$as_save_IFS
6003  test -z "$as_dir" && as_dir=.
6004    for ac_exec_ext in '' $ac_executable_extensions; do
6005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6006    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6008    break 2
6009  fi
6010done
6011  done
6012IFS=$as_save_IFS
6013
6014fi
6015fi
6016AR=$ac_cv_prog_AR
6017if test -n "$AR"; then
6018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6019$as_echo "$AR" >&6; }
6020else
6021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6022$as_echo "no" >&6; }
6023fi
6024
6025
6026    test -n "$AR" && break
6027  done
6028fi
6029if test -z "$AR"; then
6030  ac_ct_AR=$AR
6031  for ac_prog in ar lib "link -lib"
6032do
6033  # Extract the first word of "$ac_prog", so it can be a program name with args.
6034set dummy $ac_prog; ac_word=$2
6035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6036$as_echo_n "checking for $ac_word... " >&6; }
6037if ${ac_cv_prog_ac_ct_AR+:} false; then :
6038  $as_echo_n "(cached) " >&6
6039else
6040  if test -n "$ac_ct_AR"; then
6041  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6042else
6043as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6044for as_dir in $PATH
6045do
6046  IFS=$as_save_IFS
6047  test -z "$as_dir" && as_dir=.
6048    for ac_exec_ext in '' $ac_executable_extensions; do
6049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6050    ac_cv_prog_ac_ct_AR="$ac_prog"
6051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6052    break 2
6053  fi
6054done
6055  done
6056IFS=$as_save_IFS
6057
6058fi
6059fi
6060ac_ct_AR=$ac_cv_prog_ac_ct_AR
6061if test -n "$ac_ct_AR"; then
6062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6063$as_echo "$ac_ct_AR" >&6; }
6064else
6065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6066$as_echo "no" >&6; }
6067fi
6068
6069
6070  test -n "$ac_ct_AR" && break
6071done
6072
6073  if test "x$ac_ct_AR" = x; then
6074    AR="false"
6075  else
6076    case $cross_compiling:$ac_tool_warned in
6077yes:)
6078{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6079$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6080ac_tool_warned=yes ;;
6081esac
6082    AR=$ac_ct_AR
6083  fi
6084fi
6085
6086: ${AR=ar}
6087
6088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
6089$as_echo_n "checking the archiver ($AR) interface... " >&6; }
6090if ${am_cv_ar_interface+:} false; then :
6091  $as_echo_n "(cached) " >&6
6092else
6093  ac_ext=c
6094ac_cpp='$CPP $CPPFLAGS'
6095ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6096ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6097ac_compiler_gnu=$ac_cv_c_compiler_gnu
6098
6099   am_cv_ar_interface=ar
6100   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6101/* end confdefs.h.  */
6102int some_variable = 0;
6103_ACEOF
6104if ac_fn_c_try_compile "$LINENO"; then :
6105  am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
6106      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6107  (eval $am_ar_try) 2>&5
6108  ac_status=$?
6109  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6110  test $ac_status = 0; }
6111      if test "$ac_status" -eq 0; then
6112        am_cv_ar_interface=ar
6113      else
6114        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
6115        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6116  (eval $am_ar_try) 2>&5
6117  ac_status=$?
6118  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6119  test $ac_status = 0; }
6120        if test "$ac_status" -eq 0; then
6121          am_cv_ar_interface=lib
6122        else
6123          am_cv_ar_interface=unknown
6124        fi
6125      fi
6126      rm -f conftest.lib libconftest.a
6127
6128fi
6129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6130   ac_ext=c
6131ac_cpp='$CPP $CPPFLAGS'
6132ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6133ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6134ac_compiler_gnu=$ac_cv_c_compiler_gnu
6135
6136fi
6137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
6138$as_echo "$am_cv_ar_interface" >&6; }
6139
6140case $am_cv_ar_interface in
6141ar)
6142  ;;
6143lib)
6144  # Microsoft lib, so override with the ar-lib wrapper script.
6145  # FIXME: It is wrong to rewrite AR.
6146  # But if we don't then we get into trouble of one sort or another.
6147  # A longer-term fix would be to have automake use am__AR in this case,
6148  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
6149  # similar.
6150  AR="$am_aux_dir/ar-lib $AR"
6151  ;;
6152unknown)
6153  as_fn_error $? "could not determine $AR interface" "$LINENO" 5
6154  ;;
6155esac
6156
6157  fi
6158
6159        if test -n "$ac_tool_prefix"; then
6160  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6161set dummy ${ac_tool_prefix}ar; ac_word=$2
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6163$as_echo_n "checking for $ac_word... " >&6; }
6164if ${ac_cv_prog_AR+:} false; then :
6165  $as_echo_n "(cached) " >&6
6166else
6167  if test -n "$AR"; then
6168  ac_cv_prog_AR="$AR" # Let the user override the test.
6169else
6170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6171for as_dir in $PATH
6172do
6173  IFS=$as_save_IFS
6174  test -z "$as_dir" && as_dir=.
6175    for ac_exec_ext in '' $ac_executable_extensions; do
6176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6177    ac_cv_prog_AR="${ac_tool_prefix}ar"
6178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6179    break 2
6180  fi
6181done
6182  done
6183IFS=$as_save_IFS
6184
6185fi
6186fi
6187AR=$ac_cv_prog_AR
6188if test -n "$AR"; then
6189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6190$as_echo "$AR" >&6; }
6191else
6192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6193$as_echo "no" >&6; }
6194fi
6195
6196
6197fi
6198if test -z "$ac_cv_prog_AR"; then
6199  ac_ct_AR=$AR
6200  # Extract the first word of "ar", so it can be a program name with args.
6201set dummy ar; ac_word=$2
6202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6203$as_echo_n "checking for $ac_word... " >&6; }
6204if ${ac_cv_prog_ac_ct_AR+:} false; then :
6205  $as_echo_n "(cached) " >&6
6206else
6207  if test -n "$ac_ct_AR"; then
6208  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6209else
6210as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6211for as_dir in $PATH
6212do
6213  IFS=$as_save_IFS
6214  test -z "$as_dir" && as_dir=.
6215    for ac_exec_ext in '' $ac_executable_extensions; do
6216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6217    ac_cv_prog_ac_ct_AR="ar"
6218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6219    break 2
6220  fi
6221done
6222  done
6223IFS=$as_save_IFS
6224
6225fi
6226fi
6227ac_ct_AR=$ac_cv_prog_ac_ct_AR
6228if test -n "$ac_ct_AR"; then
6229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6230$as_echo "$ac_ct_AR" >&6; }
6231else
6232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6233$as_echo "no" >&6; }
6234fi
6235
6236  if test "x$ac_ct_AR" = x; then
6237    AR="ar"
6238  else
6239    case $cross_compiling:$ac_tool_warned in
6240yes:)
6241{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6242$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6243ac_tool_warned=yes ;;
6244esac
6245    AR=$ac_ct_AR
6246  fi
6247else
6248  AR="$ac_cv_prog_AR"
6249fi
6250
6251  if test -z "$ARFLAGS"; then
6252    ARFLAGS='cr'
6253  fi
6254
6255
6256
6257  if test -z "$RANLIB"; then
6258    if test $gl_cv_c_amsterdam_compiler = yes; then
6259      RANLIB=':'
6260    else
6261            if test -n "$ac_tool_prefix"; then
6262  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6263set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6265$as_echo_n "checking for $ac_word... " >&6; }
6266if ${ac_cv_prog_RANLIB+:} false; then :
6267  $as_echo_n "(cached) " >&6
6268else
6269  if test -n "$RANLIB"; then
6270  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6271else
6272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6273for as_dir in $PATH
6274do
6275  IFS=$as_save_IFS
6276  test -z "$as_dir" && as_dir=.
6277    for ac_exec_ext in '' $ac_executable_extensions; do
6278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6279    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6281    break 2
6282  fi
6283done
6284  done
6285IFS=$as_save_IFS
6286
6287fi
6288fi
6289RANLIB=$ac_cv_prog_RANLIB
6290if test -n "$RANLIB"; then
6291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6292$as_echo "$RANLIB" >&6; }
6293else
6294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6295$as_echo "no" >&6; }
6296fi
6297
6298
6299fi
6300if test -z "$ac_cv_prog_RANLIB"; then
6301  ac_ct_RANLIB=$RANLIB
6302  # Extract the first word of "ranlib", so it can be a program name with args.
6303set dummy ranlib; ac_word=$2
6304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6305$as_echo_n "checking for $ac_word... " >&6; }
6306if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6307  $as_echo_n "(cached) " >&6
6308else
6309  if test -n "$ac_ct_RANLIB"; then
6310  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6311else
6312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6313for as_dir in $PATH
6314do
6315  IFS=$as_save_IFS
6316  test -z "$as_dir" && as_dir=.
6317    for ac_exec_ext in '' $ac_executable_extensions; do
6318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6319    ac_cv_prog_ac_ct_RANLIB="ranlib"
6320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6321    break 2
6322  fi
6323done
6324  done
6325IFS=$as_save_IFS
6326
6327fi
6328fi
6329ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6330if test -n "$ac_ct_RANLIB"; then
6331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6332$as_echo "$ac_ct_RANLIB" >&6; }
6333else
6334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6335$as_echo "no" >&6; }
6336fi
6337
6338  if test "x$ac_ct_RANLIB" = x; then
6339    RANLIB=":"
6340  else
6341    case $cross_compiling:$ac_tool_warned in
6342yes:)
6343{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6344$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6345ac_tool_warned=yes ;;
6346esac
6347    RANLIB=$ac_ct_RANLIB
6348  fi
6349else
6350  RANLIB="$ac_cv_prog_RANLIB"
6351fi
6352
6353    fi
6354  fi
6355
6356
6357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6358$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6359if ${ac_cv_sys_largefile_source+:} false; then :
6360  $as_echo_n "(cached) " >&6
6361else
6362  while :; do
6363  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6364/* end confdefs.h.  */
6365#include <sys/types.h> /* for off_t */
6366     #include <stdio.h>
6367int
6368main ()
6369{
6370int (*fp) (FILE *, off_t, int) = fseeko;
6371     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6372  ;
6373  return 0;
6374}
6375_ACEOF
6376if ac_fn_c_try_link "$LINENO"; then :
6377  ac_cv_sys_largefile_source=no; break
6378fi
6379rm -f core conftest.err conftest.$ac_objext \
6380    conftest$ac_exeext conftest.$ac_ext
6381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6382/* end confdefs.h.  */
6383#define _LARGEFILE_SOURCE 1
6384#include <sys/types.h> /* for off_t */
6385     #include <stdio.h>
6386int
6387main ()
6388{
6389int (*fp) (FILE *, off_t, int) = fseeko;
6390     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6391  ;
6392  return 0;
6393}
6394_ACEOF
6395if ac_fn_c_try_link "$LINENO"; then :
6396  ac_cv_sys_largefile_source=1; break
6397fi
6398rm -f core conftest.err conftest.$ac_objext \
6399    conftest$ac_exeext conftest.$ac_ext
6400  ac_cv_sys_largefile_source=unknown
6401  break
6402done
6403fi
6404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6405$as_echo "$ac_cv_sys_largefile_source" >&6; }
6406case $ac_cv_sys_largefile_source in #(
6407  no | unknown) ;;
6408  *)
6409cat >>confdefs.h <<_ACEOF
6410#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6411_ACEOF
6412;;
6413esac
6414rm -rf conftest*
6415
6416# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6417# in glibc 2.1.3, but that breaks too many other things.
6418# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6419if test $ac_cv_sys_largefile_source != unknown; then
6420
6421$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
6422
6423fi
6424
6425# Check whether --enable-largefile was given.
6426if test "${enable_largefile+set}" = set; then :
6427  enableval=$enable_largefile;
6428fi
6429
6430if test "$enable_largefile" != no; then
6431
6432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6433$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6434if ${ac_cv_sys_largefile_CC+:} false; then :
6435  $as_echo_n "(cached) " >&6
6436else
6437  ac_cv_sys_largefile_CC=no
6438     if test "$GCC" != yes; then
6439       ac_save_CC=$CC
6440       while :; do
6441         # IRIX 6.2 and later do not support large files by default,
6442         # so use the C compiler's -n32 option if that helps.
6443         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6444/* end confdefs.h.  */
6445#include <sys/types.h>
6446 /* Check that off_t can represent 2**63 - 1 correctly.
6447    We can't simply define LARGE_OFF_T to be 9223372036854775807,
6448    since some C++ compilers masquerading as C compilers
6449    incorrectly reject 9223372036854775807.  */
6450#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6451  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6452                       && LARGE_OFF_T % 2147483647 == 1)
6453                      ? 1 : -1];
6454int
6455main ()
6456{
6457
6458  ;
6459  return 0;
6460}
6461_ACEOF
6462         if ac_fn_c_try_compile "$LINENO"; then :
6463  break
6464fi
6465rm -f core conftest.err conftest.$ac_objext
6466         CC="$CC -n32"
6467         if ac_fn_c_try_compile "$LINENO"; then :
6468  ac_cv_sys_largefile_CC=' -n32'; break
6469fi
6470rm -f core conftest.err conftest.$ac_objext
6471         break
6472       done
6473       CC=$ac_save_CC
6474       rm -f conftest.$ac_ext
6475    fi
6476fi
6477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6478$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6479  if test "$ac_cv_sys_largefile_CC" != no; then
6480    CC=$CC$ac_cv_sys_largefile_CC
6481  fi
6482
6483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6484$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6485if ${ac_cv_sys_file_offset_bits+:} false; then :
6486  $as_echo_n "(cached) " >&6
6487else
6488  while :; do
6489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6490/* end confdefs.h.  */
6491#include <sys/types.h>
6492 /* Check that off_t can represent 2**63 - 1 correctly.
6493    We can't simply define LARGE_OFF_T to be 9223372036854775807,
6494    since some C++ compilers masquerading as C compilers
6495    incorrectly reject 9223372036854775807.  */
6496#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6497  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6498                       && LARGE_OFF_T % 2147483647 == 1)
6499                      ? 1 : -1];
6500int
6501main ()
6502{
6503
6504  ;
6505  return 0;
6506}
6507_ACEOF
6508if ac_fn_c_try_compile "$LINENO"; then :
6509  ac_cv_sys_file_offset_bits=no; break
6510fi
6511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6512  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6513/* end confdefs.h.  */
6514#define _FILE_OFFSET_BITS 64
6515#include <sys/types.h>
6516 /* Check that off_t can represent 2**63 - 1 correctly.
6517    We can't simply define LARGE_OFF_T to be 9223372036854775807,
6518    since some C++ compilers masquerading as C compilers
6519    incorrectly reject 9223372036854775807.  */
6520#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6521  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6522                       && LARGE_OFF_T % 2147483647 == 1)
6523                      ? 1 : -1];
6524int
6525main ()
6526{
6527
6528  ;
6529  return 0;
6530}
6531_ACEOF
6532if ac_fn_c_try_compile "$LINENO"; then :
6533  ac_cv_sys_file_offset_bits=64; break
6534fi
6535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6536  ac_cv_sys_file_offset_bits=unknown
6537  break
6538done
6539fi
6540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6541$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6542case $ac_cv_sys_file_offset_bits in #(
6543  no | unknown) ;;
6544  *)
6545cat >>confdefs.h <<_ACEOF
6546#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6547_ACEOF
6548;;
6549esac
6550rm -rf conftest*
6551  if test $ac_cv_sys_file_offset_bits = unknown; then
6552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6553$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6554if ${ac_cv_sys_large_files+:} false; then :
6555  $as_echo_n "(cached) " >&6
6556else
6557  while :; do
6558  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6559/* end confdefs.h.  */
6560#include <sys/types.h>
6561 /* Check that off_t can represent 2**63 - 1 correctly.
6562    We can't simply define LARGE_OFF_T to be 9223372036854775807,
6563    since some C++ compilers masquerading as C compilers
6564    incorrectly reject 9223372036854775807.  */
6565#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6566  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6567                       && LARGE_OFF_T % 2147483647 == 1)
6568                      ? 1 : -1];
6569int
6570main ()
6571{
6572
6573  ;
6574  return 0;
6575}
6576_ACEOF
6577if ac_fn_c_try_compile "$LINENO"; then :
6578  ac_cv_sys_large_files=no; break
6579fi
6580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6581  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6582/* end confdefs.h.  */
6583#define _LARGE_FILES 1
6584#include <sys/types.h>
6585 /* Check that off_t can represent 2**63 - 1 correctly.
6586    We can't simply define LARGE_OFF_T to be 9223372036854775807,
6587    since some C++ compilers masquerading as C compilers
6588    incorrectly reject 9223372036854775807.  */
6589#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6590  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6591                       && LARGE_OFF_T % 2147483647 == 1)
6592                      ? 1 : -1];
6593int
6594main ()
6595{
6596
6597  ;
6598  return 0;
6599}
6600_ACEOF
6601if ac_fn_c_try_compile "$LINENO"; then :
6602  ac_cv_sys_large_files=1; break
6603fi
6604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6605  ac_cv_sys_large_files=unknown
6606  break
6607done
6608fi
6609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6610$as_echo "$ac_cv_sys_large_files" >&6; }
6611case $ac_cv_sys_large_files in #(
6612  no | unknown) ;;
6613  *)
6614cat >>confdefs.h <<_ACEOF
6615#define _LARGE_FILES $ac_cv_sys_large_files
6616_ACEOF
6617;;
6618esac
6619rm -rf conftest*
6620  fi
6621
6622
6623$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6624
6625fi
6626
6627   case $ac_cv_prog_cc_stdc in #(
6628  no) :
6629    ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6630  *) :
6631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6632$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6633if ${ac_cv_prog_cc_c99+:} false; then :
6634  $as_echo_n "(cached) " >&6
6635else
6636  ac_cv_prog_cc_c99=no
6637ac_save_CC=$CC
6638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6639/* end confdefs.h.  */
6640#include <stdarg.h>
6641#include <stdbool.h>
6642#include <stdlib.h>
6643#include <wchar.h>
6644#include <stdio.h>
6645
6646// Check varargs macros.  These examples are taken from C99 6.10.3.5.
6647#define debug(...) fprintf (stderr, __VA_ARGS__)
6648#define showlist(...) puts (#__VA_ARGS__)
6649#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6650static void
6651test_varargs_macros (void)
6652{
6653  int x = 1234;
6654  int y = 5678;
6655  debug ("Flag");
6656  debug ("X = %d\n", x);
6657  showlist (The first, second, and third items.);
6658  report (x>y, "x is %d but y is %d", x, y);
6659}
6660
6661// Check long long types.
6662#define BIG64 18446744073709551615ull
6663#define BIG32 4294967295ul
6664#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6665#if !BIG_OK
6666  your preprocessor is broken;
6667#endif
6668#if BIG_OK
6669#else
6670  your preprocessor is broken;
6671#endif
6672static long long int bignum = -9223372036854775807LL;
6673static unsigned long long int ubignum = BIG64;
6674
6675struct incomplete_array
6676{
6677  int datasize;
6678  double data[];
6679};
6680
6681struct named_init {
6682  int number;
6683  const wchar_t *name;
6684  double average;
6685};
6686
6687typedef const char *ccp;
6688
6689static inline int
6690test_restrict (ccp restrict text)
6691{
6692  // See if C++-style comments work.
6693  // Iterate through items via the restricted pointer.
6694  // Also check for declarations in for loops.
6695  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6696    continue;
6697  return 0;
6698}
6699
6700// Check varargs and va_copy.
6701static void
6702test_varargs (const char *format, ...)
6703{
6704  va_list args;
6705  va_start (args, format);
6706  va_list args_copy;
6707  va_copy (args_copy, args);
6708
6709  const char *str;
6710  int number;
6711  float fnumber;
6712
6713  while (*format)
6714    {
6715      switch (*format++)
6716	{
6717	case 's': // string
6718	  str = va_arg (args_copy, const char *);
6719	  break;
6720	case 'd': // int
6721	  number = va_arg (args_copy, int);
6722	  break;
6723	case 'f': // float
6724	  fnumber = va_arg (args_copy, double);
6725	  break;
6726	default:
6727	  break;
6728	}
6729    }
6730  va_end (args_copy);
6731  va_end (args);
6732}
6733
6734int
6735main ()
6736{
6737
6738  // Check bool.
6739  _Bool success = false;
6740
6741  // Check restrict.
6742  if (test_restrict ("String literal") == 0)
6743    success = true;
6744  char *restrict newvar = "Another string";
6745
6746  // Check varargs.
6747  test_varargs ("s, d' f .", "string", 65, 34.234);
6748  test_varargs_macros ();
6749
6750  // Check flexible array members.
6751  struct incomplete_array *ia =
6752    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6753  ia->datasize = 10;
6754  for (int i = 0; i < ia->datasize; ++i)
6755    ia->data[i] = i * 1.234;
6756
6757  // Check named initializers.
6758  struct named_init ni = {
6759    .number = 34,
6760    .name = L"Test wide string",
6761    .average = 543.34343,
6762  };
6763
6764  ni.number = 58;
6765
6766  int dynamic_array[ni.number];
6767  dynamic_array[ni.number - 1] = 543;
6768
6769  // work around unused variable warnings
6770  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6771	  || dynamic_array[ni.number - 1] != 543);
6772
6773  ;
6774  return 0;
6775}
6776_ACEOF
6777for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
6778do
6779  CC="$ac_save_CC $ac_arg"
6780  if ac_fn_c_try_compile "$LINENO"; then :
6781  ac_cv_prog_cc_c99=$ac_arg
6782fi
6783rm -f core conftest.err conftest.$ac_objext
6784  test "x$ac_cv_prog_cc_c99" != "xno" && break
6785done
6786rm -f conftest.$ac_ext
6787CC=$ac_save_CC
6788
6789fi
6790# AC_CACHE_VAL
6791case "x$ac_cv_prog_cc_c99" in
6792  x)
6793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6794$as_echo "none needed" >&6; } ;;
6795  xno)
6796    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6797$as_echo "unsupported" >&6; } ;;
6798  *)
6799    CC="$CC $ac_cv_prog_cc_c99"
6800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6801$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6802esac
6803if test "x$ac_cv_prog_cc_c99" != xno; then :
6804  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6805else
6806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6807$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6808if ${ac_cv_prog_cc_c89+:} false; then :
6809  $as_echo_n "(cached) " >&6
6810else
6811  ac_cv_prog_cc_c89=no
6812ac_save_CC=$CC
6813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6814/* end confdefs.h.  */
6815#include <stdarg.h>
6816#include <stdio.h>
6817struct stat;
6818/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
6819struct buf { int x; };
6820FILE * (*rcsopen) (struct buf *, struct stat *, int);
6821static char *e (p, i)
6822     char **p;
6823     int i;
6824{
6825  return p[i];
6826}
6827static char *f (char * (*g) (char **, int), char **p, ...)
6828{
6829  char *s;
6830  va_list v;
6831  va_start (v,p);
6832  s = g (p, va_arg (v,int));
6833  va_end (v);
6834  return s;
6835}
6836
6837/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6838   function prototypes and stuff, but not '\xHH' hex character constants.
6839   These don't provoke an error unfortunately, instead are silently treated
6840   as 'x'.  The following induces an error, until -std is added to get
6841   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6842   array size at least.  It's necessary to write '\x00'==0 to get something
6843   that's true only with -std.  */
6844int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6845
6846/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6847   inside strings and character constants.  */
6848#define FOO(x) 'x'
6849int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6850
6851int test (int i, double x);
6852struct s1 {int (*f) (int a);};
6853struct s2 {int (*f) (double a);};
6854int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6855int argc;
6856char **argv;
6857int
6858main ()
6859{
6860return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6861  ;
6862  return 0;
6863}
6864_ACEOF
6865for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6866	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6867do
6868  CC="$ac_save_CC $ac_arg"
6869  if ac_fn_c_try_compile "$LINENO"; then :
6870  ac_cv_prog_cc_c89=$ac_arg
6871fi
6872rm -f core conftest.err conftest.$ac_objext
6873  test "x$ac_cv_prog_cc_c89" != "xno" && break
6874done
6875rm -f conftest.$ac_ext
6876CC=$ac_save_CC
6877
6878fi
6879# AC_CACHE_VAL
6880case "x$ac_cv_prog_cc_c89" in
6881  x)
6882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6883$as_echo "none needed" >&6; } ;;
6884  xno)
6885    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6886$as_echo "unsupported" >&6; } ;;
6887  *)
6888    CC="$CC $ac_cv_prog_cc_c89"
6889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6890$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6891esac
6892if test "x$ac_cv_prog_cc_c89" != xno; then :
6893  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6894else
6895  ac_cv_prog_cc_stdc=no
6896fi
6897
6898fi
6899 ;;
6900esac
6901  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
6902$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
6903  if ${ac_cv_prog_cc_stdc+:} false; then :
6904  $as_echo_n "(cached) " >&6
6905fi
6906
6907  case $ac_cv_prog_cc_stdc in #(
6908  no) :
6909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6910$as_echo "unsupported" >&6; } ;; #(
6911  '') :
6912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6913$as_echo "none needed" >&6; } ;; #(
6914  *) :
6915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6916$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6917esac
6918
6919
6920
6921  # Pre-early section.
6922
6923
6924
6925  # Code from module absolute-header:
6926  # Code from module alignof:
6927  # Code from module alloca:
6928  # Code from module alloca-opt:
6929  # Code from module argmatch:
6930  # Code from module argp:
6931  # Code from module argp-version-etc:
6932  # Code from module assure:
6933  # Code from module at-internal:
6934  # Code from module bitrotate:
6935  # Code from module builtin-expect:
6936  # Code from module c-ctype:
6937  # Code from module c-strcase:
6938  # Code from module c-strcaseeq:
6939  # Code from module chdir:
6940  # Code from module chdir-long:
6941  # Code from module chown:
6942  # Code from module clock-time:
6943  # Code from module cloexec:
6944  # Code from module close:
6945  # Code from module close-stream:
6946  # Code from module closedir:
6947  # Code from module closeout:
6948  # Code from module configmake:
6949  # Code from module d-ino:
6950  # Code from module dirent:
6951  # Code from module dirent-safer:
6952  # Code from module dirfd:
6953  # Code from module dirname:
6954  # Code from module dirname-lgpl:
6955  # Code from module dosname:
6956  # Code from module double-slash-root:
6957  # Code from module dup:
6958  # Code from module dup2:
6959  # Code from module environ:
6960  # Code from module errno:
6961  # Code from module error:
6962  # Code from module exitfail:
6963  # Code from module extensions:
6964  # Code from module extern-inline:
6965  # Code from module fchdir:
6966  # Code from module fcntl:
6967  # Code from module fcntl-h:
6968  # Code from module fd-hook:
6969  # Code from module fdopendir:
6970  # Code from module fileblocks:
6971  # Code from module filename:
6972  # Code from module filenamecat-lgpl:
6973  # Code from module flexmember:
6974  # Code from module float:
6975  # Code from module fnmatch:
6976  # Code from module fnmatch-gnu:
6977  # Code from module fpending:
6978  # Code from module fseek:
6979  # Code from module fseeko:
6980
6981  # Code from module fstat:
6982  # Code from module fstatat:
6983  # Code from module full-write:
6984  # Code from module getcwd:
6985  # Code from module getcwd-lgpl:
6986  # Code from module getdelim:
6987  # Code from module getdtablesize:
6988  # Code from module getline:
6989  # Code from module getopt:
6990  # Code from module getopt-gnu:
6991  # Code from module getopt-posix:
6992  # Code from module getprogname:
6993  # Code from module gettext:
6994  # Code from module gettext-h:
6995  # Code from module gettime:
6996  # Code from module gettimeofday:
6997  # Code from module gitlog-to-changelog:
6998  # Code from module hard-locale:
6999  # Code from module hash:
7000  # Code from module havelib:
7001  # Code from module include_next:
7002  # Code from module intprops:
7003  # Code from module inttostr:
7004  # Code from module inttypes:
7005  # Code from module inttypes-incomplete:
7006  # Code from module largefile:
7007
7008  # Code from module lchown:
7009  # Code from module limits-h:
7010  # Code from module localcharset:
7011  # Code from module lseek:
7012  # Code from module lstat:
7013  # Code from module malloc-gnu:
7014  # Code from module malloc-posix:
7015  # Code from module malloca:
7016  # Code from module mbrtowc:
7017  # Code from module mbsinit:
7018  # Code from module mbsrtowcs:
7019  # Code from module memchr:
7020  # Code from module mempcpy:
7021  # Code from module memrchr:
7022  # Code from module minmax:
7023  # Code from module mktime:
7024  # Code from module mktime-internal:
7025  # Code from module msvc-inval:
7026  # Code from module msvc-nothrow:
7027  # Code from module multiarch:
7028  # Code from module nocrash:
7029  # Code from module obstack:
7030  # Code from module open:
7031  # Code from module openat:
7032  # Code from module openat-die:
7033  # Code from module openat-h:
7034  # Code from module opendir:
7035  # Code from module parse-datetime:
7036  # Code from module pathmax:
7037  # Code from module progname:
7038  # Code from module quote:
7039  # Code from module quotearg:
7040  # Code from module quotearg-simple:
7041  # Code from module raise:
7042  # Code from module rawmemchr:
7043  # Code from module read:
7044  # Code from module readdir:
7045  # Code from module realloc-posix:
7046  # Code from module rewinddir:
7047  # Code from module safe-read:
7048  # Code from module safe-write:
7049  # Code from module save-cwd:
7050  # Code from module savedir:
7051  # Code from module setenv:
7052  # Code from module signal-h:
7053  # Code from module sleep:
7054  # Code from module snippet/_Noreturn:
7055  # Code from module snippet/arg-nonnull:
7056  # Code from module snippet/c++defs:
7057  # Code from module snippet/warn-on-use:
7058  # Code from module ssize_t:
7059  # Code from module stat:
7060  # Code from module stat-time:
7061  # Code from module stdalign:
7062  # Code from module stdarg:
7063
7064
7065
7066  # Code from module stdbool:
7067  # Code from module stddef:
7068  # Code from module stdint:
7069  # Code from module stdio:
7070  # Code from module stdlib:
7071  # Code from module stpcpy:
7072  # Code from module strcase:
7073  # Code from module strchrnul:
7074  # Code from module strdup-posix:
7075  # Code from module streq:
7076  # Code from module strerror:
7077  # Code from module strerror-override:
7078  # Code from module strftime:
7079  # Code from module string:
7080  # Code from module strings:
7081  # Code from module strndup:
7082  # Code from module strnlen:
7083  # Code from module strnlen1:
7084  # Code from module strtol:
7085  # Code from module sys_stat:
7086  # Code from module sys_time:
7087  # Code from module sys_types:
7088  # Code from module sysexits:
7089  # Code from module time:
7090  # Code from module time_r:
7091  # Code from module time_rz:
7092  # Code from module timegm:
7093  # Code from module timespec:
7094  # Code from module unistd:
7095  # Code from module unistd-safer:
7096  # Code from module unlocked-io:
7097  # Code from module unsetenv:
7098  # Code from module utimens:
7099  # Code from module utimensat:
7100  # Code from module vasnprintf:
7101  # Code from module verify:
7102  # Code from module version-etc:
7103  # Code from module version-etc-fsf:
7104  # Code from module vsnprintf:
7105  # Code from module wchar:
7106  # Code from module wctype-h:
7107  # Code from module write:
7108  # Code from module xalloc:
7109  # Code from module xalloc-die:
7110  # Code from module xalloc-oversized:
7111  # Code from module xgetcwd:
7112  # Code from module xsize:
7113  # Code from module xstrndup:
7114
7115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
7116$as_echo_n "checking for function prototypes... " >&6; }
7117if test "$ac_cv_prog_cc_c89" != no; then
7118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7119$as_echo "yes" >&6; }
7120
7121$as_echo "#define PROTOTYPES 1" >>confdefs.h
7122
7123
7124$as_echo "#define __PROTOTYPES 1" >>confdefs.h
7125
7126else
7127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7128$as_echo "no" >&6; }
7129fi
7130
7131
7132# Check whether --enable-largefile was given.
7133if test "${enable_largefile+set}" = set; then :
7134  enableval=$enable_largefile;
7135fi
7136
7137if test "$enable_largefile" != no; then
7138
7139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7140$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7141if ${ac_cv_sys_largefile_CC+:} false; then :
7142  $as_echo_n "(cached) " >&6
7143else
7144  ac_cv_sys_largefile_CC=no
7145     if test "$GCC" != yes; then
7146       ac_save_CC=$CC
7147       while :; do
7148         # IRIX 6.2 and later do not support large files by default,
7149         # so use the C compiler's -n32 option if that helps.
7150         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7151/* end confdefs.h.  */
7152#include <sys/types.h>
7153 /* Check that off_t can represent 2**63 - 1 correctly.
7154    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7155    since some C++ compilers masquerading as C compilers
7156    incorrectly reject 9223372036854775807.  */
7157#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7158  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7159                       && LARGE_OFF_T % 2147483647 == 1)
7160                      ? 1 : -1];
7161int
7162main ()
7163{
7164
7165  ;
7166  return 0;
7167}
7168_ACEOF
7169         if ac_fn_c_try_compile "$LINENO"; then :
7170  break
7171fi
7172rm -f core conftest.err conftest.$ac_objext
7173         CC="$CC -n32"
7174         if ac_fn_c_try_compile "$LINENO"; then :
7175  ac_cv_sys_largefile_CC=' -n32'; break
7176fi
7177rm -f core conftest.err conftest.$ac_objext
7178         break
7179       done
7180       CC=$ac_save_CC
7181       rm -f conftest.$ac_ext
7182    fi
7183fi
7184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7185$as_echo "$ac_cv_sys_largefile_CC" >&6; }
7186  if test "$ac_cv_sys_largefile_CC" != no; then
7187    CC=$CC$ac_cv_sys_largefile_CC
7188  fi
7189
7190  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7191$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7192if ${ac_cv_sys_file_offset_bits+:} false; then :
7193  $as_echo_n "(cached) " >&6
7194else
7195  while :; do
7196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7197/* end confdefs.h.  */
7198#include <sys/types.h>
7199 /* Check that off_t can represent 2**63 - 1 correctly.
7200    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7201    since some C++ compilers masquerading as C compilers
7202    incorrectly reject 9223372036854775807.  */
7203#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7204  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7205                       && LARGE_OFF_T % 2147483647 == 1)
7206                      ? 1 : -1];
7207int
7208main ()
7209{
7210
7211  ;
7212  return 0;
7213}
7214_ACEOF
7215if ac_fn_c_try_compile "$LINENO"; then :
7216  ac_cv_sys_file_offset_bits=no; break
7217fi
7218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7219  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7220/* end confdefs.h.  */
7221#define _FILE_OFFSET_BITS 64
7222#include <sys/types.h>
7223 /* Check that off_t can represent 2**63 - 1 correctly.
7224    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7225    since some C++ compilers masquerading as C compilers
7226    incorrectly reject 9223372036854775807.  */
7227#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7228  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7229                       && LARGE_OFF_T % 2147483647 == 1)
7230                      ? 1 : -1];
7231int
7232main ()
7233{
7234
7235  ;
7236  return 0;
7237}
7238_ACEOF
7239if ac_fn_c_try_compile "$LINENO"; then :
7240  ac_cv_sys_file_offset_bits=64; break
7241fi
7242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7243  ac_cv_sys_file_offset_bits=unknown
7244  break
7245done
7246fi
7247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7248$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7249case $ac_cv_sys_file_offset_bits in #(
7250  no | unknown) ;;
7251  *)
7252cat >>confdefs.h <<_ACEOF
7253#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7254_ACEOF
7255;;
7256esac
7257rm -rf conftest*
7258  if test $ac_cv_sys_file_offset_bits = unknown; then
7259    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7260$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
7261if ${ac_cv_sys_large_files+:} false; then :
7262  $as_echo_n "(cached) " >&6
7263else
7264  while :; do
7265  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7266/* end confdefs.h.  */
7267#include <sys/types.h>
7268 /* Check that off_t can represent 2**63 - 1 correctly.
7269    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7270    since some C++ compilers masquerading as C compilers
7271    incorrectly reject 9223372036854775807.  */
7272#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7273  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7274                       && LARGE_OFF_T % 2147483647 == 1)
7275                      ? 1 : -1];
7276int
7277main ()
7278{
7279
7280  ;
7281  return 0;
7282}
7283_ACEOF
7284if ac_fn_c_try_compile "$LINENO"; then :
7285  ac_cv_sys_large_files=no; break
7286fi
7287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7288  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7289/* end confdefs.h.  */
7290#define _LARGE_FILES 1
7291#include <sys/types.h>
7292 /* Check that off_t can represent 2**63 - 1 correctly.
7293    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7294    since some C++ compilers masquerading as C compilers
7295    incorrectly reject 9223372036854775807.  */
7296#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7297  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7298                       && LARGE_OFF_T % 2147483647 == 1)
7299                      ? 1 : -1];
7300int
7301main ()
7302{
7303
7304  ;
7305  return 0;
7306}
7307_ACEOF
7308if ac_fn_c_try_compile "$LINENO"; then :
7309  ac_cv_sys_large_files=1; break
7310fi
7311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7312  ac_cv_sys_large_files=unknown
7313  break
7314done
7315fi
7316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7317$as_echo "$ac_cv_sys_large_files" >&6; }
7318case $ac_cv_sys_large_files in #(
7319  no | unknown) ;;
7320  *)
7321cat >>confdefs.h <<_ACEOF
7322#define _LARGE_FILES $ac_cv_sys_large_files
7323_ACEOF
7324;;
7325esac
7326rm -rf conftest*
7327  fi
7328
7329
7330$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7331
7332fi
7333
7334
7335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
7336$as_echo_n "checking return type of signal handlers... " >&6; }
7337if ${ac_cv_type_signal+:} false; then :
7338  $as_echo_n "(cached) " >&6
7339else
7340  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7341/* end confdefs.h.  */
7342#include <sys/types.h>
7343#include <signal.h>
7344
7345int
7346main ()
7347{
7348return *(signal (0, 0)) (0) == 1;
7349  ;
7350  return 0;
7351}
7352_ACEOF
7353if ac_fn_c_try_compile "$LINENO"; then :
7354  ac_cv_type_signal=int
7355else
7356  ac_cv_type_signal=void
7357fi
7358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7359fi
7360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
7361$as_echo "$ac_cv_type_signal" >&6; }
7362
7363cat >>confdefs.h <<_ACEOF
7364#define RETSIGTYPE $ac_cv_type_signal
7365_ACEOF
7366
7367
7368
7369
7370
7371  for ac_header in $ac_header_list
7372do :
7373  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7374ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7375"
7376if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7377  cat >>confdefs.h <<_ACEOF
7378#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7379_ACEOF
7380
7381fi
7382
7383done
7384
7385
7386
7387
7388ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
7389if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
7390
7391$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
7392
7393fi
7394
7395
7396if test $ac_cv_header_sys_mkdev_h = no; then
7397  ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
7398if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
7399
7400$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
7401
7402fi
7403
7404
7405fi
7406
7407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
7408$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
7409if ${ac_cv_c_const+:} false; then :
7410  $as_echo_n "(cached) " >&6
7411else
7412  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7413/* end confdefs.h.  */
7414
7415int
7416main ()
7417{
7418
7419#ifndef __cplusplus
7420  /* Ultrix mips cc rejects this sort of thing.  */
7421  typedef int charset[2];
7422  const charset cs = { 0, 0 };
7423  /* SunOS 4.1.1 cc rejects this.  */
7424  char const *const *pcpcc;
7425  char **ppc;
7426  /* NEC SVR4.0.2 mips cc rejects this.  */
7427  struct point {int x, y;};
7428  static struct point const zero = {0,0};
7429  /* AIX XL C 1.02.0.0 rejects this.
7430     It does not let you subtract one const X* pointer from another in
7431     an arm of an if-expression whose if-part is not a constant
7432     expression */
7433  const char *g = "string";
7434  pcpcc = &g + (g ? g-g : 0);
7435  /* HPUX 7.0 cc rejects these. */
7436  ++pcpcc;
7437  ppc = (char**) pcpcc;
7438  pcpcc = (char const *const *) ppc;
7439  { /* SCO 3.2v4 cc rejects this sort of thing.  */
7440    char tx;
7441    char *t = &tx;
7442    char const *s = 0 ? (char *) 0 : (char const *) 0;
7443
7444    *t++ = 0;
7445    if (s) return 0;
7446  }
7447  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7448    int x[] = {25, 17};
7449    const int *foo = &x[0];
7450    ++foo;
7451  }
7452  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7453    typedef const int *iptr;
7454    iptr p = 0;
7455    ++p;
7456  }
7457  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
7458       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7459    struct s { int j; const int *ap[3]; } bx;
7460    struct s *b = &bx; b->j = 5;
7461  }
7462  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7463    const int foo = 10;
7464    if (!foo) return 0;
7465  }
7466  return !cs[0] && !zero.x;
7467#endif
7468
7469  ;
7470  return 0;
7471}
7472_ACEOF
7473if ac_fn_c_try_compile "$LINENO"; then :
7474  ac_cv_c_const=yes
7475else
7476  ac_cv_c_const=no
7477fi
7478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7479fi
7480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
7481$as_echo "$ac_cv_c_const" >&6; }
7482if test $ac_cv_c_const = no; then
7483
7484$as_echo "#define const /**/" >>confdefs.h
7485
7486fi
7487
7488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7489$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
7490if ${ac_cv_type_uid_t+:} false; then :
7491  $as_echo_n "(cached) " >&6
7492else
7493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7494/* end confdefs.h.  */
7495#include <sys/types.h>
7496
7497_ACEOF
7498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7499  $EGREP "uid_t" >/dev/null 2>&1; then :
7500  ac_cv_type_uid_t=yes
7501else
7502  ac_cv_type_uid_t=no
7503fi
7504rm -f conftest*
7505
7506fi
7507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7508$as_echo "$ac_cv_type_uid_t" >&6; }
7509if test $ac_cv_type_uid_t = no; then
7510
7511$as_echo "#define uid_t int" >>confdefs.h
7512
7513
7514$as_echo "#define gid_t int" >>confdefs.h
7515
7516fi
7517
7518ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default"
7519if test "x$ac_cv_type_gid_t" = xyes; then :
7520
7521else
7522
7523cat >>confdefs.h <<_ACEOF
7524#define gid_t int
7525_ACEOF
7526
7527fi
7528
7529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7530$as_echo_n "checking for ANSI C header files... " >&6; }
7531if ${ac_cv_header_stdc+:} false; then :
7532  $as_echo_n "(cached) " >&6
7533else
7534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7535/* end confdefs.h.  */
7536#include <stdlib.h>
7537#include <stdarg.h>
7538#include <string.h>
7539#include <float.h>
7540
7541int
7542main ()
7543{
7544
7545  ;
7546  return 0;
7547}
7548_ACEOF
7549if ac_fn_c_try_compile "$LINENO"; then :
7550  ac_cv_header_stdc=yes
7551else
7552  ac_cv_header_stdc=no
7553fi
7554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7555
7556if test $ac_cv_header_stdc = yes; then
7557  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7558  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7559/* end confdefs.h.  */
7560#include <string.h>
7561
7562_ACEOF
7563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7564  $EGREP "memchr" >/dev/null 2>&1; then :
7565
7566else
7567  ac_cv_header_stdc=no
7568fi
7569rm -f conftest*
7570
7571fi
7572
7573if test $ac_cv_header_stdc = yes; then
7574  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7576/* end confdefs.h.  */
7577#include <stdlib.h>
7578
7579_ACEOF
7580if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7581  $EGREP "free" >/dev/null 2>&1; then :
7582
7583else
7584  ac_cv_header_stdc=no
7585fi
7586rm -f conftest*
7587
7588fi
7589
7590if test $ac_cv_header_stdc = yes; then
7591  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7592  if test "$cross_compiling" = yes; then :
7593  :
7594else
7595  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7596/* end confdefs.h.  */
7597#include <ctype.h>
7598#include <stdlib.h>
7599#if ((' ' & 0x0FF) == 0x020)
7600# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7601# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7602#else
7603# define ISLOWER(c) \
7604		   (('a' <= (c) && (c) <= 'i') \
7605		     || ('j' <= (c) && (c) <= 'r') \
7606		     || ('s' <= (c) && (c) <= 'z'))
7607# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7608#endif
7609
7610#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7611int
7612main ()
7613{
7614  int i;
7615  for (i = 0; i < 256; i++)
7616    if (XOR (islower (i), ISLOWER (i))
7617	|| toupper (i) != TOUPPER (i))
7618      return 2;
7619  return 0;
7620}
7621_ACEOF
7622if ac_fn_c_try_run "$LINENO"; then :
7623
7624else
7625  ac_cv_header_stdc=no
7626fi
7627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7628  conftest.$ac_objext conftest.beam conftest.$ac_ext
7629fi
7630
7631fi
7632fi
7633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7634$as_echo "$ac_cv_header_stdc" >&6; }
7635if test $ac_cv_header_stdc = yes; then
7636
7637$as_echo "#define STDC_HEADERS 1" >>confdefs.h
7638
7639fi
7640
7641ac_header_dirent=no
7642for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
7643  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7645$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
7646if eval \${$as_ac_Header+:} false; then :
7647  $as_echo_n "(cached) " >&6
7648else
7649  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7650/* end confdefs.h.  */
7651#include <sys/types.h>
7652#include <$ac_hdr>
7653
7654int
7655main ()
7656{
7657if ((DIR *) 0)
7658return 0;
7659  ;
7660  return 0;
7661}
7662_ACEOF
7663if ac_fn_c_try_compile "$LINENO"; then :
7664  eval "$as_ac_Header=yes"
7665else
7666  eval "$as_ac_Header=no"
7667fi
7668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7669fi
7670eval ac_res=\$$as_ac_Header
7671	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7672$as_echo "$ac_res" >&6; }
7673if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7674  cat >>confdefs.h <<_ACEOF
7675#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
7676_ACEOF
7677
7678ac_header_dirent=$ac_hdr; break
7679fi
7680
7681done
7682# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7683if test $ac_header_dirent = dirent.h; then
7684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7685$as_echo_n "checking for library containing opendir... " >&6; }
7686if ${ac_cv_search_opendir+:} false; then :
7687  $as_echo_n "(cached) " >&6
7688else
7689  ac_func_search_save_LIBS=$LIBS
7690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7691/* end confdefs.h.  */
7692
7693/* Override any GCC internal prototype to avoid an error.
7694   Use char because int might match the return type of a GCC
7695   builtin and then its argument prototype would still apply.  */
7696#ifdef __cplusplus
7697extern "C"
7698#endif
7699char opendir ();
7700int
7701main ()
7702{
7703return opendir ();
7704  ;
7705  return 0;
7706}
7707_ACEOF
7708for ac_lib in '' dir; do
7709  if test -z "$ac_lib"; then
7710    ac_res="none required"
7711  else
7712    ac_res=-l$ac_lib
7713    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7714  fi
7715  if ac_fn_c_try_link "$LINENO"; then :
7716  ac_cv_search_opendir=$ac_res
7717fi
7718rm -f core conftest.err conftest.$ac_objext \
7719    conftest$ac_exeext
7720  if ${ac_cv_search_opendir+:} false; then :
7721  break
7722fi
7723done
7724if ${ac_cv_search_opendir+:} false; then :
7725
7726else
7727  ac_cv_search_opendir=no
7728fi
7729rm conftest.$ac_ext
7730LIBS=$ac_func_search_save_LIBS
7731fi
7732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7733$as_echo "$ac_cv_search_opendir" >&6; }
7734ac_res=$ac_cv_search_opendir
7735if test "$ac_res" != no; then :
7736  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7737
7738fi
7739
7740else
7741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7742$as_echo_n "checking for library containing opendir... " >&6; }
7743if ${ac_cv_search_opendir+:} false; then :
7744  $as_echo_n "(cached) " >&6
7745else
7746  ac_func_search_save_LIBS=$LIBS
7747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7748/* end confdefs.h.  */
7749
7750/* Override any GCC internal prototype to avoid an error.
7751   Use char because int might match the return type of a GCC
7752   builtin and then its argument prototype would still apply.  */
7753#ifdef __cplusplus
7754extern "C"
7755#endif
7756char opendir ();
7757int
7758main ()
7759{
7760return opendir ();
7761  ;
7762  return 0;
7763}
7764_ACEOF
7765for ac_lib in '' x; do
7766  if test -z "$ac_lib"; then
7767    ac_res="none required"
7768  else
7769    ac_res=-l$ac_lib
7770    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7771  fi
7772  if ac_fn_c_try_link "$LINENO"; then :
7773  ac_cv_search_opendir=$ac_res
7774fi
7775rm -f core conftest.err conftest.$ac_objext \
7776    conftest$ac_exeext
7777  if ${ac_cv_search_opendir+:} false; then :
7778  break
7779fi
7780done
7781if ${ac_cv_search_opendir+:} false; then :
7782
7783else
7784  ac_cv_search_opendir=no
7785fi
7786rm conftest.$ac_ext
7787LIBS=$ac_func_search_save_LIBS
7788fi
7789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7790$as_echo "$ac_cv_search_opendir" >&6; }
7791ac_res=$ac_cv_search_opendir
7792if test "$ac_res" != no; then :
7793  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7794
7795fi
7796
7797fi
7798
7799
7800for ac_func in fchmod fchown
7801do :
7802  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7803ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7804if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7805  cat >>confdefs.h <<_ACEOF
7806#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7807_ACEOF
7808
7809fi
7810done
7811
7812# This is needed for mingw build
7813for ac_func in setmode getpwuid getpwnam getgrgid getgrnam pipe fork getuid geteuid
7814do :
7815  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7816ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7817if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7818  cat >>confdefs.h <<_ACEOF
7819#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7820_ACEOF
7821
7822fi
7823done
7824
7825
7826# gnulib modules
7827
7828
7829
7830
7831
7832          LIBC_FATAL_STDERR_=1
7833  export LIBC_FATAL_STDERR_
7834
7835ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7836if test "x$ac_cv_type_size_t" = xyes; then :
7837
7838else
7839
7840cat >>confdefs.h <<_ACEOF
7841#define size_t unsigned int
7842_ACEOF
7843
7844fi
7845
7846# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7847# for constant arguments.  Useless!
7848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7849$as_echo_n "checking for working alloca.h... " >&6; }
7850if ${ac_cv_working_alloca_h+:} false; then :
7851  $as_echo_n "(cached) " >&6
7852else
7853  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7854/* end confdefs.h.  */
7855#include <alloca.h>
7856int
7857main ()
7858{
7859char *p = (char *) alloca (2 * sizeof (int));
7860			  if (p) return 0;
7861  ;
7862  return 0;
7863}
7864_ACEOF
7865if ac_fn_c_try_link "$LINENO"; then :
7866  ac_cv_working_alloca_h=yes
7867else
7868  ac_cv_working_alloca_h=no
7869fi
7870rm -f core conftest.err conftest.$ac_objext \
7871    conftest$ac_exeext conftest.$ac_ext
7872fi
7873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7874$as_echo "$ac_cv_working_alloca_h" >&6; }
7875if test $ac_cv_working_alloca_h = yes; then
7876
7877$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7878
7879fi
7880
7881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7882$as_echo_n "checking for alloca... " >&6; }
7883if ${ac_cv_func_alloca_works+:} false; then :
7884  $as_echo_n "(cached) " >&6
7885else
7886  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7887/* end confdefs.h.  */
7888#ifdef __GNUC__
7889# define alloca __builtin_alloca
7890#else
7891# ifdef _MSC_VER
7892#  include <malloc.h>
7893#  define alloca _alloca
7894# else
7895#  ifdef HAVE_ALLOCA_H
7896#   include <alloca.h>
7897#  else
7898#   ifdef _AIX
7899 #pragma alloca
7900#   else
7901#    ifndef alloca /* predefined by HP cc +Olibcalls */
7902void *alloca (size_t);
7903#    endif
7904#   endif
7905#  endif
7906# endif
7907#endif
7908
7909int
7910main ()
7911{
7912char *p = (char *) alloca (1);
7913				    if (p) return 0;
7914  ;
7915  return 0;
7916}
7917_ACEOF
7918if ac_fn_c_try_link "$LINENO"; then :
7919  ac_cv_func_alloca_works=yes
7920else
7921  ac_cv_func_alloca_works=no
7922fi
7923rm -f core conftest.err conftest.$ac_objext \
7924    conftest$ac_exeext conftest.$ac_ext
7925fi
7926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7927$as_echo "$ac_cv_func_alloca_works" >&6; }
7928
7929if test $ac_cv_func_alloca_works = yes; then
7930
7931$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7932
7933else
7934  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7935# that cause trouble.  Some versions do not even contain alloca or
7936# contain a buggy version.  If you still want to use their alloca,
7937# use ar to extract alloca.o from them instead of compiling alloca.c.
7938
7939
7940
7941
7942
7943ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7944
7945$as_echo "#define C_ALLOCA 1" >>confdefs.h
7946
7947
7948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7949$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7950if ${ac_cv_os_cray+:} false; then :
7951  $as_echo_n "(cached) " >&6
7952else
7953  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7954/* end confdefs.h.  */
7955#if defined CRAY && ! defined CRAY2
7956webecray
7957#else
7958wenotbecray
7959#endif
7960
7961_ACEOF
7962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7963  $EGREP "webecray" >/dev/null 2>&1; then :
7964  ac_cv_os_cray=yes
7965else
7966  ac_cv_os_cray=no
7967fi
7968rm -f conftest*
7969
7970fi
7971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7972$as_echo "$ac_cv_os_cray" >&6; }
7973if test $ac_cv_os_cray = yes; then
7974  for ac_func in _getb67 GETB67 getb67; do
7975    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7976ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7977if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7978
7979cat >>confdefs.h <<_ACEOF
7980#define CRAY_STACKSEG_END $ac_func
7981_ACEOF
7982
7983    break
7984fi
7985
7986  done
7987fi
7988
7989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7990$as_echo_n "checking stack direction for C alloca... " >&6; }
7991if ${ac_cv_c_stack_direction+:} false; then :
7992  $as_echo_n "(cached) " >&6
7993else
7994  if test "$cross_compiling" = yes; then :
7995  ac_cv_c_stack_direction=0
7996else
7997  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7998/* end confdefs.h.  */
7999$ac_includes_default
8000int
8001find_stack_direction (int *addr, int depth)
8002{
8003  int dir, dummy = 0;
8004  if (! addr)
8005    addr = &dummy;
8006  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8007  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8008  return dir + dummy;
8009}
8010
8011int
8012main (int argc, char **argv)
8013{
8014  return find_stack_direction (0, argc + !argv + 20) < 0;
8015}
8016_ACEOF
8017if ac_fn_c_try_run "$LINENO"; then :
8018  ac_cv_c_stack_direction=1
8019else
8020  ac_cv_c_stack_direction=-1
8021fi
8022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8023  conftest.$ac_objext conftest.beam conftest.$ac_ext
8024fi
8025
8026fi
8027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8028$as_echo "$ac_cv_c_stack_direction" >&6; }
8029cat >>confdefs.h <<_ACEOF
8030#define STACK_DIRECTION $ac_cv_c_stack_direction
8031_ACEOF
8032
8033
8034fi
8035
8036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
8037$as_echo_n "checking for inline... " >&6; }
8038if ${ac_cv_c_inline+:} false; then :
8039  $as_echo_n "(cached) " >&6
8040else
8041  ac_cv_c_inline=no
8042for ac_kw in inline __inline__ __inline; do
8043  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8044/* end confdefs.h.  */
8045#ifndef __cplusplus
8046typedef int foo_t;
8047static $ac_kw foo_t static_foo () {return 0; }
8048$ac_kw foo_t foo () {return 0; }
8049#endif
8050
8051_ACEOF
8052if ac_fn_c_try_compile "$LINENO"; then :
8053  ac_cv_c_inline=$ac_kw
8054fi
8055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8056  test "$ac_cv_c_inline" != no && break
8057done
8058
8059fi
8060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
8061$as_echo "$ac_cv_c_inline" >&6; }
8062
8063case $ac_cv_c_inline in
8064  inline | yes) ;;
8065  *)
8066    case $ac_cv_c_inline in
8067      no) ac_val=;;
8068      *) ac_val=$ac_cv_c_inline;;
8069    esac
8070    cat >>confdefs.h <<_ACEOF
8071#ifndef __cplusplus
8072#define inline $ac_val
8073#endif
8074_ACEOF
8075    ;;
8076esac
8077
8078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8079$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
8080if ${ac_cv_c_restrict+:} false; then :
8081  $as_echo_n "(cached) " >&6
8082else
8083  ac_cv_c_restrict=no
8084   # The order here caters to the fact that C++ does not require restrict.
8085   for ac_kw in __restrict __restrict__ _Restrict restrict; do
8086     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8087/* end confdefs.h.  */
8088typedef int *int_ptr;
8089	   int foo (int_ptr $ac_kw ip) { return ip[0]; }
8090	   int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
8091	   int bar (int ip[$ac_kw]) { return ip[0]; }
8092
8093int
8094main ()
8095{
8096int s[1];
8097	   int *$ac_kw t = s;
8098	   t[0] = 0;
8099	   return foo (t) + bar (t);
8100
8101  ;
8102  return 0;
8103}
8104_ACEOF
8105if ac_fn_c_try_compile "$LINENO"; then :
8106  ac_cv_c_restrict=$ac_kw
8107fi
8108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8109     test "$ac_cv_c_restrict" != no && break
8110   done
8111
8112fi
8113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
8114$as_echo "$ac_cv_c_restrict" >&6; }
8115
8116 case $ac_cv_c_restrict in
8117   restrict) ;;
8118   no) $as_echo "#define restrict /**/" >>confdefs.h
8119 ;;
8120   *)  cat >>confdefs.h <<_ACEOF
8121#define restrict $ac_cv_c_restrict
8122_ACEOF
8123 ;;
8124 esac
8125
8126ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
8127if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
8128  ac_have_decl=1
8129else
8130  ac_have_decl=0
8131fi
8132
8133cat >>confdefs.h <<_ACEOF
8134#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
8135_ACEOF
8136
8137ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
8138if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
8139  ac_have_decl=1
8140else
8141  ac_have_decl=0
8142fi
8143
8144cat >>confdefs.h <<_ACEOF
8145#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
8146_ACEOF
8147
8148ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
8149if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
8150  ac_have_decl=1
8151else
8152  ac_have_decl=0
8153fi
8154
8155cat >>confdefs.h <<_ACEOF
8156#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
8157_ACEOF
8158
8159ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
8160if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
8161  ac_have_decl=1
8162else
8163  ac_have_decl=0
8164fi
8165
8166cat >>confdefs.h <<_ACEOF
8167#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
8168_ACEOF
8169
8170ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
8171if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
8172  ac_have_decl=1
8173else
8174  ac_have_decl=0
8175fi
8176
8177cat >>confdefs.h <<_ACEOF
8178#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
8179_ACEOF
8180
8181ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
8182if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
8183  ac_have_decl=1
8184else
8185  ac_have_decl=0
8186fi
8187
8188cat >>confdefs.h <<_ACEOF
8189#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
8190_ACEOF
8191
8192ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
8193if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
8194  ac_have_decl=1
8195else
8196  ac_have_decl=0
8197fi
8198
8199cat >>confdefs.h <<_ACEOF
8200#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
8201_ACEOF
8202
8203ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
8204if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
8205  ac_have_decl=1
8206else
8207  ac_have_decl=0
8208fi
8209
8210cat >>confdefs.h <<_ACEOF
8211#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
8212_ACEOF
8213
8214ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
8215if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
8216  ac_have_decl=1
8217else
8218  ac_have_decl=0
8219fi
8220
8221cat >>confdefs.h <<_ACEOF
8222#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
8223_ACEOF
8224
8225ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8226if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
8227  ac_have_decl=1
8228else
8229  ac_have_decl=0
8230fi
8231
8232cat >>confdefs.h <<_ACEOF
8233#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
8234_ACEOF
8235
8236ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
8237if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
8238  ac_have_decl=1
8239else
8240  ac_have_decl=0
8241fi
8242
8243cat >>confdefs.h <<_ACEOF
8244#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
8245_ACEOF
8246
8247ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
8248if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
8249  ac_have_decl=1
8250else
8251  ac_have_decl=0
8252fi
8253
8254cat >>confdefs.h <<_ACEOF
8255#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
8256_ACEOF
8257
8258ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
8259if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
8260  ac_have_decl=1
8261else
8262  ac_have_decl=0
8263fi
8264
8265cat >>confdefs.h <<_ACEOF
8266#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
8267_ACEOF
8268
8269
8270
8271
8272  for ac_func in $ac_func_list
8273do :
8274  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8275ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8276if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8277  cat >>confdefs.h <<_ACEOF
8278#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8279_ACEOF
8280
8281fi
8282done
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8293if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8294  ac_have_decl=1
8295else
8296  ac_have_decl=0
8297fi
8298
8299cat >>confdefs.h <<_ACEOF
8300#define HAVE_DECL_STRERROR_R $ac_have_decl
8301_ACEOF
8302
8303for ac_func in strerror_r
8304do :
8305  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8306if test "x$ac_cv_func_strerror_r" = xyes; then :
8307  cat >>confdefs.h <<_ACEOF
8308#define HAVE_STRERROR_R 1
8309_ACEOF
8310
8311fi
8312done
8313
8314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8315$as_echo_n "checking whether strerror_r returns char *... " >&6; }
8316if ${ac_cv_func_strerror_r_char_p+:} false; then :
8317  $as_echo_n "(cached) " >&6
8318else
8319
8320    ac_cv_func_strerror_r_char_p=no
8321    if test $ac_cv_have_decl_strerror_r = yes; then
8322      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8323/* end confdefs.h.  */
8324$ac_includes_default
8325int
8326main ()
8327{
8328
8329	  char buf[100];
8330	  char x = *strerror_r (0, buf, sizeof buf);
8331	  char *p = strerror_r (0, buf, sizeof buf);
8332	  return !p || x;
8333
8334  ;
8335  return 0;
8336}
8337_ACEOF
8338if ac_fn_c_try_compile "$LINENO"; then :
8339  ac_cv_func_strerror_r_char_p=yes
8340fi
8341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8342    else
8343      # strerror_r is not declared.  Choose between
8344      # systems that have relatively inaccessible declarations for the
8345      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
8346      # former has a strerror_r that returns char*, while the latter
8347      # has a strerror_r that returns `int'.
8348      # This test should segfault on the DEC system.
8349      if test "$cross_compiling" = yes; then :
8350  :
8351else
8352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8353/* end confdefs.h.  */
8354$ac_includes_default
8355	extern char *strerror_r ();
8356int
8357main ()
8358{
8359char buf[100];
8360	  char x = *strerror_r (0, buf, sizeof buf);
8361	  return ! isalpha (x);
8362  ;
8363  return 0;
8364}
8365_ACEOF
8366if ac_fn_c_try_run "$LINENO"; then :
8367  ac_cv_func_strerror_r_char_p=yes
8368fi
8369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8370  conftest.$ac_objext conftest.beam conftest.$ac_ext
8371fi
8372
8373    fi
8374
8375fi
8376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8377$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
8378if test $ac_cv_func_strerror_r_char_p = yes; then
8379
8380$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8381
8382fi
8383
8384
8385  XGETTEXT_EXTRA_OPTIONS=
8386
8387
8388  GNULIB_CHDIR=0;
8389  GNULIB_CHOWN=0;
8390  GNULIB_CLOSE=0;
8391  GNULIB_DUP=0;
8392  GNULIB_DUP2=0;
8393  GNULIB_DUP3=0;
8394  GNULIB_ENVIRON=0;
8395  GNULIB_EUIDACCESS=0;
8396  GNULIB_FACCESSAT=0;
8397  GNULIB_FCHDIR=0;
8398  GNULIB_FCHOWNAT=0;
8399  GNULIB_FDATASYNC=0;
8400  GNULIB_FSYNC=0;
8401  GNULIB_FTRUNCATE=0;
8402  GNULIB_GETCWD=0;
8403  GNULIB_GETDOMAINNAME=0;
8404  GNULIB_GETDTABLESIZE=0;
8405  GNULIB_GETGROUPS=0;
8406  GNULIB_GETHOSTNAME=0;
8407  GNULIB_GETLOGIN=0;
8408  GNULIB_GETLOGIN_R=0;
8409  GNULIB_GETPAGESIZE=0;
8410  GNULIB_GETUSERSHELL=0;
8411  GNULIB_GROUP_MEMBER=0;
8412  GNULIB_ISATTY=0;
8413  GNULIB_LCHOWN=0;
8414  GNULIB_LINK=0;
8415  GNULIB_LINKAT=0;
8416  GNULIB_LSEEK=0;
8417  GNULIB_PIPE=0;
8418  GNULIB_PIPE2=0;
8419  GNULIB_PREAD=0;
8420  GNULIB_PWRITE=0;
8421  GNULIB_READ=0;
8422  GNULIB_READLINK=0;
8423  GNULIB_READLINKAT=0;
8424  GNULIB_RMDIR=0;
8425  GNULIB_SETHOSTNAME=0;
8426  GNULIB_SLEEP=0;
8427  GNULIB_SYMLINK=0;
8428  GNULIB_SYMLINKAT=0;
8429  GNULIB_TTYNAME_R=0;
8430  GNULIB_UNISTD_H_NONBLOCKING=0;
8431  GNULIB_UNISTD_H_SIGPIPE=0;
8432  GNULIB_UNLINK=0;
8433  GNULIB_UNLINKAT=0;
8434  GNULIB_USLEEP=0;
8435  GNULIB_WRITE=0;
8436    HAVE_CHOWN=1;
8437  HAVE_DUP2=1;
8438  HAVE_DUP3=1;
8439  HAVE_EUIDACCESS=1;
8440  HAVE_FACCESSAT=1;
8441  HAVE_FCHDIR=1;
8442  HAVE_FCHOWNAT=1;
8443  HAVE_FDATASYNC=1;
8444  HAVE_FSYNC=1;
8445  HAVE_FTRUNCATE=1;
8446  HAVE_GETDTABLESIZE=1;
8447  HAVE_GETGROUPS=1;
8448  HAVE_GETHOSTNAME=1;
8449  HAVE_GETLOGIN=1;
8450  HAVE_GETPAGESIZE=1;
8451  HAVE_GROUP_MEMBER=1;
8452  HAVE_LCHOWN=1;
8453  HAVE_LINK=1;
8454  HAVE_LINKAT=1;
8455  HAVE_PIPE=1;
8456  HAVE_PIPE2=1;
8457  HAVE_PREAD=1;
8458  HAVE_PWRITE=1;
8459  HAVE_READLINK=1;
8460  HAVE_READLINKAT=1;
8461  HAVE_SETHOSTNAME=1;
8462  HAVE_SLEEP=1;
8463  HAVE_SYMLINK=1;
8464  HAVE_SYMLINKAT=1;
8465  HAVE_UNLINKAT=1;
8466  HAVE_USLEEP=1;
8467  HAVE_DECL_ENVIRON=1;
8468  HAVE_DECL_FCHDIR=1;
8469  HAVE_DECL_FDATASYNC=1;
8470  HAVE_DECL_GETDOMAINNAME=1;
8471  HAVE_DECL_GETLOGIN=1;
8472  HAVE_DECL_GETLOGIN_R=1;
8473  HAVE_DECL_GETPAGESIZE=1;
8474  HAVE_DECL_GETUSERSHELL=1;
8475  HAVE_DECL_SETHOSTNAME=1;
8476  HAVE_DECL_TTYNAME_R=1;
8477  HAVE_OS_H=0;
8478  HAVE_SYS_PARAM_H=0;
8479  REPLACE_CHOWN=0;
8480  REPLACE_CLOSE=0;
8481  REPLACE_DUP=0;
8482  REPLACE_DUP2=0;
8483  REPLACE_FCHOWNAT=0;
8484  REPLACE_FTRUNCATE=0;
8485  REPLACE_GETCWD=0;
8486  REPLACE_GETDOMAINNAME=0;
8487  REPLACE_GETDTABLESIZE=0;
8488  REPLACE_GETLOGIN_R=0;
8489  REPLACE_GETGROUPS=0;
8490  REPLACE_GETPAGESIZE=0;
8491  REPLACE_ISATTY=0;
8492  REPLACE_LCHOWN=0;
8493  REPLACE_LINK=0;
8494  REPLACE_LINKAT=0;
8495  REPLACE_LSEEK=0;
8496  REPLACE_PREAD=0;
8497  REPLACE_PWRITE=0;
8498  REPLACE_READ=0;
8499  REPLACE_READLINK=0;
8500  REPLACE_READLINKAT=0;
8501  REPLACE_RMDIR=0;
8502  REPLACE_SLEEP=0;
8503  REPLACE_SYMLINK=0;
8504  REPLACE_SYMLINKAT=0;
8505  REPLACE_TTYNAME_R=0;
8506  REPLACE_UNLINK=0;
8507  REPLACE_UNLINKAT=0;
8508  REPLACE_USLEEP=0;
8509  REPLACE_WRITE=0;
8510  UNISTD_H_HAVE_WINSOCK2_H=0;
8511  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521# Make sure we can run config.sub.
8522$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
8523  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
8524
8525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
8526$as_echo_n "checking build system type... " >&6; }
8527if ${ac_cv_build+:} false; then :
8528  $as_echo_n "(cached) " >&6
8529else
8530  ac_build_alias=$build_alias
8531test "x$ac_build_alias" = x &&
8532  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
8533test "x$ac_build_alias" = x &&
8534  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
8535ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
8536  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
8537
8538fi
8539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
8540$as_echo "$ac_cv_build" >&6; }
8541case $ac_cv_build in
8542*-*-*) ;;
8543*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
8544esac
8545build=$ac_cv_build
8546ac_save_IFS=$IFS; IFS='-'
8547set x $ac_cv_build
8548shift
8549build_cpu=$1
8550build_vendor=$2
8551shift; shift
8552# Remember, the first character of IFS is used to create $*,
8553# except with old shells:
8554build_os=$*
8555IFS=$ac_save_IFS
8556case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
8557
8558
8559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
8560$as_echo_n "checking host system type... " >&6; }
8561if ${ac_cv_host+:} false; then :
8562  $as_echo_n "(cached) " >&6
8563else
8564  if test "x$host_alias" = x; then
8565  ac_cv_host=$ac_cv_build
8566else
8567  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
8568    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
8569fi
8570
8571fi
8572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
8573$as_echo "$ac_cv_host" >&6; }
8574case $ac_cv_host in
8575*-*-*) ;;
8576*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
8577esac
8578host=$ac_cv_host
8579ac_save_IFS=$IFS; IFS='-'
8580set x $ac_cv_host
8581shift
8582host_cpu=$1
8583host_vendor=$2
8584shift; shift
8585# Remember, the first character of IFS is used to create $*,
8586# except with old shells:
8587host_os=$*
8588IFS=$ac_save_IFS
8589case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
8590
8591
8592
8593      for ac_header in unistd.h
8594do :
8595  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
8596if test "x$ac_cv_header_unistd_h" = xyes; then :
8597  cat >>confdefs.h <<_ACEOF
8598#define HAVE_UNISTD_H 1
8599_ACEOF
8600
8601fi
8602
8603done
8604
8605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
8606$as_echo_n "checking for working chown... " >&6; }
8607if ${ac_cv_func_chown_works+:} false; then :
8608  $as_echo_n "(cached) " >&6
8609else
8610  if test "$cross_compiling" = yes; then :
8611  case "$host_os" in # ((
8612                  # Guess yes on glibc systems.
8613          *-gnu*) ac_cv_func_chown_works=yes ;;
8614                  # If we don't know, assume the worst.
8615          *)      ac_cv_func_chown_works=no ;;
8616        esac
8617
8618else
8619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8620/* end confdefs.h.  */
8621$ac_includes_default
8622           #include <fcntl.h>
8623
8624int
8625main ()
8626{
8627
8628            char *f = "conftest.chown";
8629            struct stat before, after;
8630
8631            if (creat (f, 0600) < 0)
8632              return 1;
8633            if (stat (f, &before) < 0)
8634              return 1;
8635            if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
8636              return 1;
8637            if (stat (f, &after) < 0)
8638              return 1;
8639            return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
8640
8641  ;
8642  return 0;
8643}
8644
8645_ACEOF
8646if ac_fn_c_try_run "$LINENO"; then :
8647  ac_cv_func_chown_works=yes
8648else
8649  ac_cv_func_chown_works=no
8650fi
8651rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8652  conftest.$ac_objext conftest.beam conftest.$ac_ext
8653fi
8654
8655     rm -f conftest.chown
8656
8657fi
8658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
8659$as_echo "$ac_cv_func_chown_works" >&6; }
8660  if test $ac_cv_func_chown_works = yes; then
8661
8662$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
8663
8664  fi
8665
8666
8667  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
8668$as_echo_n "checking whether chown dereferences symlinks... " >&6; }
8669if ${gl_cv_func_chown_follows_symlink+:} false; then :
8670  $as_echo_n "(cached) " >&6
8671else
8672
8673      if test "$cross_compiling" = yes; then :
8674  gl_cv_func_chown_follows_symlink=yes
8675
8676else
8677  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8678/* end confdefs.h.  */
8679
8680#include <unistd.h>
8681#include <stdlib.h>
8682#include <errno.h>
8683
8684        int
8685        main ()
8686        {
8687          int result = 0;
8688          char const *dangling_symlink = "conftest.dangle";
8689
8690          unlink (dangling_symlink);
8691          if (symlink ("conftest.no-such", dangling_symlink))
8692            abort ();
8693
8694          /* Exit successfully on a conforming system,
8695             i.e., where chown must fail with ENOENT.  */
8696          if (chown (dangling_symlink, getuid (), getgid ()) == 0)
8697            result |= 1;
8698          if (errno != ENOENT)
8699            result |= 2;
8700          return result;
8701        }
8702
8703_ACEOF
8704if ac_fn_c_try_run "$LINENO"; then :
8705  gl_cv_func_chown_follows_symlink=yes
8706else
8707  gl_cv_func_chown_follows_symlink=no
8708fi
8709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8710  conftest.$ac_objext conftest.beam conftest.$ac_ext
8711fi
8712
8713
8714
8715fi
8716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
8717$as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
8718
8719  if test $gl_cv_func_chown_follows_symlink = no; then
8720
8721$as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
8722
8723  fi
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736    if test $ac_cv_func_chown = no; then
8737    HAVE_CHOWN=0
8738  else
8739        if test $gl_cv_func_chown_follows_symlink = no; then
8740      REPLACE_CHOWN=1
8741    fi
8742
8743        if test $ac_cv_func_chown_works = no; then
8744
8745$as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
8746
8747      REPLACE_CHOWN=1
8748    fi
8749
8750                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
8751$as_echo_n "checking whether chown honors trailing slash... " >&6; }
8752if ${gl_cv_func_chown_slash_works+:} false; then :
8753  $as_echo_n "(cached) " >&6
8754else
8755  touch conftest.file && rm -f conftest.link
8756       if test "$cross_compiling" = yes; then :
8757  case "$host_os" in
8758                   # Guess yes on glibc systems.
8759           *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;;
8760                   # If we don't know, assume the worst.
8761           *)      gl_cv_func_chown_slash_works="guessing no" ;;
8762         esac
8763
8764else
8765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8766/* end confdefs.h.  */
8767
8768#include <unistd.h>
8769#include <stdlib.h>
8770#include <errno.h>
8771
8772int
8773main ()
8774{
8775    if (symlink ("conftest.file", "conftest.link")) return 1;
8776          if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
8777
8778  ;
8779  return 0;
8780}
8781_ACEOF
8782if ac_fn_c_try_run "$LINENO"; then :
8783  gl_cv_func_chown_slash_works=yes
8784else
8785  gl_cv_func_chown_slash_works=no
8786fi
8787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8788  conftest.$ac_objext conftest.beam conftest.$ac_ext
8789fi
8790
8791      rm -f conftest.link conftest.file
8792fi
8793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
8794$as_echo "$gl_cv_func_chown_slash_works" >&6; }
8795    case "$gl_cv_func_chown_slash_works" in
8796      *yes) ;;
8797      *)
8798
8799$as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
8800
8801        REPLACE_CHOWN=1
8802        ;;
8803    esac
8804
8805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
8806$as_echo_n "checking whether chown always updates ctime... " >&6; }
8807if ${gl_cv_func_chown_ctime_works+:} false; then :
8808  $as_echo_n "(cached) " >&6
8809else
8810  if test "$cross_compiling" = yes; then :
8811  case "$host_os" in
8812                   # Guess yes on glibc systems.
8813           *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;;
8814                   # If we don't know, assume the worst.
8815           *)      gl_cv_func_chown_ctime_works="guessing no" ;;
8816         esac
8817
8818else
8819  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8820/* end confdefs.h.  */
8821
8822#include <unistd.h>
8823#include <stdlib.h>
8824#include <errno.h>
8825#include <fcntl.h>
8826#include <sys/stat.h>
8827
8828int
8829main ()
8830{
8831    struct stat st1, st2;
8832          if (close (creat ("conftest.file", 0600))) return 1;
8833          if (stat ("conftest.file", &st1)) return 2;
8834          sleep (1);
8835          if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
8836          if (stat ("conftest.file", &st2)) return 4;
8837          if (st2.st_ctime <= st1.st_ctime) return 5;
8838
8839  ;
8840  return 0;
8841}
8842_ACEOF
8843if ac_fn_c_try_run "$LINENO"; then :
8844  gl_cv_func_chown_ctime_works=yes
8845else
8846  gl_cv_func_chown_ctime_works=no
8847fi
8848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8849  conftest.$ac_objext conftest.beam conftest.$ac_ext
8850fi
8851
8852      rm -f conftest.file
8853fi
8854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
8855$as_echo "$gl_cv_func_chown_ctime_works" >&6; }
8856    case "$gl_cv_func_chown_ctime_works" in
8857      *yes) ;;
8858      *)
8859
8860$as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
8861
8862        REPLACE_CHOWN=1
8863        ;;
8864    esac
8865  fi
8866
8867
8868
8869
8870
8871  if test $ac_cv_func__set_invalid_parameter_handler = yes; then
8872    HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
8873
8874$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
8875
8876  else
8877    HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
8878  fi
8879
8880
8881
8882
8883
8884
8885
8886     GNULIB_OPENDIR=0;
8887  GNULIB_READDIR=0;
8888  GNULIB_REWINDDIR=0;
8889  GNULIB_CLOSEDIR=0;
8890  GNULIB_DIRFD=0;
8891  GNULIB_FDOPENDIR=0;
8892  GNULIB_SCANDIR=0;
8893  GNULIB_ALPHASORT=0;
8894    HAVE_OPENDIR=1;
8895  HAVE_READDIR=1;
8896  HAVE_REWINDDIR=1;
8897  HAVE_CLOSEDIR=1;
8898  HAVE_DECL_DIRFD=1;
8899  HAVE_DECL_FDOPENDIR=1;
8900  HAVE_FDOPENDIR=1;
8901  HAVE_SCANDIR=1;
8902  HAVE_ALPHASORT=1;
8903  REPLACE_OPENDIR=0;
8904  REPLACE_CLOSEDIR=0;
8905  REPLACE_DIRFD=0;
8906  REPLACE_FDOPENDIR=0;
8907
8908
8909
8910  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
8911$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
8912if ${gl_cv_have_include_next+:} false; then :
8913  $as_echo_n "(cached) " >&6
8914else
8915  rm -rf conftestd1a conftestd1b conftestd2
8916     mkdir conftestd1a conftestd1b conftestd2
8917                                                  cat <<EOF > conftestd1a/conftest.h
8918#define DEFINED_IN_CONFTESTD1
8919#include_next <conftest.h>
8920#ifdef DEFINED_IN_CONFTESTD2
8921int foo;
8922#else
8923#error "include_next doesn't work"
8924#endif
8925EOF
8926     cat <<EOF > conftestd1b/conftest.h
8927#define DEFINED_IN_CONFTESTD1
8928#include <stdio.h>
8929#include_next <conftest.h>
8930#ifdef DEFINED_IN_CONFTESTD2
8931int foo;
8932#else
8933#error "include_next doesn't work"
8934#endif
8935EOF
8936     cat <<EOF > conftestd2/conftest.h
8937#ifndef DEFINED_IN_CONFTESTD1
8938#error "include_next test doesn't work"
8939#endif
8940#define DEFINED_IN_CONFTESTD2
8941EOF
8942     gl_save_CPPFLAGS="$CPPFLAGS"
8943     CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
8944     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8945/* end confdefs.h.  */
8946#include <conftest.h>
8947_ACEOF
8948if ac_fn_c_try_compile "$LINENO"; then :
8949  gl_cv_have_include_next=yes
8950else
8951  CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
8952        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8953/* end confdefs.h.  */
8954#include <conftest.h>
8955_ACEOF
8956if ac_fn_c_try_compile "$LINENO"; then :
8957  gl_cv_have_include_next=buggy
8958else
8959  gl_cv_have_include_next=no
8960fi
8961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8962
8963fi
8964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8965     CPPFLAGS="$gl_save_CPPFLAGS"
8966     rm -rf conftestd1a conftestd1b conftestd2
8967
8968fi
8969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
8970$as_echo "$gl_cv_have_include_next" >&6; }
8971  PRAGMA_SYSTEM_HEADER=
8972  if test $gl_cv_have_include_next = yes; then
8973    INCLUDE_NEXT=include_next
8974    INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8975    if test -n "$GCC"; then
8976      PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
8977    fi
8978  else
8979    if test $gl_cv_have_include_next = buggy; then
8980      INCLUDE_NEXT=include
8981      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
8982    else
8983      INCLUDE_NEXT=include
8984      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
8985    fi
8986  fi
8987
8988
8989
8990  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
8991$as_echo_n "checking whether system header files limit the line length... " >&6; }
8992if ${gl_cv_pragma_columns+:} false; then :
8993  $as_echo_n "(cached) " >&6
8994else
8995       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8996/* end confdefs.h.  */
8997
8998#ifdef __TANDEM
8999choke me
9000#endif
9001
9002_ACEOF
9003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9004  $EGREP "choke me" >/dev/null 2>&1; then :
9005  gl_cv_pragma_columns=yes
9006else
9007  gl_cv_pragma_columns=no
9008fi
9009rm -f conftest*
9010
9011
9012fi
9013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9014$as_echo "$gl_cv_pragma_columns" >&6; }
9015  if test $gl_cv_pragma_columns = yes; then
9016    PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9017  else
9018    PRAGMA_COLUMNS=
9019  fi
9020
9021
9022
9023
9024
9025
9026
9027
9028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
9029$as_echo_n "checking whether // is distinct from /... " >&6; }
9030if ${gl_cv_double_slash_root+:} false; then :
9031  $as_echo_n "(cached) " >&6
9032else
9033   if test x"$cross_compiling" = xyes ; then
9034        # When cross-compiling, there is no way to tell whether // is special
9035        # short of a list of hosts.  However, the only known hosts to date
9036        # that have a distinct // are Apollo DomainOS (too old to port to),
9037        # Cygwin, and z/OS.  If anyone knows of another system for which // has
9038        # special semantics and is distinct from /, please report it to
9039        # <bug-gnulib@gnu.org>.
9040        case $host in
9041          *-cygwin | i370-ibm-openedition)
9042            gl_cv_double_slash_root=yes ;;
9043          *)
9044            # Be optimistic and assume that / and // are the same when we
9045            # don't know.
9046            gl_cv_double_slash_root='unknown, assuming no' ;;
9047        esac
9048      else
9049        set x `ls -di / // 2>/dev/null`
9050        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
9051          gl_cv_double_slash_root=no
9052        else
9053          gl_cv_double_slash_root=yes
9054        fi
9055      fi
9056fi
9057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
9058$as_echo "$gl_cv_double_slash_root" >&6; }
9059  if test "$gl_cv_double_slash_root" = yes; then
9060
9061$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
9062
9063  fi
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9077$as_echo_n "checking if environ is properly declared... " >&6; }
9078  if ${gt_cv_var_environ_declaration+:} false; then :
9079  $as_echo_n "(cached) " >&6
9080else
9081
9082    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9083/* end confdefs.h.  */
9084#if HAVE_UNISTD_H
9085     #include <unistd.h>
9086     #endif
9087     /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
9088     #include <stdlib.h>
9089
9090           extern struct { int foo; } environ;
9091int
9092main ()
9093{
9094environ.foo = 1;
9095  ;
9096  return 0;
9097}
9098_ACEOF
9099if ac_fn_c_try_compile "$LINENO"; then :
9100  gt_cv_var_environ_declaration=no
9101else
9102  gt_cv_var_environ_declaration=yes
9103fi
9104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9105fi
9106
9107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9108$as_echo "$gt_cv_var_environ_declaration" >&6; }
9109  if test $gt_cv_var_environ_declaration = yes; then
9110
9111$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9112
9113  fi
9114
9115
9116  if test $gt_cv_var_environ_declaration != yes; then
9117    HAVE_DECL_ENVIRON=0
9118  fi
9119
9120
9121
9122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9123$as_echo_n "checking for complete errno.h... " >&6; }
9124if ${gl_cv_header_errno_h_complete+:} false; then :
9125  $as_echo_n "(cached) " >&6
9126else
9127
9128    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9129/* end confdefs.h.  */
9130
9131#include <errno.h>
9132#if !defined ETXTBSY
9133booboo
9134#endif
9135#if !defined ENOMSG
9136booboo
9137#endif
9138#if !defined EIDRM
9139booboo
9140#endif
9141#if !defined ENOLINK
9142booboo
9143#endif
9144#if !defined EPROTO
9145booboo
9146#endif
9147#if !defined EMULTIHOP
9148booboo
9149#endif
9150#if !defined EBADMSG
9151booboo
9152#endif
9153#if !defined EOVERFLOW
9154booboo
9155#endif
9156#if !defined ENOTSUP
9157booboo
9158#endif
9159#if !defined ENETRESET
9160booboo
9161#endif
9162#if !defined ECONNABORTED
9163booboo
9164#endif
9165#if !defined ESTALE
9166booboo
9167#endif
9168#if !defined EDQUOT
9169booboo
9170#endif
9171#if !defined ECANCELED
9172booboo
9173#endif
9174#if !defined EOWNERDEAD
9175booboo
9176#endif
9177#if !defined ENOTRECOVERABLE
9178booboo
9179#endif
9180#if !defined EILSEQ
9181booboo
9182#endif
9183
9184_ACEOF
9185if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9186  $EGREP "booboo" >/dev/null 2>&1; then :
9187  gl_cv_header_errno_h_complete=no
9188else
9189  gl_cv_header_errno_h_complete=yes
9190fi
9191rm -f conftest*
9192
9193
9194fi
9195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
9196$as_echo "$gl_cv_header_errno_h_complete" >&6; }
9197  if test $gl_cv_header_errno_h_complete = yes; then
9198    ERRNO_H=''
9199  else
9200
9201
9202
9203
9204
9205
9206
9207
9208     if test $gl_cv_have_include_next = yes; then
9209       gl_cv_next_errno_h='<'errno.h'>'
9210     else
9211       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
9212$as_echo_n "checking absolute name of <errno.h>... " >&6; }
9213if ${gl_cv_next_errno_h+:} false; then :
9214  $as_echo_n "(cached) " >&6
9215else
9216
9217
9218
9219  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9220/* end confdefs.h.  */
9221#include <errno.h>
9222_ACEOF
9223                case "$host_os" in
9224    aix*) gl_absname_cpp="$ac_cpp -C" ;;
9225    *)    gl_absname_cpp="$ac_cpp" ;;
9226  esac
9227
9228  case "$host_os" in
9229    mingw*)
9230                                          gl_dirsep_regex='[/\\]'
9231      ;;
9232    *)
9233      gl_dirsep_regex='\/'
9234      ;;
9235  esac
9236      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9237  gl_header_literal_regex=`echo 'errno.h' \
9238                           | sed -e "$gl_make_literal_regex_sed"`
9239  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9240      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9241      s|^/[^/]|//&|
9242      p
9243      q
9244    }'
9245
9246        gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9247  sed -n "$gl_absolute_header_sed"`
9248
9249           gl_header=$gl_cv_absolute_errno_h
9250           gl_cv_next_errno_h='"'$gl_header'"'
9251
9252
9253fi
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
9255$as_echo "$gl_cv_next_errno_h" >&6; }
9256     fi
9257     NEXT_ERRNO_H=$gl_cv_next_errno_h
9258
9259     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9260       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9261       gl_next_as_first_directive='<'errno.h'>'
9262     else
9263       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9264       gl_next_as_first_directive=$gl_cv_next_errno_h
9265     fi
9266     NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
9267
9268
9269
9270
9271    ERRNO_H='errno.h'
9272  fi
9273
9274   if test -n "$ERRNO_H"; then
9275  GL_GENERATE_ERRNO_H_TRUE=
9276  GL_GENERATE_ERRNO_H_FALSE='#'
9277else
9278  GL_GENERATE_ERRNO_H_TRUE='#'
9279  GL_GENERATE_ERRNO_H_FALSE=
9280fi
9281
9282
9283  if test -n "$ERRNO_H"; then
9284    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
9285$as_echo_n "checking for EMULTIHOP value... " >&6; }
9286if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
9287  $as_echo_n "(cached) " >&6
9288else
9289
9290      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9291/* end confdefs.h.  */
9292
9293#include <errno.h>
9294#ifdef EMULTIHOP
9295yes
9296#endif
9297
9298_ACEOF
9299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9300  $EGREP "yes" >/dev/null 2>&1; then :
9301  gl_cv_header_errno_h_EMULTIHOP=yes
9302else
9303  gl_cv_header_errno_h_EMULTIHOP=no
9304fi
9305rm -f conftest*
9306
9307      if test $gl_cv_header_errno_h_EMULTIHOP = no; then
9308        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9309/* end confdefs.h.  */
9310
9311#define _XOPEN_SOURCE_EXTENDED 1
9312#include <errno.h>
9313#ifdef EMULTIHOP
9314yes
9315#endif
9316
9317_ACEOF
9318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9319  $EGREP "yes" >/dev/null 2>&1; then :
9320  gl_cv_header_errno_h_EMULTIHOP=hidden
9321fi
9322rm -f conftest*
9323
9324        if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
9325                              if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
9326#define _XOPEN_SOURCE_EXTENDED 1
9327#include <errno.h>
9328/* The following two lines are a workaround against an autoconf-2.52 bug.  */
9329#include <stdio.h>
9330#include <stdlib.h>
9331"; then :
9332
9333fi
9334
9335        fi
9336      fi
9337
9338fi
9339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
9340$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
9341    case $gl_cv_header_errno_h_EMULTIHOP in
9342      yes | no)
9343        EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
9344        ;;
9345      *)
9346        EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
9347        ;;
9348    esac
9349
9350
9351  fi
9352
9353
9354  if test -n "$ERRNO_H"; then
9355    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
9356$as_echo_n "checking for ENOLINK value... " >&6; }
9357if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
9358  $as_echo_n "(cached) " >&6
9359else
9360
9361      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9362/* end confdefs.h.  */
9363
9364#include <errno.h>
9365#ifdef ENOLINK
9366yes
9367#endif
9368
9369_ACEOF
9370if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9371  $EGREP "yes" >/dev/null 2>&1; then :
9372  gl_cv_header_errno_h_ENOLINK=yes
9373else
9374  gl_cv_header_errno_h_ENOLINK=no
9375fi
9376rm -f conftest*
9377
9378      if test $gl_cv_header_errno_h_ENOLINK = no; then
9379        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9380/* end confdefs.h.  */
9381
9382#define _XOPEN_SOURCE_EXTENDED 1
9383#include <errno.h>
9384#ifdef ENOLINK
9385yes
9386#endif
9387
9388_ACEOF
9389if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9390  $EGREP "yes" >/dev/null 2>&1; then :
9391  gl_cv_header_errno_h_ENOLINK=hidden
9392fi
9393rm -f conftest*
9394
9395        if test $gl_cv_header_errno_h_ENOLINK = hidden; then
9396                              if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
9397#define _XOPEN_SOURCE_EXTENDED 1
9398#include <errno.h>
9399/* The following two lines are a workaround against an autoconf-2.52 bug.  */
9400#include <stdio.h>
9401#include <stdlib.h>
9402"; then :
9403
9404fi
9405
9406        fi
9407      fi
9408
9409fi
9410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
9411$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
9412    case $gl_cv_header_errno_h_ENOLINK in
9413      yes | no)
9414        ENOLINK_HIDDEN=0; ENOLINK_VALUE=
9415        ;;
9416      *)
9417        ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
9418        ;;
9419    esac
9420
9421
9422  fi
9423
9424
9425  if test -n "$ERRNO_H"; then
9426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
9427$as_echo_n "checking for EOVERFLOW value... " >&6; }
9428if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
9429  $as_echo_n "(cached) " >&6
9430else
9431
9432      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9433/* end confdefs.h.  */
9434
9435#include <errno.h>
9436#ifdef EOVERFLOW
9437yes
9438#endif
9439
9440_ACEOF
9441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9442  $EGREP "yes" >/dev/null 2>&1; then :
9443  gl_cv_header_errno_h_EOVERFLOW=yes
9444else
9445  gl_cv_header_errno_h_EOVERFLOW=no
9446fi
9447rm -f conftest*
9448
9449      if test $gl_cv_header_errno_h_EOVERFLOW = no; then
9450        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9451/* end confdefs.h.  */
9452
9453#define _XOPEN_SOURCE_EXTENDED 1
9454#include <errno.h>
9455#ifdef EOVERFLOW
9456yes
9457#endif
9458
9459_ACEOF
9460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9461  $EGREP "yes" >/dev/null 2>&1; then :
9462  gl_cv_header_errno_h_EOVERFLOW=hidden
9463fi
9464rm -f conftest*
9465
9466        if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
9467                              if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
9468#define _XOPEN_SOURCE_EXTENDED 1
9469#include <errno.h>
9470/* The following two lines are a workaround against an autoconf-2.52 bug.  */
9471#include <stdio.h>
9472#include <stdlib.h>
9473"; then :
9474
9475fi
9476
9477        fi
9478      fi
9479
9480fi
9481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
9482$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
9483    case $gl_cv_header_errno_h_EOVERFLOW in
9484      yes | no)
9485        EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
9486        ;;
9487      *)
9488        EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
9489        ;;
9490    esac
9491
9492
9493  fi
9494
9495
9496
9497
9498
9499ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
9500if test "x$ac_cv_have_decl_fchdir" = xyes; then :
9501  ac_have_decl=1
9502else
9503  ac_have_decl=0
9504fi
9505
9506cat >>confdefs.h <<_ACEOF
9507#define HAVE_DECL_FCHDIR $ac_have_decl
9508_ACEOF
9509
9510
9511  GNULIB_FCNTL=0;
9512  GNULIB_NONBLOCKING=0;
9513  GNULIB_OPEN=0;
9514  GNULIB_OPENAT=0;
9515    HAVE_FCNTL=1;
9516  HAVE_OPENAT=1;
9517  REPLACE_FCNTL=0;
9518  REPLACE_OPEN=0;
9519  REPLACE_OPENAT=0;
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
9531$as_echo_n "checking for working fcntl.h... " >&6; }
9532if ${gl_cv_header_working_fcntl_h+:} false; then :
9533  $as_echo_n "(cached) " >&6
9534else
9535  if test "$cross_compiling" = yes; then :
9536  gl_cv_header_working_fcntl_h=cross-compiling
9537else
9538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9539/* end confdefs.h.  */
9540#include <sys/types.h>
9541           #include <sys/stat.h>
9542           #if HAVE_UNISTD_H
9543           # include <unistd.h>
9544           #else /* on Windows with MSVC */
9545           # include <io.h>
9546           # include <stdlib.h>
9547           # defined sleep(n) _sleep ((n) * 1000)
9548           #endif
9549           #include <fcntl.h>
9550           #ifndef O_NOATIME
9551            #define O_NOATIME 0
9552           #endif
9553           #ifndef O_NOFOLLOW
9554            #define O_NOFOLLOW 0
9555           #endif
9556           static int const constants[] =
9557            {
9558              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
9559              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
9560            };
9561
9562int
9563main ()
9564{
9565
9566            int result = !constants;
9567            #if HAVE_SYMLINK
9568            {
9569              static char const sym[] = "conftest.sym";
9570              if (symlink ("/dev/null", sym) != 0)
9571                result |= 2;
9572              else
9573                {
9574                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
9575                  if (fd >= 0)
9576                    {
9577                      close (fd);
9578                      result |= 4;
9579                    }
9580                }
9581              if (unlink (sym) != 0 || symlink (".", sym) != 0)
9582                result |= 2;
9583              else
9584                {
9585                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
9586                  if (fd >= 0)
9587                    {
9588                      close (fd);
9589                      result |= 4;
9590                    }
9591                }
9592              unlink (sym);
9593            }
9594            #endif
9595            {
9596              static char const file[] = "confdefs.h";
9597              int fd = open (file, O_RDONLY | O_NOATIME);
9598              if (fd < 0)
9599                result |= 8;
9600              else
9601                {
9602                  struct stat st0;
9603                  if (fstat (fd, &st0) != 0)
9604                    result |= 16;
9605                  else
9606                    {
9607                      char c;
9608                      sleep (1);
9609                      if (read (fd, &c, 1) != 1)
9610                        result |= 24;
9611                      else
9612                        {
9613                          if (close (fd) != 0)
9614                            result |= 32;
9615                          else
9616                            {
9617                              struct stat st1;
9618                              if (stat (file, &st1) != 0)
9619                                result |= 40;
9620                              else
9621                                if (st0.st_atime != st1.st_atime)
9622                                  result |= 64;
9623                            }
9624                        }
9625                    }
9626                }
9627            }
9628            return result;
9629  ;
9630  return 0;
9631}
9632_ACEOF
9633if ac_fn_c_try_run "$LINENO"; then :
9634  gl_cv_header_working_fcntl_h=yes
9635else
9636  case $? in #(
9637        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
9638        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
9639        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
9640         *) gl_cv_header_working_fcntl_h='no';;
9641        esac
9642fi
9643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9644  conftest.$ac_objext conftest.beam conftest.$ac_ext
9645fi
9646
9647fi
9648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
9649$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
9650
9651  case $gl_cv_header_working_fcntl_h in #(
9652  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
9653  *) ac_val=1;;
9654  esac
9655
9656cat >>confdefs.h <<_ACEOF
9657#define HAVE_WORKING_O_NOATIME $ac_val
9658_ACEOF
9659
9660
9661  case $gl_cv_header_working_fcntl_h in #(
9662  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
9663  *) ac_val=1;;
9664  esac
9665
9666cat >>confdefs.h <<_ACEOF
9667#define HAVE_WORKING_O_NOFOLLOW $ac_val
9668_ACEOF
9669
9670
9671ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9672if test "x$ac_cv_type_pid_t" = xyes; then :
9673
9674else
9675
9676cat >>confdefs.h <<_ACEOF
9677#define pid_t int
9678_ACEOF
9679
9680fi
9681
9682ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
9683if test "x$ac_cv_type_mode_t" = xyes; then :
9684
9685else
9686
9687cat >>confdefs.h <<_ACEOF
9688#define mode_t int
9689_ACEOF
9690
9691fi
9692
9693
9694
9695
9696
9697   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
9698$as_echo_n "checking for mbstate_t... " >&6; }
9699if ${ac_cv_type_mbstate_t+:} false; then :
9700  $as_echo_n "(cached) " >&6
9701else
9702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9703/* end confdefs.h.  */
9704$ac_includes_default
9705/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
9706   <wchar.h>.
9707   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9708   included before <wchar.h>.  */
9709#include <stddef.h>
9710#include <stdio.h>
9711#include <time.h>
9712#include <wchar.h>
9713int
9714main ()
9715{
9716mbstate_t x; return sizeof x;
9717  ;
9718  return 0;
9719}
9720_ACEOF
9721if ac_fn_c_try_compile "$LINENO"; then :
9722  ac_cv_type_mbstate_t=yes
9723else
9724  ac_cv_type_mbstate_t=no
9725fi
9726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9727fi
9728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
9729$as_echo "$ac_cv_type_mbstate_t" >&6; }
9730   if test $ac_cv_type_mbstate_t = yes; then
9731
9732$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
9733
9734   else
9735
9736$as_echo "#define mbstate_t int" >>confdefs.h
9737
9738   fi
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759  GNULIB_DPRINTF=0;
9760  GNULIB_FCLOSE=0;
9761  GNULIB_FDOPEN=0;
9762  GNULIB_FFLUSH=0;
9763  GNULIB_FGETC=0;
9764  GNULIB_FGETS=0;
9765  GNULIB_FOPEN=0;
9766  GNULIB_FPRINTF=0;
9767  GNULIB_FPRINTF_POSIX=0;
9768  GNULIB_FPURGE=0;
9769  GNULIB_FPUTC=0;
9770  GNULIB_FPUTS=0;
9771  GNULIB_FREAD=0;
9772  GNULIB_FREOPEN=0;
9773  GNULIB_FSCANF=0;
9774  GNULIB_FSEEK=0;
9775  GNULIB_FSEEKO=0;
9776  GNULIB_FTELL=0;
9777  GNULIB_FTELLO=0;
9778  GNULIB_FWRITE=0;
9779  GNULIB_GETC=0;
9780  GNULIB_GETCHAR=0;
9781  GNULIB_GETDELIM=0;
9782  GNULIB_GETLINE=0;
9783  GNULIB_OBSTACK_PRINTF=0;
9784  GNULIB_OBSTACK_PRINTF_POSIX=0;
9785  GNULIB_PCLOSE=0;
9786  GNULIB_PERROR=0;
9787  GNULIB_POPEN=0;
9788  GNULIB_PRINTF=0;
9789  GNULIB_PRINTF_POSIX=0;
9790  GNULIB_PUTC=0;
9791  GNULIB_PUTCHAR=0;
9792  GNULIB_PUTS=0;
9793  GNULIB_REMOVE=0;
9794  GNULIB_RENAME=0;
9795  GNULIB_RENAMEAT=0;
9796  GNULIB_SCANF=0;
9797  GNULIB_SNPRINTF=0;
9798  GNULIB_SPRINTF_POSIX=0;
9799  GNULIB_STDIO_H_NONBLOCKING=0;
9800  GNULIB_STDIO_H_SIGPIPE=0;
9801  GNULIB_TMPFILE=0;
9802  GNULIB_VASPRINTF=0;
9803  GNULIB_VFSCANF=0;
9804  GNULIB_VSCANF=0;
9805  GNULIB_VDPRINTF=0;
9806  GNULIB_VFPRINTF=0;
9807  GNULIB_VFPRINTF_POSIX=0;
9808  GNULIB_VPRINTF=0;
9809  GNULIB_VPRINTF_POSIX=0;
9810  GNULIB_VSNPRINTF=0;
9811  GNULIB_VSPRINTF_POSIX=0;
9812    HAVE_DECL_FPURGE=1;
9813  HAVE_DECL_FSEEKO=1;
9814  HAVE_DECL_FTELLO=1;
9815  HAVE_DECL_GETDELIM=1;
9816  HAVE_DECL_GETLINE=1;
9817  HAVE_DECL_OBSTACK_PRINTF=1;
9818  HAVE_DECL_SNPRINTF=1;
9819  HAVE_DECL_VSNPRINTF=1;
9820  HAVE_DPRINTF=1;
9821  HAVE_FSEEKO=1;
9822  HAVE_FTELLO=1;
9823  HAVE_PCLOSE=1;
9824  HAVE_POPEN=1;
9825  HAVE_RENAMEAT=1;
9826  HAVE_VASPRINTF=1;
9827  HAVE_VDPRINTF=1;
9828  REPLACE_DPRINTF=0;
9829  REPLACE_FCLOSE=0;
9830  REPLACE_FDOPEN=0;
9831  REPLACE_FFLUSH=0;
9832  REPLACE_FOPEN=0;
9833  REPLACE_FPRINTF=0;
9834  REPLACE_FPURGE=0;
9835  REPLACE_FREOPEN=0;
9836  REPLACE_FSEEK=0;
9837  REPLACE_FSEEKO=0;
9838  REPLACE_FTELL=0;
9839  REPLACE_FTELLO=0;
9840  REPLACE_GETDELIM=0;
9841  REPLACE_GETLINE=0;
9842  REPLACE_OBSTACK_PRINTF=0;
9843  REPLACE_PERROR=0;
9844  REPLACE_POPEN=0;
9845  REPLACE_PRINTF=0;
9846  REPLACE_REMOVE=0;
9847  REPLACE_RENAME=0;
9848  REPLACE_RENAMEAT=0;
9849  REPLACE_SNPRINTF=0;
9850  REPLACE_SPRINTF=0;
9851  REPLACE_STDIO_READ_FUNCS=0;
9852  REPLACE_STDIO_WRITE_FUNCS=0;
9853  REPLACE_TMPFILE=0;
9854  REPLACE_VASPRINTF=0;
9855  REPLACE_VDPRINTF=0;
9856  REPLACE_VFPRINTF=0;
9857  REPLACE_VPRINTF=0;
9858  REPLACE_VSNPRINTF=0;
9859  REPLACE_VSPRINTF=0;
9860
9861
9862    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
9863$as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
9864if ${gl_cv_var_stdin_large_offset+:} false; then :
9865  $as_echo_n "(cached) " >&6
9866else
9867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9868/* end confdefs.h.  */
9869#include <stdio.h>
9870int
9871main ()
9872{
9873#if defined __SL64 && defined __SCLE /* cygwin */
9874  /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
9875     fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
9876     it is easier to do a version check than building a runtime test.  */
9877# include <cygwin/version.h>
9878# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
9879  choke me
9880# endif
9881#endif
9882  ;
9883  return 0;
9884}
9885_ACEOF
9886if ac_fn_c_try_link "$LINENO"; then :
9887  gl_cv_var_stdin_large_offset=yes
9888else
9889  gl_cv_var_stdin_large_offset=no
9890fi
9891rm -f core conftest.err conftest.$ac_objext \
9892    conftest$ac_exeext conftest.$ac_ext
9893fi
9894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
9895$as_echo "$gl_cv_var_stdin_large_offset" >&6; }
9896
9897
9898
9899
9900
9901  case "$host_os" in
9902    mingw*)
9903                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
9904$as_echo_n "checking for 64-bit off_t... " >&6; }
9905if ${gl_cv_type_off_t_64+:} false; then :
9906  $as_echo_n "(cached) " >&6
9907else
9908  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9909/* end confdefs.h.  */
9910#include <sys/types.h>
9911                int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
9912
9913int
9914main ()
9915{
9916
9917  ;
9918  return 0;
9919}
9920_ACEOF
9921if ac_fn_c_try_compile "$LINENO"; then :
9922  gl_cv_type_off_t_64=yes
9923else
9924  gl_cv_type_off_t_64=no
9925fi
9926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9927
9928fi
9929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
9930$as_echo "$gl_cv_type_off_t_64" >&6; }
9931      if test $gl_cv_type_off_t_64 = no; then
9932        WINDOWS_64_BIT_OFF_T=1
9933      else
9934        WINDOWS_64_BIT_OFF_T=0
9935      fi
9936                  WINDOWS_64_BIT_ST_SIZE=1
9937      ;;
9938    *)
9939                                                      WINDOWS_64_BIT_OFF_T=0
9940      WINDOWS_64_BIT_ST_SIZE=0
9941      ;;
9942  esac
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960     if test $gl_cv_have_include_next = yes; then
9961       gl_cv_next_sys_types_h='<'sys/types.h'>'
9962     else
9963       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
9964$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
9965if ${gl_cv_next_sys_types_h+:} false; then :
9966  $as_echo_n "(cached) " >&6
9967else
9968
9969
9970
9971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9972/* end confdefs.h.  */
9973#include <sys/types.h>
9974_ACEOF
9975                case "$host_os" in
9976    aix*) gl_absname_cpp="$ac_cpp -C" ;;
9977    *)    gl_absname_cpp="$ac_cpp" ;;
9978  esac
9979
9980  case "$host_os" in
9981    mingw*)
9982                                          gl_dirsep_regex='[/\\]'
9983      ;;
9984    *)
9985      gl_dirsep_regex='\/'
9986      ;;
9987  esac
9988      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9989  gl_header_literal_regex=`echo 'sys/types.h' \
9990                           | sed -e "$gl_make_literal_regex_sed"`
9991  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9992      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9993      s|^/[^/]|//&|
9994      p
9995      q
9996    }'
9997
9998        gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9999  sed -n "$gl_absolute_header_sed"`
10000
10001           gl_header=$gl_cv_absolute_sys_types_h
10002           gl_cv_next_sys_types_h='"'$gl_header'"'
10003
10004
10005fi
10006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
10007$as_echo "$gl_cv_next_sys_types_h" >&6; }
10008     fi
10009     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
10010
10011     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10012       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10013       gl_next_as_first_directive='<'sys/types.h'>'
10014     else
10015       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10016       gl_next_as_first_directive=$gl_cv_next_sys_types_h
10017     fi
10018     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
10031if test "x$ac_cv_have_decl_fseeko" = xyes; then :
10032  ac_have_decl=1
10033else
10034  ac_have_decl=0
10035fi
10036
10037cat >>confdefs.h <<_ACEOF
10038#define HAVE_DECL_FSEEKO $ac_have_decl
10039_ACEOF
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
10050$as_echo_n "checking for fseeko... " >&6; }
10051if ${gl_cv_func_fseeko+:} false; then :
10052  $as_echo_n "(cached) " >&6
10053else
10054
10055      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10056/* end confdefs.h.  */
10057#include <stdio.h>
10058
10059int
10060main ()
10061{
10062fseeko (stdin, 0, 0);
10063  ;
10064  return 0;
10065}
10066_ACEOF
10067if ac_fn_c_try_link "$LINENO"; then :
10068  gl_cv_func_fseeko=yes
10069else
10070  gl_cv_func_fseeko=no
10071fi
10072rm -f core conftest.err conftest.$ac_objext \
10073    conftest$ac_exeext conftest.$ac_ext
10074
10075fi
10076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
10077$as_echo "$gl_cv_func_fseeko" >&6; }
10078
10079
10080  if test $ac_cv_have_decl_fseeko = no; then
10081    HAVE_DECL_FSEEKO=0
10082  fi
10083
10084  if test $gl_cv_func_fseeko = no; then
10085    HAVE_FSEEKO=0
10086  else
10087    if test $WINDOWS_64_BIT_OFF_T = 1; then
10088      REPLACE_FSEEKO=1
10089    fi
10090    if test $gl_cv_var_stdin_large_offset = no; then
10091      REPLACE_FSEEKO=1
10092    fi
10093
10094  fi
10095
10096
10097     GNULIB_FCHMODAT=0;
10098  GNULIB_FSTAT=0;
10099  GNULIB_FSTATAT=0;
10100  GNULIB_FUTIMENS=0;
10101  GNULIB_LCHMOD=0;
10102  GNULIB_LSTAT=0;
10103  GNULIB_MKDIRAT=0;
10104  GNULIB_MKFIFO=0;
10105  GNULIB_MKFIFOAT=0;
10106  GNULIB_MKNOD=0;
10107  GNULIB_MKNODAT=0;
10108  GNULIB_STAT=0;
10109  GNULIB_UTIMENSAT=0;
10110    HAVE_FCHMODAT=1;
10111  HAVE_FSTATAT=1;
10112  HAVE_FUTIMENS=1;
10113  HAVE_LCHMOD=1;
10114  HAVE_LSTAT=1;
10115  HAVE_MKDIRAT=1;
10116  HAVE_MKFIFO=1;
10117  HAVE_MKFIFOAT=1;
10118  HAVE_MKNOD=1;
10119  HAVE_MKNODAT=1;
10120  HAVE_UTIMENSAT=1;
10121  REPLACE_FSTAT=0;
10122  REPLACE_FSTATAT=0;
10123  REPLACE_FUTIMENS=0;
10124  REPLACE_LSTAT=0;
10125  REPLACE_MKDIR=0;
10126  REPLACE_MKFIFO=0;
10127  REPLACE_MKNOD=0;
10128  REPLACE_STAT=0;
10129  REPLACE_UTIMENSAT=0;
10130
10131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
10132$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
10133if ${ac_cv_header_stat_broken+:} false; then :
10134  $as_echo_n "(cached) " >&6
10135else
10136  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10137/* end confdefs.h.  */
10138#include <sys/types.h>
10139#include <sys/stat.h>
10140
10141#if defined S_ISBLK && defined S_IFDIR
10142extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
10143#endif
10144
10145#if defined S_ISBLK && defined S_IFCHR
10146extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
10147#endif
10148
10149#if defined S_ISLNK && defined S_IFREG
10150extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
10151#endif
10152
10153#if defined S_ISSOCK && defined S_IFREG
10154extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
10155#endif
10156
10157_ACEOF
10158if ac_fn_c_try_compile "$LINENO"; then :
10159  ac_cv_header_stat_broken=no
10160else
10161  ac_cv_header_stat_broken=yes
10162fi
10163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10164fi
10165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
10166$as_echo "$ac_cv_header_stat_broken" >&6; }
10167if test $ac_cv_header_stat_broken = yes; then
10168
10169$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
10170
10171fi
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189     if test $gl_cv_have_include_next = yes; then
10190       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10191     else
10192       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
10193$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
10194if ${gl_cv_next_sys_stat_h+:} false; then :
10195  $as_echo_n "(cached) " >&6
10196else
10197
10198             if test $ac_cv_header_sys_stat_h = yes; then
10199
10200
10201
10202
10203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10204/* end confdefs.h.  */
10205#include <sys/stat.h>
10206_ACEOF
10207                case "$host_os" in
10208    aix*) gl_absname_cpp="$ac_cpp -C" ;;
10209    *)    gl_absname_cpp="$ac_cpp" ;;
10210  esac
10211
10212  case "$host_os" in
10213    mingw*)
10214                                          gl_dirsep_regex='[/\\]'
10215      ;;
10216    *)
10217      gl_dirsep_regex='\/'
10218      ;;
10219  esac
10220      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10221  gl_header_literal_regex=`echo 'sys/stat.h' \
10222                           | sed -e "$gl_make_literal_regex_sed"`
10223  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10224      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10225      s|^/[^/]|//&|
10226      p
10227      q
10228    }'
10229
10230        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10231  sed -n "$gl_absolute_header_sed"`
10232
10233           gl_header=$gl_cv_absolute_sys_stat_h
10234           gl_cv_next_sys_stat_h='"'$gl_header'"'
10235          else
10236               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10237             fi
10238
10239
10240fi
10241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
10242$as_echo "$gl_cv_next_sys_stat_h" >&6; }
10243     fi
10244     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
10245
10246     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10247       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10248       gl_next_as_first_directive='<'sys/stat.h'>'
10249     else
10250       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10251       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
10252     fi
10253     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
10266
10267$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
10268
10269  fi
10270
10271      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
10272     #include <sys/stat.h>
10273"
10274if test "x$ac_cv_type_nlink_t" = xyes; then :
10275
10276else
10277
10278$as_echo "#define nlink_t int" >>confdefs.h
10279
10280fi
10281
10282
10283
10284    for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
10285    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10287$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10288if eval \${$as_gl_Symbol+:} false; then :
10289  $as_echo_n "(cached) " >&6
10290else
10291  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10292/* end confdefs.h.  */
10293#include <sys/stat.h>
10294
10295int
10296main ()
10297{
10298#undef $gl_func
10299  (void) $gl_func;
10300  ;
10301  return 0;
10302}
10303_ACEOF
10304if ac_fn_c_try_compile "$LINENO"; then :
10305  eval "$as_gl_Symbol=yes"
10306else
10307  eval "$as_gl_Symbol=no"
10308fi
10309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10310fi
10311eval ac_res=\$$as_gl_Symbol
10312	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10313$as_echo "$ac_res" >&6; }
10314    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
10315  cat >>confdefs.h <<_ACEOF
10316#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10317_ACEOF
10318
10319                     eval ac_cv_have_decl_$gl_func=yes
10320fi
10321      done
10322
10323
10324
10325      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
10326$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
10327if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
10328  $as_echo_n "(cached) " >&6
10329else
10330  rm -f conftest.sym conftest.file
10331     echo >conftest.file
10332     if test "$cross_compiling" = yes; then :
10333  case "$host_os" in
10334          *-gnu*)
10335            # Guess yes on glibc systems.
10336            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
10337          *)
10338            # If we don't know, assume the worst.
10339            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
10340        esac
10341
10342else
10343  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10344/* end confdefs.h.  */
10345$ac_includes_default
10346int
10347main ()
10348{
10349struct stat sbuf;
10350            if (symlink ("conftest.file", "conftest.sym") != 0)
10351              return 1;
10352            /* Linux will dereference the symlink and fail, as required by
10353               POSIX.  That is better in the sense that it means we will not
10354               have to compile and use the lstat wrapper.  */
10355            return lstat ("conftest.sym/", &sbuf) == 0;
10356
10357  ;
10358  return 0;
10359}
10360_ACEOF
10361if ac_fn_c_try_run "$LINENO"; then :
10362  gl_cv_func_lstat_dereferences_slashed_symlink=yes
10363else
10364  gl_cv_func_lstat_dereferences_slashed_symlink=no
10365fi
10366rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10367  conftest.$ac_objext conftest.beam conftest.$ac_ext
10368fi
10369
10370     rm -f conftest.sym conftest.file
10371
10372fi
10373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
10374$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
10375  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
10376    *yes)
10377
10378cat >>confdefs.h <<_ACEOF
10379#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
10380_ACEOF
10381
10382      ;;
10383  esac
10384
10385
10386
10387
10388
10389   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
10390$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
10391if ${gl_cv_func_getcwd_null+:} false; then :
10392  $as_echo_n "(cached) " >&6
10393else
10394  if test "$cross_compiling" = yes; then :
10395  case "$host_os" in
10396                     # Guess yes on glibc systems.
10397            *-gnu*)  gl_cv_func_getcwd_null="guessing yes";;
10398                     # Guess yes on Cygwin.
10399            cygwin*) gl_cv_func_getcwd_null="guessing yes";;
10400                     # If we don't know, assume the worst.
10401            *)       gl_cv_func_getcwd_null="guessing no";;
10402          esac
10403
10404else
10405  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10406/* end confdefs.h.  */
10407
10408#	 include <stdlib.h>
10409#        if HAVE_UNISTD_H
10410#         include <unistd.h>
10411#        else /* on Windows with MSVC */
10412#         include <direct.h>
10413#        endif
10414#        ifndef getcwd
10415         char *getcwd ();
10416#        endif
10417
10418int
10419main ()
10420{
10421
10422#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10423/* mingw cwd does not start with '/', but getcwd does allocate.
10424   However, mingw fails to honor non-zero size.  */
10425#else
10426           if (chdir ("/") != 0)
10427             return 1;
10428           else
10429             {
10430               char *f = getcwd (NULL, 0);
10431               if (! f)
10432                 return 2;
10433               if (f[0] != '/')
10434                 return 3;
10435               if (f[1] != '\0')
10436                 return 4;
10437               free (f);
10438               return 0;
10439             }
10440#endif
10441
10442  ;
10443  return 0;
10444}
10445_ACEOF
10446if ac_fn_c_try_run "$LINENO"; then :
10447  gl_cv_func_getcwd_null=yes
10448else
10449  gl_cv_func_getcwd_null=no
10450fi
10451rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10452  conftest.$ac_objext conftest.beam conftest.$ac_ext
10453fi
10454
10455fi
10456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
10457$as_echo "$gl_cv_func_getcwd_null" >&6; }
10458
10459
10460  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
10461$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
10462if ${gl_cv_func_getcwd_posix_signature+:} false; then :
10463  $as_echo_n "(cached) " >&6
10464else
10465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10466/* end confdefs.h.  */
10467#include <unistd.h>
10468int
10469main ()
10470{
10471extern
10472           #ifdef __cplusplus
10473           "C"
10474           #endif
10475           char *getcwd (char *, size_t);
10476
10477  ;
10478  return 0;
10479}
10480
10481_ACEOF
10482if ac_fn_c_try_compile "$LINENO"; then :
10483  gl_cv_func_getcwd_posix_signature=yes
10484else
10485  gl_cv_func_getcwd_posix_signature=no
10486fi
10487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10488
10489fi
10490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
10491$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
10492
10493ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
10494if test "x$ac_cv_have_decl_getcwd" = xyes; then :
10495  ac_have_decl=1
10496else
10497  ac_have_decl=0
10498fi
10499
10500cat >>confdefs.h <<_ACEOF
10501#define HAVE_DECL_GETCWD $ac_have_decl
10502_ACEOF
10503
10504ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
10505if test "x$ac_cv_have_decl_getdelim" = xyes; then :
10506  ac_have_decl=1
10507else
10508  ac_have_decl=0
10509fi
10510
10511cat >>confdefs.h <<_ACEOF
10512#define HAVE_DECL_GETDELIM $ac_have_decl
10513_ACEOF
10514
10515
10516
10517
10518
10519ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
10520if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
10521  ac_have_decl=1
10522else
10523  ac_have_decl=0
10524fi
10525
10526cat >>confdefs.h <<_ACEOF
10527#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
10528_ACEOF
10529
10530ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
10531if test "x$ac_cv_have_decl_getline" = xyes; then :
10532  ac_have_decl=1
10533else
10534  ac_have_decl=0
10535fi
10536
10537cat >>confdefs.h <<_ACEOF
10538#define HAVE_DECL_GETLINE $ac_have_decl
10539_ACEOF
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556     if test $gl_cv_have_include_next = yes; then
10557       gl_cv_next_getopt_h='<'getopt.h'>'
10558     else
10559       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
10560$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
10561if ${gl_cv_next_getopt_h+:} false; then :
10562  $as_echo_n "(cached) " >&6
10563else
10564
10565             if test $ac_cv_header_getopt_h = yes; then
10566
10567
10568
10569
10570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10571/* end confdefs.h.  */
10572#include <getopt.h>
10573_ACEOF
10574                case "$host_os" in
10575    aix*) gl_absname_cpp="$ac_cpp -C" ;;
10576    *)    gl_absname_cpp="$ac_cpp" ;;
10577  esac
10578
10579  case "$host_os" in
10580    mingw*)
10581                                          gl_dirsep_regex='[/\\]'
10582      ;;
10583    *)
10584      gl_dirsep_regex='\/'
10585      ;;
10586  esac
10587      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10588  gl_header_literal_regex=`echo 'getopt.h' \
10589                           | sed -e "$gl_make_literal_regex_sed"`
10590  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10591      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10592      s|^/[^/]|//&|
10593      p
10594      q
10595    }'
10596
10597        gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10598  sed -n "$gl_absolute_header_sed"`
10599
10600           gl_header=$gl_cv_absolute_getopt_h
10601           gl_cv_next_getopt_h='"'$gl_header'"'
10602          else
10603               gl_cv_next_getopt_h='<'getopt.h'>'
10604             fi
10605
10606
10607fi
10608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
10609$as_echo "$gl_cv_next_getopt_h" >&6; }
10610     fi
10611     NEXT_GETOPT_H=$gl_cv_next_getopt_h
10612
10613     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10614       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10615       gl_next_as_first_directive='<'getopt.h'>'
10616     else
10617       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10618       gl_next_as_first_directive=$gl_cv_next_getopt_h
10619     fi
10620     NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
10621
10622
10623
10624
10625  if test $ac_cv_header_getopt_h = yes; then
10626    HAVE_GETOPT_H=1
10627  else
10628    HAVE_GETOPT_H=0
10629  fi
10630
10631
10632  gl_replace_getopt=
10633
10634    if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10635    for ac_header in getopt.h
10636do :
10637  ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
10638if test "x$ac_cv_header_getopt_h" = xyes; then :
10639  cat >>confdefs.h <<_ACEOF
10640#define HAVE_GETOPT_H 1
10641_ACEOF
10642
10643else
10644  gl_replace_getopt=yes
10645fi
10646
10647done
10648
10649  fi
10650
10651    if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10652    for ac_func in getopt_long_only
10653do :
10654  ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
10655if test "x$ac_cv_func_getopt_long_only" = xyes; then :
10656  cat >>confdefs.h <<_ACEOF
10657#define HAVE_GETOPT_LONG_ONLY 1
10658_ACEOF
10659
10660else
10661  gl_replace_getopt=yes
10662fi
10663done
10664
10665  fi
10666
10667          if test -z "$gl_replace_getopt"; then
10668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
10669$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
10670if ${gl_cv_func_getopt_posix+:} false; then :
10671  $as_echo_n "(cached) " >&6
10672else
10673
10674                                                if test $cross_compiling = no; then
10675                              if test "$cross_compiling" = yes; then :
10676  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10678as_fn_error $? "cannot run test program while cross compiling
10679See \`config.log' for more details" "$LINENO" 5; }
10680else
10681  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10682/* end confdefs.h.  */
10683
10684#include <unistd.h>
10685#include <stdlib.h>
10686#include <string.h>
10687
10688int
10689main ()
10690{
10691  static char program[] = "program";
10692  static char a[] = "-a";
10693  static char foo[] = "foo";
10694  static char bar[] = "bar";
10695  char *argv[] = { program, a, foo, bar, NULL };
10696  int c;
10697
10698  c = getopt (4, argv, "ab");
10699  if (!(c == 'a'))
10700    return 1;
10701  c = getopt (4, argv, "ab");
10702  if (!(c == -1))
10703    return 2;
10704  if (!(optind == 2))
10705    return 3;
10706  return 0;
10707}
10708
10709_ACEOF
10710if ac_fn_c_try_run "$LINENO"; then :
10711  gl_cv_func_getopt_posix=maybe
10712else
10713  gl_cv_func_getopt_posix=no
10714fi
10715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10716  conftest.$ac_objext conftest.beam conftest.$ac_ext
10717fi
10718
10719          if test $gl_cv_func_getopt_posix = maybe; then
10720                                    if test "$cross_compiling" = yes; then :
10721  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10723as_fn_error $? "cannot run test program while cross compiling
10724See \`config.log' for more details" "$LINENO" 5; }
10725else
10726  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10727/* end confdefs.h.  */
10728
10729#include <unistd.h>
10730#include <stdlib.h>
10731#include <string.h>
10732
10733int
10734main ()
10735{
10736  static char program[] = "program";
10737  static char donald[] = "donald";
10738  static char p[] = "-p";
10739  static char billy[] = "billy";
10740  static char duck[] = "duck";
10741  static char a[] = "-a";
10742  static char bar[] = "bar";
10743  char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
10744  int c;
10745
10746  c = getopt (7, argv, "+abp:q:");
10747  if (!(c == -1))
10748    return 4;
10749  if (!(strcmp (argv[0], "program") == 0))
10750    return 5;
10751  if (!(strcmp (argv[1], "donald") == 0))
10752    return 6;
10753  if (!(strcmp (argv[2], "-p") == 0))
10754    return 7;
10755  if (!(strcmp (argv[3], "billy") == 0))
10756    return 8;
10757  if (!(strcmp (argv[4], "duck") == 0))
10758    return 9;
10759  if (!(strcmp (argv[5], "-a") == 0))
10760    return 10;
10761  if (!(strcmp (argv[6], "bar") == 0))
10762    return 11;
10763  if (!(optind == 1))
10764    return 12;
10765  return 0;
10766}
10767
10768_ACEOF
10769if ac_fn_c_try_run "$LINENO"; then :
10770  gl_cv_func_getopt_posix=maybe
10771else
10772  gl_cv_func_getopt_posix=no
10773fi
10774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10775  conftest.$ac_objext conftest.beam conftest.$ac_ext
10776fi
10777
10778          fi
10779          if test $gl_cv_func_getopt_posix = maybe; then
10780                        if test "$cross_compiling" = yes; then :
10781  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10782$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10783as_fn_error $? "cannot run test program while cross compiling
10784See \`config.log' for more details" "$LINENO" 5; }
10785else
10786  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10787/* end confdefs.h.  */
10788
10789#include <unistd.h>
10790#include <stdlib.h>
10791#include <string.h>
10792
10793int
10794main ()
10795{
10796  static char program[] = "program";
10797  static char ab[] = "-ab";
10798  char *argv[3] = { program, ab, NULL };
10799  if (getopt (2, argv, "ab:") != 'a')
10800    return 13;
10801  if (getopt (2, argv, "ab:") != '?')
10802    return 14;
10803  if (optopt != 'b')
10804    return 15;
10805  if (optind != 2)
10806    return 16;
10807  return 0;
10808}
10809
10810_ACEOF
10811if ac_fn_c_try_run "$LINENO"; then :
10812  gl_cv_func_getopt_posix=yes
10813else
10814  gl_cv_func_getopt_posix=no
10815fi
10816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10817  conftest.$ac_objext conftest.beam conftest.$ac_ext
10818fi
10819
10820          fi
10821        else
10822          case "$host_os" in
10823            darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
10824            *)                       gl_cv_func_getopt_posix="guessing yes";;
10825          esac
10826        fi
10827
10828fi
10829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
10830$as_echo "$gl_cv_func_getopt_posix" >&6; }
10831    case "$gl_cv_func_getopt_posix" in
10832      *no) gl_replace_getopt=yes ;;
10833    esac
10834  fi
10835
10836  if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
10838$as_echo_n "checking for working GNU getopt function... " >&6; }
10839if ${gl_cv_func_getopt_gnu+:} false; then :
10840  $as_echo_n "(cached) " >&6
10841else
10842  # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
10843       # optstring is necessary for programs like m4 that have POSIX-mandated
10844       # semantics for supporting options interspersed with files.
10845       # Also, since getopt_long is a GNU extension, we require optind=0.
10846       # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
10847       # so take care to revert to the correct (non-)export state.
10848       gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
10849       case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
10850         xx) gl_had_POSIXLY_CORRECT=exported ;;
10851         x)  gl_had_POSIXLY_CORRECT=yes      ;;
10852         *)  gl_had_POSIXLY_CORRECT=         ;;
10853       esac
10854       POSIXLY_CORRECT=1
10855       export POSIXLY_CORRECT
10856       if test "$cross_compiling" = yes; then :
10857           gl_cv_func_getopt_gnu="guessing no"
10858
10859else
10860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10861/* end confdefs.h.  */
10862#include <getopt.h>
10863                           #include <stddef.h>
10864                           #include <string.h>
10865
10866#include <stdlib.h>
10867#if defined __MACH__ && defined __APPLE__
10868/* Avoid a crash on Mac OS X.  */
10869#include <mach/mach.h>
10870#include <mach/mach_error.h>
10871#include <mach/thread_status.h>
10872#include <mach/exception.h>
10873#include <mach/task.h>
10874#include <pthread.h>
10875/* The exception port on which our thread listens.  */
10876static mach_port_t our_exception_port;
10877/* The main function of the thread listening for exceptions of type
10878   EXC_BAD_ACCESS.  */
10879static void *
10880mach_exception_thread (void *arg)
10881{
10882  /* Buffer for a message to be received.  */
10883  struct {
10884    mach_msg_header_t head;
10885    mach_msg_body_t msgh_body;
10886    char data[1024];
10887  } msg;
10888  mach_msg_return_t retval;
10889  /* Wait for a message on the exception port.  */
10890  retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
10891                     our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
10892  if (retval != MACH_MSG_SUCCESS)
10893    abort ();
10894  exit (1);
10895}
10896static void
10897nocrash_init (void)
10898{
10899  mach_port_t self = mach_task_self ();
10900  /* Allocate a port on which the thread shall listen for exceptions.  */
10901  if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
10902      == KERN_SUCCESS) {
10903    /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
10904    if (mach_port_insert_right (self, our_exception_port, our_exception_port,
10905                                MACH_MSG_TYPE_MAKE_SEND)
10906        == KERN_SUCCESS) {
10907      /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
10908         for us.  */
10909      exception_mask_t mask = EXC_MASK_BAD_ACCESS;
10910      /* Create the thread listening on the exception port.  */
10911      pthread_attr_t attr;
10912      pthread_t thread;
10913      if (pthread_attr_init (&attr) == 0
10914          && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
10915          && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
10916        pthread_attr_destroy (&attr);
10917        /* Replace the exception port info for these exceptions with our own.
10918           Note that we replace the exception port for the entire task, not only
10919           for a particular thread.  This has the effect that when our exception
10920           port gets the message, the thread specific exception port has already
10921           been asked, and we don't need to bother about it.
10922           See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
10923        task_set_exception_ports (self, mask, our_exception_port,
10924                                  EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
10925      }
10926    }
10927  }
10928}
10929#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10930/* Avoid a crash on native Windows.  */
10931#define WIN32_LEAN_AND_MEAN
10932#include <windows.h>
10933#include <winerror.h>
10934static LONG WINAPI
10935exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
10936{
10937  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
10938    {
10939    case EXCEPTION_ACCESS_VIOLATION:
10940    case EXCEPTION_IN_PAGE_ERROR:
10941    case EXCEPTION_STACK_OVERFLOW:
10942    case EXCEPTION_GUARD_PAGE:
10943    case EXCEPTION_PRIV_INSTRUCTION:
10944    case EXCEPTION_ILLEGAL_INSTRUCTION:
10945    case EXCEPTION_DATATYPE_MISALIGNMENT:
10946    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
10947    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
10948      exit (1);
10949    }
10950  return EXCEPTION_CONTINUE_SEARCH;
10951}
10952static void
10953nocrash_init (void)
10954{
10955  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
10956}
10957#else
10958/* Avoid a crash on POSIX systems.  */
10959#include <signal.h>
10960#include <unistd.h>
10961/* A POSIX signal handler.  */
10962static void
10963exception_handler (int sig)
10964{
10965  _exit (1);
10966}
10967static void
10968nocrash_init (void)
10969{
10970#ifdef SIGSEGV
10971  signal (SIGSEGV, exception_handler);
10972#endif
10973#ifdef SIGBUS
10974  signal (SIGBUS, exception_handler);
10975#endif
10976}
10977#endif
10978
10979
10980int
10981main ()
10982{
10983
10984             int result = 0;
10985
10986             nocrash_init();
10987
10988             /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
10989                and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
10990                OSF/1 5.1, Solaris 10.  */
10991             {
10992               static char conftest[] = "conftest";
10993               static char plus[] = "-+";
10994               char *argv[3] = { conftest, plus, NULL };
10995               opterr = 0;
10996               if (getopt (2, argv, "+a") != '?')
10997                 result |= 1;
10998             }
10999             /* This code succeeds on glibc 2.8, mingw,
11000                and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
11001                IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
11002             {
11003               static char program[] = "program";
11004               static char p[] = "-p";
11005               static char foo[] = "foo";
11006               static char bar[] = "bar";
11007               char *argv[] = { program, p, foo, bar, NULL };
11008
11009               optind = 1;
11010               if (getopt (4, argv, "p::") != 'p')
11011                 result |= 2;
11012               else if (optarg != NULL)
11013                 result |= 4;
11014               else if (getopt (4, argv, "p::") != -1)
11015                 result |= 6;
11016               else if (optind != 2)
11017                 result |= 8;
11018             }
11019             /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
11020             {
11021               static char program[] = "program";
11022               static char foo[] = "foo";
11023               static char p[] = "-p";
11024               char *argv[] = { program, foo, p, NULL };
11025               optind = 0;
11026               if (getopt (3, argv, "-p") != 1)
11027                 result |= 16;
11028               else if (getopt (3, argv, "-p") != 'p')
11029                 result |= 16;
11030             }
11031             /* This code fails on glibc 2.11.  */
11032             {
11033               static char program[] = "program";
11034               static char b[] = "-b";
11035               static char a[] = "-a";
11036               char *argv[] = { program, b, a, NULL };
11037               optind = opterr = 0;
11038               if (getopt (3, argv, "+:a:b") != 'b')
11039                 result |= 32;
11040               else if (getopt (3, argv, "+:a:b") != ':')
11041                 result |= 32;
11042             }
11043             /* This code dumps core on glibc 2.14.  */
11044             {
11045               static char program[] = "program";
11046               static char w[] = "-W";
11047               static char dummy[] = "dummy";
11048               char *argv[] = { program, w, dummy, NULL };
11049               optind = opterr = 1;
11050               if (getopt (3, argv, "W;") != 'W')
11051                 result |= 64;
11052             }
11053             return result;
11054
11055  ;
11056  return 0;
11057}
11058_ACEOF
11059if ac_fn_c_try_run "$LINENO"; then :
11060  gl_cv_func_getopt_gnu=yes
11061else
11062  gl_cv_func_getopt_gnu=no
11063fi
11064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11065  conftest.$ac_objext conftest.beam conftest.$ac_ext
11066fi
11067
11068       case $gl_had_POSIXLY_CORRECT in
11069         exported) ;;
11070         yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
11071         *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
11072       esac
11073
11074fi
11075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
11076$as_echo "$gl_cv_func_getopt_gnu" >&6; }
11077    if test "$gl_cv_func_getopt_gnu" != yes; then
11078      gl_replace_getopt=yes
11079    else
11080      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
11081$as_echo_n "checking for working GNU getopt_long function... " >&6; }
11082if ${gl_cv_func_getopt_long_gnu+:} false; then :
11083  $as_echo_n "(cached) " >&6
11084else
11085  if test "$cross_compiling" = yes; then :
11086              case "$host_os" in
11087              openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
11088              *)        gl_cv_func_getopt_long_gnu="guessing yes";;
11089            esac
11090
11091else
11092  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11093/* end confdefs.h.  */
11094#include <getopt.h>
11095                #include <stddef.h>
11096                #include <string.h>
11097
11098int
11099main ()
11100{
11101static const struct option long_options[] =
11102                  {
11103                    { "xtremely-",no_argument,       NULL, 1003 },
11104                    { "xtra",     no_argument,       NULL, 1001 },
11105                    { "xtreme",   no_argument,       NULL, 1002 },
11106                    { "xtremely", no_argument,       NULL, 1003 },
11107                    { NULL,       0,                 NULL, 0 }
11108                  };
11109                /* This code fails on OpenBSD 5.0.  */
11110                {
11111                  static char program[] = "program";
11112                  static char xtremel[] = "--xtremel";
11113                  char *argv[] = { program, xtremel, NULL };
11114                  int option_index;
11115                  optind = 1; opterr = 0;
11116                  if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
11117                    return 1;
11118                }
11119                return 0;
11120
11121  ;
11122  return 0;
11123}
11124_ACEOF
11125if ac_fn_c_try_run "$LINENO"; then :
11126  gl_cv_func_getopt_long_gnu=yes
11127else
11128  gl_cv_func_getopt_long_gnu=no
11129fi
11130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11131  conftest.$ac_objext conftest.beam conftest.$ac_ext
11132fi
11133
11134
11135fi
11136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
11137$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
11138      case "$gl_cv_func_getopt_long_gnu" in
11139        *yes) ;;
11140        *) gl_replace_getopt=yes ;;
11141      esac
11142    fi
11143  fi
11144
11145
11146
11147
11148
11149
11150    REPLACE_GETOPT=1
11151
11152  if test $REPLACE_GETOPT = 1; then
11153
11154  GETOPT_H=getopt.h
11155
11156$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
11157
11158
11159
11160  fi
11161
11162ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
11163if test "x$ac_cv_have_decl_getenv" = xyes; then :
11164  ac_have_decl=1
11165else
11166  ac_have_decl=0
11167fi
11168
11169cat >>confdefs.h <<_ACEOF
11170#define HAVE_DECL_GETENV $ac_have_decl
11171_ACEOF
11172
11173
11174
11175
11176
11177:
11178
11179
11180
11181
11182
11183  GNULIB_GETTIMEOFDAY=0;
11184    HAVE_GETTIMEOFDAY=1;
11185  HAVE_STRUCT_TIMEVAL=1;
11186  HAVE_SYS_TIME_H=1;
11187  HAVE_TIMEZONE_T=0;
11188  REPLACE_GETTIMEOFDAY=0;
11189  REPLACE_STRUCT_TIMEVAL=0;
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206     if test $gl_cv_have_include_next = yes; then
11207       gl_cv_next_sys_time_h='<'sys/time.h'>'
11208     else
11209       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
11210$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
11211if ${gl_cv_next_sys_time_h+:} false; then :
11212  $as_echo_n "(cached) " >&6
11213else
11214
11215             if test $ac_cv_header_sys_time_h = yes; then
11216
11217
11218
11219
11220  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11221/* end confdefs.h.  */
11222#include <sys/time.h>
11223_ACEOF
11224                case "$host_os" in
11225    aix*) gl_absname_cpp="$ac_cpp -C" ;;
11226    *)    gl_absname_cpp="$ac_cpp" ;;
11227  esac
11228
11229  case "$host_os" in
11230    mingw*)
11231                                          gl_dirsep_regex='[/\\]'
11232      ;;
11233    *)
11234      gl_dirsep_regex='\/'
11235      ;;
11236  esac
11237      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11238  gl_header_literal_regex=`echo 'sys/time.h' \
11239                           | sed -e "$gl_make_literal_regex_sed"`
11240  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11241      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11242      s|^/[^/]|//&|
11243      p
11244      q
11245    }'
11246
11247        gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11248  sed -n "$gl_absolute_header_sed"`
11249
11250           gl_header=$gl_cv_absolute_sys_time_h
11251           gl_cv_next_sys_time_h='"'$gl_header'"'
11252          else
11253               gl_cv_next_sys_time_h='<'sys/time.h'>'
11254             fi
11255
11256
11257fi
11258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
11259$as_echo "$gl_cv_next_sys_time_h" >&6; }
11260     fi
11261     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
11262
11263     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11264       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11265       gl_next_as_first_directive='<'sys/time.h'>'
11266     else
11267       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11268       gl_next_as_first_directive=$gl_cv_next_sys_time_h
11269     fi
11270     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
11271
11272
11273
11274
11275
11276  if test $ac_cv_header_sys_time_h != yes; then
11277    HAVE_SYS_TIME_H=0
11278  fi
11279
11280
11281
11282
11283
11284  if test $ac_cv_header_sys_socket_h != yes; then
11285                    for ac_header in winsock2.h
11286do :
11287  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
11288if test "x$ac_cv_header_winsock2_h" = xyes; then :
11289  cat >>confdefs.h <<_ACEOF
11290#define HAVE_WINSOCK2_H 1
11291_ACEOF
11292
11293fi
11294
11295done
11296
11297  fi
11298  if test "$ac_cv_header_winsock2_h" = yes; then
11299    HAVE_WINSOCK2_H=1
11300    UNISTD_H_HAVE_WINSOCK2_H=1
11301    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
11302  else
11303    HAVE_WINSOCK2_H=0
11304  fi
11305
11306
11307  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
11308$as_echo_n "checking for struct timeval... " >&6; }
11309if ${gl_cv_sys_struct_timeval+:} false; then :
11310  $as_echo_n "(cached) " >&6
11311else
11312  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11313/* end confdefs.h.  */
11314#if HAVE_SYS_TIME_H
11315             #include <sys/time.h>
11316            #endif
11317            #include <time.h>
11318            #if HAVE_WINSOCK2_H
11319            # include <winsock2.h>
11320            #endif
11321
11322int
11323main ()
11324{
11325static struct timeval x; x.tv_sec = x.tv_usec;
11326  ;
11327  return 0;
11328}
11329_ACEOF
11330if ac_fn_c_try_compile "$LINENO"; then :
11331  gl_cv_sys_struct_timeval=yes
11332else
11333  gl_cv_sys_struct_timeval=no
11334fi
11335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11336
11337fi
11338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
11339$as_echo "$gl_cv_sys_struct_timeval" >&6; }
11340  if test $gl_cv_sys_struct_timeval != yes; then
11341    HAVE_STRUCT_TIMEVAL=0
11342  else
11343                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
11344$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
11345if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
11346  $as_echo_n "(cached) " >&6
11347else
11348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11349/* end confdefs.h.  */
11350#if HAVE_SYS_TIME_H
11351               #include <sys/time.h>
11352              #endif
11353              #include <time.h>
11354              #if HAVE_WINSOCK2_H
11355              # include <winsock2.h>
11356              #endif
11357
11358int
11359main ()
11360{
11361static struct timeval x;
11362              typedef int verify_tv_sec_type[
11363                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
11364              ];
11365
11366  ;
11367  return 0;
11368}
11369_ACEOF
11370if ac_fn_c_try_compile "$LINENO"; then :
11371  gl_cv_sys_struct_timeval_tv_sec=yes
11372else
11373  gl_cv_sys_struct_timeval_tv_sec=no
11374fi
11375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11376
11377fi
11378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
11379$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
11380    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
11381      REPLACE_STRUCT_TIMEVAL=1
11382    fi
11383  fi
11384
11385
11386    for gl_func in gettimeofday; do
11387    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11389$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11390if eval \${$as_gl_Symbol+:} false; then :
11391  $as_echo_n "(cached) " >&6
11392else
11393  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11394/* end confdefs.h.  */
11395
11396#if HAVE_SYS_TIME_H
11397# include <sys/time.h>
11398#endif
11399#include <time.h>
11400
11401int
11402main ()
11403{
11404#undef $gl_func
11405  (void) $gl_func;
11406  ;
11407  return 0;
11408}
11409_ACEOF
11410if ac_fn_c_try_compile "$LINENO"; then :
11411  eval "$as_gl_Symbol=yes"
11412else
11413  eval "$as_gl_Symbol=no"
11414fi
11415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11416fi
11417eval ac_res=\$$as_gl_Symbol
11418	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11419$as_echo "$ac_res" >&6; }
11420    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11421  cat >>confdefs.h <<_ACEOF
11422#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11423_ACEOF
11424
11425                     eval ac_cv_have_decl_$gl_func=yes
11426fi
11427      done
11428
11429
11430
11431
11432
11433ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
11434if test "x$ac_cv_type_off_t" = xyes; then :
11435
11436else
11437
11438cat >>confdefs.h <<_ACEOF
11439#define off_t long int
11440_ACEOF
11441
11442fi
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456     if test $gl_cv_have_include_next = yes; then
11457       gl_cv_next_limits_h='<'limits.h'>'
11458     else
11459       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
11460$as_echo_n "checking absolute name of <limits.h>... " >&6; }
11461if ${gl_cv_next_limits_h+:} false; then :
11462  $as_echo_n "(cached) " >&6
11463else
11464
11465             if test $ac_cv_header_limits_h = yes; then
11466
11467
11468
11469
11470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11471/* end confdefs.h.  */
11472#include <limits.h>
11473_ACEOF
11474                case "$host_os" in
11475    aix*) gl_absname_cpp="$ac_cpp -C" ;;
11476    *)    gl_absname_cpp="$ac_cpp" ;;
11477  esac
11478
11479  case "$host_os" in
11480    mingw*)
11481                                          gl_dirsep_regex='[/\\]'
11482      ;;
11483    *)
11484      gl_dirsep_regex='\/'
11485      ;;
11486  esac
11487      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11488  gl_header_literal_regex=`echo 'limits.h' \
11489                           | sed -e "$gl_make_literal_regex_sed"`
11490  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11491      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11492      s|^/[^/]|//&|
11493      p
11494      q
11495    }'
11496
11497        gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11498  sed -n "$gl_absolute_header_sed"`
11499
11500           gl_header=$gl_cv_absolute_limits_h
11501           gl_cv_next_limits_h='"'$gl_header'"'
11502          else
11503               gl_cv_next_limits_h='<'limits.h'>'
11504             fi
11505
11506
11507fi
11508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
11509$as_echo "$gl_cv_next_limits_h" >&6; }
11510     fi
11511     NEXT_LIMITS_H=$gl_cv_next_limits_h
11512
11513     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11514       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11515       gl_next_as_first_directive='<'limits.h'>'
11516     else
11517       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11518       gl_next_as_first_directive=$gl_cv_next_limits_h
11519     fi
11520     NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
11521
11522
11523
11524
11525
11526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
11527$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
11528if ${gl_cv_header_limits_width+:} false; then :
11529  $as_echo_n "(cached) " >&6
11530else
11531  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11532/* end confdefs.h.  */
11533#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
11534                           #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
11535                          #endif
11536                          #include <limits.h>
11537                          int ullw = ULLONG_WIDTH;
11538int
11539main ()
11540{
11541
11542  ;
11543  return 0;
11544}
11545_ACEOF
11546if ac_fn_c_try_compile "$LINENO"; then :
11547  gl_cv_header_limits_width=yes
11548else
11549  gl_cv_header_limits_width=no
11550fi
11551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11552fi
11553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
11554$as_echo "$gl_cv_header_limits_width" >&6; }
11555  if test "$gl_cv_header_limits_width" = yes; then
11556    LIMITS_H=
11557  else
11558    LIMITS_H=limits.h
11559  fi
11560
11561   if test -n "$LIMITS_H"; then
11562  GL_GENERATE_LIMITS_H_TRUE=
11563  GL_GENERATE_LIMITS_H_FALSE='#'
11564else
11565  GL_GENERATE_LIMITS_H_TRUE='#'
11566  GL_GENERATE_LIMITS_H_FALSE=
11567fi
11568
11569
11570
11571  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
11572$as_echo_n "checking for wint_t... " >&6; }
11573if ${gt_cv_c_wint_t+:} false; then :
11574  $as_echo_n "(cached) " >&6
11575else
11576  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11577/* end confdefs.h.  */
11578
11579/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11580   <wchar.h>.
11581   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
11582   before <wchar.h>.  */
11583#include <stddef.h>
11584#include <stdio.h>
11585#include <time.h>
11586#include <wchar.h>
11587            wint_t foo = (wchar_t)'\0';
11588int
11589main ()
11590{
11591
11592  ;
11593  return 0;
11594}
11595_ACEOF
11596if ac_fn_c_try_compile "$LINENO"; then :
11597  gt_cv_c_wint_t=yes
11598else
11599  gt_cv_c_wint_t=no
11600fi
11601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11602fi
11603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
11604$as_echo "$gt_cv_c_wint_t" >&6; }
11605  if test $gt_cv_c_wint_t = yes; then
11606
11607$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
11608
11609
11610            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
11611$as_echo_n "checking whether wint_t is too small... " >&6; }
11612if ${gl_cv_type_wint_t_too_small+:} false; then :
11613  $as_echo_n "(cached) " >&6
11614else
11615  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11616/* end confdefs.h.  */
11617
11618/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
11619   <wchar.h>.
11620   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11621   included before <wchar.h>.  */
11622#if !(defined __GLIBC__ && !defined __UCLIBC__)
11623# include <stddef.h>
11624# include <stdio.h>
11625# include <time.h>
11626#endif
11627#include <wchar.h>
11628              int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
11629
11630int
11631main ()
11632{
11633
11634  ;
11635  return 0;
11636}
11637_ACEOF
11638if ac_fn_c_try_compile "$LINENO"; then :
11639  gl_cv_type_wint_t_too_small=no
11640else
11641  gl_cv_type_wint_t_too_small=yes
11642fi
11643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11644fi
11645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
11646$as_echo "$gl_cv_type_wint_t_too_small" >&6; }
11647    if test $gl_cv_type_wint_t_too_small = yes; then
11648      GNULIB_OVERRIDES_WINT_T=1
11649    else
11650      GNULIB_OVERRIDES_WINT_T=0
11651    fi
11652  else
11653    GNULIB_OVERRIDES_WINT_T=0
11654  fi
11655
11656
11657
11658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
11659$as_echo_n "checking for unsigned long long int... " >&6; }
11660if ${ac_cv_type_unsigned_long_long_int+:} false; then :
11661  $as_echo_n "(cached) " >&6
11662else
11663  ac_cv_type_unsigned_long_long_int=yes
11664     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11665       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11666/* end confdefs.h.  */
11667
11668  /* For now, do not test the preprocessor; as of 2007 there are too many
11669         implementations with broken preprocessors.  Perhaps this can
11670         be revisited in 2012.  In the meantime, code should not expect
11671         #if to work with literals wider than 32 bits.  */
11672      /* Test literals.  */
11673      long long int ll = 9223372036854775807ll;
11674      long long int nll = -9223372036854775807LL;
11675      unsigned long long int ull = 18446744073709551615ULL;
11676      /* Test constant expressions.   */
11677      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
11678                     ? 1 : -1)];
11679      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
11680                     ? 1 : -1)];
11681      int i = 63;
11682int
11683main ()
11684{
11685/* Test availability of runtime routines for shift and division.  */
11686      long long int llmax = 9223372036854775807ll;
11687      unsigned long long int ullmax = 18446744073709551615ull;
11688      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
11689              | (llmax / ll) | (llmax % ll)
11690              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
11691              | (ullmax / ull) | (ullmax % ull));
11692  ;
11693  return 0;
11694}
11695
11696_ACEOF
11697if ac_fn_c_try_link "$LINENO"; then :
11698
11699else
11700  ac_cv_type_unsigned_long_long_int=no
11701fi
11702rm -f core conftest.err conftest.$ac_objext \
11703    conftest$ac_exeext conftest.$ac_ext
11704     fi
11705fi
11706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
11707$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
11708  if test $ac_cv_type_unsigned_long_long_int = yes; then
11709
11710$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
11711
11712  fi
11713
11714
11715
11716  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
11717$as_echo_n "checking for long long int... " >&6; }
11718if ${ac_cv_type_long_long_int+:} false; then :
11719  $as_echo_n "(cached) " >&6
11720else
11721  ac_cv_type_long_long_int=yes
11722      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11723        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
11724        if test $ac_cv_type_long_long_int = yes; then
11725                                        if test "$cross_compiling" = yes; then :
11726  :
11727else
11728  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11729/* end confdefs.h.  */
11730#include <limits.h>
11731                 #ifndef LLONG_MAX
11732                 # define HALF \
11733                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
11734                 # define LLONG_MAX (HALF - 1 + HALF)
11735                 #endif
11736int
11737main ()
11738{
11739long long int n = 1;
11740                 int i;
11741                 for (i = 0; ; i++)
11742                   {
11743                     long long int m = n << i;
11744                     if (m >> i != n)
11745                       return 1;
11746                     if (LLONG_MAX / 2 < m)
11747                       break;
11748                   }
11749                 return 0;
11750  ;
11751  return 0;
11752}
11753_ACEOF
11754if ac_fn_c_try_run "$LINENO"; then :
11755
11756else
11757  ac_cv_type_long_long_int=no
11758fi
11759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11760  conftest.$ac_objext conftest.beam conftest.$ac_ext
11761fi
11762
11763        fi
11764      fi
11765fi
11766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
11767$as_echo "$ac_cv_type_long_long_int" >&6; }
11768  if test $ac_cv_type_long_long_int = yes; then
11769
11770$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
11771
11772  fi
11773
11774
11775
11776
11777
11778
11779    gl_cv_c_multiarch=no
11780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11781/* end confdefs.h.  */
11782#ifndef __APPLE_CC__
11783         not a universal capable compiler
11784        #endif
11785        typedef int dummy;
11786
11787_ACEOF
11788if ac_fn_c_try_compile "$LINENO"; then :
11789
11790               arch=
11791     prev=
11792     for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
11793       if test -n "$prev"; then
11794         case $word in
11795           i?86 | x86_64 | ppc | ppc64)
11796             if test -z "$arch" || test "$arch" = "$word"; then
11797               arch="$word"
11798             else
11799               gl_cv_c_multiarch=yes
11800             fi
11801             ;;
11802         esac
11803         prev=
11804       else
11805         if test "x$word" = "x-arch"; then
11806           prev=arch
11807         fi
11808       fi
11809     done
11810
11811fi
11812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11813  if test $gl_cv_c_multiarch = yes; then
11814    APPLE_UNIVERSAL_BUILD=1
11815  else
11816    APPLE_UNIVERSAL_BUILD=0
11817  fi
11818
11819
11820
11821
11822
11823
11824
11825
11826  if test $ac_cv_type_long_long_int = yes; then
11827    HAVE_LONG_LONG_INT=1
11828  else
11829    HAVE_LONG_LONG_INT=0
11830  fi
11831
11832
11833  if test $ac_cv_type_unsigned_long_long_int = yes; then
11834    HAVE_UNSIGNED_LONG_LONG_INT=1
11835  else
11836    HAVE_UNSIGNED_LONG_LONG_INT=0
11837  fi
11838
11839
11840
11841  if test $ac_cv_header_wchar_h = yes; then
11842    HAVE_WCHAR_H=1
11843  else
11844    HAVE_WCHAR_H=0
11845  fi
11846
11847
11848      if test $ac_cv_header_inttypes_h = yes; then
11849    HAVE_INTTYPES_H=1
11850  else
11851    HAVE_INTTYPES_H=0
11852  fi
11853
11854
11855      if test $ac_cv_header_sys_types_h = yes; then
11856    HAVE_SYS_TYPES_H=1
11857  else
11858    HAVE_SYS_TYPES_H=0
11859  fi
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871     if test $gl_cv_have_include_next = yes; then
11872       gl_cv_next_stdint_h='<'stdint.h'>'
11873     else
11874       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
11875$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
11876if ${gl_cv_next_stdint_h+:} false; then :
11877  $as_echo_n "(cached) " >&6
11878else
11879
11880             if test $ac_cv_header_stdint_h = yes; then
11881
11882
11883
11884
11885  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11886/* end confdefs.h.  */
11887#include <stdint.h>
11888_ACEOF
11889                case "$host_os" in
11890    aix*) gl_absname_cpp="$ac_cpp -C" ;;
11891    *)    gl_absname_cpp="$ac_cpp" ;;
11892  esac
11893
11894  case "$host_os" in
11895    mingw*)
11896                                          gl_dirsep_regex='[/\\]'
11897      ;;
11898    *)
11899      gl_dirsep_regex='\/'
11900      ;;
11901  esac
11902      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11903  gl_header_literal_regex=`echo 'stdint.h' \
11904                           | sed -e "$gl_make_literal_regex_sed"`
11905  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11906      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11907      s|^/[^/]|//&|
11908      p
11909      q
11910    }'
11911
11912        gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11913  sed -n "$gl_absolute_header_sed"`
11914
11915           gl_header=$gl_cv_absolute_stdint_h
11916           gl_cv_next_stdint_h='"'$gl_header'"'
11917          else
11918               gl_cv_next_stdint_h='<'stdint.h'>'
11919             fi
11920
11921
11922fi
11923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
11924$as_echo "$gl_cv_next_stdint_h" >&6; }
11925     fi
11926     NEXT_STDINT_H=$gl_cv_next_stdint_h
11927
11928     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11929       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11930       gl_next_as_first_directive='<'stdint.h'>'
11931     else
11932       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11933       gl_next_as_first_directive=$gl_cv_next_stdint_h
11934     fi
11935     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
11936
11937
11938
11939
11940  if test $ac_cv_header_stdint_h = yes; then
11941    HAVE_STDINT_H=1
11942  else
11943    HAVE_STDINT_H=0
11944  fi
11945
11946
11947    if test $ac_cv_header_stdint_h = yes; then
11948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
11949$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
11950if ${gl_cv_header_working_stdint_h+:} false; then :
11951  $as_echo_n "(cached) " >&6
11952else
11953  gl_cv_header_working_stdint_h=no
11954       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11955/* end confdefs.h.  */
11956
11957
11958#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
11959#define __STDC_CONSTANT_MACROS 1
11960#define __STDC_LIMIT_MACROS 1
11961#include <stdint.h>
11962/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
11963#if !(defined WCHAR_MIN && defined WCHAR_MAX)
11964#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
11965#endif
11966
11967
11968  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11969     included before <wchar.h>.  */
11970  #include <stddef.h>
11971  #include <signal.h>
11972  #if HAVE_WCHAR_H
11973  # include <stdio.h>
11974  # include <time.h>
11975  # include <wchar.h>
11976  #endif
11977
11978
11979#ifdef INT8_MAX
11980int8_t a1 = INT8_MAX;
11981int8_t a1min = INT8_MIN;
11982#endif
11983#ifdef INT16_MAX
11984int16_t a2 = INT16_MAX;
11985int16_t a2min = INT16_MIN;
11986#endif
11987#ifdef INT32_MAX
11988int32_t a3 = INT32_MAX;
11989int32_t a3min = INT32_MIN;
11990#endif
11991#ifdef INT64_MAX
11992int64_t a4 = INT64_MAX;
11993int64_t a4min = INT64_MIN;
11994#endif
11995#ifdef UINT8_MAX
11996uint8_t b1 = UINT8_MAX;
11997#else
11998typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
11999#endif
12000#ifdef UINT16_MAX
12001uint16_t b2 = UINT16_MAX;
12002#endif
12003#ifdef UINT32_MAX
12004uint32_t b3 = UINT32_MAX;
12005#endif
12006#ifdef UINT64_MAX
12007uint64_t b4 = UINT64_MAX;
12008#endif
12009int_least8_t c1 = INT8_C (0x7f);
12010int_least8_t c1max = INT_LEAST8_MAX;
12011int_least8_t c1min = INT_LEAST8_MIN;
12012int_least16_t c2 = INT16_C (0x7fff);
12013int_least16_t c2max = INT_LEAST16_MAX;
12014int_least16_t c2min = INT_LEAST16_MIN;
12015int_least32_t c3 = INT32_C (0x7fffffff);
12016int_least32_t c3max = INT_LEAST32_MAX;
12017int_least32_t c3min = INT_LEAST32_MIN;
12018int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12019int_least64_t c4max = INT_LEAST64_MAX;
12020int_least64_t c4min = INT_LEAST64_MIN;
12021uint_least8_t d1 = UINT8_C (0xff);
12022uint_least8_t d1max = UINT_LEAST8_MAX;
12023uint_least16_t d2 = UINT16_C (0xffff);
12024uint_least16_t d2max = UINT_LEAST16_MAX;
12025uint_least32_t d3 = UINT32_C (0xffffffff);
12026uint_least32_t d3max = UINT_LEAST32_MAX;
12027uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12028uint_least64_t d4max = UINT_LEAST64_MAX;
12029int_fast8_t e1 = INT_FAST8_MAX;
12030int_fast8_t e1min = INT_FAST8_MIN;
12031int_fast16_t e2 = INT_FAST16_MAX;
12032int_fast16_t e2min = INT_FAST16_MIN;
12033int_fast32_t e3 = INT_FAST32_MAX;
12034int_fast32_t e3min = INT_FAST32_MIN;
12035int_fast64_t e4 = INT_FAST64_MAX;
12036int_fast64_t e4min = INT_FAST64_MIN;
12037uint_fast8_t f1 = UINT_FAST8_MAX;
12038uint_fast16_t f2 = UINT_FAST16_MAX;
12039uint_fast32_t f3 = UINT_FAST32_MAX;
12040uint_fast64_t f4 = UINT_FAST64_MAX;
12041#ifdef INTPTR_MAX
12042intptr_t g = INTPTR_MAX;
12043intptr_t gmin = INTPTR_MIN;
12044#endif
12045#ifdef UINTPTR_MAX
12046uintptr_t h = UINTPTR_MAX;
12047#endif
12048intmax_t i = INTMAX_MAX;
12049uintmax_t j = UINTMAX_MAX;
12050
12051/* Check that SIZE_MAX has the correct type, if possible.  */
12052#if 201112 <= __STDC_VERSION__
12053int k = _Generic (SIZE_MAX, size_t: 0);
12054#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
12055       || (0x5110 <= __SUNPRO_C && !__STDC__))
12056extern size_t k;
12057extern __typeof__ (SIZE_MAX) k;
12058#endif
12059
12060#include <limits.h> /* for CHAR_BIT */
12061#define TYPE_MINIMUM(t) \
12062  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12063#define TYPE_MAXIMUM(t) \
12064  ((t) ((t) 0 < (t) -1 \
12065        ? (t) -1 \
12066        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12067struct s {
12068  int check_PTRDIFF:
12069      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12070      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12071      ? 1 : -1;
12072  /* Detect bug in FreeBSD 6.0 / ia64.  */
12073  int check_SIG_ATOMIC:
12074      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12075      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12076      ? 1 : -1;
12077  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12078  int check_WCHAR:
12079      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12080      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12081      ? 1 : -1;
12082  /* Detect bug in mingw.  */
12083  int check_WINT:
12084      WINT_MIN == TYPE_MINIMUM (wint_t)
12085      && WINT_MAX == TYPE_MAXIMUM (wint_t)
12086      ? 1 : -1;
12087
12088  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
12089  int check_UINT8_C:
12090        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12091  int check_UINT16_C:
12092        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12093
12094  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
12095#ifdef UINT8_MAX
12096  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12097#endif
12098#ifdef UINT16_MAX
12099  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12100#endif
12101#ifdef UINT32_MAX
12102  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12103#endif
12104#ifdef UINT64_MAX
12105  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12106#endif
12107  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12108  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12109  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12110  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12111  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12112  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12113  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12114  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12115  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12116  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12117  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12118};
12119
12120int
12121main ()
12122{
12123
12124  ;
12125  return 0;
12126}
12127_ACEOF
12128if ac_fn_c_try_compile "$LINENO"; then :
12129                                                    if test "$cross_compiling" = yes; then :
12130                 gl_cv_header_working_stdint_h=yes
12131
12132else
12133  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12134/* end confdefs.h.  */
12135
12136
12137#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12138#define __STDC_CONSTANT_MACROS 1
12139#define __STDC_LIMIT_MACROS 1
12140#include <stdint.h>
12141
12142
12143  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12144     included before <wchar.h>.  */
12145  #include <stddef.h>
12146  #include <signal.h>
12147  #if HAVE_WCHAR_H
12148  # include <stdio.h>
12149  # include <time.h>
12150  # include <wchar.h>
12151  #endif
12152
12153
12154#include <stdio.h>
12155#include <string.h>
12156#define MVAL(macro) MVAL1(macro)
12157#define MVAL1(expression) #expression
12158static const char *macro_values[] =
12159  {
12160#ifdef INT8_MAX
12161    MVAL (INT8_MAX),
12162#endif
12163#ifdef INT16_MAX
12164    MVAL (INT16_MAX),
12165#endif
12166#ifdef INT32_MAX
12167    MVAL (INT32_MAX),
12168#endif
12169#ifdef INT64_MAX
12170    MVAL (INT64_MAX),
12171#endif
12172#ifdef UINT8_MAX
12173    MVAL (UINT8_MAX),
12174#endif
12175#ifdef UINT16_MAX
12176    MVAL (UINT16_MAX),
12177#endif
12178#ifdef UINT32_MAX
12179    MVAL (UINT32_MAX),
12180#endif
12181#ifdef UINT64_MAX
12182    MVAL (UINT64_MAX),
12183#endif
12184    NULL
12185  };
12186
12187int
12188main ()
12189{
12190
12191  const char **mv;
12192  for (mv = macro_values; *mv != NULL; mv++)
12193    {
12194      const char *value = *mv;
12195      /* Test whether it looks like a cast expression.  */
12196      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
12197          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
12198          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
12199          || strncmp (value, "((int)"/*)*/, 6) == 0
12200          || strncmp (value, "((signed short)"/*)*/, 15) == 0
12201          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
12202        return mv - macro_values + 1;
12203    }
12204  return 0;
12205
12206  ;
12207  return 0;
12208}
12209_ACEOF
12210if ac_fn_c_try_run "$LINENO"; then :
12211  gl_cv_header_working_stdint_h=yes
12212fi
12213rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12214  conftest.$ac_objext conftest.beam conftest.$ac_ext
12215fi
12216
12217
12218fi
12219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12220
12221fi
12222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
12223$as_echo "$gl_cv_header_working_stdint_h" >&6; }
12224  fi
12225
12226  HAVE_C99_STDINT_H=0
12227  HAVE_SYS_BITYPES_H=0
12228  HAVE_SYS_INTTYPES_H=0
12229  STDINT_H=stdint.h
12230  if test "$gl_cv_header_working_stdint_h" = yes; then
12231    HAVE_C99_STDINT_H=1
12232            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
12233$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
12234if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
12235  $as_echo_n "(cached) " >&6
12236else
12237  gl_cv_header_stdint_predates_cxx11_h=yes
12238       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12239/* end confdefs.h.  */
12240
12241
12242#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12243#include <stdint.h>
12244
12245
12246  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12247     included before <wchar.h>.  */
12248  #include <stddef.h>
12249  #include <signal.h>
12250  #if HAVE_WCHAR_H
12251  # include <stdio.h>
12252  # include <time.h>
12253  # include <wchar.h>
12254  #endif
12255
12256
12257intmax_t im = INTMAX_MAX;
12258int32_t i32 = INT32_C (0x7fffffff);
12259
12260int
12261main ()
12262{
12263
12264  ;
12265  return 0;
12266}
12267_ACEOF
12268if ac_fn_c_try_compile "$LINENO"; then :
12269  gl_cv_header_stdint_predates_cxx11_h=no
12270fi
12271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12272fi
12273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
12274$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
12275
12276    if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
12277
12278$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
12279
12280
12281$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
12282
12283    fi
12284    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
12285$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
12286if ${gl_cv_header_stdint_width+:} false; then :
12287  $as_echo_n "(cached) " >&6
12288else
12289  gl_cv_header_stdint_width=no
12290       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12291/* end confdefs.h.  */
12292
12293            /* Work if build is not clean.  */
12294            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
12295            #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
12296             #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
12297            #endif
12298            #include <stdint.h>
12299
12300  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12301     included before <wchar.h>.  */
12302  #include <stddef.h>
12303  #include <signal.h>
12304  #if HAVE_WCHAR_H
12305  # include <stdio.h>
12306  # include <time.h>
12307  # include <wchar.h>
12308  #endif
12309
12310            int iw = UINTMAX_WIDTH;
12311
12312int
12313main ()
12314{
12315
12316  ;
12317  return 0;
12318}
12319_ACEOF
12320if ac_fn_c_try_compile "$LINENO"; then :
12321  gl_cv_header_stdint_width=yes
12322fi
12323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12324fi
12325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
12326$as_echo "$gl_cv_header_stdint_width" >&6; }
12327    if test "$gl_cv_header_stdint_width" = yes; then
12328      STDINT_H=
12329    fi
12330  else
12331            for ac_header in sys/inttypes.h sys/bitypes.h
12332do :
12333  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12334ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12335if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12336  cat >>confdefs.h <<_ACEOF
12337#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12338_ACEOF
12339
12340fi
12341
12342done
12343
12344    if test $ac_cv_header_sys_inttypes_h = yes; then
12345      HAVE_SYS_INTTYPES_H=1
12346    fi
12347    if test $ac_cv_header_sys_bitypes_h = yes; then
12348      HAVE_SYS_BITYPES_H=1
12349    fi
12350
12351
12352  if test $APPLE_UNIVERSAL_BUILD = 0; then
12353
12354
12355  for gltype in ptrdiff_t size_t ; do
12356    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12357$as_echo_n "checking for bit size of $gltype... " >&6; }
12358if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12359  $as_echo_n "(cached) " >&6
12360else
12361  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
12362  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12363     included before <wchar.h>.  */
12364  #include <stddef.h>
12365  #include <signal.h>
12366  #if HAVE_WCHAR_H
12367  # include <stdio.h>
12368  # include <time.h>
12369  # include <wchar.h>
12370  #endif
12371
12372#include <limits.h>"; then :
12373
12374else
12375  result=unknown
12376fi
12377
12378       eval gl_cv_bitsizeof_${gltype}=\$result
12379
12380fi
12381eval ac_res=\$gl_cv_bitsizeof_${gltype}
12382	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12383$as_echo "$ac_res" >&6; }
12384    eval result=\$gl_cv_bitsizeof_${gltype}
12385    if test $result = unknown; then
12386                                                result=0
12387    fi
12388    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12389    cat >>confdefs.h <<_ACEOF
12390#define BITSIZEOF_${GLTYPE} $result
12391_ACEOF
12392
12393    eval BITSIZEOF_${GLTYPE}=\$result
12394  done
12395
12396
12397  fi
12398
12399
12400  for gltype in sig_atomic_t wchar_t wint_t ; do
12401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12402$as_echo_n "checking for bit size of $gltype... " >&6; }
12403if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12404  $as_echo_n "(cached) " >&6
12405else
12406  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
12407  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12408     included before <wchar.h>.  */
12409  #include <stddef.h>
12410  #include <signal.h>
12411  #if HAVE_WCHAR_H
12412  # include <stdio.h>
12413  # include <time.h>
12414  # include <wchar.h>
12415  #endif
12416
12417#include <limits.h>"; then :
12418
12419else
12420  result=unknown
12421fi
12422
12423       eval gl_cv_bitsizeof_${gltype}=\$result
12424
12425fi
12426eval ac_res=\$gl_cv_bitsizeof_${gltype}
12427	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12428$as_echo "$ac_res" >&6; }
12429    eval result=\$gl_cv_bitsizeof_${gltype}
12430    if test $result = unknown; then
12431                                                result=0
12432    fi
12433    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12434    cat >>confdefs.h <<_ACEOF
12435#define BITSIZEOF_${GLTYPE} $result
12436_ACEOF
12437
12438    eval BITSIZEOF_${GLTYPE}=\$result
12439  done
12440
12441
12442
12443
12444  for gltype in sig_atomic_t wchar_t wint_t ; do
12445    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
12446$as_echo_n "checking whether $gltype is signed... " >&6; }
12447if eval \${gl_cv_type_${gltype}_signed+:} false; then :
12448  $as_echo_n "(cached) " >&6
12449else
12450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12451/* end confdefs.h.  */
12452
12453  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12454     included before <wchar.h>.  */
12455  #include <stddef.h>
12456  #include <signal.h>
12457  #if HAVE_WCHAR_H
12458  # include <stdio.h>
12459  # include <time.h>
12460  # include <wchar.h>
12461  #endif
12462
12463            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
12464int
12465main ()
12466{
12467
12468  ;
12469  return 0;
12470}
12471_ACEOF
12472if ac_fn_c_try_compile "$LINENO"; then :
12473  result=yes
12474else
12475  result=no
12476fi
12477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12478       eval gl_cv_type_${gltype}_signed=\$result
12479
12480fi
12481eval ac_res=\$gl_cv_type_${gltype}_signed
12482	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12483$as_echo "$ac_res" >&6; }
12484    eval result=\$gl_cv_type_${gltype}_signed
12485    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12486    if test "$result" = yes; then
12487      cat >>confdefs.h <<_ACEOF
12488#define HAVE_SIGNED_${GLTYPE} 1
12489_ACEOF
12490
12491      eval HAVE_SIGNED_${GLTYPE}=1
12492    else
12493      eval HAVE_SIGNED_${GLTYPE}=0
12494    fi
12495  done
12496
12497
12498  gl_cv_type_ptrdiff_t_signed=yes
12499  gl_cv_type_size_t_signed=no
12500  if test $APPLE_UNIVERSAL_BUILD = 0; then
12501
12502
12503  for gltype in ptrdiff_t size_t ; do
12504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12505$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
12506if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
12507  $as_echo_n "(cached) " >&6
12508else
12509  eval gl_cv_type_${gltype}_suffix=no
12510       eval result=\$gl_cv_type_${gltype}_signed
12511       if test "$result" = yes; then
12512         glsufu=
12513       else
12514         glsufu=u
12515       fi
12516       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12517         case $glsuf in
12518           '')  gltype1='int';;
12519           l)   gltype1='long int';;
12520           ll)  gltype1='long long int';;
12521           i64) gltype1='__int64';;
12522           u)   gltype1='unsigned int';;
12523           ul)  gltype1='unsigned long int';;
12524           ull) gltype1='unsigned long long int';;
12525           ui64)gltype1='unsigned __int64';;
12526         esac
12527         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12528/* end confdefs.h.  */
12529
12530  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12531     included before <wchar.h>.  */
12532  #include <stddef.h>
12533  #include <signal.h>
12534  #if HAVE_WCHAR_H
12535  # include <stdio.h>
12536  # include <time.h>
12537  # include <wchar.h>
12538  #endif
12539
12540              extern $gltype foo;
12541              extern $gltype1 foo;
12542int
12543main ()
12544{
12545
12546  ;
12547  return 0;
12548}
12549_ACEOF
12550if ac_fn_c_try_compile "$LINENO"; then :
12551  eval gl_cv_type_${gltype}_suffix=\$glsuf
12552fi
12553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12554         eval result=\$gl_cv_type_${gltype}_suffix
12555         test "$result" != no && break
12556       done
12557fi
12558eval ac_res=\$gl_cv_type_${gltype}_suffix
12559	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12560$as_echo "$ac_res" >&6; }
12561    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12562    eval result=\$gl_cv_type_${gltype}_suffix
12563    test "$result" = no && result=
12564    eval ${GLTYPE}_SUFFIX=\$result
12565    cat >>confdefs.h <<_ACEOF
12566#define ${GLTYPE}_SUFFIX $result
12567_ACEOF
12568
12569  done
12570
12571
12572  fi
12573
12574
12575  for gltype in sig_atomic_t wchar_t wint_t ; do
12576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12577$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
12578if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
12579  $as_echo_n "(cached) " >&6
12580else
12581  eval gl_cv_type_${gltype}_suffix=no
12582       eval result=\$gl_cv_type_${gltype}_signed
12583       if test "$result" = yes; then
12584         glsufu=
12585       else
12586         glsufu=u
12587       fi
12588       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12589         case $glsuf in
12590           '')  gltype1='int';;
12591           l)   gltype1='long int';;
12592           ll)  gltype1='long long int';;
12593           i64) gltype1='__int64';;
12594           u)   gltype1='unsigned int';;
12595           ul)  gltype1='unsigned long int';;
12596           ull) gltype1='unsigned long long int';;
12597           ui64)gltype1='unsigned __int64';;
12598         esac
12599         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12600/* end confdefs.h.  */
12601
12602  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12603     included before <wchar.h>.  */
12604  #include <stddef.h>
12605  #include <signal.h>
12606  #if HAVE_WCHAR_H
12607  # include <stdio.h>
12608  # include <time.h>
12609  # include <wchar.h>
12610  #endif
12611
12612              extern $gltype foo;
12613              extern $gltype1 foo;
12614int
12615main ()
12616{
12617
12618  ;
12619  return 0;
12620}
12621_ACEOF
12622if ac_fn_c_try_compile "$LINENO"; then :
12623  eval gl_cv_type_${gltype}_suffix=\$glsuf
12624fi
12625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12626         eval result=\$gl_cv_type_${gltype}_suffix
12627         test "$result" != no && break
12628       done
12629fi
12630eval ac_res=\$gl_cv_type_${gltype}_suffix
12631	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12632$as_echo "$ac_res" >&6; }
12633    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12634    eval result=\$gl_cv_type_${gltype}_suffix
12635    test "$result" = no && result=
12636    eval ${GLTYPE}_SUFFIX=\$result
12637    cat >>confdefs.h <<_ACEOF
12638#define ${GLTYPE}_SUFFIX $result
12639_ACEOF
12640
12641  done
12642
12643
12644
12645          if test $GNULIB_OVERRIDES_WINT_T = 1; then
12646    BITSIZEOF_WINT_T=32
12647  fi
12648
12649  fi
12650
12651    LIMITS_H=limits.h
12652   if test -n "$LIMITS_H"; then
12653  GL_GENERATE_LIMITS_H_TRUE=
12654  GL_GENERATE_LIMITS_H_FALSE='#'
12655else
12656  GL_GENERATE_LIMITS_H_TRUE='#'
12657  GL_GENERATE_LIMITS_H_FALSE=
12658fi
12659
12660
12661
12662
12663
12664
12665   if test -n "$STDINT_H"; then
12666  GL_GENERATE_STDINT_H_TRUE=
12667  GL_GENERATE_STDINT_H_FALSE='#'
12668else
12669  GL_GENERATE_STDINT_H_TRUE='#'
12670  GL_GENERATE_STDINT_H_FALSE=
12671fi
12672
12673
12674
12675
12676
12677  GNULIB_IMAXABS=0;
12678  GNULIB_IMAXDIV=0;
12679  GNULIB_STRTOIMAX=0;
12680  GNULIB_STRTOUMAX=0;
12681    HAVE_DECL_IMAXABS=1;
12682  HAVE_DECL_IMAXDIV=1;
12683  HAVE_DECL_STRTOIMAX=1;
12684  HAVE_DECL_STRTOUMAX=1;
12685  REPLACE_STRTOIMAX=0;
12686  REPLACE_STRTOUMAX=0;
12687  INT32_MAX_LT_INTMAX_MAX=1;
12688  INT64_MAX_EQ_LONG_MAX='defined _LP64';
12689  PRI_MACROS_BROKEN=0;
12690  PRIPTR_PREFIX=__PRIPTR_PREFIX;
12691  UINT32_MAX_LT_UINTMAX_MAX=1;
12692  UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708     if test $gl_cv_have_include_next = yes; then
12709       gl_cv_next_inttypes_h='<'inttypes.h'>'
12710     else
12711       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
12712$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
12713if ${gl_cv_next_inttypes_h+:} false; then :
12714  $as_echo_n "(cached) " >&6
12715else
12716
12717             if test $ac_cv_header_inttypes_h = yes; then
12718
12719
12720
12721
12722  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12723/* end confdefs.h.  */
12724#include <inttypes.h>
12725_ACEOF
12726                case "$host_os" in
12727    aix*) gl_absname_cpp="$ac_cpp -C" ;;
12728    *)    gl_absname_cpp="$ac_cpp" ;;
12729  esac
12730
12731  case "$host_os" in
12732    mingw*)
12733                                          gl_dirsep_regex='[/\\]'
12734      ;;
12735    *)
12736      gl_dirsep_regex='\/'
12737      ;;
12738  esac
12739      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12740  gl_header_literal_regex=`echo 'inttypes.h' \
12741                           | sed -e "$gl_make_literal_regex_sed"`
12742  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12743      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12744      s|^/[^/]|//&|
12745      p
12746      q
12747    }'
12748
12749        gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12750  sed -n "$gl_absolute_header_sed"`
12751
12752           gl_header=$gl_cv_absolute_inttypes_h
12753           gl_cv_next_inttypes_h='"'$gl_header'"'
12754          else
12755               gl_cv_next_inttypes_h='<'inttypes.h'>'
12756             fi
12757
12758
12759fi
12760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
12761$as_echo "$gl_cv_next_inttypes_h" >&6; }
12762     fi
12763     NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
12764
12765     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12766       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12767       gl_next_as_first_directive='<'inttypes.h'>'
12768     else
12769       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12770       gl_next_as_first_directive=$gl_cv_next_inttypes_h
12771     fi
12772     NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
12773
12774
12775
12776
12777
12778
12779
12780
12781    for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
12782    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12784$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12785if eval \${$as_gl_Symbol+:} false; then :
12786  $as_echo_n "(cached) " >&6
12787else
12788  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12789/* end confdefs.h.  */
12790#include <inttypes.h>
12791
12792int
12793main ()
12794{
12795#undef $gl_func
12796  (void) $gl_func;
12797  ;
12798  return 0;
12799}
12800_ACEOF
12801if ac_fn_c_try_compile "$LINENO"; then :
12802  eval "$as_gl_Symbol=yes"
12803else
12804  eval "$as_gl_Symbol=no"
12805fi
12806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12807fi
12808eval ac_res=\$$as_gl_Symbol
12809	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12810$as_echo "$ac_res" >&6; }
12811    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
12812  cat >>confdefs.h <<_ACEOF
12813#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12814_ACEOF
12815
12816                     eval ac_cv_have_decl_$gl_func=yes
12817fi
12818      done
12819
12820
12821
12822  for ac_header in inttypes.h
12823do :
12824  ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
12825if test "x$ac_cv_header_inttypes_h" = xyes; then :
12826  cat >>confdefs.h <<_ACEOF
12827#define HAVE_INTTYPES_H 1
12828_ACEOF
12829
12830fi
12831
12832done
12833
12834  if test $ac_cv_header_inttypes_h = yes; then
12835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
12836$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
12837if ${gt_cv_inttypes_pri_broken+:} false; then :
12838  $as_echo_n "(cached) " >&6
12839else
12840
12841        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12842/* end confdefs.h.  */
12843
12844#include <inttypes.h>
12845#ifdef PRId32
12846char *p = PRId32;
12847#endif
12848
12849int
12850main ()
12851{
12852
12853  ;
12854  return 0;
12855}
12856_ACEOF
12857if ac_fn_c_try_compile "$LINENO"; then :
12858  gt_cv_inttypes_pri_broken=no
12859else
12860  gt_cv_inttypes_pri_broken=yes
12861fi
12862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12863
12864fi
12865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
12866$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
12867  fi
12868  if test "$gt_cv_inttypes_pri_broken" = yes; then
12869
12870cat >>confdefs.h <<_ACEOF
12871#define PRI_MACROS_BROKEN 1
12872_ACEOF
12873
12874    PRI_MACROS_BROKEN=1
12875  else
12876    PRI_MACROS_BROKEN=0
12877  fi
12878
12879
12880
12881
12882
12883  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12884$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12885if ${am_cv_langinfo_codeset+:} false; then :
12886  $as_echo_n "(cached) " >&6
12887else
12888  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12889/* end confdefs.h.  */
12890#include <langinfo.h>
12891int
12892main ()
12893{
12894char* cs = nl_langinfo(CODESET); return !cs;
12895  ;
12896  return 0;
12897}
12898_ACEOF
12899if ac_fn_c_try_link "$LINENO"; then :
12900  am_cv_langinfo_codeset=yes
12901else
12902  am_cv_langinfo_codeset=no
12903fi
12904rm -f core conftest.err conftest.$ac_objext \
12905    conftest$ac_exeext conftest.$ac_ext
12906
12907fi
12908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12909$as_echo "$am_cv_langinfo_codeset" >&6; }
12910  if test $am_cv_langinfo_codeset = yes; then
12911
12912$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12913
12914  fi
12915
12916
12917    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
12918$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
12919if ${ac_cv_gnu_library_2_1+:} false; then :
12920  $as_echo_n "(cached) " >&6
12921else
12922  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12923/* end confdefs.h.  */
12924
12925#include <features.h>
12926#ifdef __GNU_LIBRARY__
12927 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
12928  Lucky GNU user
12929 #endif
12930#endif
12931#ifdef __UCLIBC__
12932 Lucky user
12933#endif
12934
12935_ACEOF
12936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12937  $EGREP "Lucky" >/dev/null 2>&1; then :
12938  ac_cv_gnu_library_2_1=yes
12939else
12940  ac_cv_gnu_library_2_1=no
12941fi
12942rm -f conftest*
12943
12944
12945
12946fi
12947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
12948$as_echo "$ac_cv_gnu_library_2_1" >&6; }
12949
12950    GLIBC21="$ac_cv_gnu_library_2_1"
12951
12952
12953
12954
12955
12956  GNULIB__EXIT=0;
12957  GNULIB_ATOLL=0;
12958  GNULIB_CALLOC_POSIX=0;
12959  GNULIB_CANONICALIZE_FILE_NAME=0;
12960  GNULIB_GETLOADAVG=0;
12961  GNULIB_GETSUBOPT=0;
12962  GNULIB_GRANTPT=0;
12963  GNULIB_MALLOC_POSIX=0;
12964  GNULIB_MBTOWC=0;
12965  GNULIB_MKDTEMP=0;
12966  GNULIB_MKOSTEMP=0;
12967  GNULIB_MKOSTEMPS=0;
12968  GNULIB_MKSTEMP=0;
12969  GNULIB_MKSTEMPS=0;
12970  GNULIB_POSIX_OPENPT=0;
12971  GNULIB_PTSNAME=0;
12972  GNULIB_PTSNAME_R=0;
12973  GNULIB_PUTENV=0;
12974  GNULIB_QSORT_R=0;
12975  GNULIB_RANDOM=0;
12976  GNULIB_RANDOM_R=0;
12977  GNULIB_REALLOC_POSIX=0;
12978  GNULIB_REALPATH=0;
12979  GNULIB_RPMATCH=0;
12980  GNULIB_SECURE_GETENV=0;
12981  GNULIB_SETENV=0;
12982  GNULIB_STRTOD=0;
12983  GNULIB_STRTOLL=0;
12984  GNULIB_STRTOULL=0;
12985  GNULIB_SYSTEM_POSIX=0;
12986  GNULIB_UNLOCKPT=0;
12987  GNULIB_UNSETENV=0;
12988  GNULIB_WCTOMB=0;
12989    HAVE__EXIT=1;
12990  HAVE_ATOLL=1;
12991  HAVE_CANONICALIZE_FILE_NAME=1;
12992  HAVE_DECL_GETLOADAVG=1;
12993  HAVE_GETSUBOPT=1;
12994  HAVE_GRANTPT=1;
12995  HAVE_MKDTEMP=1;
12996  HAVE_MKOSTEMP=1;
12997  HAVE_MKOSTEMPS=1;
12998  HAVE_MKSTEMP=1;
12999  HAVE_MKSTEMPS=1;
13000  HAVE_POSIX_OPENPT=1;
13001  HAVE_PTSNAME=1;
13002  HAVE_PTSNAME_R=1;
13003  HAVE_QSORT_R=1;
13004  HAVE_RANDOM=1;
13005  HAVE_RANDOM_H=1;
13006  HAVE_RANDOM_R=1;
13007  HAVE_REALPATH=1;
13008  HAVE_RPMATCH=1;
13009  HAVE_SECURE_GETENV=1;
13010  HAVE_SETENV=1;
13011  HAVE_DECL_SETENV=1;
13012  HAVE_STRTOD=1;
13013  HAVE_STRTOLL=1;
13014  HAVE_STRTOULL=1;
13015  HAVE_STRUCT_RANDOM_DATA=1;
13016  HAVE_SYS_LOADAVG_H=0;
13017  HAVE_UNLOCKPT=1;
13018  HAVE_DECL_UNSETENV=1;
13019  REPLACE_CALLOC=0;
13020  REPLACE_CANONICALIZE_FILE_NAME=0;
13021  REPLACE_MALLOC=0;
13022  REPLACE_MBTOWC=0;
13023  REPLACE_MKSTEMP=0;
13024  REPLACE_PTSNAME=0;
13025  REPLACE_PTSNAME_R=0;
13026  REPLACE_PUTENV=0;
13027  REPLACE_QSORT_R=0;
13028  REPLACE_RANDOM_R=0;
13029  REPLACE_REALLOC=0;
13030  REPLACE_REALPATH=0;
13031  REPLACE_SETENV=0;
13032  REPLACE_STRTOD=0;
13033  REPLACE_UNSETENV=0;
13034  REPLACE_WCTOMB=0;
13035
13036
13037  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
13038$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
13039if ${gl_cv_func_malloc_posix+:} false; then :
13040  $as_echo_n "(cached) " >&6
13041else
13042
13043                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13044/* end confdefs.h.  */
13045
13046int
13047main ()
13048{
13049#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13050             choke me
13051             #endif
13052
13053  ;
13054  return 0;
13055}
13056_ACEOF
13057if ac_fn_c_try_compile "$LINENO"; then :
13058  gl_cv_func_malloc_posix=yes
13059else
13060  gl_cv_func_malloc_posix=no
13061fi
13062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13063
13064fi
13065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
13066$as_echo "$gl_cv_func_malloc_posix" >&6; }
13067
13068
13069
13070      for ac_header in stdlib.h
13071do :
13072  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
13073if test "x$ac_cv_header_stdlib_h" = xyes; then :
13074  cat >>confdefs.h <<_ACEOF
13075#define HAVE_STDLIB_H 1
13076_ACEOF
13077
13078fi
13079
13080done
13081
13082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
13083$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
13084if ${ac_cv_func_malloc_0_nonnull+:} false; then :
13085  $as_echo_n "(cached) " >&6
13086else
13087  if test "$cross_compiling" = yes; then :
13088  case "$host_os" in
13089          # Guess yes on platforms where we know the result.
13090          *-gnu* | freebsd* | netbsd* | openbsd* \
13091          | hpux* | solaris* | cygwin* | mingw*)
13092            ac_cv_func_malloc_0_nonnull=yes ;;
13093          # If we don't know, assume the worst.
13094          *) ac_cv_func_malloc_0_nonnull=no ;;
13095        esac
13096
13097else
13098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13099/* end confdefs.h.  */
13100#if defined STDC_HEADERS || defined HAVE_STDLIB_H
13101            # include <stdlib.h>
13102            #else
13103            char *malloc ();
13104            #endif
13105
13106int
13107main ()
13108{
13109char *p = malloc (0);
13110            int result = !p;
13111            free (p);
13112            return result;
13113  ;
13114  return 0;
13115}
13116
13117_ACEOF
13118if ac_fn_c_try_run "$LINENO"; then :
13119  ac_cv_func_malloc_0_nonnull=yes
13120else
13121  ac_cv_func_malloc_0_nonnull=no
13122fi
13123rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13124  conftest.$ac_objext conftest.beam conftest.$ac_ext
13125fi
13126
13127
13128fi
13129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
13130$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
13131  if test $ac_cv_func_malloc_0_nonnull = yes; then :
13132  gl_cv_func_malloc_0_nonnull=1
13133else
13134  gl_cv_func_malloc_0_nonnull=0
13135fi
13136
13137
13138cat >>confdefs.h <<_ACEOF
13139#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
13140_ACEOF
13141
13142
13143
13144  GNULIB_BTOWC=0;
13145  GNULIB_WCTOB=0;
13146  GNULIB_MBSINIT=0;
13147  GNULIB_MBRTOWC=0;
13148  GNULIB_MBRLEN=0;
13149  GNULIB_MBSRTOWCS=0;
13150  GNULIB_MBSNRTOWCS=0;
13151  GNULIB_WCRTOMB=0;
13152  GNULIB_WCSRTOMBS=0;
13153  GNULIB_WCSNRTOMBS=0;
13154  GNULIB_WCWIDTH=0;
13155  GNULIB_WMEMCHR=0;
13156  GNULIB_WMEMCMP=0;
13157  GNULIB_WMEMCPY=0;
13158  GNULIB_WMEMMOVE=0;
13159  GNULIB_WMEMSET=0;
13160  GNULIB_WCSLEN=0;
13161  GNULIB_WCSNLEN=0;
13162  GNULIB_WCSCPY=0;
13163  GNULIB_WCPCPY=0;
13164  GNULIB_WCSNCPY=0;
13165  GNULIB_WCPNCPY=0;
13166  GNULIB_WCSCAT=0;
13167  GNULIB_WCSNCAT=0;
13168  GNULIB_WCSCMP=0;
13169  GNULIB_WCSNCMP=0;
13170  GNULIB_WCSCASECMP=0;
13171  GNULIB_WCSNCASECMP=0;
13172  GNULIB_WCSCOLL=0;
13173  GNULIB_WCSXFRM=0;
13174  GNULIB_WCSDUP=0;
13175  GNULIB_WCSCHR=0;
13176  GNULIB_WCSRCHR=0;
13177  GNULIB_WCSCSPN=0;
13178  GNULIB_WCSSPN=0;
13179  GNULIB_WCSPBRK=0;
13180  GNULIB_WCSSTR=0;
13181  GNULIB_WCSTOK=0;
13182  GNULIB_WCSWIDTH=0;
13183    HAVE_BTOWC=1;
13184  HAVE_MBSINIT=1;
13185  HAVE_MBRTOWC=1;
13186  HAVE_MBRLEN=1;
13187  HAVE_MBSRTOWCS=1;
13188  HAVE_MBSNRTOWCS=1;
13189  HAVE_WCRTOMB=1;
13190  HAVE_WCSRTOMBS=1;
13191  HAVE_WCSNRTOMBS=1;
13192  HAVE_WMEMCHR=1;
13193  HAVE_WMEMCMP=1;
13194  HAVE_WMEMCPY=1;
13195  HAVE_WMEMMOVE=1;
13196  HAVE_WMEMSET=1;
13197  HAVE_WCSLEN=1;
13198  HAVE_WCSNLEN=1;
13199  HAVE_WCSCPY=1;
13200  HAVE_WCPCPY=1;
13201  HAVE_WCSNCPY=1;
13202  HAVE_WCPNCPY=1;
13203  HAVE_WCSCAT=1;
13204  HAVE_WCSNCAT=1;
13205  HAVE_WCSCMP=1;
13206  HAVE_WCSNCMP=1;
13207  HAVE_WCSCASECMP=1;
13208  HAVE_WCSNCASECMP=1;
13209  HAVE_WCSCOLL=1;
13210  HAVE_WCSXFRM=1;
13211  HAVE_WCSDUP=1;
13212  HAVE_WCSCHR=1;
13213  HAVE_WCSRCHR=1;
13214  HAVE_WCSCSPN=1;
13215  HAVE_WCSSPN=1;
13216  HAVE_WCSPBRK=1;
13217  HAVE_WCSSTR=1;
13218  HAVE_WCSTOK=1;
13219  HAVE_WCSWIDTH=1;
13220  HAVE_DECL_WCTOB=1;
13221  HAVE_DECL_WCWIDTH=1;
13222  REPLACE_MBSTATE_T=0;
13223  REPLACE_BTOWC=0;
13224  REPLACE_WCTOB=0;
13225  REPLACE_MBSINIT=0;
13226  REPLACE_MBRTOWC=0;
13227  REPLACE_MBRLEN=0;
13228  REPLACE_MBSRTOWCS=0;
13229  REPLACE_MBSNRTOWCS=0;
13230  REPLACE_WCRTOMB=0;
13231  REPLACE_WCSRTOMBS=0;
13232  REPLACE_WCSNRTOMBS=0;
13233  REPLACE_WCWIDTH=0;
13234  REPLACE_WCSWIDTH=0;
13235
13236
13237
13238
13239
13240
13241
13242
13243  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
13244$as_echo_n "checking for a traditional japanese locale... " >&6; }
13245if ${gt_cv_locale_ja+:} false; then :
13246  $as_echo_n "(cached) " >&6
13247else
13248
13249    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13250/* end confdefs.h.  */
13251
13252#include <locale.h>
13253#include <time.h>
13254#if HAVE_LANGINFO_CODESET
13255# include <langinfo.h>
13256#endif
13257#include <stdlib.h>
13258#include <string.h>
13259struct tm t;
13260char buf[16];
13261int main ()
13262{
13263  const char *p;
13264  /* Check whether the given locale name is recognized by the system.  */
13265#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
13266  /* On native Windows, setlocale(category, "") looks at the system settings,
13267     not at the environment variables.  Also, when an encoding suffix such
13268     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
13269     category of the locale to "C".  */
13270  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
13271      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
13272    return 1;
13273#else
13274  if (setlocale (LC_ALL, "") == NULL) return 1;
13275#endif
13276  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
13277     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
13278     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
13279     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
13280     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
13281     some unit tests fail.
13282     On MirBSD 10, when an unsupported locale is specified, setlocale()
13283     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
13284#if HAVE_LANGINFO_CODESET
13285  {
13286    const char *cs = nl_langinfo (CODESET);
13287    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
13288        || strcmp (cs, "UTF-8") == 0)
13289      return 1;
13290  }
13291#endif
13292#ifdef __CYGWIN__
13293  /* On Cygwin, avoid locale names without encoding suffix, because the
13294     locale_charset() function relies on the encoding suffix.  Note that
13295     LC_ALL is set on the command line.  */
13296  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
13297#endif
13298  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
13299     on Cygwin 1.5.x.  */
13300  if (MB_CUR_MAX == 1)
13301    return 1;
13302  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
13303     This excludes the UTF-8 encoding (except on MirBSD).  */
13304  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
13305  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
13306  for (p = buf; *p != '\0'; p++)
13307    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
13308      return 1;
13309  return 0;
13310}
13311
13312_ACEOF
13313    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13314  (eval $ac_link) 2>&5
13315  ac_status=$?
13316  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13317  test $ac_status = 0; } && test -s conftest$ac_exeext; then
13318      case "$host_os" in
13319        # Handle native Windows specially, because there setlocale() interprets
13320        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
13321        # "fr" or "fra" as "French" or "French_France.1252",
13322        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
13323        # "ja" as "Japanese" or "Japanese_Japan.932",
13324        # and similar.
13325        mingw*)
13326          # Note that on native Windows, the Japanese locale is
13327          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
13328          # cannot use it here.
13329          gt_cv_locale_ja=none
13330          ;;
13331        *)
13332          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
13333          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
13334          # configure script would override the LC_ALL setting. Likewise for
13335          # LC_CTYPE, which is also set at the beginning of the configure script.
13336          # Test for the AIX locale name.
13337          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13338            gt_cv_locale_ja=ja_JP
13339          else
13340            # Test for the locale name with explicit encoding suffix.
13341            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13342              gt_cv_locale_ja=ja_JP.EUC-JP
13343            else
13344              # Test for the HP-UX, OSF/1, NetBSD locale name.
13345              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13346                gt_cv_locale_ja=ja_JP.eucJP
13347              else
13348                # Test for the IRIX, FreeBSD locale name.
13349                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13350                  gt_cv_locale_ja=ja_JP.EUC
13351                else
13352                  # Test for the Solaris 7 locale name.
13353                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13354                    gt_cv_locale_ja=ja
13355                  else
13356                    # Special test for NetBSD 1.6.
13357                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
13358                      gt_cv_locale_ja=ja_JP.eucJP
13359                    else
13360                      # None found.
13361                      gt_cv_locale_ja=none
13362                    fi
13363                  fi
13364                fi
13365              fi
13366            fi
13367          fi
13368          ;;
13369      esac
13370    fi
13371    rm -fr conftest*
13372
13373fi
13374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
13375$as_echo "$gt_cv_locale_ja" >&6; }
13376  LOCALE_JA=$gt_cv_locale_ja
13377
13378
13379
13380
13381
13382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
13383$as_echo_n "checking for a transitional chinese locale... " >&6; }
13384if ${gt_cv_locale_zh_CN+:} false; then :
13385  $as_echo_n "(cached) " >&6
13386else
13387
13388    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13389/* end confdefs.h.  */
13390
13391#include <locale.h>
13392#include <stdlib.h>
13393#include <time.h>
13394#if HAVE_LANGINFO_CODESET
13395# include <langinfo.h>
13396#endif
13397#include <stdlib.h>
13398#include <string.h>
13399struct tm t;
13400char buf[16];
13401int main ()
13402{
13403  const char *p;
13404  /* Check whether the given locale name is recognized by the system.  */
13405#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
13406  /* On native Windows, setlocale(category, "") looks at the system settings,
13407     not at the environment variables.  Also, when an encoding suffix such
13408     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
13409     category of the locale to "C".  */
13410  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
13411      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
13412    return 1;
13413#else
13414  if (setlocale (LC_ALL, "") == NULL) return 1;
13415#endif
13416  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
13417     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
13418     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
13419     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
13420     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
13421     some unit tests fail.
13422     On MirBSD 10, when an unsupported locale is specified, setlocale()
13423     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
13424#if HAVE_LANGINFO_CODESET
13425  {
13426    const char *cs = nl_langinfo (CODESET);
13427    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
13428        || strcmp (cs, "UTF-8") == 0)
13429      return 1;
13430  }
13431#endif
13432#ifdef __CYGWIN__
13433  /* On Cygwin, avoid locale names without encoding suffix, because the
13434     locale_charset() function relies on the encoding suffix.  Note that
13435     LC_ALL is set on the command line.  */
13436  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
13437#endif
13438  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
13439     This excludes the UTF-8 encoding (except on MirBSD).  */
13440  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
13441  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
13442  for (p = buf; *p != '\0'; p++)
13443    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
13444      return 1;
13445  /* Check whether a typical GB18030 multibyte sequence is recognized as a
13446     single wide character.  This excludes the GB2312 and GBK encodings.  */
13447  if (mblen ("\203\062\332\066", 5) != 4)
13448    return 1;
13449  return 0;
13450}
13451
13452_ACEOF
13453    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13454  (eval $ac_link) 2>&5
13455  ac_status=$?
13456  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13457  test $ac_status = 0; } && test -s conftest$ac_exeext; then
13458      case "$host_os" in
13459        # Handle native Windows specially, because there setlocale() interprets
13460        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
13461        # "fr" or "fra" as "French" or "French_France.1252",
13462        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
13463        # "ja" as "Japanese" or "Japanese_Japan.932",
13464        # and similar.
13465        mingw*)
13466          # Test for the hypothetical native Windows locale name.
13467          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13468            gt_cv_locale_zh_CN=Chinese_China.54936
13469          else
13470            # None found.
13471            gt_cv_locale_zh_CN=none
13472          fi
13473          ;;
13474        solaris2.8)
13475          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
13476          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
13477          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
13478          gt_cv_locale_zh_CN=none
13479          ;;
13480        *)
13481          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
13482          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
13483          # configure script would override the LC_ALL setting. Likewise for
13484          # LC_CTYPE, which is also set at the beginning of the configure script.
13485          # Test for the locale name without encoding suffix.
13486          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13487            gt_cv_locale_zh_CN=zh_CN
13488          else
13489            # Test for the locale name with explicit encoding suffix.
13490            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13491              gt_cv_locale_zh_CN=zh_CN.GB18030
13492            else
13493              # None found.
13494              gt_cv_locale_zh_CN=none
13495            fi
13496          fi
13497          ;;
13498      esac
13499    else
13500      # If there was a link error, due to mblen(), the system is so old that
13501      # it certainly doesn't have a chinese locale.
13502      gt_cv_locale_zh_CN=none
13503    fi
13504    rm -fr conftest*
13505
13506fi
13507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
13508$as_echo "$gt_cv_locale_zh_CN" >&6; }
13509  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
13510
13511
13512
13513
13514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
13515$as_echo_n "checking for a french Unicode locale... " >&6; }
13516if ${gt_cv_locale_fr_utf8+:} false; then :
13517  $as_echo_n "(cached) " >&6
13518else
13519
13520    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13521/* end confdefs.h.  */
13522
13523#include <locale.h>
13524#include <time.h>
13525#if HAVE_LANGINFO_CODESET
13526# include <langinfo.h>
13527#endif
13528#include <stdlib.h>
13529#include <string.h>
13530struct tm t;
13531char buf[16];
13532int main () {
13533  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
13534     imitates locale dependent behaviour by looking at the environment
13535     variables, and all locales use the UTF-8 encoding.  */
13536#if !(defined __BEOS__ || defined __HAIKU__)
13537  /* Check whether the given locale name is recognized by the system.  */
13538# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
13539  /* On native Windows, setlocale(category, "") looks at the system settings,
13540     not at the environment variables.  Also, when an encoding suffix such
13541     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
13542     category of the locale to "C".  */
13543  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
13544      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
13545    return 1;
13546# else
13547  if (setlocale (LC_ALL, "") == NULL) return 1;
13548# endif
13549  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
13550     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
13551     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
13552     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
13553     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
13554     some unit tests fail.  */
13555# if HAVE_LANGINFO_CODESET
13556  {
13557    const char *cs = nl_langinfo (CODESET);
13558    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
13559      return 1;
13560  }
13561# endif
13562# ifdef __CYGWIN__
13563  /* On Cygwin, avoid locale names without encoding suffix, because the
13564     locale_charset() function relies on the encoding suffix.  Note that
13565     LC_ALL is set on the command line.  */
13566  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
13567# endif
13568  /* Check whether in the abbreviation of the second month, the second
13569     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
13570     two bytes long, with UTF-8 encoding.  */
13571  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
13572  if (strftime (buf, sizeof (buf), "%b", &t) < 4
13573      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
13574    return 1;
13575#endif
13576#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
13577  /* Check whether the decimal separator is a comma.
13578     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
13579     are nl_langinfo(RADIXCHAR) are both ".".  */
13580  if (localeconv () ->decimal_point[0] != ',') return 1;
13581#endif
13582  return 0;
13583}
13584
13585_ACEOF
13586    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13587  (eval $ac_link) 2>&5
13588  ac_status=$?
13589  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13590  test $ac_status = 0; } && test -s conftest$ac_exeext; then
13591      case "$host_os" in
13592        # Handle native Windows specially, because there setlocale() interprets
13593        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
13594        # "fr" or "fra" as "French" or "French_France.1252",
13595        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
13596        # "ja" as "Japanese" or "Japanese_Japan.932",
13597        # and similar.
13598        mingw*)
13599          # Test for the hypothetical native Windows locale name.
13600          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13601            gt_cv_locale_fr_utf8=French_France.65001
13602          else
13603            # None found.
13604            gt_cv_locale_fr_utf8=none
13605          fi
13606          ;;
13607        *)
13608          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
13609          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
13610          # configure script would override the LC_ALL setting. Likewise for
13611          # LC_CTYPE, which is also set at the beginning of the configure script.
13612          # Test for the usual locale name.
13613          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13614            gt_cv_locale_fr_utf8=fr_FR
13615          else
13616            # Test for the locale name with explicit encoding suffix.
13617            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13618              gt_cv_locale_fr_utf8=fr_FR.UTF-8
13619            else
13620              # Test for the Solaris 7 locale name.
13621              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13622                gt_cv_locale_fr_utf8=fr.UTF-8
13623              else
13624                # None found.
13625                gt_cv_locale_fr_utf8=none
13626              fi
13627            fi
13628          fi
13629          ;;
13630      esac
13631    fi
13632    rm -fr conftest*
13633
13634fi
13635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
13636$as_echo "$gt_cv_locale_fr_utf8" >&6; }
13637  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
13638
13639
13640
13641
13642
13643  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
13644$as_echo_n "checking for a traditional french locale... " >&6; }
13645if ${gt_cv_locale_fr+:} false; then :
13646  $as_echo_n "(cached) " >&6
13647else
13648
13649    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13650/* end confdefs.h.  */
13651
13652#include <locale.h>
13653#include <time.h>
13654#if HAVE_LANGINFO_CODESET
13655# include <langinfo.h>
13656#endif
13657#include <stdlib.h>
13658#include <string.h>
13659struct tm t;
13660char buf[16];
13661int main () {
13662  /* Check whether the given locale name is recognized by the system.  */
13663#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
13664  /* On native Windows, setlocale(category, "") looks at the system settings,
13665     not at the environment variables.  Also, when an encoding suffix such
13666     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
13667     category of the locale to "C".  */
13668  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
13669      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
13670    return 1;
13671#else
13672  if (setlocale (LC_ALL, "") == NULL) return 1;
13673#endif
13674  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
13675     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
13676     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
13677     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
13678     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
13679     some unit tests fail.
13680     On MirBSD 10, when an unsupported locale is specified, setlocale()
13681     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
13682#if HAVE_LANGINFO_CODESET
13683  {
13684    const char *cs = nl_langinfo (CODESET);
13685    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
13686        || strcmp (cs, "UTF-8") == 0)
13687      return 1;
13688  }
13689#endif
13690#ifdef __CYGWIN__
13691  /* On Cygwin, avoid locale names without encoding suffix, because the
13692     locale_charset() function relies on the encoding suffix.  Note that
13693     LC_ALL is set on the command line.  */
13694  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
13695#endif
13696  /* Check whether in the abbreviation of the second month, the second
13697     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
13698     one byte long. This excludes the UTF-8 encoding.  */
13699  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
13700  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
13701#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
13702  /* Check whether the decimal separator is a comma.
13703     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
13704     are nl_langinfo(RADIXCHAR) are both ".".  */
13705  if (localeconv () ->decimal_point[0] != ',') return 1;
13706#endif
13707  return 0;
13708}
13709
13710_ACEOF
13711    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13712  (eval $ac_link) 2>&5
13713  ac_status=$?
13714  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13715  test $ac_status = 0; } && test -s conftest$ac_exeext; then
13716      case "$host_os" in
13717        # Handle native Windows specially, because there setlocale() interprets
13718        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
13719        # "fr" or "fra" as "French" or "French_France.1252",
13720        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
13721        # "ja" as "Japanese" or "Japanese_Japan.932",
13722        # and similar.
13723        mingw*)
13724          # Test for the native Windows locale name.
13725          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13726            gt_cv_locale_fr=French_France.1252
13727          else
13728            # None found.
13729            gt_cv_locale_fr=none
13730          fi
13731          ;;
13732        *)
13733          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
13734          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
13735          # configure script would override the LC_ALL setting. Likewise for
13736          # LC_CTYPE, which is also set at the beginning of the configure script.
13737          # Test for the usual locale name.
13738          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13739            gt_cv_locale_fr=fr_FR
13740          else
13741            # Test for the locale name with explicit encoding suffix.
13742            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13743              gt_cv_locale_fr=fr_FR.ISO-8859-1
13744            else
13745              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
13746              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13747                gt_cv_locale_fr=fr_FR.ISO8859-1
13748              else
13749                # Test for the HP-UX locale name.
13750                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13751                  gt_cv_locale_fr=fr_FR.iso88591
13752                else
13753                  # Test for the Solaris 7 locale name.
13754                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13755                    gt_cv_locale_fr=fr
13756                  else
13757                    # None found.
13758                    gt_cv_locale_fr=none
13759                  fi
13760                fi
13761              fi
13762            fi
13763          fi
13764          ;;
13765      esac
13766    fi
13767    rm -fr conftest*
13768
13769fi
13770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
13771$as_echo "$gt_cv_locale_fr" >&6; }
13772  LOCALE_FR=$gt_cv_locale_fr
13773
13774
13775
13776
13777
13778
13779
13780  GNULIB_FFSL=0;
13781  GNULIB_FFSLL=0;
13782  GNULIB_MEMCHR=0;
13783  GNULIB_MEMMEM=0;
13784  GNULIB_MEMPCPY=0;
13785  GNULIB_MEMRCHR=0;
13786  GNULIB_RAWMEMCHR=0;
13787  GNULIB_STPCPY=0;
13788  GNULIB_STPNCPY=0;
13789  GNULIB_STRCHRNUL=0;
13790  GNULIB_STRDUP=0;
13791  GNULIB_STRNCAT=0;
13792  GNULIB_STRNDUP=0;
13793  GNULIB_STRNLEN=0;
13794  GNULIB_STRPBRK=0;
13795  GNULIB_STRSEP=0;
13796  GNULIB_STRSTR=0;
13797  GNULIB_STRCASESTR=0;
13798  GNULIB_STRTOK_R=0;
13799  GNULIB_MBSLEN=0;
13800  GNULIB_MBSNLEN=0;
13801  GNULIB_MBSCHR=0;
13802  GNULIB_MBSRCHR=0;
13803  GNULIB_MBSSTR=0;
13804  GNULIB_MBSCASECMP=0;
13805  GNULIB_MBSNCASECMP=0;
13806  GNULIB_MBSPCASECMP=0;
13807  GNULIB_MBSCASESTR=0;
13808  GNULIB_MBSCSPN=0;
13809  GNULIB_MBSPBRK=0;
13810  GNULIB_MBSSPN=0;
13811  GNULIB_MBSSEP=0;
13812  GNULIB_MBSTOK_R=0;
13813  GNULIB_STRERROR=0;
13814  GNULIB_STRERROR_R=0;
13815  GNULIB_STRSIGNAL=0;
13816  GNULIB_STRVERSCMP=0;
13817  HAVE_MBSLEN=0;
13818    HAVE_FFSL=1;
13819  HAVE_FFSLL=1;
13820  HAVE_MEMCHR=1;
13821  HAVE_DECL_MEMMEM=1;
13822  HAVE_MEMPCPY=1;
13823  HAVE_DECL_MEMRCHR=1;
13824  HAVE_RAWMEMCHR=1;
13825  HAVE_STPCPY=1;
13826  HAVE_STPNCPY=1;
13827  HAVE_STRCHRNUL=1;
13828  HAVE_DECL_STRDUP=1;
13829  HAVE_DECL_STRNDUP=1;
13830  HAVE_DECL_STRNLEN=1;
13831  HAVE_STRPBRK=1;
13832  HAVE_STRSEP=1;
13833  HAVE_STRCASESTR=1;
13834  HAVE_DECL_STRTOK_R=1;
13835  HAVE_DECL_STRERROR_R=1;
13836  HAVE_DECL_STRSIGNAL=1;
13837  HAVE_STRVERSCMP=1;
13838  REPLACE_MEMCHR=0;
13839  REPLACE_MEMMEM=0;
13840  REPLACE_STPNCPY=0;
13841  REPLACE_STRDUP=0;
13842  REPLACE_STRSTR=0;
13843  REPLACE_STRCASESTR=0;
13844  REPLACE_STRCHRNUL=0;
13845  REPLACE_STRERROR=0;
13846  REPLACE_STRERROR_R=0;
13847  REPLACE_STRNCAT=0;
13848  REPLACE_STRNDUP=0;
13849  REPLACE_STRNLEN=0;
13850  REPLACE_STRSIGNAL=0;
13851  REPLACE_STRTOK_R=0;
13852  UNDEFINE_STRTOK_R=0;
13853
13854
13855
13856
13857
13858  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
13859  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
13860  # irrelevant for anonymous mappings.
13861  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
13862if test "x$ac_cv_func_mmap" = xyes; then :
13863  gl_have_mmap=yes
13864else
13865  gl_have_mmap=no
13866fi
13867
13868
13869  # Try to allow MAP_ANONYMOUS.
13870  gl_have_mmap_anonymous=no
13871  if test $gl_have_mmap = yes; then
13872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
13873$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
13874    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13875/* end confdefs.h.  */
13876
13877#include <sys/mman.h>
13878#ifdef MAP_ANONYMOUS
13879    I cannot identify this map
13880#endif
13881
13882_ACEOF
13883if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13884  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
13885  gl_have_mmap_anonymous=yes
13886fi
13887rm -f conftest*
13888
13889    if test $gl_have_mmap_anonymous != yes; then
13890      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13891/* end confdefs.h.  */
13892
13893#include <sys/mman.h>
13894#ifdef MAP_ANON
13895    I cannot identify this map
13896#endif
13897
13898_ACEOF
13899if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13900  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
13901
13902$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
13903
13904         gl_have_mmap_anonymous=yes
13905fi
13906rm -f conftest*
13907
13908    fi
13909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
13910$as_echo "$gl_have_mmap_anonymous" >&6; }
13911    if test $gl_have_mmap_anonymous = yes; then
13912
13913$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
13914
13915    fi
13916  fi
13917
13918
13919
13920
13921
13922
13923  if test $HAVE_MEMCHR = 1; then
13924    # Detect platform-specific bugs in some versions of glibc:
13925    # memchr should not dereference anything with length 0
13926    #   http://bugzilla.redhat.com/499689
13927    # memchr should not dereference overestimated length after a match
13928    #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
13929    #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
13930    # Assume that memchr works on platforms that lack mprotect.
13931    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
13932$as_echo_n "checking whether memchr works... " >&6; }
13933if ${gl_cv_func_memchr_works+:} false; then :
13934  $as_echo_n "(cached) " >&6
13935else
13936  if test "$cross_compiling" = yes; then :
13937         gl_cv_func_memchr_works="guessing no"
13938else
13939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13940/* end confdefs.h.  */
13941
13942#include <string.h>
13943#if HAVE_SYS_MMAN_H
13944# include <fcntl.h>
13945# include <unistd.h>
13946# include <sys/types.h>
13947# include <sys/mman.h>
13948# ifndef MAP_FILE
13949#  define MAP_FILE 0
13950# endif
13951#endif
13952
13953int
13954main ()
13955{
13956
13957  int result = 0;
13958  char *fence = NULL;
13959#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
13960# if HAVE_MAP_ANONYMOUS
13961  const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
13962  const int fd = -1;
13963# else /* !HAVE_MAP_ANONYMOUS */
13964  const int flags = MAP_FILE | MAP_PRIVATE;
13965  int fd = open ("/dev/zero", O_RDONLY, 0666);
13966  if (fd >= 0)
13967# endif
13968    {
13969      int pagesize = getpagesize ();
13970      char *two_pages =
13971        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
13972                       flags, fd, 0);
13973      if (two_pages != (char *)(-1)
13974          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
13975        fence = two_pages + pagesize;
13976    }
13977#endif
13978  if (fence)
13979    {
13980      if (memchr (fence, 0, 0))
13981        result |= 1;
13982      strcpy (fence - 9, "12345678");
13983      if (memchr (fence - 9, 0, 79) != fence - 1)
13984        result |= 2;
13985      if (memchr (fence - 1, 0, 3) != fence - 1)
13986        result |= 4;
13987    }
13988  return result;
13989
13990  ;
13991  return 0;
13992}
13993_ACEOF
13994if ac_fn_c_try_run "$LINENO"; then :
13995  gl_cv_func_memchr_works=yes
13996else
13997  gl_cv_func_memchr_works=no
13998fi
13999rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14000  conftest.$ac_objext conftest.beam conftest.$ac_ext
14001fi
14002
14003fi
14004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
14005$as_echo "$gl_cv_func_memchr_works" >&6; }
14006    if test "$gl_cv_func_memchr_works" != yes; then
14007      REPLACE_MEMCHR=1
14008    fi
14009  fi
14010
14011ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
14012if test "x$ac_cv_have_decl_memrchr" = xyes; then :
14013  ac_have_decl=1
14014else
14015  ac_have_decl=0
14016fi
14017
14018cat >>confdefs.h <<_ACEOF
14019#define HAVE_DECL_MEMRCHR $ac_have_decl
14020_ACEOF
14021
14022
14023
14024
14025
14026  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
14027$as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
14028if ${gl_cv_minmax_in_limits_h+:} false; then :
14029  $as_echo_n "(cached) " >&6
14030else
14031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14032/* end confdefs.h.  */
14033#include <limits.h>
14034            int x = MIN (42, 17);
14035int
14036main ()
14037{
14038
14039  ;
14040  return 0;
14041}
14042_ACEOF
14043if ac_fn_c_try_compile "$LINENO"; then :
14044  gl_cv_minmax_in_limits_h=yes
14045else
14046  gl_cv_minmax_in_limits_h=no
14047fi
14048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14049fi
14050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
14051$as_echo "$gl_cv_minmax_in_limits_h" >&6; }
14052  if test $gl_cv_minmax_in_limits_h = yes; then
14053
14054$as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
14055
14056  fi
14057
14058
14059
14060
14061
14062
14063  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
14064$as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
14065if ${gl_cv_minmax_in_sys_param_h+:} false; then :
14066  $as_echo_n "(cached) " >&6
14067else
14068  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14069/* end confdefs.h.  */
14070#include <sys/param.h>
14071            int x = MIN (42, 17);
14072int
14073main ()
14074{
14075
14076  ;
14077  return 0;
14078}
14079_ACEOF
14080if ac_fn_c_try_compile "$LINENO"; then :
14081  gl_cv_minmax_in_sys_param_h=yes
14082else
14083  gl_cv_minmax_in_sys_param_h=no
14084fi
14085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14086fi
14087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
14088$as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
14089  if test $gl_cv_minmax_in_sys_param_h = yes; then
14090
14091$as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
14092
14093  fi
14094
14095
14096
14097
14098
14099  GNULIB_MKTIME=0;
14100  GNULIB_NANOSLEEP=0;
14101  GNULIB_STRPTIME=0;
14102  GNULIB_TIMEGM=0;
14103  GNULIB_TIME_R=0;
14104  GNULIB_TIME_RZ=0;
14105    HAVE_DECL_LOCALTIME_R=1;
14106  HAVE_NANOSLEEP=1;
14107  HAVE_STRPTIME=1;
14108  HAVE_TIMEGM=1;
14109        REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
14110  REPLACE_MKTIME=GNULIB_PORTCHECK;
14111  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
14112  REPLACE_TIMEGM=GNULIB_PORTCHECK;
14113
14114      : ${GNULIB_GETTIMEOFDAY=0};
14115        REPLACE_GMTIME=0;
14116  REPLACE_LOCALTIME=0;
14117
14118
14119  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time_t is signed" >&5
14120$as_echo_n "checking whether time_t is signed... " >&6; }
14121if ${gl_cv_time_t_is_signed+:} false; then :
14122  $as_echo_n "(cached) " >&6
14123else
14124  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14125/* end confdefs.h.  */
14126#include <time.h>
14127                          char time_t_signed[(time_t) -1 < 0 ? 1 : -1];
14128int
14129main ()
14130{
14131
14132  ;
14133  return 0;
14134}
14135_ACEOF
14136if ac_fn_c_try_compile "$LINENO"; then :
14137  gl_cv_time_t_is_signed=yes
14138else
14139  gl_cv_time_t_is_signed=no
14140fi
14141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14142fi
14143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_t_is_signed" >&5
14144$as_echo "$gl_cv_time_t_is_signed" >&6; }
14145  if test $gl_cv_time_t_is_signed = yes; then
14146
14147$as_echo "#define TIME_T_IS_SIGNED 1" >>confdefs.h
14148
14149  fi
14150
14151ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
14152if test "x$ac_cv_have_decl_alarm" = xyes; then :
14153  ac_have_decl=1
14154else
14155  ac_have_decl=0
14156fi
14157
14158cat >>confdefs.h <<_ACEOF
14159#define HAVE_DECL_ALARM $ac_have_decl
14160_ACEOF
14161
14162
14163
14164
14165
14166
14167
14168
14169  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
14170$as_echo_n "checking for promoted mode_t type... " >&6; }
14171if ${gl_cv_promoted_mode_t+:} false; then :
14172  $as_echo_n "(cached) " >&6
14173else
14174
14175                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14176/* end confdefs.h.  */
14177#include <sys/types.h>
14178int
14179main ()
14180{
14181typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
14182  ;
14183  return 0;
14184}
14185_ACEOF
14186if ac_fn_c_try_compile "$LINENO"; then :
14187  gl_cv_promoted_mode_t='int'
14188else
14189  gl_cv_promoted_mode_t='mode_t'
14190fi
14191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14192
14193fi
14194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
14195$as_echo "$gl_cv_promoted_mode_t" >&6; }
14196
14197cat >>confdefs.h <<_ACEOF
14198#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
14199_ACEOF
14200
14201
14202
14203
14204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
14205$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
14206if ${ac_cv_header_stdbool_h+:} false; then :
14207  $as_echo_n "(cached) " >&6
14208else
14209  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14210/* end confdefs.h.  */
14211
14212             #include <stdbool.h>
14213
14214             #ifdef __cplusplus
14215              typedef bool Bool;
14216             #else
14217              typedef _Bool Bool;
14218              #ifndef bool
14219               "error: bool is not defined"
14220              #endif
14221              #ifndef false
14222               "error: false is not defined"
14223              #endif
14224              #if false
14225               "error: false is not 0"
14226              #endif
14227              #ifndef true
14228               "error: true is not defined"
14229              #endif
14230              #if true != 1
14231               "error: true is not 1"
14232              #endif
14233             #endif
14234
14235             #ifndef __bool_true_false_are_defined
14236              "error: __bool_true_false_are_defined is not defined"
14237             #endif
14238
14239             struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
14240
14241             char a[true == 1 ? 1 : -1];
14242             char b[false == 0 ? 1 : -1];
14243             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
14244             char d[(bool) 0.5 == true ? 1 : -1];
14245             /* See body of main program for 'e'.  */
14246             char f[(Bool) 0.0 == false ? 1 : -1];
14247             char g[true];
14248             char h[sizeof (Bool)];
14249             char i[sizeof s.t];
14250             enum { j = false, k = true, l = false * true, m = true * 256 };
14251             /* The following fails for
14252                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
14253             Bool n[m];
14254             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
14255             char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
14256             /* Catch a bug in an HP-UX C compiler.  See
14257                http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
14258                http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
14259              */
14260             Bool q = true;
14261             Bool *pq = &q;
14262             bool *qq = &q;
14263
14264int
14265main ()
14266{
14267
14268             bool e = &s;
14269             *pq |= q; *pq |= ! q;
14270             *qq |= q; *qq |= ! q;
14271             /* Refer to every declared value, to avoid compiler optimizations.  */
14272             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
14273                     + !m + !n + !o + !p + !q + !pq + !qq);
14274
14275  ;
14276  return 0;
14277}
14278_ACEOF
14279if ac_fn_c_try_compile "$LINENO"; then :
14280  ac_cv_header_stdbool_h=yes
14281else
14282  ac_cv_header_stdbool_h=no
14283fi
14284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14285fi
14286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
14287$as_echo "$ac_cv_header_stdbool_h" >&6; }
14288   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
14289if test "x$ac_cv_type__Bool" = xyes; then :
14290
14291cat >>confdefs.h <<_ACEOF
14292#define HAVE__BOOL 1
14293_ACEOF
14294
14295
14296fi
14297
14298
14299
14300
14301
14302  # Define two additional variables used in the Makefile substitution.
14303
14304  if test "$ac_cv_header_stdbool_h" = yes; then
14305    STDBOOL_H=''
14306  else
14307    STDBOOL_H='stdbool.h'
14308  fi
14309
14310   if test -n "$STDBOOL_H"; then
14311  GL_GENERATE_STDBOOL_H_TRUE=
14312  GL_GENERATE_STDBOOL_H_FALSE='#'
14313else
14314  GL_GENERATE_STDBOOL_H_TRUE='#'
14315  GL_GENERATE_STDBOOL_H_FALSE=
14316fi
14317
14318
14319  if test "$ac_cv_type__Bool" = yes; then
14320    HAVE__BOOL=1
14321  else
14322    HAVE__BOOL=0
14323  fi
14324
14325
14326
14327  # parse-datetime.y works with bison only.
14328  : ${YACC='bison -y'}
14329
14330
14331  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5
14332$as_echo_n "checking for compound literals... " >&6; }
14333if ${gl_cv_compound_literals+:} false; then :
14334  $as_echo_n "(cached) " >&6
14335else
14336  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14337/* end confdefs.h.  */
14338struct s { int i, j; };
14339int
14340main ()
14341{
14342struct s t = (struct s) { 3, 4 };
14343        if (t.i != 0) return 0;
14344  ;
14345  return 0;
14346}
14347_ACEOF
14348if ac_fn_c_try_compile "$LINENO"; then :
14349  gl_cv_compound_literals=yes
14350else
14351  gl_cv_compound_literals=no
14352fi
14353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14354fi
14355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5
14356$as_echo "$gl_cv_compound_literals" >&6; }
14357  if test $gl_cv_compound_literals = yes; then
14358
14359$as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h
14360
14361  fi
14362
14363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14364$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14365if ${ac_cv_struct_tm+:} false; then :
14366  $as_echo_n "(cached) " >&6
14367else
14368  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14369/* end confdefs.h.  */
14370#include <sys/types.h>
14371#include <time.h>
14372
14373int
14374main ()
14375{
14376struct tm tm;
14377				     int *p = &tm.tm_sec;
14378				     return !p;
14379  ;
14380  return 0;
14381}
14382_ACEOF
14383if ac_fn_c_try_compile "$LINENO"; then :
14384  ac_cv_struct_tm=time.h
14385else
14386  ac_cv_struct_tm=sys/time.h
14387fi
14388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14389fi
14390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14391$as_echo "$ac_cv_struct_tm" >&6; }
14392if test $ac_cv_struct_tm = sys/time.h; then
14393
14394$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14395
14396fi
14397
14398
14399 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
14400"
14401if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then :
14402
14403$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
14404
14405fi
14406
14407
14408
14409  GNULIB_PTHREAD_SIGMASK=0;
14410  GNULIB_RAISE=0;
14411  GNULIB_SIGNAL_H_SIGPIPE=0;
14412  GNULIB_SIGPROCMASK=0;
14413  GNULIB_SIGACTION=0;
14414    HAVE_POSIX_SIGNALBLOCKING=1;
14415  HAVE_PTHREAD_SIGMASK=1;
14416  HAVE_RAISE=1;
14417  HAVE_SIGSET_T=1;
14418  HAVE_SIGINFO_T=1;
14419  HAVE_SIGACTION=1;
14420  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
14421
14422  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
14423
14424  HAVE_SIGHANDLER_T=1;
14425  REPLACE_PTHREAD_SIGMASK=0;
14426  REPLACE_RAISE=0;
14427
14428
14429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
14430$as_echo_n "checking for ssize_t... " >&6; }
14431if ${gt_cv_ssize_t+:} false; then :
14432  $as_echo_n "(cached) " >&6
14433else
14434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14435/* end confdefs.h.  */
14436#include <sys/types.h>
14437int
14438main ()
14439{
14440int x = sizeof (ssize_t *) + sizeof (ssize_t);
14441            return !x;
14442  ;
14443  return 0;
14444}
14445_ACEOF
14446if ac_fn_c_try_compile "$LINENO"; then :
14447  gt_cv_ssize_t=yes
14448else
14449  gt_cv_ssize_t=no
14450fi
14451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14452fi
14453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
14454$as_echo "$gt_cv_ssize_t" >&6; }
14455  if test $gt_cv_ssize_t = no; then
14456
14457$as_echo "#define ssize_t int" >>confdefs.h
14458
14459  fi
14460
14461ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
14462if test "x$ac_cv_have_decl_setenv" = xyes; then :
14463  ac_have_decl=1
14464else
14465  ac_have_decl=0
14466fi
14467
14468cat >>confdefs.h <<_ACEOF
14469#define HAVE_DECL_SETENV $ac_have_decl
14470_ACEOF
14471
14472
14473
14474
14475
14476
14477  if test $ac_cv_have_decl_setenv = no; then
14478    HAVE_DECL_SETENV=0
14479  fi
14480
14481
14482
14483
14484
14485  for ac_header in search.h
14486do :
14487  ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
14488if test "x$ac_cv_header_search_h" = xyes; then :
14489  cat >>confdefs.h <<_ACEOF
14490#define HAVE_SEARCH_H 1
14491_ACEOF
14492
14493fi
14494
14495done
14496
14497  for ac_func in tsearch
14498do :
14499  ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
14500if test "x$ac_cv_func_tsearch" = xyes; then :
14501  cat >>confdefs.h <<_ACEOF
14502#define HAVE_TSEARCH 1
14503_ACEOF
14504
14505fi
14506done
14507
14508
14509
14510
14511  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
14512      #include <signal.h>
14513      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
14514      #include <sys/types.h>
14515
14516"
14517if test "x$ac_cv_type_sigset_t" = xyes; then :
14518
14519cat >>confdefs.h <<_ACEOF
14520#define HAVE_SIGSET_T 1
14521_ACEOF
14522
14523gl_cv_type_sigset_t=yes
14524else
14525  gl_cv_type_sigset_t=no
14526fi
14527
14528  if test $gl_cv_type_sigset_t != yes; then
14529    HAVE_SIGSET_T=0
14530  fi
14531
14532
14533
14534
14535    REPLACE_NULL=0;
14536  HAVE_MAX_ALIGN_T=1;
14537  HAVE_WCHAR_T=1;
14538
14539
14540  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
14541$as_echo_n "checking for wchar_t... " >&6; }
14542if ${gt_cv_c_wchar_t+:} false; then :
14543  $as_echo_n "(cached) " >&6
14544else
14545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14546/* end confdefs.h.  */
14547#include <stddef.h>
14548            wchar_t foo = (wchar_t)'\0';
14549int
14550main ()
14551{
14552
14553  ;
14554  return 0;
14555}
14556_ACEOF
14557if ac_fn_c_try_compile "$LINENO"; then :
14558  gt_cv_c_wchar_t=yes
14559else
14560  gt_cv_c_wchar_t=no
14561fi
14562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14563fi
14564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
14565$as_echo "$gt_cv_c_wchar_t" >&6; }
14566  if test $gt_cv_c_wchar_t = yes; then
14567
14568$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
14569
14570  fi
14571
14572
14573  GNULIB_FFS=0;
14574    HAVE_FFS=1;
14575  HAVE_STRCASECMP=1;
14576  HAVE_DECL_STRNCASECMP=1;
14577
14578
14579
14580ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
14581if test "x$ac_cv_have_decl_strdup" = xyes; then :
14582  ac_have_decl=1
14583else
14584  ac_have_decl=0
14585fi
14586
14587cat >>confdefs.h <<_ACEOF
14588#define HAVE_DECL_STRDUP $ac_have_decl
14589_ACEOF
14590
14591
14592     REPLACE_STRERROR_0=0
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
14594$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
14595if ${gl_cv_func_strerror_0_works+:} false; then :
14596  $as_echo_n "(cached) " >&6
14597else
14598  if test "$cross_compiling" = yes; then :
14599  case "$host_os" in
14600                 # Guess yes on glibc systems.
14601         *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
14602                 # If we don't know, assume the worst.
14603         *)      gl_cv_func_strerror_0_works="guessing no" ;;
14604       esac
14605
14606else
14607  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14608/* end confdefs.h.  */
14609#include <string.h>
14610           #include <errno.h>
14611
14612int
14613main ()
14614{
14615int result = 0;
14616           char *str;
14617           errno = 0;
14618           str = strerror (0);
14619           if (!*str) result |= 1;
14620           if (errno) result |= 2;
14621           if (strstr (str, "nknown") || strstr (str, "ndefined"))
14622             result |= 4;
14623           return result;
14624  ;
14625  return 0;
14626}
14627_ACEOF
14628if ac_fn_c_try_run "$LINENO"; then :
14629  gl_cv_func_strerror_0_works=yes
14630else
14631  gl_cv_func_strerror_0_works=no
14632fi
14633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14634  conftest.$ac_objext conftest.beam conftest.$ac_ext
14635fi
14636
14637
14638fi
14639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
14640$as_echo "$gl_cv_func_strerror_0_works" >&6; }
14641  case "$gl_cv_func_strerror_0_works" in
14642    *yes) ;;
14643    *)
14644      REPLACE_STRERROR_0=1
14645
14646$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
14647
14648      ;;
14649  esac
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662     if test $gl_cv_have_include_next = yes; then
14663       gl_cv_next_string_h='<'string.h'>'
14664     else
14665       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
14666$as_echo_n "checking absolute name of <string.h>... " >&6; }
14667if ${gl_cv_next_string_h+:} false; then :
14668  $as_echo_n "(cached) " >&6
14669else
14670
14671
14672
14673  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14674/* end confdefs.h.  */
14675#include <string.h>
14676_ACEOF
14677                case "$host_os" in
14678    aix*) gl_absname_cpp="$ac_cpp -C" ;;
14679    *)    gl_absname_cpp="$ac_cpp" ;;
14680  esac
14681
14682  case "$host_os" in
14683    mingw*)
14684                                          gl_dirsep_regex='[/\\]'
14685      ;;
14686    *)
14687      gl_dirsep_regex='\/'
14688      ;;
14689  esac
14690      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14691  gl_header_literal_regex=`echo 'string.h' \
14692                           | sed -e "$gl_make_literal_regex_sed"`
14693  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14694      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14695      s|^/[^/]|//&|
14696      p
14697      q
14698    }'
14699
14700        gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14701  sed -n "$gl_absolute_header_sed"`
14702
14703           gl_header=$gl_cv_absolute_string_h
14704           gl_cv_next_string_h='"'$gl_header'"'
14705
14706
14707fi
14708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
14709$as_echo "$gl_cv_next_string_h" >&6; }
14710     fi
14711     NEXT_STRING_H=$gl_cv_next_string_h
14712
14713     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14714       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14715       gl_next_as_first_directive='<'string.h'>'
14716     else
14717       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14718       gl_next_as_first_directive=$gl_cv_next_string_h
14719     fi
14720     NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
14721
14722
14723
14724
14725
14726
14727    for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul      strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r      strerror_r strsignal strverscmp; do
14728    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14729    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14730$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
14731if eval \${$as_gl_Symbol+:} false; then :
14732  $as_echo_n "(cached) " >&6
14733else
14734  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14735/* end confdefs.h.  */
14736#include <string.h>
14737
14738int
14739main ()
14740{
14741#undef $gl_func
14742  (void) $gl_func;
14743  ;
14744  return 0;
14745}
14746_ACEOF
14747if ac_fn_c_try_compile "$LINENO"; then :
14748  eval "$as_gl_Symbol=yes"
14749else
14750  eval "$as_gl_Symbol=no"
14751fi
14752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14753fi
14754eval ac_res=\$$as_gl_Symbol
14755	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14756$as_echo "$ac_res" >&6; }
14757    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
14758  cat >>confdefs.h <<_ACEOF
14759#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14760_ACEOF
14761
14762                     eval ac_cv_have_decl_$gl_func=yes
14763fi
14764      done
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781     if test $gl_cv_have_include_next = yes; then
14782       gl_cv_next_strings_h='<'strings.h'>'
14783     else
14784       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
14785$as_echo_n "checking absolute name of <strings.h>... " >&6; }
14786if ${gl_cv_next_strings_h+:} false; then :
14787  $as_echo_n "(cached) " >&6
14788else
14789
14790             if test $ac_cv_header_strings_h = yes; then
14791
14792
14793
14794
14795  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14796/* end confdefs.h.  */
14797#include <strings.h>
14798_ACEOF
14799                case "$host_os" in
14800    aix*) gl_absname_cpp="$ac_cpp -C" ;;
14801    *)    gl_absname_cpp="$ac_cpp" ;;
14802  esac
14803
14804  case "$host_os" in
14805    mingw*)
14806                                          gl_dirsep_regex='[/\\]'
14807      ;;
14808    *)
14809      gl_dirsep_regex='\/'
14810      ;;
14811  esac
14812      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14813  gl_header_literal_regex=`echo 'strings.h' \
14814                           | sed -e "$gl_make_literal_regex_sed"`
14815  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14816      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14817      s|^/[^/]|//&|
14818      p
14819      q
14820    }'
14821
14822        gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14823  sed -n "$gl_absolute_header_sed"`
14824
14825           gl_header=$gl_cv_absolute_strings_h
14826           gl_cv_next_strings_h='"'$gl_header'"'
14827          else
14828               gl_cv_next_strings_h='<'strings.h'>'
14829             fi
14830
14831
14832fi
14833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
14834$as_echo "$gl_cv_next_strings_h" >&6; }
14835     fi
14836     NEXT_STRINGS_H=$gl_cv_next_strings_h
14837
14838     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14839       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14840       gl_next_as_first_directive='<'strings.h'>'
14841     else
14842       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14843       gl_next_as_first_directive=$gl_cv_next_strings_h
14844     fi
14845     NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
14846
14847
14848
14849
14850  if test $ac_cv_header_strings_h = yes; then
14851    HAVE_STRINGS_H=1
14852  else
14853    HAVE_STRINGS_H=0
14854  fi
14855
14856
14857
14858    for gl_func in ffs strcasecmp strncasecmp; do
14859    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14861$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
14862if eval \${$as_gl_Symbol+:} false; then :
14863  $as_echo_n "(cached) " >&6
14864else
14865  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14866/* end confdefs.h.  */
14867
14868    /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
14869       <strings.h>.  */
14870    #include <sys/types.h>
14871    #include <strings.h>
14872
14873int
14874main ()
14875{
14876#undef $gl_func
14877  (void) $gl_func;
14878  ;
14879  return 0;
14880}
14881_ACEOF
14882if ac_fn_c_try_compile "$LINENO"; then :
14883  eval "$as_gl_Symbol=yes"
14884else
14885  eval "$as_gl_Symbol=no"
14886fi
14887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14888fi
14889eval ac_res=\$$as_gl_Symbol
14890	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14891$as_echo "$ac_res" >&6; }
14892    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
14893  cat >>confdefs.h <<_ACEOF
14894#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14895_ACEOF
14896
14897                     eval ac_cv_have_decl_$gl_func=yes
14898fi
14899      done
14900
14901
14902ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
14903if test "x$ac_cv_have_decl_strndup" = xyes; then :
14904  ac_have_decl=1
14905else
14906  ac_have_decl=0
14907fi
14908
14909cat >>confdefs.h <<_ACEOF
14910#define HAVE_DECL_STRNDUP $ac_have_decl
14911_ACEOF
14912
14913
14914
14915ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
14916if test "x$ac_cv_have_decl_strnlen" = xyes; then :
14917  ac_have_decl=1
14918else
14919  ac_have_decl=0
14920fi
14921
14922cat >>confdefs.h <<_ACEOF
14923#define HAVE_DECL_STRNLEN $ac_have_decl
14924_ACEOF
14925
14926
14927
14928
14929
14930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
14931$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
14932if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
14933  $as_echo_n "(cached) " >&6
14934else
14935  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14936/* end confdefs.h.  */
14937#include <time.h>
14938
14939int
14940main ()
14941{
14942static struct timespec x; x.tv_sec = x.tv_nsec;
14943  ;
14944  return 0;
14945}
14946_ACEOF
14947if ac_fn_c_try_compile "$LINENO"; then :
14948  gl_cv_sys_struct_timespec_in_time_h=yes
14949else
14950  gl_cv_sys_struct_timespec_in_time_h=no
14951fi
14952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14953fi
14954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
14955$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
14956
14957  TIME_H_DEFINES_STRUCT_TIMESPEC=0
14958  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
14959  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
14960  UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
14961  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
14962    TIME_H_DEFINES_STRUCT_TIMESPEC=1
14963  else
14964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
14965$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
14966if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
14967  $as_echo_n "(cached) " >&6
14968else
14969  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14970/* end confdefs.h.  */
14971#include <sys/time.h>
14972
14973int
14974main ()
14975{
14976static struct timespec x; x.tv_sec = x.tv_nsec;
14977  ;
14978  return 0;
14979}
14980_ACEOF
14981if ac_fn_c_try_compile "$LINENO"; then :
14982  gl_cv_sys_struct_timespec_in_sys_time_h=yes
14983else
14984  gl_cv_sys_struct_timespec_in_sys_time_h=no
14985fi
14986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14987fi
14988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
14989$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
14990    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
14991      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
14992    else
14993      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
14994$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
14995if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
14996  $as_echo_n "(cached) " >&6
14997else
14998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14999/* end confdefs.h.  */
15000#include <pthread.h>
15001
15002int
15003main ()
15004{
15005static struct timespec x; x.tv_sec = x.tv_nsec;
15006  ;
15007  return 0;
15008}
15009_ACEOF
15010if ac_fn_c_try_compile "$LINENO"; then :
15011  gl_cv_sys_struct_timespec_in_pthread_h=yes
15012else
15013  gl_cv_sys_struct_timespec_in_pthread_h=no
15014fi
15015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15016fi
15017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
15018$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
15019      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
15020        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
15021      else
15022        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
15023$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
15024if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
15025  $as_echo_n "(cached) " >&6
15026else
15027  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15028/* end confdefs.h.  */
15029#include <unistd.h>
15030
15031int
15032main ()
15033{
15034static struct timespec x; x.tv_sec = x.tv_nsec;
15035  ;
15036  return 0;
15037}
15038_ACEOF
15039if ac_fn_c_try_compile "$LINENO"; then :
15040  gl_cv_sys_struct_timespec_in_unistd_h=yes
15041else
15042  gl_cv_sys_struct_timespec_in_unistd_h=no
15043fi
15044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15045fi
15046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
15047$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
15048        if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
15049          UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
15050        fi
15051      fi
15052    fi
15053  fi
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070     if test $gl_cv_have_include_next = yes; then
15071       gl_cv_next_time_h='<'time.h'>'
15072     else
15073       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
15074$as_echo_n "checking absolute name of <time.h>... " >&6; }
15075if ${gl_cv_next_time_h+:} false; then :
15076  $as_echo_n "(cached) " >&6
15077else
15078
15079
15080
15081  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15082/* end confdefs.h.  */
15083#include <time.h>
15084_ACEOF
15085                case "$host_os" in
15086    aix*) gl_absname_cpp="$ac_cpp -C" ;;
15087    *)    gl_absname_cpp="$ac_cpp" ;;
15088  esac
15089
15090  case "$host_os" in
15091    mingw*)
15092                                          gl_dirsep_regex='[/\\]'
15093      ;;
15094    *)
15095      gl_dirsep_regex='\/'
15096      ;;
15097  esac
15098      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15099  gl_header_literal_regex=`echo 'time.h' \
15100                           | sed -e "$gl_make_literal_regex_sed"`
15101  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15102      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15103      s|^/[^/]|//&|
15104      p
15105      q
15106    }'
15107
15108        gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15109  sed -n "$gl_absolute_header_sed"`
15110
15111           gl_header=$gl_cv_absolute_time_h
15112           gl_cv_next_time_h='"'$gl_header'"'
15113
15114
15115fi
15116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
15117$as_echo "$gl_cv_next_time_h" >&6; }
15118     fi
15119     NEXT_TIME_H=$gl_cv_next_time_h
15120
15121     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15122       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15123       gl_next_as_first_directive='<'time.h'>'
15124     else
15125       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15126       gl_next_as_first_directive=$gl_cv_next_time_h
15127     fi
15128     NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
15142if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
15143  ac_have_decl=1
15144else
15145  ac_have_decl=0
15146fi
15147
15148cat >>confdefs.h <<_ACEOF
15149#define HAVE_DECL_UNSETENV $ac_have_decl
15150_ACEOF
15151
15152
15153  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
15154$as_echo_n "checking whether the utimes function works... " >&6; }
15155if ${gl_cv_func_working_utimes+:} false; then :
15156  $as_echo_n "(cached) " >&6
15157else
15158
15159  if test "$cross_compiling" = yes; then :
15160  gl_cv_func_working_utimes=no
15161else
15162  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15163/* end confdefs.h.  */
15164
15165#include <sys/types.h>
15166#include <sys/stat.h>
15167#include <fcntl.h>
15168#include <sys/time.h>
15169#include <time.h>
15170#include <unistd.h>
15171#include <stdlib.h>
15172#include <stdio.h>
15173#include <utime.h>
15174#include <errno.h>
15175
15176static int
15177inorder (time_t a, time_t b, time_t c)
15178{
15179  return a <= b && b <= c;
15180}
15181
15182int
15183main ()
15184{
15185  int result = 0;
15186  char const *file = "conftest.utimes";
15187  /* On OS/2, file timestamps must be on or after 1980 in local time,
15188     with an even number of seconds.  */
15189  static struct timeval timeval[2] = {{315620000 + 10, 10},
15190                                      {315620000 + 1000000, 999998}};
15191
15192  /* Test whether utimes() essentially works.  */
15193  {
15194    struct stat sbuf;
15195    FILE *f = fopen (file, "w");
15196    if (f == NULL)
15197      result |= 1;
15198    else if (fclose (f) != 0)
15199      result |= 1;
15200    else if (utimes (file, timeval) != 0)
15201      result |= 2;
15202    else if (lstat (file, &sbuf) != 0)
15203      result |= 1;
15204    else if (!(sbuf.st_atime == timeval[0].tv_sec
15205               && sbuf.st_mtime == timeval[1].tv_sec))
15206      result |= 4;
15207    if (unlink (file) != 0)
15208      result |= 1;
15209  }
15210
15211  /* Test whether utimes() with a NULL argument sets the file's timestamp
15212     to the current time.  Use 'fstat' as well as 'time' to
15213     determine the "current" time, to accommodate NFS file systems
15214     if there is a time skew between the host and the NFS server.  */
15215  {
15216    int fd = open (file, O_WRONLY|O_CREAT, 0644);
15217    if (fd < 0)
15218      result |= 1;
15219    else
15220      {
15221        time_t t0, t2;
15222        struct stat st0, st1, st2;
15223        if (time (&t0) == (time_t) -1)
15224          result |= 1;
15225        else if (fstat (fd, &st0) != 0)
15226          result |= 1;
15227        else if (utimes (file, timeval) != 0
15228                 && (errno != EACCES
15229                     /* OS/2 kLIBC utimes fails on opened files.  */
15230                     || close (fd) != 0
15231                     || utimes (file, timeval) != 0
15232                     || (fd = open (file, O_WRONLY)) < 0))
15233          result |= 2;
15234        else if (utimes (file, NULL) != 0
15235                 && (errno != EACCES
15236                     /* OS/2 kLIBC utimes fails on opened files.  */
15237                     || close (fd) != 0
15238                     || utimes (file, NULL) != 0
15239                     || (fd = open (file, O_WRONLY)) < 0))
15240          result |= 8;
15241        else if (fstat (fd, &st1) != 0)
15242          result |= 1;
15243        else if (write (fd, "\n", 1) != 1)
15244          result |= 1;
15245        else if (fstat (fd, &st2) != 0)
15246          result |= 1;
15247        else if (time (&t2) == (time_t) -1)
15248          result |= 1;
15249        else
15250          {
15251            int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
15252            int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
15253            if (! (st1.st_atime == st1.st_mtime))
15254              result |= 16;
15255            if (! (m_ok_POSIX || m_ok_NFS))
15256              result |= 32;
15257          }
15258        if (close (fd) != 0)
15259          result |= 1;
15260      }
15261    if (unlink (file) != 0)
15262      result |= 1;
15263  }
15264
15265  /* Test whether utimes() with a NULL argument works on read-only files.  */
15266  {
15267    int fd = open (file, O_WRONLY|O_CREAT, 0444);
15268    if (fd < 0)
15269      result |= 1;
15270    else if (close (fd) != 0)
15271      result |= 1;
15272    else if (utimes (file, NULL) != 0)
15273      result |= 64;
15274    if (unlink (file) != 0)
15275      result |= 1;
15276  }
15277
15278  return result;
15279}
15280
15281_ACEOF
15282if ac_fn_c_try_run "$LINENO"; then :
15283  gl_cv_func_working_utimes=yes
15284else
15285  gl_cv_func_working_utimes=no
15286fi
15287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15288  conftest.$ac_objext conftest.beam conftest.$ac_ext
15289fi
15290
15291fi
15292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
15293$as_echo "$gl_cv_func_working_utimes" >&6; }
15294
15295  if test $gl_cv_func_working_utimes = yes; then
15296
15297$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
15298
15299  fi
15300
15301
15302
15303
15304
15305  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
15306$as_echo_n "checking for struct utimbuf... " >&6; }
15307if ${gl_cv_sys_struct_utimbuf+:} false; then :
15308  $as_echo_n "(cached) " >&6
15309else
15310  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15311/* end confdefs.h.  */
15312#if HAVE_SYS_TIME_H
15313             #include <sys/time.h>
15314            #endif
15315            #include <time.h>
15316            #ifdef HAVE_UTIME_H
15317             #include <utime.h>
15318            #endif
15319
15320int
15321main ()
15322{
15323static struct utimbuf x; x.actime = x.modtime;
15324  ;
15325  return 0;
15326}
15327_ACEOF
15328if ac_fn_c_try_compile "$LINENO"; then :
15329  gl_cv_sys_struct_utimbuf=yes
15330else
15331  gl_cv_sys_struct_utimbuf=no
15332fi
15333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15334fi
15335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
15336$as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
15337
15338  if test $gl_cv_sys_struct_utimbuf = yes; then
15339
15340$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
15341
15342  fi
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358  if test $ac_cv_header_features_h = yes; then
15359    HAVE_FEATURES_H=1
15360  else
15361    HAVE_FEATURES_H=0
15362  fi
15363
15364
15365
15366  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
15367$as_echo_n "checking for inttypes.h... " >&6; }
15368if ${gl_cv_header_inttypes_h+:} false; then :
15369  $as_echo_n "(cached) " >&6
15370else
15371  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15372/* end confdefs.h.  */
15373
15374#include <sys/types.h>
15375#include <inttypes.h>
15376
15377int
15378main ()
15379{
15380uintmax_t i = (uintmax_t) -1; return !i;
15381  ;
15382  return 0;
15383}
15384_ACEOF
15385if ac_fn_c_try_compile "$LINENO"; then :
15386  gl_cv_header_inttypes_h=yes
15387else
15388  gl_cv_header_inttypes_h=no
15389fi
15390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15391fi
15392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
15393$as_echo "$gl_cv_header_inttypes_h" >&6; }
15394  if test $gl_cv_header_inttypes_h = yes; then
15395
15396cat >>confdefs.h <<_ACEOF
15397#define HAVE_INTTYPES_H_WITH_UINTMAX 1
15398_ACEOF
15399
15400  fi
15401
15402
15403  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
15404$as_echo_n "checking for stdint.h... " >&6; }
15405if ${gl_cv_header_stdint_h+:} false; then :
15406  $as_echo_n "(cached) " >&6
15407else
15408  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15409/* end confdefs.h.  */
15410#include <sys/types.h>
15411            #include <stdint.h>
15412int
15413main ()
15414{
15415uintmax_t i = (uintmax_t) -1; return !i;
15416  ;
15417  return 0;
15418}
15419_ACEOF
15420if ac_fn_c_try_compile "$LINENO"; then :
15421  gl_cv_header_stdint_h=yes
15422else
15423  gl_cv_header_stdint_h=no
15424fi
15425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15426fi
15427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
15428$as_echo "$gl_cv_header_stdint_h" >&6; }
15429  if test $gl_cv_header_stdint_h = yes; then
15430
15431cat >>confdefs.h <<_ACEOF
15432#define HAVE_STDINT_H_WITH_UINTMAX 1
15433_ACEOF
15434
15435  fi
15436
15437
15438
15439
15440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
15441$as_echo_n "checking for intmax_t... " >&6; }
15442if ${gt_cv_c_intmax_t+:} false; then :
15443  $as_echo_n "(cached) " >&6
15444else
15445  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15446/* end confdefs.h.  */
15447
15448#include <stddef.h>
15449#include <stdlib.h>
15450#if HAVE_STDINT_H_WITH_UINTMAX
15451#include <stdint.h>
15452#endif
15453#if HAVE_INTTYPES_H_WITH_UINTMAX
15454#include <inttypes.h>
15455#endif
15456
15457int
15458main ()
15459{
15460intmax_t x = -1; return !x;
15461  ;
15462  return 0;
15463}
15464_ACEOF
15465if ac_fn_c_try_compile "$LINENO"; then :
15466  gt_cv_c_intmax_t=yes
15467else
15468  gt_cv_c_intmax_t=no
15469fi
15470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15471fi
15472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
15473$as_echo "$gt_cv_c_intmax_t" >&6; }
15474  if test $gt_cv_c_intmax_t = yes; then
15475
15476$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
15477
15478  else
15479
15480    test $ac_cv_type_long_long_int = yes \
15481      && ac_type='long long' \
15482      || ac_type='long'
15483
15484cat >>confdefs.h <<_ACEOF
15485#define intmax_t $ac_type
15486_ACEOF
15487
15488  fi
15489
15490
15491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
15492$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
15493if ${gl_cv_cc_double_expbit0+:} false; then :
15494  $as_echo_n "(cached) " >&6
15495else
15496
15497      if test "$cross_compiling" = yes; then :
15498
15499                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15500/* end confdefs.h.  */
15501
15502#if defined arm || defined __arm || defined __arm__
15503  mixed_endianness
15504#endif
15505
15506_ACEOF
15507if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15508  $EGREP "mixed_endianness" >/dev/null 2>&1; then :
15509  gl_cv_cc_double_expbit0="unknown"
15510else
15511
15512                                                         :
15513if ${ac_cv_c_bigendian+:} false; then :
15514  $as_echo_n "(cached) " >&6
15515else
15516  ac_cv_c_bigendian=unknown
15517    # See if we're dealing with a universal compiler.
15518    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15519/* end confdefs.h.  */
15520#ifndef __APPLE_CC__
15521	       not a universal capable compiler
15522	     #endif
15523	     typedef int dummy;
15524
15525_ACEOF
15526if ac_fn_c_try_compile "$LINENO"; then :
15527
15528	# Check for potential -arch flags.  It is not universal unless
15529	# there are at least two -arch flags with different values.
15530	ac_arch=
15531	ac_prev=
15532	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15533	 if test -n "$ac_prev"; then
15534	   case $ac_word in
15535	     i?86 | x86_64 | ppc | ppc64)
15536	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15537		 ac_arch=$ac_word
15538	       else
15539		 ac_cv_c_bigendian=universal
15540		 break
15541	       fi
15542	       ;;
15543	   esac
15544	   ac_prev=
15545	 elif test "x$ac_word" = "x-arch"; then
15546	   ac_prev=arch
15547	 fi
15548       done
15549fi
15550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15551    if test $ac_cv_c_bigendian = unknown; then
15552      # See if sys/param.h defines the BYTE_ORDER macro.
15553      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15554/* end confdefs.h.  */
15555#include <sys/types.h>
15556	     #include <sys/param.h>
15557
15558int
15559main ()
15560{
15561#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15562		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15563		     && LITTLE_ENDIAN)
15564	      bogus endian macros
15565	     #endif
15566
15567  ;
15568  return 0;
15569}
15570_ACEOF
15571if ac_fn_c_try_compile "$LINENO"; then :
15572  # It does; now see whether it defined to BIG_ENDIAN or not.
15573	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15574/* end confdefs.h.  */
15575#include <sys/types.h>
15576		#include <sys/param.h>
15577
15578int
15579main ()
15580{
15581#if BYTE_ORDER != BIG_ENDIAN
15582		 not big endian
15583		#endif
15584
15585  ;
15586  return 0;
15587}
15588_ACEOF
15589if ac_fn_c_try_compile "$LINENO"; then :
15590  ac_cv_c_bigendian=yes
15591else
15592  ac_cv_c_bigendian=no
15593fi
15594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15595fi
15596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15597    fi
15598    if test $ac_cv_c_bigendian = unknown; then
15599      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15600      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15601/* end confdefs.h.  */
15602#include <limits.h>
15603
15604int
15605main ()
15606{
15607#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15608	      bogus endian macros
15609	     #endif
15610
15611  ;
15612  return 0;
15613}
15614_ACEOF
15615if ac_fn_c_try_compile "$LINENO"; then :
15616  # It does; now see whether it defined to _BIG_ENDIAN or not.
15617	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15618/* end confdefs.h.  */
15619#include <limits.h>
15620
15621int
15622main ()
15623{
15624#ifndef _BIG_ENDIAN
15625		 not big endian
15626		#endif
15627
15628  ;
15629  return 0;
15630}
15631_ACEOF
15632if ac_fn_c_try_compile "$LINENO"; then :
15633  ac_cv_c_bigendian=yes
15634else
15635  ac_cv_c_bigendian=no
15636fi
15637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15638fi
15639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15640    fi
15641    if test $ac_cv_c_bigendian = unknown; then
15642      # Compile a test program.
15643      if test "$cross_compiling" = yes; then :
15644  # Try to guess by grepping values from an object file.
15645	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15646/* end confdefs.h.  */
15647short int ascii_mm[] =
15648		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15649		short int ascii_ii[] =
15650		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15651		int use_ascii (int i) {
15652		  return ascii_mm[i] + ascii_ii[i];
15653		}
15654		short int ebcdic_ii[] =
15655		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15656		short int ebcdic_mm[] =
15657		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15658		int use_ebcdic (int i) {
15659		  return ebcdic_mm[i] + ebcdic_ii[i];
15660		}
15661		extern int foo;
15662
15663int
15664main ()
15665{
15666return use_ascii (foo) == use_ebcdic (foo);
15667  ;
15668  return 0;
15669}
15670_ACEOF
15671if ac_fn_c_try_compile "$LINENO"; then :
15672  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15673	      ac_cv_c_bigendian=yes
15674	    fi
15675	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15676	      if test "$ac_cv_c_bigendian" = unknown; then
15677		ac_cv_c_bigendian=no
15678	      else
15679		# finding both strings is unlikely to happen, but who knows?
15680		ac_cv_c_bigendian=unknown
15681	      fi
15682	    fi
15683fi
15684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15685else
15686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15687/* end confdefs.h.  */
15688$ac_includes_default
15689int
15690main ()
15691{
15692
15693	     /* Are we little or big endian?  From Harbison&Steele.  */
15694	     union
15695	     {
15696	       long int l;
15697	       char c[sizeof (long int)];
15698	     } u;
15699	     u.l = 1;
15700	     return u.c[sizeof (long int) - 1] == 1;
15701
15702  ;
15703  return 0;
15704}
15705_ACEOF
15706if ac_fn_c_try_run "$LINENO"; then :
15707  ac_cv_c_bigendian=no
15708else
15709  ac_cv_c_bigendian=yes
15710fi
15711rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15712  conftest.$ac_objext conftest.beam conftest.$ac_ext
15713fi
15714
15715    fi
15716fi
15717:
15718 case $ac_cv_c_bigendian in #(
15719   yes)
15720     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
15721   no)
15722     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
15723   universal)
15724
15725$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
15726
15727     ;; #(
15728   *)
15729     gl_cv_cc_double_expbit0="unknown" ;;
15730 esac
15731
15732
15733fi
15734rm -f conftest*
15735
15736
15737else
15738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15739/* end confdefs.h.  */
15740
15741#include <float.h>
15742#include <stddef.h>
15743#include <stdio.h>
15744#include <string.h>
15745#define NWORDS \
15746  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
15747typedef union { double value; unsigned int word[NWORDS]; } memory_double;
15748static unsigned int ored_words[NWORDS];
15749static unsigned int anded_words[NWORDS];
15750static void add_to_ored_words (double x)
15751{
15752  memory_double m;
15753  size_t i;
15754  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
15755  memset (&m, 0, sizeof (memory_double));
15756  m.value = x;
15757  for (i = 0; i < NWORDS; i++)
15758    {
15759      ored_words[i] |= m.word[i];
15760      anded_words[i] &= m.word[i];
15761    }
15762}
15763int main ()
15764{
15765  size_t j;
15766  FILE *fp = fopen ("conftest.out", "w");
15767  if (fp == NULL)
15768    return 1;
15769  for (j = 0; j < NWORDS; j++)
15770    anded_words[j] = ~ (unsigned int) 0;
15771  add_to_ored_words (0.25);
15772  add_to_ored_words (0.5);
15773  add_to_ored_words (1.0);
15774  add_to_ored_words (2.0);
15775  add_to_ored_words (4.0);
15776  /* Remove bits that are common (e.g. if representation of the first mantissa
15777     bit is explicit).  */
15778  for (j = 0; j < NWORDS; j++)
15779    ored_words[j] &= ~anded_words[j];
15780  /* Now find the nonzero word.  */
15781  for (j = 0; j < NWORDS; j++)
15782    if (ored_words[j] != 0)
15783      break;
15784  if (j < NWORDS)
15785    {
15786      size_t i;
15787      for (i = j + 1; i < NWORDS; i++)
15788        if (ored_words[i] != 0)
15789          {
15790            fprintf (fp, "unknown");
15791            return (fclose (fp) != 0);
15792          }
15793      for (i = 0; ; i++)
15794        if ((ored_words[j] >> i) & 1)
15795          {
15796            fprintf (fp, "word %d bit %d", (int) j, (int) i);
15797            return (fclose (fp) != 0);
15798          }
15799    }
15800  fprintf (fp, "unknown");
15801  return (fclose (fp) != 0);
15802}
15803
15804_ACEOF
15805if ac_fn_c_try_run "$LINENO"; then :
15806  gl_cv_cc_double_expbit0=`cat conftest.out`
15807else
15808  gl_cv_cc_double_expbit0="unknown"
15809fi
15810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15811  conftest.$ac_objext conftest.beam conftest.$ac_ext
15812fi
15813
15814      rm -f conftest.out
15815
15816fi
15817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
15818$as_echo "$gl_cv_cc_double_expbit0" >&6; }
15819  case "$gl_cv_cc_double_expbit0" in
15820    word*bit*)
15821      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
15822      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
15823
15824cat >>confdefs.h <<_ACEOF
15825#define DBL_EXPBIT0_WORD $word
15826_ACEOF
15827
15828
15829cat >>confdefs.h <<_ACEOF
15830#define DBL_EXPBIT0_BIT $bit
15831_ACEOF
15832
15833      ;;
15834  esac
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
15845$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
15846if ${gl_cv_func_snprintf_retval_c99+:} false; then :
15847  $as_echo_n "(cached) " >&6
15848else
15849
15850      if test "$cross_compiling" = yes; then :
15851
15852         case "$host_os" in
15853                                 # Guess yes on glibc systems.
15854           *-gnu*)               gl_cv_func_snprintf_retval_c99="guessing yes";;
15855                                 # Guess yes on FreeBSD >= 5.
15856           freebsd[1-4].*)       gl_cv_func_snprintf_retval_c99="guessing no";;
15857           freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15858                                 # Guess yes on Mac OS X >= 10.3.
15859           darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
15860           darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
15861                                 # Guess yes on OpenBSD >= 3.9.
15862           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
15863                                 gl_cv_func_snprintf_retval_c99="guessing no";;
15864           openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
15865                                 # Guess yes on Solaris >= 2.10.
15866           solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
15867           solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
15868                                 # Guess yes on AIX >= 4.
15869           aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
15870           aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
15871                                 # Guess yes on NetBSD >= 3.
15872           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
15873                                 gl_cv_func_snprintf_retval_c99="guessing no";;
15874           netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
15875                                 # Guess yes on BeOS.
15876           beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
15877                                 # If we don't know, assume the worst.
15878           *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
15879         esac
15880
15881else
15882  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15883/* end confdefs.h.  */
15884
15885#include <stdio.h>
15886#include <string.h>
15887#if HAVE_SNPRINTF
15888# define my_snprintf snprintf
15889#else
15890# include <stdarg.h>
15891static int my_snprintf (char *buf, int size, const char *format, ...)
15892{
15893  va_list args;
15894  int ret;
15895  va_start (args, format);
15896  ret = vsnprintf (buf, size, format, args);
15897  va_end (args);
15898  return ret;
15899}
15900#endif
15901static char buf[100];
15902int main ()
15903{
15904  strcpy (buf, "ABCDEF");
15905  if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
15906    return 1;
15907  if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
15908    return 2;
15909  if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
15910    return 3;
15911  return 0;
15912}
15913_ACEOF
15914if ac_fn_c_try_run "$LINENO"; then :
15915  gl_cv_func_snprintf_retval_c99=yes
15916else
15917  gl_cv_func_snprintf_retval_c99=no
15918fi
15919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15920  conftest.$ac_objext conftest.beam conftest.$ac_ext
15921fi
15922
15923
15924fi
15925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
15926$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
15927
15928
15929
15930
15931
15932
15933  for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
15934do :
15935  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15936ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15937if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15938  cat >>confdefs.h <<_ACEOF
15939#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15940_ACEOF
15941
15942fi
15943done
15944
15945      ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
15946"
15947if test "x$ac_cv_have_decl__snprintf" = xyes; then :
15948  ac_have_decl=1
15949else
15950  ac_have_decl=0
15951fi
15952
15953cat >>confdefs.h <<_ACEOF
15954#define HAVE_DECL__SNPRINTF $ac_have_decl
15955_ACEOF
15956
15957
15958
15959  case "$gl_cv_func_snprintf_retval_c99" in
15960    *yes)
15961
15962$as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
15963
15964      ;;
15965  esac
15966
15967ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
15968if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
15969  ac_have_decl=1
15970else
15971  ac_have_decl=0
15972fi
15973
15974cat >>confdefs.h <<_ACEOF
15975#define HAVE_DECL_VSNPRINTF $ac_have_decl
15976_ACEOF
15977
15978
15979            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
15980$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
15981if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
15982  $as_echo_n "(cached) " >&6
15983else
15984  gl_cv_header_wchar_h_correct_inline=yes
15985     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15986/* end confdefs.h.  */
15987
15988       #define wcstod renamed_wcstod
15989/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15990   <wchar.h>.
15991   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15992   included before <wchar.h>.  */
15993#include <stddef.h>
15994#include <stdio.h>
15995#include <time.h>
15996#include <wchar.h>
15997extern int zero (void);
15998int main () { return zero(); }
15999
16000_ACEOF
16001                              save_ac_compile="$ac_compile"
16002     ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
16003     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
16004  (eval $ac_compile) 2>&5
16005  ac_status=$?
16006  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16007  test $ac_status = 0; }; then
16008       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16009/* end confdefs.h.  */
16010
16011         #define wcstod renamed_wcstod
16012/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16013   <wchar.h>.
16014   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16015   included before <wchar.h>.  */
16016#include <stddef.h>
16017#include <stdio.h>
16018#include <time.h>
16019#include <wchar.h>
16020int zero (void) { return 0; }
16021
16022_ACEOF
16023              ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
16024       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
16025  (eval $ac_compile) 2>&5
16026  ac_status=$?
16027  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16028  test $ac_status = 0; }; then
16029         if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
16030           :
16031         else
16032           gl_cv_header_wchar_h_correct_inline=no
16033         fi
16034       fi
16035     fi
16036     ac_compile="$save_ac_compile"
16037     rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
16038
16039fi
16040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
16041$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
16042  if test $gl_cv_header_wchar_h_correct_inline = no; then
16043    as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
16044This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
16045C99 mode. You have four options:
16046  - Add the flag -fgnu89-inline to CC and reconfigure, or
16047  - Fix your include files, using parts of
16048    <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
16049  - Use a gcc version older than 4.3, or
16050  - Don't use the flags -std=c99 or -std=gnu99.
16051Configuration aborted." "$LINENO" 5
16052  fi
16053
16054
16055  GNULIB_ISWBLANK=0;
16056  GNULIB_WCTYPE=0;
16057  GNULIB_ISWCTYPE=0;
16058  GNULIB_WCTRANS=0;
16059  GNULIB_TOWCTRANS=0;
16060    HAVE_ISWBLANK=1;
16061  HAVE_WCTYPE_T=1;
16062  HAVE_WCTRANS_T=1;
16063  REPLACE_ISWBLANK=0;
16064
16065
16066
16067
16068  for ac_header in stdint.h
16069do :
16070  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
16071if test "x$ac_cv_header_stdint_h" = xyes; then :
16072  cat >>confdefs.h <<_ACEOF
16073#define HAVE_STDINT_H 1
16074_ACEOF
16075
16076fi
16077
16078done
16079
16080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
16081$as_echo_n "checking for SIZE_MAX... " >&6; }
16082if ${gl_cv_size_max+:} false; then :
16083  $as_echo_n "(cached) " >&6
16084else
16085
16086    gl_cv_size_max=
16087    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16088/* end confdefs.h.  */
16089
16090#include <limits.h>
16091#if HAVE_STDINT_H
16092#include <stdint.h>
16093#endif
16094#ifdef SIZE_MAX
16095Found it
16096#endif
16097
16098_ACEOF
16099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16100  $EGREP "Found it" >/dev/null 2>&1; then :
16101  gl_cv_size_max=yes
16102fi
16103rm -f conftest*
16104
16105    if test -z "$gl_cv_size_max"; then
16106                        if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
16107#include <limits.h>"; then :
16108
16109else
16110  size_t_bits_minus_1=
16111fi
16112
16113      if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
16114
16115else
16116  fits_in_uint=
16117fi
16118
16119      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
16120        if test $fits_in_uint = 1; then
16121                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16122/* end confdefs.h.  */
16123#include <stddef.h>
16124                 extern size_t foo;
16125                 extern unsigned long foo;
16126
16127int
16128main ()
16129{
16130
16131  ;
16132  return 0;
16133}
16134_ACEOF
16135if ac_fn_c_try_compile "$LINENO"; then :
16136  fits_in_uint=0
16137fi
16138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16139        fi
16140                                if test $fits_in_uint = 1; then
16141          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
16142        else
16143          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
16144        fi
16145      else
16146                gl_cv_size_max='((size_t)~(size_t)0)'
16147      fi
16148    fi
16149
16150fi
16151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
16152$as_echo "$gl_cv_size_max" >&6; }
16153  if test "$gl_cv_size_max" != yes; then
16154
16155cat >>confdefs.h <<_ACEOF
16156#define SIZE_MAX $gl_cv_size_max
16157_ACEOF
16158
16159  fi
16160
16161
16162
16163   if false; then
16164  GL_COND_LIBTOOL_TRUE=
16165  GL_COND_LIBTOOL_FALSE='#'
16166else
16167  GL_COND_LIBTOOL_TRUE='#'
16168  GL_COND_LIBTOOL_FALSE=
16169fi
16170
16171  gl_cond_libtool=false
16172  gl_libdeps=
16173  gl_ltlibdeps=
16174  gl_m4_base='m4'
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184  gl_source_base='gnu'
16185
16186
16187  if test $ac_cv_func_alloca_works = no; then
16188    :
16189  fi
16190
16191  # Define an additional variable used in the Makefile substitution.
16192  if test $ac_cv_working_alloca_h = yes; then
16193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
16194$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
16195if ${gl_cv_rpl_alloca+:} false; then :
16196  $as_echo_n "(cached) " >&6
16197else
16198
16199      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16200/* end confdefs.h.  */
16201
16202#if defined __GNUC__ || defined _AIX || defined _MSC_VER
16203        Need own alloca
16204#endif
16205
16206_ACEOF
16207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16208  $EGREP "Need own alloca" >/dev/null 2>&1; then :
16209  gl_cv_rpl_alloca=yes
16210else
16211  gl_cv_rpl_alloca=no
16212fi
16213rm -f conftest*
16214
16215
16216fi
16217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
16218$as_echo "$gl_cv_rpl_alloca" >&6; }
16219    if test $gl_cv_rpl_alloca = yes; then
16220
16221$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16222
16223      ALLOCA_H=alloca.h
16224    else
16225                  ALLOCA_H=
16226    fi
16227  else
16228    ALLOCA_H=alloca.h
16229  fi
16230
16231   if test -n "$ALLOCA_H"; then
16232  GL_GENERATE_ALLOCA_H_TRUE=
16233  GL_GENERATE_ALLOCA_H_FALSE='#'
16234else
16235  GL_GENERATE_ALLOCA_H_TRUE='#'
16236  GL_GENERATE_ALLOCA_H_FALSE=
16237fi
16238
16239
16240
16241
16242
16243
16244
16245  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
16246"
16247if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
16248  ac_have_decl=1
16249else
16250  ac_have_decl=0
16251fi
16252
16253cat >>confdefs.h <<_ACEOF
16254#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
16255_ACEOF
16256if test $ac_have_decl = 1; then :
16257
16258else
16259
16260$as_echo "#define GNULIB_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
16261
16262fi
16263
16264  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
16265"
16266if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
16267  ac_have_decl=1
16268else
16269  ac_have_decl=0
16270fi
16271
16272cat >>confdefs.h <<_ACEOF
16273#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
16274_ACEOF
16275if test $ac_have_decl = 1; then :
16276
16277else
16278
16279$as_echo "#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
16280
16281fi
16282
16283
16284  # Check if program_invocation_name and program_invocation_short_name
16285  # are defined elsewhere. It is improbable that only one of them will
16286  # be defined and other not, I prefer to stay on the safe side and to
16287  # test each one separately.
16288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_name is defined" >&5
16289$as_echo_n "checking whether program_invocation_name is defined... " >&6; }
16290  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16291/* end confdefs.h.  */
16292#include <argp.h>
16293int
16294main ()
16295{
16296program_invocation_name = "test";
16297  ;
16298  return 0;
16299}
16300_ACEOF
16301if ac_fn_c_try_link "$LINENO"; then :
16302
16303$as_echo "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
16304
16305                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16306$as_echo "yes" >&6; }
16307else
16308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16309$as_echo "no" >&6; }
16310fi
16311rm -f core conftest.err conftest.$ac_objext \
16312    conftest$ac_exeext conftest.$ac_ext
16313
16314  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_short_name is defined" >&5
16315$as_echo_n "checking whether program_invocation_short_name is defined... " >&6; }
16316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16317/* end confdefs.h.  */
16318#include <argp.h>
16319int
16320main ()
16321{
16322program_invocation_short_name = "test";
16323  ;
16324  return 0;
16325}
16326_ACEOF
16327if ac_fn_c_try_link "$LINENO"; then :
16328
16329$as_echo "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
16330
16331                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16332$as_echo "yes" >&6; }
16333else
16334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16335$as_echo "no" >&6; }
16336fi
16337rm -f core conftest.err conftest.$ac_objext \
16338    conftest$ac_exeext conftest.$ac_ext
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_error:2:c-format"
16360
16361
16362
16363  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format"
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373  gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
16374
16375
16376  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
16377$as_echo_n "checking for __builtin_expect... " >&6; }
16378if ${gl_cv___builtin_expect+:} false; then :
16379  $as_echo_n "(cached) " >&6
16380else
16381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16382/* end confdefs.h.  */
16383
16384         int
16385         main (int argc, char **argv)
16386         {
16387           argc = __builtin_expect (argc, 100);
16388           return argv[argc != 100][0];
16389         }
16390_ACEOF
16391if ac_fn_c_try_link "$LINENO"; then :
16392  gl_cv___builtin_expect=yes
16393else
16394  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16395/* end confdefs.h.  */
16396
16397             #include <builtins.h>
16398             int
16399             main (int argc, char **argv)
16400             {
16401               argc = __builtin_expect (argc, 100);
16402               return argv[argc != 100][0];
16403             }
16404_ACEOF
16405if ac_fn_c_try_link "$LINENO"; then :
16406  gl_cv___builtin_expect="in <builtins.h>"
16407else
16408  gl_cv___builtin_expect=no
16409fi
16410rm -f core conftest.err conftest.$ac_objext \
16411    conftest$ac_exeext conftest.$ac_ext
16412fi
16413rm -f core conftest.err conftest.$ac_objext \
16414    conftest$ac_exeext conftest.$ac_ext
16415fi
16416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
16417$as_echo "$gl_cv___builtin_expect" >&6; }
16418  if test "$gl_cv___builtin_expect" = yes; then
16419    $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
16420
16421  elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
16422    $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
16423
16424  fi
16425
16426
16427
16428
16429
16430
16431
16432          GNULIB_CHDIR=1
16433
16434
16435
16436
16437
16438$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
16439
16440
16441
16442
16443
16444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
16445$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
16446if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
16447  $as_echo_n "(cached) " >&6
16448else
16449  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16450/* end confdefs.h.  */
16451
16452/* Arrange to define PATH_MAX, like "pathmax.h" does. */
16453#if HAVE_UNISTD_H
16454# include <unistd.h>
16455#endif
16456#include <limits.h>
16457#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16458# include <sys/param.h>
16459#endif
16460#if !defined PATH_MAX && defined MAXPATHLEN
16461# define PATH_MAX MAXPATHLEN
16462#endif
16463#ifdef __hpux
16464# undef PATH_MAX
16465# define PATH_MAX 1024
16466#endif
16467#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16468# undef PATH_MAX
16469# define PATH_MAX 260
16470#endif
16471
16472#ifdef PATH_MAX
16473have_arbitrary_file_name_length_limit
16474#endif
16475_ACEOF
16476if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16477  $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
16478  gl_cv_have_arbitrary_file_name_length_limit=yes
16479else
16480  gl_cv_have_arbitrary_file_name_length_limit=no
16481fi
16482rm -f conftest*
16483
16484fi
16485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
16486$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
16487
16488  if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
16489
16490
16491
16492
16493
16494
16495
16496
16497  gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
16498
16499    :
16500  fi
16501
16502  if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
16503
16504
16505
16506
16507
16508
16509
16510
16511  gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
16512
16513  fi
16514  if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
16515
16516
16517
16518
16519
16520
16521
16522
16523  gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
16524
16525  fi
16526
16527
16528
16529
16530
16531          GNULIB_CHOWN=1
16532
16533
16534
16535
16536
16537$as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
16538
16539
16540
16541
16542
16543
16544  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
16545  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
16546
16547  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
16548  # programs in the package would end up linked with that potentially-shared
16549  # library, inducing unnecessary run-time overhead.
16550  LIB_CLOCK_GETTIME=
16551
16552  gl_saved_libs=$LIBS
16553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
16554$as_echo_n "checking for library containing clock_gettime... " >&6; }
16555if ${ac_cv_search_clock_gettime+:} false; then :
16556  $as_echo_n "(cached) " >&6
16557else
16558  ac_func_search_save_LIBS=$LIBS
16559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16560/* end confdefs.h.  */
16561
16562/* Override any GCC internal prototype to avoid an error.
16563   Use char because int might match the return type of a GCC
16564   builtin and then its argument prototype would still apply.  */
16565#ifdef __cplusplus
16566extern "C"
16567#endif
16568char clock_gettime ();
16569int
16570main ()
16571{
16572return clock_gettime ();
16573  ;
16574  return 0;
16575}
16576_ACEOF
16577for ac_lib in '' rt posix4; do
16578  if test -z "$ac_lib"; then
16579    ac_res="none required"
16580  else
16581    ac_res=-l$ac_lib
16582    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16583  fi
16584  if ac_fn_c_try_link "$LINENO"; then :
16585  ac_cv_search_clock_gettime=$ac_res
16586fi
16587rm -f core conftest.err conftest.$ac_objext \
16588    conftest$ac_exeext
16589  if ${ac_cv_search_clock_gettime+:} false; then :
16590  break
16591fi
16592done
16593if ${ac_cv_search_clock_gettime+:} false; then :
16594
16595else
16596  ac_cv_search_clock_gettime=no
16597fi
16598rm conftest.$ac_ext
16599LIBS=$ac_func_search_save_LIBS
16600fi
16601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
16602$as_echo "$ac_cv_search_clock_gettime" >&6; }
16603ac_res=$ac_cv_search_clock_gettime
16604if test "$ac_res" != no; then :
16605  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16606  test "$ac_cv_search_clock_gettime" = "none required" ||
16607                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
16608fi
16609
16610    for ac_func in clock_gettime clock_settime
16611do :
16612  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16613ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16614if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16615  cat >>confdefs.h <<_ACEOF
16616#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16617_ACEOF
16618
16619fi
16620done
16621
16622  LIBS=$gl_saved_libs
16623
16624
16625
16626$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
16627
16628
16629
16630
16631
16632  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16633    REPLACE_CLOSE=1
16634  fi
16635
16636
16637
16638
16639
16640  if test $ac_cv_header_sys_socket_h != yes; then
16641                    for ac_header in winsock2.h
16642do :
16643  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
16644if test "x$ac_cv_header_winsock2_h" = xyes; then :
16645  cat >>confdefs.h <<_ACEOF
16646#define HAVE_WINSOCK2_H 1
16647_ACEOF
16648
16649fi
16650
16651done
16652
16653  fi
16654  if test "$ac_cv_header_winsock2_h" = yes; then
16655    HAVE_WINSOCK2_H=1
16656    UNISTD_H_HAVE_WINSOCK2_H=1
16657    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
16658  else
16659    HAVE_WINSOCK2_H=0
16660  fi
16661
16662
16663    if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
16664                        REPLACE_CLOSE=1
16665    fi
16666
16667
16668    if test $REPLACE_CLOSE = 0; then
16669
16670
16671
16672  if test $ac_cv_func_fchdir = no; then
16673    HAVE_FCHDIR=0
16674  fi
16675
16676      if test $HAVE_FCHDIR = 0; then
16677        REPLACE_CLOSE=1
16678      fi
16679    fi
16680
16681
16682  if test $REPLACE_CLOSE = 1; then
16683
16684
16685
16686
16687
16688
16689
16690
16691  gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
16692
16693  fi
16694
16695
16696
16697
16698
16699          GNULIB_CLOSE=1
16700
16701
16702
16703
16704
16705$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
16706
16707
16708
16709
16710  :
16711
16712
16713
16714cat >>confdefs.h <<_ACEOF
16715#define GNULIB_CLOSE_STREAM 1
16716_ACEOF
16717
16718
16719
16720
16721
16722  for ac_func in closedir
16723do :
16724  ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
16725if test "x$ac_cv_func_closedir" = xyes; then :
16726  cat >>confdefs.h <<_ACEOF
16727#define HAVE_CLOSEDIR 1
16728_ACEOF
16729
16730fi
16731done
16732
16733  if test $ac_cv_func_closedir = no; then
16734    HAVE_CLOSEDIR=0
16735  fi
16736
16737
16738
16739
16740  if test $ac_cv_func_fchdir = no; then
16741    HAVE_FCHDIR=0
16742  fi
16743
16744    if test $HAVE_FCHDIR = 0; then
16745      if test $HAVE_CLOSEDIR = 1; then
16746        REPLACE_CLOSEDIR=1
16747      fi
16748    fi
16749
16750    case $host_os,$HAVE_CLOSEDIR in
16751    os2*,1)
16752      REPLACE_CLOSEDIR=1;;
16753  esac
16754
16755  if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
16756
16757
16758
16759
16760
16761
16762
16763
16764  gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
16765
16766  fi
16767
16768
16769
16770
16771
16772          GNULIB_CLOSEDIR=1
16773
16774
16775
16776
16777
16778$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
16779
16780
16781
16782
16783  :
16784
16785
16786          if test "x$datarootdir" = x; then
16787    datarootdir='${datadir}'
16788
16789  fi
16790    if test "x$docdir" = x; then
16791    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
16792
16793  fi
16794    if test "x$htmldir" = x; then
16795    htmldir='${docdir}'
16796
16797  fi
16798  if test "x$dvidir" = x; then
16799    dvidir='${docdir}'
16800
16801  fi
16802  if test "x$pdfdir" = x; then
16803    pdfdir='${docdir}'
16804
16805  fi
16806  if test "x$psdir" = x; then
16807    psdir='${docdir}'
16808
16809  fi
16810  if test "x$lispdir" = x; then
16811    lispdir='${datarootdir}/emacs/site-lisp'
16812
16813  fi
16814  if test "x$localedir" = x; then
16815    localedir='${datarootdir}/locale'
16816
16817  fi
16818    if test "x$runstatedir" = x; then
16819    runstatedir='${localstatedir}/run'
16820
16821  fi
16822
16823      pkglibexecdir='${libexecdir}/${PACKAGE}'
16824
16825
16826      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
16827$as_echo_n "checking for d_ino member in directory struct... " >&6; }
16828if ${gl_cv_struct_dirent_d_ino+:} false; then :
16829  $as_echo_n "(cached) " >&6
16830else
16831  if test "$cross_compiling" = yes; then :
16832  case "$host_os" in
16833                           # Guess yes on glibc systems with Linux kernel.
16834              linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
16835                           # If we don't know, assume the worst.
16836              *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
16837            esac
16838
16839else
16840  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16841/* end confdefs.h.  */
16842#include <sys/types.h>
16843             #include <sys/stat.h>
16844             #include <dirent.h>
16845
16846int
16847main ()
16848{
16849DIR *dp = opendir (".");
16850             struct dirent *e;
16851             struct stat st;
16852             if (! dp)
16853               return 1;
16854             e = readdir (dp);
16855             if (! e)
16856               return 2;
16857             if (lstat (e->d_name, &st) != 0)
16858               return 3;
16859             if (e->d_ino != st.st_ino)
16860               return 4;
16861             closedir (dp);
16862             return 0;
16863
16864  ;
16865  return 0;
16866}
16867_ACEOF
16868if ac_fn_c_try_run "$LINENO"; then :
16869  gl_cv_struct_dirent_d_ino=yes
16870else
16871  gl_cv_struct_dirent_d_ino=no
16872fi
16873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16874  conftest.$ac_objext conftest.beam conftest.$ac_ext
16875fi
16876
16877fi
16878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
16879$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
16880   case "$gl_cv_struct_dirent_d_ino" in
16881     *yes)
16882
16883$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
16884
16885       ;;
16886   esac
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901     if test $gl_cv_have_include_next = yes; then
16902       gl_cv_next_dirent_h='<'dirent.h'>'
16903     else
16904       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
16905$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
16906if ${gl_cv_next_dirent_h+:} false; then :
16907  $as_echo_n "(cached) " >&6
16908else
16909
16910             if test $ac_cv_header_dirent_h = yes; then
16911
16912
16913
16914
16915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16916/* end confdefs.h.  */
16917#include <dirent.h>
16918_ACEOF
16919                case "$host_os" in
16920    aix*) gl_absname_cpp="$ac_cpp -C" ;;
16921    *)    gl_absname_cpp="$ac_cpp" ;;
16922  esac
16923
16924  case "$host_os" in
16925    mingw*)
16926                                          gl_dirsep_regex='[/\\]'
16927      ;;
16928    *)
16929      gl_dirsep_regex='\/'
16930      ;;
16931  esac
16932      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16933  gl_header_literal_regex=`echo 'dirent.h' \
16934                           | sed -e "$gl_make_literal_regex_sed"`
16935  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16936      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16937      s|^/[^/]|//&|
16938      p
16939      q
16940    }'
16941
16942        gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16943  sed -n "$gl_absolute_header_sed"`
16944
16945           gl_header=$gl_cv_absolute_dirent_h
16946           gl_cv_next_dirent_h='"'$gl_header'"'
16947          else
16948               gl_cv_next_dirent_h='<'dirent.h'>'
16949             fi
16950
16951
16952fi
16953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
16954$as_echo "$gl_cv_next_dirent_h" >&6; }
16955     fi
16956     NEXT_DIRENT_H=$gl_cv_next_dirent_h
16957
16958     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16959       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16960       gl_next_as_first_directive='<'dirent.h'>'
16961     else
16962       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16963       gl_next_as_first_directive=$gl_cv_next_dirent_h
16964     fi
16965     NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
16966
16967
16968
16969
16970  if test $ac_cv_header_dirent_h = yes; then
16971    HAVE_DIRENT_H=1
16972  else
16973    HAVE_DIRENT_H=0
16974  fi
16975
16976
16977
16978    for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
16979    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16980    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16981$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16982if eval \${$as_gl_Symbol+:} false; then :
16983  $as_echo_n "(cached) " >&6
16984else
16985  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16986/* end confdefs.h.  */
16987#include <dirent.h>
16988
16989int
16990main ()
16991{
16992#undef $gl_func
16993  (void) $gl_func;
16994  ;
16995  return 0;
16996}
16997_ACEOF
16998if ac_fn_c_try_compile "$LINENO"; then :
16999  eval "$as_gl_Symbol=yes"
17000else
17001  eval "$as_gl_Symbol=no"
17002fi
17003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17004fi
17005eval ac_res=\$$as_gl_Symbol
17006	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17007$as_echo "$ac_res" >&6; }
17008    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17009  cat >>confdefs.h <<_ACEOF
17010#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17011_ACEOF
17012
17013                     eval ac_cv_have_decl_$gl_func=yes
17014fi
17015      done
17016
17017
17018
17019
17020
17021
17022
17023cat >>confdefs.h <<_ACEOF
17024#define GNULIB_DIRENT_SAFER 1
17025_ACEOF
17026
17027
17028
17029
17030
17031
17032
17033  for ac_func in dirfd
17034do :
17035  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
17036if test "x$ac_cv_func_dirfd" = xyes; then :
17037  cat >>confdefs.h <<_ACEOF
17038#define HAVE_DIRFD 1
17039_ACEOF
17040
17041fi
17042done
17043
17044  ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
17045      #include <dirent.h>
17046"
17047if test "x$ac_cv_have_decl_dirfd" = xyes; then :
17048  ac_have_decl=1
17049else
17050  ac_have_decl=0
17051fi
17052
17053cat >>confdefs.h <<_ACEOF
17054#define HAVE_DECL_DIRFD $ac_have_decl
17055_ACEOF
17056
17057  if test $ac_cv_have_decl_dirfd = no; then
17058    HAVE_DECL_DIRFD=0
17059  fi
17060
17061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
17062$as_echo_n "checking whether dirfd is a macro... " >&6; }
17063if ${gl_cv_func_dirfd_macro+:} false; then :
17064  $as_echo_n "(cached) " >&6
17065else
17066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17067/* end confdefs.h.  */
17068
17069#include <sys/types.h>
17070#include <dirent.h>
17071#ifdef dirfd
17072 dirent_header_defines_dirfd
17073#endif
17074_ACEOF
17075if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17076  $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
17077  gl_cv_func_dirfd_macro=yes
17078else
17079  gl_cv_func_dirfd_macro=no
17080fi
17081rm -f conftest*
17082
17083fi
17084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
17085$as_echo "$gl_cv_func_dirfd_macro" >&6; }
17086
17087  # Use the replacement if we have no function or macro with that name,
17088  # or if OS/2 kLIBC whose dirfd() does not work.
17089  # Replace only if the system declares dirfd already.
17090  case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
17091    no,no,*,yes | *,*,os2*,yes)
17092      REPLACE_DIRFD=1
17093
17094$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
17095;;
17096  esac
17097
17098  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
17099     || test $REPLACE_DIRFD = 1; then
17100
17101
17102
17103
17104
17105
17106
17107
17108  gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
17109
17110
17111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
17112$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
17113if ${gl_cv_sys_dir_fd_member_name+:} false; then :
17114  $as_echo_n "(cached) " >&6
17115else
17116
17117      dirfd_save_CFLAGS=$CFLAGS
17118      for ac_expr in d_fd dd_fd; do
17119
17120        CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
17121        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17122/* end confdefs.h.  */
17123
17124           #include <sys/types.h>
17125           #include <dirent.h>
17126int
17127main ()
17128{
17129DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
17130  ;
17131  return 0;
17132}
17133_ACEOF
17134if ac_fn_c_try_compile "$LINENO"; then :
17135  dir_fd_found=yes
17136
17137fi
17138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17139        CFLAGS=$dirfd_save_CFLAGS
17140        test "$dir_fd_found" = yes && break
17141      done
17142      test "$dir_fd_found" = yes || ac_expr=no_such_member
17143
17144      gl_cv_sys_dir_fd_member_name=$ac_expr
17145
17146
17147fi
17148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
17149$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
17150  if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
17151
17152cat >>confdefs.h <<_ACEOF
17153#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
17154_ACEOF
17155
17156  fi
17157
17158
17159  fi
17160
17161
17162
17163
17164
17165          GNULIB_DIRFD=1
17166
17167
17168
17169
17170
17171$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
17172
17173
17174
17175
17176
17177
17178
17179
17180cat >>confdefs.h <<_ACEOF
17181#define GNULIB_DIRNAME 1
17182_ACEOF
17183
17184
17185
17186
17187
17188
17189
17190
17191  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
17192$as_echo_n "checking whether // is distinct from /... " >&6; }
17193if ${gl_cv_double_slash_root+:} false; then :
17194  $as_echo_n "(cached) " >&6
17195else
17196   if test x"$cross_compiling" = xyes ; then
17197        # When cross-compiling, there is no way to tell whether // is special
17198        # short of a list of hosts.  However, the only known hosts to date
17199        # that have a distinct // are Apollo DomainOS (too old to port to),
17200        # Cygwin, and z/OS.  If anyone knows of another system for which // has
17201        # special semantics and is distinct from /, please report it to
17202        # <bug-gnulib@gnu.org>.
17203        case $host in
17204          *-cygwin | i370-ibm-openedition)
17205            gl_cv_double_slash_root=yes ;;
17206          *)
17207            # Be optimistic and assume that / and // are the same when we
17208            # don't know.
17209            gl_cv_double_slash_root='unknown, assuming no' ;;
17210        esac
17211      else
17212        set x `ls -di / // 2>/dev/null`
17213        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
17214          gl_cv_double_slash_root=no
17215        else
17216          gl_cv_double_slash_root=yes
17217        fi
17218      fi
17219fi
17220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
17221$as_echo "$gl_cv_double_slash_root" >&6; }
17222  if test "$gl_cv_double_slash_root" = yes; then
17223
17224$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
17225
17226  fi
17227
17228
17229
17230
17231  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17232    REPLACE_DUP=1
17233  fi
17234
17235
17236
17237
17238  if test $ac_cv_func_fchdir = no; then
17239    HAVE_FCHDIR=0
17240  fi
17241
17242    if test $HAVE_FCHDIR = 0; then
17243      REPLACE_DUP=1
17244    fi
17245
17246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
17247$as_echo_n "checking whether dup works... " >&6; }
17248if ${gl_cv_func_dup_works+:} false; then :
17249  $as_echo_n "(cached) " >&6
17250else
17251  if test "$cross_compiling" = yes; then :
17252  gl_cv_func_dup_works='guessing yes'
17253else
17254  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17255/* end confdefs.h.  */
17256#include <unistd.h>
17257                         #include <fcntl.h>
17258                         #include <errno.h>
17259int
17260main ()
17261{
17262/* On OS/2 kLIBC, dup does not work on a directory fd.  */
17263           int fd = open (".", O_RDONLY);
17264           return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
17265
17266  ;
17267  return 0;
17268}
17269
17270_ACEOF
17271if ac_fn_c_try_run "$LINENO"; then :
17272  gl_cv_func_dup_works=yes
17273else
17274  gl_cv_func_dup_works=no
17275fi
17276rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17277  conftest.$ac_objext conftest.beam conftest.$ac_ext
17278fi
17279
17280
17281fi
17282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
17283$as_echo "$gl_cv_func_dup_works" >&6; }
17284  case "$gl_cv_func_dup_works" in
17285    *yes) ;;
17286    *)
17287      REPLACE_DUP=1
17288      ;;
17289  esac
17290
17291  if test $REPLACE_DUP = 1; then
17292
17293
17294
17295
17296
17297
17298
17299
17300  gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
17301
17302    :
17303  fi
17304
17305
17306
17307
17308
17309          GNULIB_DUP=1
17310
17311
17312
17313
17314
17315$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
17316
17317
17318
17319
17320
17321
17322
17323
17324$as_echo "#define HAVE_DUP2 1" >>confdefs.h
17325
17326
17327  if test $HAVE_DUP2 = 1; then
17328    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
17329$as_echo_n "checking whether dup2 works... " >&6; }
17330if ${gl_cv_func_dup2_works+:} false; then :
17331  $as_echo_n "(cached) " >&6
17332else
17333  if test "$cross_compiling" = yes; then :
17334  case "$host_os" in
17335           mingw*) # on this platform, dup2 always returns 0 for success
17336             gl_cv_func_dup2_works="guessing no" ;;
17337           cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
17338             gl_cv_func_dup2_works="guessing no" ;;
17339           aix* | freebsd*)
17340                   # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
17341                   # not EBADF.
17342             gl_cv_func_dup2_works="guessing no" ;;
17343           haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
17344             gl_cv_func_dup2_works="guessing no" ;;
17345           *-android*) # implemented using dup3(), which fails if oldfd == newfd
17346             gl_cv_func_dup2_works="guessing no" ;;
17347           os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
17348             gl_cv_func_dup2_works="guessing no" ;;
17349           *) gl_cv_func_dup2_works="guessing yes" ;;
17350         esac
17351else
17352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17353/* end confdefs.h.  */
17354
17355         #include <errno.h>
17356             #include <fcntl.h>
17357             #include <limits.h>
17358             #include <sys/resource.h>
17359             #include <unistd.h>
17360             #ifndef RLIM_SAVED_CUR
17361             # define RLIM_SAVED_CUR RLIM_INFINITY
17362             #endif
17363             #ifndef RLIM_SAVED_MAX
17364             # define RLIM_SAVED_MAX RLIM_INFINITY
17365             #endif
17366
17367int
17368main ()
17369{
17370int result = 0;
17371             int bad_fd = INT_MAX;
17372             struct rlimit rlim;
17373             if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
17374                 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
17375                 && rlim.rlim_cur != RLIM_INFINITY
17376                 && rlim.rlim_cur != RLIM_SAVED_MAX
17377                 && rlim.rlim_cur != RLIM_SAVED_CUR)
17378               bad_fd = rlim.rlim_cur;
17379             #ifdef FD_CLOEXEC
17380               if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
17381                 result |= 1;
17382             #endif
17383             if (dup2 (1, 1) != 1)
17384               result |= 2;
17385             #ifdef FD_CLOEXEC
17386               if (fcntl (1, F_GETFD) != FD_CLOEXEC)
17387                 result |= 4;
17388             #endif
17389             close (0);
17390             if (dup2 (0, 0) != -1)
17391               result |= 8;
17392             /* Many gnulib modules require POSIX conformance of EBADF.  */
17393             if (dup2 (2, bad_fd) == -1 && errno != EBADF)
17394               result |= 16;
17395             /* Flush out some cygwin core dumps.  */
17396             if (dup2 (2, -1) != -1 || errno != EBADF)
17397               result |= 32;
17398             dup2 (2, 255);
17399             dup2 (2, 256);
17400             /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
17401             {
17402               int fd = open (".", O_RDONLY);
17403               if (fd == -1)
17404                 result |= 64;
17405               else if (dup2 (fd, fd + 1) == -1)
17406                 result |= 128;
17407
17408               close (fd);
17409             }
17410             return result;
17411  ;
17412  return 0;
17413}
17414
17415_ACEOF
17416if ac_fn_c_try_run "$LINENO"; then :
17417  gl_cv_func_dup2_works=yes
17418else
17419  gl_cv_func_dup2_works=no
17420fi
17421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17422  conftest.$ac_objext conftest.beam conftest.$ac_ext
17423fi
17424
17425
17426fi
17427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
17428$as_echo "$gl_cv_func_dup2_works" >&6; }
17429    case "$gl_cv_func_dup2_works" in
17430      *yes) ;;
17431      *)
17432        REPLACE_DUP2=1
17433        for ac_func in setdtablesize
17434do :
17435  ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
17436if test "x$ac_cv_func_setdtablesize" = xyes; then :
17437  cat >>confdefs.h <<_ACEOF
17438#define HAVE_SETDTABLESIZE 1
17439_ACEOF
17440
17441fi
17442done
17443
17444        ;;
17445    esac
17446  fi
17447
17448
17449
17450
17451  if test $ac_cv_func_fchdir = no; then
17452    HAVE_FCHDIR=0
17453  fi
17454
17455    if test $HAVE_FCHDIR = 0; then
17456      if test $HAVE_DUP2 = 1; then
17457        REPLACE_DUP2=1
17458      fi
17459    fi
17460
17461
17462  if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
17463
17464
17465
17466
17467
17468
17469
17470
17471  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
17472
17473
17474  fi
17475
17476
17477
17478
17479
17480          GNULIB_DUP2=1
17481
17482
17483
17484
17485
17486$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496          GNULIB_ENVIRON=1
17497
17498
17499
17500
17501
17502$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
17503
17504
17505
17506
17507
17508      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
17509$as_echo_n "checking for error_at_line... " >&6; }
17510if ${ac_cv_lib_error_at_line+:} false; then :
17511  $as_echo_n "(cached) " >&6
17512else
17513  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17514/* end confdefs.h.  */
17515#include <error.h>
17516int
17517main ()
17518{
17519error_at_line (0, 0, "", 0, "an error occurred");
17520  ;
17521  return 0;
17522}
17523_ACEOF
17524if ac_fn_c_try_link "$LINENO"; then :
17525  ac_cv_lib_error_at_line=yes
17526else
17527  ac_cv_lib_error_at_line=no
17528fi
17529rm -f core conftest.err conftest.$ac_objext \
17530    conftest$ac_exeext conftest.$ac_ext
17531fi
17532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
17533$as_echo "$ac_cv_lib_error_at_line" >&6; }
17534
17535  if test $ac_cv_lib_error_at_line = no; then
17536
17537
17538
17539
17540
17541
17542
17543
17544  gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
17545
17546
17547
17548  :
17549
17550  fi
17551
17552
17553  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
17554
17555
17556
17557  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
17558
17559
17560
17561
17562
17563
17564
17565  if test $ac_cv_have_decl_fchdir = no; then
17566    HAVE_DECL_FCHDIR=0
17567  fi
17568
17569
17570  if test $HAVE_FCHDIR = 0; then
17571
17572
17573
17574
17575
17576
17577
17578
17579  gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
17580
17581    :
17582
17583$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
17584
17585                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
17586$as_echo_n "checking whether open can visit directories... " >&6; }
17587if ${gl_cv_func_open_directory_works+:} false; then :
17588  $as_echo_n "(cached) " >&6
17589else
17590  if test "$cross_compiling" = yes; then :
17591  case "$host_os" in
17592                   # Guess yes on glibc systems.
17593           *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
17594                   # If we don't know, assume the worst.
17595           *)      gl_cv_func_open_directory_works="guessing no" ;;
17596         esac
17597
17598else
17599  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17600/* end confdefs.h.  */
17601#include <fcntl.h>
17602
17603int
17604main ()
17605{
17606return open(".", O_RDONLY) < 0;
17607  ;
17608  return 0;
17609}
17610_ACEOF
17611if ac_fn_c_try_run "$LINENO"; then :
17612  gl_cv_func_open_directory_works=yes
17613else
17614  gl_cv_func_open_directory_works=no
17615fi
17616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17617  conftest.$ac_objext conftest.beam conftest.$ac_ext
17618fi
17619
17620fi
17621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
17622$as_echo "$gl_cv_func_open_directory_works" >&6; }
17623    case "$gl_cv_func_open_directory_works" in
17624      *yes) ;;
17625      *)
17626
17627$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
17628
17629        ;;
17630    esac
17631  fi
17632
17633
17634
17635
17636
17637
17638          GNULIB_FCHDIR=1
17639
17640
17641
17642
17643
17644$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
17645
17646
17647
17648
17649
17650
17651
17652
17653  if test $ac_cv_func_fcntl = no; then
17654
17655
17656
17657  if test $ac_cv_func_fcntl = no; then
17658    HAVE_FCNTL=0
17659  else
17660    REPLACE_FCNTL=1
17661  fi
17662
17663  else
17664            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
17665$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
17666if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
17667  $as_echo_n "(cached) " >&6
17668else
17669  if test "$cross_compiling" = yes; then :
17670  case $host_os in
17671            aix* | cygwin* | haiku*)
17672               gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
17673            *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
17674          esac
17675else
17676  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17677/* end confdefs.h.  */
17678#include <errno.h>
17679              #include <fcntl.h>
17680              #include <limits.h>
17681              #include <sys/resource.h>
17682              #include <unistd.h>
17683              #ifndef RLIM_SAVED_CUR
17684              # define RLIM_SAVED_CUR RLIM_INFINITY
17685              #endif
17686              #ifndef RLIM_SAVED_MAX
17687              # define RLIM_SAVED_MAX RLIM_INFINITY
17688              #endif
17689
17690int
17691main ()
17692{
17693int result = 0;
17694              int bad_fd = INT_MAX;
17695              struct rlimit rlim;
17696              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
17697                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
17698                  && rlim.rlim_cur != RLIM_INFINITY
17699                  && rlim.rlim_cur != RLIM_SAVED_MAX
17700                  && rlim.rlim_cur != RLIM_SAVED_CUR)
17701                bad_fd = rlim.rlim_cur;
17702              if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
17703              if (errno != EINVAL) result |= 2;
17704              if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
17705              if (errno != EINVAL) result |= 8;
17706              /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
17707              {
17708                int fd;
17709                fd = open (".", O_RDONLY);
17710                if (fd == -1)
17711                  result |= 16;
17712                else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
17713                  result |= 32;
17714
17715                close (fd);
17716              }
17717              return result;
17718  ;
17719  return 0;
17720}
17721_ACEOF
17722if ac_fn_c_try_run "$LINENO"; then :
17723  gl_cv_func_fcntl_f_dupfd_works=yes
17724else
17725  gl_cv_func_fcntl_f_dupfd_works=no
17726fi
17727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17728  conftest.$ac_objext conftest.beam conftest.$ac_ext
17729fi
17730
17731fi
17732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
17733$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
17734    case $gl_cv_func_fcntl_f_dupfd_works in
17735      *yes) ;;
17736      *)
17737
17738
17739  if test $ac_cv_func_fcntl = no; then
17740    HAVE_FCNTL=0
17741  else
17742    REPLACE_FCNTL=1
17743  fi
17744
17745
17746$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
17747 ;;
17748    esac
17749
17750        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
17751$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
17752if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
17753  $as_echo_n "(cached) " >&6
17754else
17755  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17756/* end confdefs.h.  */
17757
17758#include <fcntl.h>
17759#ifndef F_DUPFD_CLOEXEC
17760choke me
17761#endif
17762
17763int
17764main ()
17765{
17766
17767  ;
17768  return 0;
17769}
17770_ACEOF
17771if ac_fn_c_try_compile "$LINENO"; then :
17772  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17773/* end confdefs.h.  */
17774
17775#ifdef __linux__
17776/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
17777   it to support the semantics on older kernels that failed with EINVAL.  */
17778choke me
17779#endif
17780
17781int
17782main ()
17783{
17784
17785  ;
17786  return 0;
17787}
17788_ACEOF
17789if ac_fn_c_try_compile "$LINENO"; then :
17790  gl_cv_func_fcntl_f_dupfd_cloexec=yes
17791else
17792  gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
17793fi
17794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17795else
17796  gl_cv_func_fcntl_f_dupfd_cloexec=no
17797fi
17798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17799fi
17800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
17801$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
17802    if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
17803
17804
17805
17806  if test $ac_cv_func_fcntl = no; then
17807    HAVE_FCNTL=0
17808  else
17809    REPLACE_FCNTL=1
17810  fi
17811
17812          fi
17813  fi
17814
17815
17816
17817
17818  if test $ac_cv_func_fchdir = no; then
17819    HAVE_FCHDIR=0
17820  fi
17821
17822    if test $HAVE_FCHDIR = 0; then
17823
17824
17825
17826  if test $ac_cv_func_fcntl = no; then
17827    HAVE_FCNTL=0
17828  else
17829    REPLACE_FCNTL=1
17830  fi
17831
17832    fi
17833
17834
17835  if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
17836
17837
17838
17839
17840
17841
17842
17843
17844  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
17845
17846  fi
17847
17848
17849
17850
17851
17852          GNULIB_FCNTL=1
17853
17854
17855
17856
17857
17858$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873     if test $gl_cv_have_include_next = yes; then
17874       gl_cv_next_fcntl_h='<'fcntl.h'>'
17875     else
17876       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
17877$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
17878if ${gl_cv_next_fcntl_h+:} false; then :
17879  $as_echo_n "(cached) " >&6
17880else
17881
17882
17883
17884  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17885/* end confdefs.h.  */
17886#include <fcntl.h>
17887_ACEOF
17888                case "$host_os" in
17889    aix*) gl_absname_cpp="$ac_cpp -C" ;;
17890    *)    gl_absname_cpp="$ac_cpp" ;;
17891  esac
17892
17893  case "$host_os" in
17894    mingw*)
17895                                          gl_dirsep_regex='[/\\]'
17896      ;;
17897    *)
17898      gl_dirsep_regex='\/'
17899      ;;
17900  esac
17901      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17902  gl_header_literal_regex=`echo 'fcntl.h' \
17903                           | sed -e "$gl_make_literal_regex_sed"`
17904  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17905      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17906      s|^/[^/]|//&|
17907      p
17908      q
17909    }'
17910
17911        gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17912  sed -n "$gl_absolute_header_sed"`
17913
17914           gl_header=$gl_cv_absolute_fcntl_h
17915           gl_cv_next_fcntl_h='"'$gl_header'"'
17916
17917
17918fi
17919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
17920$as_echo "$gl_cv_next_fcntl_h" >&6; }
17921     fi
17922     NEXT_FCNTL_H=$gl_cv_next_fcntl_h
17923
17924     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17925       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17926       gl_next_as_first_directive='<'fcntl.h'>'
17927     else
17928       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17929       gl_next_as_first_directive=$gl_cv_next_fcntl_h
17930     fi
17931     NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942    for gl_func in fcntl openat; do
17943    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17945$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17946if eval \${$as_gl_Symbol+:} false; then :
17947  $as_echo_n "(cached) " >&6
17948else
17949  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17950/* end confdefs.h.  */
17951#include <fcntl.h>
17952
17953int
17954main ()
17955{
17956#undef $gl_func
17957  (void) $gl_func;
17958  ;
17959  return 0;
17960}
17961_ACEOF
17962if ac_fn_c_try_compile "$LINENO"; then :
17963  eval "$as_gl_Symbol=yes"
17964else
17965  eval "$as_gl_Symbol=no"
17966fi
17967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17968fi
17969eval ac_res=\$$as_gl_Symbol
17970	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17971$as_echo "$ac_res" >&6; }
17972    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17973  cat >>confdefs.h <<_ACEOF
17974#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17975_ACEOF
17976
17977                     eval ac_cv_have_decl_$gl_func=yes
17978fi
17979      done
17980
17981
17982
17983
17984
17985
17986
17987    ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
17988#include <dirent.h>
17989
17990"
17991if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
17992  ac_have_decl=1
17993else
17994  ac_have_decl=0
17995fi
17996
17997cat >>confdefs.h <<_ACEOF
17998#define HAVE_DECL_FDOPENDIR $ac_have_decl
17999_ACEOF
18000if test $ac_have_decl = 1; then :
18001
18002else
18003  HAVE_DECL_FDOPENDIR=0
18004fi
18005
18006
18007  if test $ac_cv_func_fdopendir = no; then
18008    HAVE_FDOPENDIR=0
18009  else
18010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
18011$as_echo_n "checking whether fdopendir works... " >&6; }
18012if ${gl_cv_func_fdopendir_works+:} false; then :
18013  $as_echo_n "(cached) " >&6
18014else
18015  if test "$cross_compiling" = yes; then :
18016  case "$host_os" in
18017                    # Guess yes on glibc systems.
18018            *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
18019                    # If we don't know, assume the worst.
18020            *)      gl_cv_func_fdopendir_works="guessing no" ;;
18021          esac
18022
18023else
18024  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18025/* end confdefs.h.  */
18026
18027#include <dirent.h>
18028#include <fcntl.h>
18029#include <unistd.h>
18030#if !HAVE_DECL_FDOPENDIR
18031extern
18032# ifdef __cplusplus
18033"C"
18034# endif
18035DIR *fdopendir (int);
18036#endif
18037
18038int
18039main ()
18040{
18041int result = 0;
18042     int fd = open ("conftest.c", O_RDONLY);
18043     if (fd < 0) result |= 1;
18044     if (fdopendir (fd)) result |= 2;
18045     if (close (fd)) result |= 4;
18046     return result;
18047  ;
18048  return 0;
18049}
18050_ACEOF
18051if ac_fn_c_try_run "$LINENO"; then :
18052  gl_cv_func_fdopendir_works=yes
18053else
18054  gl_cv_func_fdopendir_works=no
18055fi
18056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18057  conftest.$ac_objext conftest.beam conftest.$ac_ext
18058fi
18059
18060fi
18061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
18062$as_echo "$gl_cv_func_fdopendir_works" >&6; }
18063    case "$gl_cv_func_fdopendir_works" in
18064      *yes) ;;
18065      *)
18066        REPLACE_FDOPENDIR=1
18067        ;;
18068    esac
18069  fi
18070
18071  if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
18072
18073
18074
18075
18076
18077
18078
18079
18080  gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
18081
18082  fi
18083
18084
18085
18086
18087
18088          GNULIB_FDOPENDIR=1
18089
18090
18091
18092
18093
18094$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
18095
18096
18097
18098
18099
18100cat >>confdefs.h <<_ACEOF
18101#define GNULIB_FDOPENDIR 1
18102_ACEOF
18103
18104
18105
18106
18107    ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
18108if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
18109
18110cat >>confdefs.h <<_ACEOF
18111#define HAVE_STRUCT_STAT_ST_BLOCKS 1
18112_ACEOF
18113
18114
18115$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
18116
18117else
18118  :
18119fi
18120
18121
18122
18123
18124  if test $ac_cv_member_struct_stat_st_blocks = no; then
18125
18126
18127
18128
18129
18130
18131
18132
18133  gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext"
18134
18135
18136
18137  :
18138
18139  fi
18140
18141
18142
18143
18144  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
18145$as_echo_n "checking for flexible array member... " >&6; }
18146if ${ac_cv_c_flexmember+:} false; then :
18147  $as_echo_n "(cached) " >&6
18148else
18149  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18150/* end confdefs.h.  */
18151#include <stdlib.h>
18152            #include <stdio.h>
18153            #include <stddef.h>
18154            struct s { int n; double d[]; };
18155int
18156main ()
18157{
18158int m = getchar ();
18159            size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
18160            nbytes += sizeof (struct s) - 1;
18161            nbytes -= nbytes % sizeof (struct s);
18162            struct s *p = malloc (nbytes);
18163            p->d[0] = 0.0;
18164            return p->d != (double *) NULL;
18165  ;
18166  return 0;
18167}
18168_ACEOF
18169if ac_fn_c_try_compile "$LINENO"; then :
18170  ac_cv_c_flexmember=yes
18171else
18172  ac_cv_c_flexmember=no
18173fi
18174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18175fi
18176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
18177$as_echo "$ac_cv_c_flexmember" >&6; }
18178  if test $ac_cv_c_flexmember = yes; then
18179
18180$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
18181
18182  else
18183    $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
18184
18185  fi
18186
18187
18188
18189
18190  FLOAT_H=
18191  REPLACE_FLOAT_LDBL=0
18192  case "$host_os" in
18193    aix* | beos* | openbsd* | mirbsd* | irix*)
18194      FLOAT_H=float.h
18195      ;;
18196    freebsd*)
18197      case "$host_cpu" in
18198        i[34567]86 )
18199          FLOAT_H=float.h
18200          ;;
18201        x86_64 )
18202          # On x86_64 systems, the C compiler may still be generating
18203          # 32-bit code.
18204          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18205/* end confdefs.h.  */
18206#if defined __LP64__ || defined __x86_64__ || defined __amd64__
18207             yes
18208             #endif
18209_ACEOF
18210if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18211  $EGREP "yes" >/dev/null 2>&1; then :
18212
18213else
18214  FLOAT_H=float.h
18215fi
18216rm -f conftest*
18217
18218          ;;
18219      esac
18220      ;;
18221    linux*)
18222      case "$host_cpu" in
18223        powerpc*)
18224          FLOAT_H=float.h
18225          ;;
18226      esac
18227      ;;
18228  esac
18229  case "$host_os" in
18230    aix* | freebsd* | linux*)
18231      if test -n "$FLOAT_H"; then
18232        REPLACE_FLOAT_LDBL=1
18233      fi
18234      ;;
18235  esac
18236
18237    REPLACE_ITOLD=0
18238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
18239$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
18240if ${gl_cv_func_itold_works+:} false; then :
18241  $as_echo_n "(cached) " >&6
18242else
18243
18244      if test "$cross_compiling" = yes; then :
18245  case "$host" in
18246           sparc*-*-linux*)
18247             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18248/* end confdefs.h.  */
18249#if defined __LP64__ || defined __arch64__
18250                yes
18251                #endif
18252_ACEOF
18253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18254  $EGREP "yes" >/dev/null 2>&1; then :
18255  gl_cv_func_itold_works="guessing no"
18256else
18257  gl_cv_func_itold_works="guessing yes"
18258fi
18259rm -f conftest*
18260
18261             ;;
18262           *) gl_cv_func_itold_works="guessing yes" ;;
18263         esac
18264
18265else
18266  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18267/* end confdefs.h.  */
18268
18269int i = -1;
18270volatile long double ld;
18271int main ()
18272{
18273  ld += i * 1.0L;
18274  if (ld > 0)
18275    return 1;
18276  return 0;
18277}
18278_ACEOF
18279if ac_fn_c_try_run "$LINENO"; then :
18280  gl_cv_func_itold_works=yes
18281else
18282  gl_cv_func_itold_works=no
18283fi
18284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18285  conftest.$ac_objext conftest.beam conftest.$ac_ext
18286fi
18287
18288
18289fi
18290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
18291$as_echo "$gl_cv_func_itold_works" >&6; }
18292  case "$gl_cv_func_itold_works" in
18293    *no)
18294      REPLACE_ITOLD=1
18295                  FLOAT_H=float.h
18296      ;;
18297  esac
18298
18299  if test -n "$FLOAT_H"; then
18300
18301
18302
18303
18304
18305
18306
18307
18308     if test $gl_cv_have_include_next = yes; then
18309       gl_cv_next_float_h='<'float.h'>'
18310     else
18311       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
18312$as_echo_n "checking absolute name of <float.h>... " >&6; }
18313if ${gl_cv_next_float_h+:} false; then :
18314  $as_echo_n "(cached) " >&6
18315else
18316
18317
18318
18319  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18320/* end confdefs.h.  */
18321#include <float.h>
18322_ACEOF
18323                case "$host_os" in
18324    aix*) gl_absname_cpp="$ac_cpp -C" ;;
18325    *)    gl_absname_cpp="$ac_cpp" ;;
18326  esac
18327
18328  case "$host_os" in
18329    mingw*)
18330                                          gl_dirsep_regex='[/\\]'
18331      ;;
18332    *)
18333      gl_dirsep_regex='\/'
18334      ;;
18335  esac
18336      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18337  gl_header_literal_regex=`echo 'float.h' \
18338                           | sed -e "$gl_make_literal_regex_sed"`
18339  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18340      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18341      s|^/[^/]|//&|
18342      p
18343      q
18344    }'
18345
18346        gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18347  sed -n "$gl_absolute_header_sed"`
18348
18349           gl_header=$gl_cv_absolute_float_h
18350           gl_cv_next_float_h='"'$gl_header'"'
18351
18352
18353fi
18354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
18355$as_echo "$gl_cv_next_float_h" >&6; }
18356     fi
18357     NEXT_FLOAT_H=$gl_cv_next_float_h
18358
18359     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18360       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18361       gl_next_as_first_directive='<'float.h'>'
18362     else
18363       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18364       gl_next_as_first_directive=$gl_cv_next_float_h
18365     fi
18366     NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
18367
18368
18369
18370
18371  fi
18372
18373   if test -n "$FLOAT_H"; then
18374  GL_GENERATE_FLOAT_H_TRUE=
18375  GL_GENERATE_FLOAT_H_FALSE='#'
18376else
18377  GL_GENERATE_FLOAT_H_TRUE='#'
18378  GL_GENERATE_FLOAT_H_FALSE=
18379fi
18380
18381
18382
18383  if test $REPLACE_FLOAT_LDBL = 1; then
18384
18385
18386
18387
18388
18389
18390
18391
18392  gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
18393
18394  fi
18395  if test $REPLACE_ITOLD = 1; then
18396
18397
18398
18399
18400
18401
18402
18403
18404  gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
18405
18406  fi
18407
18408
18409
18410
18411
18412  FNMATCH_H=
18413  gl_fnmatch_required_lowercase=`
18414    echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
18415  `
18416  gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
18417  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
18418$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
18419if eval \${$gl_fnmatch_cache_var+:} false; then :
18420  $as_echo_n "(cached) " >&6
18421else
18422                           if test $gl_fnmatch_required = GNU; then
18423       gl_fnmatch_gnu_start=
18424       gl_fnmatch_gnu_end=
18425     else
18426       gl_fnmatch_gnu_start='#if 0'
18427       gl_fnmatch_gnu_end='#endif'
18428     fi
18429     if test "$cross_compiling" = yes; then :
18430  eval "$gl_fnmatch_cache_var=\"guessing no\""
18431else
18432  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18433/* end confdefs.h.  */
18434#include <fnmatch.h>
18435            static int
18436            y (char const *pattern, char const *string, int flags)
18437            {
18438              return fnmatch (pattern, string, flags) == 0;
18439            }
18440            static int
18441            n (char const *pattern, char const *string, int flags)
18442            {
18443              return fnmatch (pattern, string, flags) == FNM_NOMATCH;
18444            }
18445
18446int
18447main ()
18448{
18449char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
18450            char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
18451            static char const A_1[] = { 'A' - 1, 0 };
18452            static char const A01[] = { 'A' + 1, 0 };
18453            static char const a_1[] = { 'a' - 1, 0 };
18454            static char const a01[] = { 'a' + 1, 0 };
18455            static char const bs_1[] = { '\\\\' - 1, 0 };
18456            static char const bs01[] = { '\\\\' + 1, 0 };
18457            int result = 0;
18458            if (!n ("a*", "", 0))
18459              return 1;
18460            if (!y ("a*", "abc", 0))
18461              return 1;
18462            if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
18463              return 1;
18464            if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
18465              return 2;
18466            if (!y ("a\\\\bc", "abc", 0))
18467              return 3;
18468            if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
18469              return 3;
18470            if (!y ("*x", ".x", 0))
18471              return 4;
18472            if (!n ("*x", ".x", FNM_PERIOD))
18473              return 4;
18474            if (!y (Apat, "\\\\", 0))
18475              return 5;
18476            if (!y (Apat, "A", 0))
18477              return 5;
18478            if (!y (apat, "\\\\", 0))
18479              return 5;
18480            if (!y (apat, "a", 0))
18481              return 5;
18482            if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
18483              return 5;
18484            if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
18485              return 5;
18486            if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
18487              return 5;
18488            if (!(y (apat, a01, 0) == ('a' < '\\\\')))
18489              return 5;
18490            if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
18491              return 5;
18492            if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
18493              return 5;
18494            if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
18495              return 5;
18496            if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
18497              return 5;
18498            $gl_fnmatch_gnu_start
18499            if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
18500              result |= 8;
18501            if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
18502              result |= 16;
18503            if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
18504              result |= 32;
18505            if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
18506              result |= 64;
18507            if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
18508              result |= 64;
18509            if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
18510              result |= 64;
18511            $gl_fnmatch_gnu_end
18512            return result;
18513
18514  ;
18515  return 0;
18516}
18517_ACEOF
18518if ac_fn_c_try_run "$LINENO"; then :
18519  eval "$gl_fnmatch_cache_var=yes"
18520else
18521  eval "$gl_fnmatch_cache_var=no"
18522fi
18523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18524  conftest.$ac_objext conftest.beam conftest.$ac_ext
18525fi
18526
18527
18528fi
18529eval ac_res=\$$gl_fnmatch_cache_var
18530	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18531$as_echo "$ac_res" >&6; }
18532  eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
18533  if test "$gl_fnmatch_result" = yes; then
18534            rm -f "$gl_source_base/fnmatch.h"
18535  else
18536    FNMATCH_H=fnmatch.h
18537  fi
18538
18539   if test -n "$FNMATCH_H"; then
18540  GL_GENERATE_FNMATCH_H_TRUE=
18541  GL_GENERATE_FNMATCH_H_FALSE='#'
18542else
18543  GL_GENERATE_FNMATCH_H_TRUE='#'
18544  GL_GENERATE_FNMATCH_H_FALSE=
18545fi
18546
18547
18548  if test -n "$FNMATCH_H"; then
18549
18550
18551
18552
18553
18554
18555
18556
18557  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
18558
18559
18560
18561cat >>confdefs.h <<_ACEOF
18562#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
18563_ACEOF
18564
18565
18566  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
18567"
18568if test "x$ac_cv_have_decl_isblank" = xyes; then :
18569  ac_have_decl=1
18570else
18571  ac_have_decl=0
18572fi
18573
18574cat >>confdefs.h <<_ACEOF
18575#define HAVE_DECL_ISBLANK $ac_have_decl
18576_ACEOF
18577
18578
18579
18580
18581  fi
18582
18583
18584
18585
18586
18587  if test -n "$FNMATCH_H"; then
18588
18589
18590
18591
18592
18593
18594
18595
18596  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
18597
18598
18599
18600cat >>confdefs.h <<_ACEOF
18601#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
18602_ACEOF
18603
18604
18605  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
18606"
18607if test "x$ac_cv_have_decl_isblank" = xyes; then :
18608  ac_have_decl=1
18609else
18610  ac_have_decl=0
18611fi
18612
18613cat >>confdefs.h <<_ACEOF
18614#define HAVE_DECL_ISBLANK $ac_have_decl
18615_ACEOF
18616
18617
18618
18619
18620  fi
18621
18622
18623  fp_headers='
18624    #include <stdio.h>
18625    #if HAVE_STDIO_EXT_H
18626    # include <stdio_ext.h>
18627    #endif
18628  '
18629  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
18630$as_echo_n "checking for __fpending... " >&6; }
18631if ${gl_cv_func___fpending+:} false; then :
18632  $as_echo_n "(cached) " >&6
18633else
18634
18635      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18636/* end confdefs.h.  */
18637$fp_headers
18638int
18639main ()
18640{
18641return ! __fpending (stdin);
18642  ;
18643  return 0;
18644}
18645_ACEOF
18646if ac_fn_c_try_link "$LINENO"; then :
18647  gl_cv_func___fpending=yes
18648else
18649  gl_cv_func___fpending=no
18650fi
18651rm -f core conftest.err conftest.$ac_objext \
18652    conftest$ac_exeext conftest.$ac_ext
18653
18654fi
18655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
18656$as_echo "$gl_cv_func___fpending" >&6; }
18657  if test $gl_cv_func___fpending = yes; then
18658    ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
18659"
18660if test "x$ac_cv_have_decl___fpending" = xyes; then :
18661  ac_have_decl=1
18662else
18663  ac_have_decl=0
18664fi
18665
18666cat >>confdefs.h <<_ACEOF
18667#define HAVE_DECL___FPENDING $ac_have_decl
18668_ACEOF
18669
18670  fi
18671
18672  if test $gl_cv_func___fpending = no; then
18673
18674
18675
18676
18677
18678
18679
18680
18681  gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
18682
18683  fi
18684
18685
18686
18687    if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
18688    REPLACE_FSEEK=1
18689  fi
18690
18691  if test $REPLACE_FSEEK = 1; then
18692
18693
18694
18695
18696
18697
18698
18699
18700  gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
18701
18702  fi
18703
18704
18705
18706
18707
18708          GNULIB_FSEEK=1
18709
18710
18711
18712
18713
18714$as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
18727$as_echo_n "checking for fseeko... " >&6; }
18728if ${gl_cv_func_fseeko+:} false; then :
18729  $as_echo_n "(cached) " >&6
18730else
18731
18732      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18733/* end confdefs.h.  */
18734#include <stdio.h>
18735
18736int
18737main ()
18738{
18739fseeko (stdin, 0, 0);
18740  ;
18741  return 0;
18742}
18743_ACEOF
18744if ac_fn_c_try_link "$LINENO"; then :
18745  gl_cv_func_fseeko=yes
18746else
18747  gl_cv_func_fseeko=no
18748fi
18749rm -f core conftest.err conftest.$ac_objext \
18750    conftest$ac_exeext conftest.$ac_ext
18751
18752fi
18753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
18754$as_echo "$gl_cv_func_fseeko" >&6; }
18755
18756
18757  if test $ac_cv_have_decl_fseeko = no; then
18758    HAVE_DECL_FSEEKO=0
18759  fi
18760
18761  if test $gl_cv_func_fseeko = no; then
18762    HAVE_FSEEKO=0
18763  else
18764    if test $WINDOWS_64_BIT_OFF_T = 1; then
18765      REPLACE_FSEEKO=1
18766    fi
18767    if test $gl_cv_var_stdin_large_offset = no; then
18768      REPLACE_FSEEKO=1
18769    fi
18770
18771  fi
18772
18773  if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
18774
18775
18776
18777
18778
18779
18780
18781
18782  gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
18783
18784
18785      for ac_func in _fseeki64
18786do :
18787  ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
18788if test "x$ac_cv_func__fseeki64" = xyes; then :
18789  cat >>confdefs.h <<_ACEOF
18790#define HAVE__FSEEKI64 1
18791_ACEOF
18792
18793fi
18794done
18795
18796
18797  fi
18798
18799
18800
18801
18802
18803          GNULIB_FSEEKO=1
18804
18805
18806
18807
18808
18809$as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
18810
18811
18812
18813
18814
18815
18816
18817  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18818    REPLACE_FSTAT=1
18819  fi
18820
18821
18822  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
18823    REPLACE_FSTAT=1
18824  fi
18825
18826
18827
18828
18829
18830  if test $ac_cv_func_fchdir = no; then
18831    HAVE_FCHDIR=0
18832  fi
18833
18834    if test $HAVE_FCHDIR = 0; then
18835      case "$gl_cv_func_open_directory_works" in
18836        *yes) ;;
18837        *)
18838          REPLACE_FSTAT=1
18839          ;;
18840      esac
18841    fi
18842
18843
18844  if test $REPLACE_FSTAT = 1; then
18845
18846
18847
18848
18849
18850
18851
18852
18853  gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
18854
18855    :
18856  fi
18857
18858
18859
18860
18861
18862          GNULIB_FSTAT=1
18863
18864
18865
18866
18867
18868$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878  if test $ac_cv_func_fstatat = no; then
18879    HAVE_FSTATAT=0
18880  else
18881            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
18882$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
18883if ${gl_cv_func_fstatat_zero_flag+:} false; then :
18884  $as_echo_n "(cached) " >&6
18885else
18886  if test "$cross_compiling" = yes; then :
18887  case "$host_os" in
18888            aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
18889            *)    gl_cv_func_fstatat_zero_flag="guessing yes";;
18890          esac
18891
18892else
18893  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18894/* end confdefs.h.  */
18895
18896              #include <fcntl.h>
18897              #include <sys/stat.h>
18898              int
18899              main (void)
18900              {
18901                struct stat a;
18902                return fstatat (AT_FDCWD, ".", &a, 0) != 0;
18903              }
18904
18905_ACEOF
18906if ac_fn_c_try_run "$LINENO"; then :
18907  gl_cv_func_fstatat_zero_flag=yes
18908else
18909  gl_cv_func_fstatat_zero_flag=no
18910fi
18911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18912  conftest.$ac_objext conftest.beam conftest.$ac_ext
18913fi
18914
18915
18916fi
18917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
18918$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
18919
18920    case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
18921    *yes+*yes) ;;
18922    *) REPLACE_FSTATAT=1
18923       case $gl_cv_func_fstatat_zero_flag in
18924       *yes)
18925
18926$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
18927
18928         ;;
18929       esac
18930       ;;
18931    esac
18932  fi
18933
18934  if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
18935
18936
18937
18938
18939
18940
18941
18942
18943  gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
18944
18945  fi
18946
18947
18948
18949
18950
18951          GNULIB_FSTATAT=1
18952
18953
18954
18955
18956
18957$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
18958
18959
18960
18961
18962
18963
18964
18965
18966  gl_abort_bug=no
18967  case "$host_os" in
18968    mingw*)
18969      gl_cv_func_getcwd_path_max=yes
18970      ;;
18971    *)
18972
18973
18974
18975
18976
18977  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
18978$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
18979if ${gl_cv_func_getcwd_path_max+:} false; then :
18980  $as_echo_n "(cached) " >&6
18981else
18982  # Arrange for deletion of the temporary directory this test creates.
18983     ac_clean_files="$ac_clean_files confdir3"
18984          if test "$cross_compiling" = yes; then :
18985  case "$host_os" in
18986       aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
18987       *) gl_cv_func_getcwd_path_max=no;;
18988     esac
18989else
18990  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18991/* end confdefs.h.  */
18992
18993#include <errno.h>
18994#include <stdlib.h>
18995#if HAVE_UNISTD_H
18996# include <unistd.h>
18997#else
18998# include <direct.h>
18999#endif
19000#include <string.h>
19001#include <limits.h>
19002#include <sys/stat.h>
19003#include <sys/types.h>
19004#include <fcntl.h>
19005
19006
19007/* Arrange to define PATH_MAX, like "pathmax.h" does. */
19008#if HAVE_UNISTD_H
19009# include <unistd.h>
19010#endif
19011#include <limits.h>
19012#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19013# include <sys/param.h>
19014#endif
19015#if !defined PATH_MAX && defined MAXPATHLEN
19016# define PATH_MAX MAXPATHLEN
19017#endif
19018#ifdef __hpux
19019# undef PATH_MAX
19020# define PATH_MAX 1024
19021#endif
19022#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19023# undef PATH_MAX
19024# define PATH_MAX 260
19025#endif
19026
19027
19028#ifndef AT_FDCWD
19029# define AT_FDCWD 0
19030#endif
19031#ifdef ENAMETOOLONG
19032# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
19033#else
19034# define is_ENAMETOOLONG(x) 0
19035#endif
19036
19037/* Use the getcwd function, not any macro.  */
19038#undef getcwd
19039
19040/* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
19041#undef mkdir
19042
19043#ifndef S_IRWXU
19044# define S_IRWXU 0700
19045#endif
19046
19047/* The length of this name must be 8.  */
19048#define DIR_NAME "confdir3"
19049#define DIR_NAME_LEN 8
19050#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
19051
19052/* The length of "../".  */
19053#define DOTDOTSLASH_LEN 3
19054
19055/* Leftover bytes in the buffer, to work around library or OS bugs.  */
19056#define BUF_SLOP 20
19057
19058int
19059main ()
19060{
19061#ifndef PATH_MAX
19062  /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
19063     at least not on a local file system.  And if we were to start worrying
19064     about remote file systems, we'd have to enable the wrapper function
19065     all of the time, just to be safe.  That's not worth the cost.  */
19066  exit (0);
19067#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
19068        - DIR_NAME_SIZE - BUF_SLOP) \
19069       <= PATH_MAX)
19070  /* FIXME: Assuming there's a system for which this is true,
19071     this should be done in a compile test.  */
19072  exit (0);
19073#else
19074  char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
19075           + DIR_NAME_SIZE + BUF_SLOP];
19076  char *cwd = getcwd (buf, PATH_MAX);
19077  size_t initial_cwd_len;
19078  size_t cwd_len;
19079  int fail = 0;
19080  size_t n_chdirs = 0;
19081
19082  if (cwd == NULL)
19083    exit (10);
19084
19085  cwd_len = initial_cwd_len = strlen (cwd);
19086
19087  while (1)
19088    {
19089      size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
19090      char *c = NULL;
19091
19092      cwd_len += DIR_NAME_SIZE;
19093      /* If mkdir or chdir fails, it could be that this system cannot create
19094         any file with an absolute name longer than PATH_MAX, such as cygwin.
19095         If so, leave fail as 0, because the current working directory can't
19096         be too long for getcwd if it can't even be created.  For other
19097         errors, be pessimistic and consider that as a failure, too.  */
19098      if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
19099        {
19100          if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19101            fail = 20;
19102          break;
19103        }
19104
19105      if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
19106        {
19107          struct stat sb;
19108
19109          c = getcwd (buf, PATH_MAX);
19110          if (!c && errno == ENOENT)
19111            {
19112              fail = 11;
19113              break;
19114            }
19115          if (c)
19116            {
19117              fail = 31;
19118              break;
19119            }
19120          if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19121            {
19122              fail = 21;
19123              break;
19124            }
19125
19126          /* Our replacement needs to be able to stat() long ../../paths,
19127             so generate a path larger than PATH_MAX to check,
19128             avoiding the replacement if we can't stat().  */
19129          c = getcwd (buf, cwd_len + 1);
19130          if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
19131            {
19132              fail = 32;
19133              break;
19134            }
19135        }
19136
19137      if (dotdot_max <= cwd_len - initial_cwd_len)
19138        {
19139          if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
19140            break;
19141          c = getcwd (buf, cwd_len + 1);
19142          if (!c)
19143            {
19144              if (! (errno == ERANGE || errno == ENOENT
19145                     || is_ENAMETOOLONG (errno)))
19146                {
19147                  fail = 22;
19148                  break;
19149                }
19150              if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
19151                {
19152                  fail = 12;
19153                  break;
19154                }
19155            }
19156        }
19157
19158      if (c && strlen (c) != cwd_len)
19159        {
19160          fail = 23;
19161          break;
19162        }
19163      ++n_chdirs;
19164    }
19165
19166  /* Leaving behind such a deep directory is not polite.
19167     So clean up here, right away, even though the driving
19168     shell script would also clean up.  */
19169  {
19170    size_t i;
19171
19172    /* Try rmdir first, in case the chdir failed.  */
19173    rmdir (DIR_NAME);
19174    for (i = 0; i <= n_chdirs; i++)
19175      {
19176        if (chdir ("..") < 0)
19177          break;
19178        if (rmdir (DIR_NAME) != 0)
19179          break;
19180      }
19181  }
19182
19183  exit (fail);
19184#endif
19185}
19186
19187_ACEOF
19188if ac_fn_c_try_run "$LINENO"; then :
19189  gl_cv_func_getcwd_path_max=yes
19190else
19191  case $? in
19192     10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
19193     31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
19194     32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
19195     *) gl_cv_func_getcwd_path_max=no;;
19196     esac
19197fi
19198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19199  conftest.$ac_objext conftest.beam conftest.$ac_ext
19200fi
19201
19202
19203fi
19204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
19205$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
19206
19207      case "$gl_cv_func_getcwd_null" in
19208        *yes)
19209
19210
19211
19212
19213  for ac_func in getpagesize
19214do :
19215  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
19216if test "x$ac_cv_func_getpagesize" = xyes; then :
19217  cat >>confdefs.h <<_ACEOF
19218#define HAVE_GETPAGESIZE 1
19219_ACEOF
19220
19221fi
19222done
19223
19224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
19225$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
19226if ${gl_cv_func_getcwd_abort_bug+:} false; then :
19227  $as_echo_n "(cached) " >&6
19228else
19229  # Remove any remnants of a previous test.
19230     rm -rf confdir-14B---
19231     # Arrange for deletion of the temporary directory this test creates.
19232     ac_clean_files="$ac_clean_files confdir-14B---"
19233          if test "$cross_compiling" = yes; then :
19234  gl_cv_func_getcwd_abort_bug=yes
19235else
19236  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19237/* end confdefs.h.  */
19238
19239#include <errno.h>
19240#include <stdlib.h>
19241#if HAVE_UNISTD_H
19242# include <unistd.h>
19243#else /* on Windows with MSVC */
19244# include <direct.h>
19245#endif
19246#include <string.h>
19247#include <sys/stat.h>
19248
19249
19250/* Arrange to define PATH_MAX, like "pathmax.h" does. */
19251#if HAVE_UNISTD_H
19252# include <unistd.h>
19253#endif
19254#include <limits.h>
19255#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19256# include <sys/param.h>
19257#endif
19258#if !defined PATH_MAX && defined MAXPATHLEN
19259# define PATH_MAX MAXPATHLEN
19260#endif
19261#ifdef __hpux
19262# undef PATH_MAX
19263# define PATH_MAX 1024
19264#endif
19265#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19266# undef PATH_MAX
19267# define PATH_MAX 260
19268#endif
19269
19270
19271/* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
19272#undef mkdir
19273
19274#ifndef S_IRWXU
19275# define S_IRWXU 0700
19276#endif
19277
19278/* FIXME: skip the run-test altogether on systems without getpagesize.  */
19279#if ! HAVE_GETPAGESIZE
19280# define getpagesize() 0
19281#endif
19282
19283/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
19284   the 16kB pagesize on ia64 linux.  Those conditions make the code below
19285   trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
19286#define TARGET_LEN (5 * 1024)
19287
19288int
19289main ()
19290{
19291  char *cwd;
19292  size_t initial_cwd_len;
19293  int fail = 0;
19294
19295  /* The bug is triggered when PATH_MAX < getpagesize (), so skip
19296     this relatively expensive and invasive test if that's not true.  */
19297#ifdef PATH_MAX
19298  int bug_possible = PATH_MAX < getpagesize ();
19299#else
19300  int bug_possible = 0;
19301#endif
19302  if (! bug_possible)
19303    return 0;
19304
19305  cwd = getcwd (NULL, 0);
19306  if (cwd == NULL)
19307    return 2;
19308
19309  initial_cwd_len = strlen (cwd);
19310  free (cwd);
19311
19312  if (1)
19313    {
19314      static char const dir_name[] = "confdir-14B---";
19315      size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
19316                              / sizeof dir_name);
19317      size_t d;
19318      for (d = 0; d < desired_depth; d++)
19319        {
19320          if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
19321            {
19322              if (! (errno == ERANGE || errno == ENAMETOOLONG
19323                     || errno == ENOENT))
19324                fail = 3; /* Unable to construct deep hierarchy.  */
19325              break;
19326            }
19327        }
19328
19329      /* If libc has the bug in question, this invocation of getcwd
19330         results in a failed assertion.  */
19331      cwd = getcwd (NULL, 0);
19332      if (cwd == NULL)
19333        fail = 4; /* getcwd didn't assert, but it failed for a long name
19334                     where the answer could have been learned.  */
19335      free (cwd);
19336
19337      /* Call rmdir first, in case the above chdir failed.  */
19338      rmdir (dir_name);
19339      while (0 < d--)
19340        {
19341          if (chdir ("..") < 0)
19342            {
19343              fail = 5;
19344              break;
19345            }
19346          rmdir (dir_name);
19347        }
19348    }
19349
19350  return fail;
19351}
19352
19353_ACEOF
19354if ac_fn_c_try_run "$LINENO"; then :
19355  gl_cv_func_getcwd_abort_bug=no
19356else
19357                                ret=$?
19358     if test $ret -ge 128 || test $ret = 4; then
19359       gl_cv_func_getcwd_abort_bug=yes
19360     else
19361       gl_cv_func_getcwd_abort_bug=no
19362     fi
19363fi
19364rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19365  conftest.$ac_objext conftest.beam conftest.$ac_ext
19366fi
19367
19368
19369fi
19370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
19371$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
19372  if test $gl_cv_func_getcwd_abort_bug = yes; then :
19373  gl_abort_bug=yes
19374fi
19375
19376          ;;
19377      esac
19378      ;;
19379  esac
19380      case "$gl_cv_func_getcwd_path_max" in
19381    "no"|"no, it has the AIX bug") ;;
19382    *)
19383
19384$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
19385
19386      ;;
19387  esac
19388  case "$gl_cv_func_getcwd_path_max" in
19389    "no, but it is partly working")
19390
19391$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
19392
19393      ;;
19394    "yes, but with shorter paths")
19395
19396$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
19397
19398      ;;
19399  esac
19400
19401  if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
19402     || test $gl_cv_func_getcwd_posix_signature != yes \
19403     || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
19404     || test $gl_abort_bug = yes; then
19405    REPLACE_GETCWD=1
19406  fi
19407
19408  if test $REPLACE_GETCWD = 1; then
19409
19410
19411
19412
19413
19414
19415
19416
19417  gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
19418
19419
19420
19421
19422  :
19423
19424  fi
19425
19426
19427cat >>confdefs.h <<_ACEOF
19428#define GNULIB_GETCWD 1
19429_ACEOF
19430
19431
19432
19433
19434
19435
19436
19437          GNULIB_GETCWD=1
19438
19439
19440
19441
19442
19443$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
19444
19445
19446
19447
19448
19449
19450
19451
19452  case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
19453  *yes,yes) ;;
19454  *)
19455        REPLACE_GETCWD=1
19456    ;;
19457  esac
19458
19459  if test $REPLACE_GETCWD = 1; then
19460
19461
19462
19463
19464
19465
19466
19467
19468  gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
19469
19470  fi
19471
19472
19473
19474
19475
19476          GNULIB_GETCWD=1
19477
19478
19479
19480
19481
19482$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494  if test $ac_cv_func_getdelim = yes; then
19495    HAVE_GETDELIM=1
19496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
19497$as_echo_n "checking for working getdelim function... " >&6; }
19498if ${gl_cv_func_working_getdelim+:} false; then :
19499  $as_echo_n "(cached) " >&6
19500else
19501  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
19502    if test "$cross_compiling" = yes; then :
19503        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19504/* end confdefs.h.  */
19505
19506#include <features.h>
19507#ifdef __GNU_LIBRARY__
19508 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
19509  Lucky GNU user
19510 #endif
19511#endif
19512
19513_ACEOF
19514if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19515  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
19516  gl_cv_func_working_getdelim="guessing yes"
19517else
19518  gl_cv_func_working_getdelim="guessing no"
19519fi
19520rm -f conftest*
19521
19522
19523else
19524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19525/* end confdefs.h.  */
19526
19527#    include <stdio.h>
19528#    include <stdlib.h>
19529#    include <string.h>
19530    int main ()
19531    {
19532      FILE *in = fopen ("./conftest.data", "r");
19533      if (!in)
19534        return 1;
19535      {
19536        /* Test result for a NULL buffer and a zero size.
19537           Based on a test program from Karl Heuer.  */
19538        char *line = NULL;
19539        size_t siz = 0;
19540        int len = getdelim (&line, &siz, '\n', in);
19541        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
19542          return 2;
19543      }
19544      {
19545        /* Test result for a NULL buffer and a non-zero size.
19546           This crashes on FreeBSD 8.0.  */
19547        char *line = NULL;
19548        size_t siz = (size_t)(~0) / 4;
19549        if (getdelim (&line, &siz, '\n', in) == -1)
19550          return 3;
19551        free (line);
19552      }
19553      fclose (in);
19554      return 0;
19555    }
19556
19557_ACEOF
19558if ac_fn_c_try_run "$LINENO"; then :
19559  gl_cv_func_working_getdelim=yes
19560else
19561  gl_cv_func_working_getdelim=no
19562fi
19563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19564  conftest.$ac_objext conftest.beam conftest.$ac_ext
19565fi
19566
19567fi
19568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
19569$as_echo "$gl_cv_func_working_getdelim" >&6; }
19570    case "$gl_cv_func_working_getdelim" in
19571      *no)
19572        REPLACE_GETDELIM=1
19573        ;;
19574    esac
19575  else
19576    HAVE_GETDELIM=0
19577  fi
19578
19579  if test $ac_cv_have_decl_getdelim = no; then
19580    HAVE_DECL_GETDELIM=0
19581  fi
19582
19583  if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
19584
19585
19586
19587
19588
19589
19590
19591
19592  gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
19593
19594
19595  for ac_func in flockfile funlockfile
19596do :
19597  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19598ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19599if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19600  cat >>confdefs.h <<_ACEOF
19601#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19602_ACEOF
19603
19604fi
19605done
19606
19607  ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
19608if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
19609  ac_have_decl=1
19610else
19611  ac_have_decl=0
19612fi
19613
19614cat >>confdefs.h <<_ACEOF
19615#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
19616_ACEOF
19617
19618
19619  fi
19620
19621
19622
19623
19624
19625          GNULIB_GETDELIM=1
19626
19627
19628
19629
19630
19631$as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
19632
19633
19634
19635
19636
19637
19638
19639
19640  if test $ac_cv_func_getdtablesize = yes &&
19641     test $ac_cv_have_decl_getdtablesize = yes; then
19642    # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
19643    # up to an unchangeable hard limit; all other platforms correctly
19644    # require setrlimit before getdtablesize() can report a larger value.
19645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
19646$as_echo_n "checking whether getdtablesize works... " >&6; }
19647if ${gl_cv_func_getdtablesize_works+:} false; then :
19648  $as_echo_n "(cached) " >&6
19649else
19650  if test "$cross_compiling" = yes; then :
19651  case "$host_os" in
19652          cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
19653            gl_cv_func_getdtablesize_works="guessing no" ;;
19654          *) gl_cv_func_getdtablesize_works="guessing yes" ;;
19655         esac
19656else
19657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19658/* end confdefs.h.  */
19659
19660        #include <unistd.h>
19661int
19662main ()
19663{
19664int size = getdtablesize();
19665           if (dup2 (0, getdtablesize()) != -1)
19666             return 1;
19667           if (size != getdtablesize())
19668             return 2;
19669
19670  ;
19671  return 0;
19672}
19673_ACEOF
19674if ac_fn_c_try_run "$LINENO"; then :
19675  gl_cv_func_getdtablesize_works=yes
19676else
19677  gl_cv_func_getdtablesize_works=no
19678fi
19679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19680  conftest.$ac_objext conftest.beam conftest.$ac_ext
19681fi
19682
19683
19684fi
19685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
19686$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
19687    case "$gl_cv_func_getdtablesize_works" in
19688      *yes) ;;
19689      *) REPLACE_GETDTABLESIZE=1 ;;
19690    esac
19691  else
19692    HAVE_GETDTABLESIZE=0
19693  fi
19694
19695  if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
19696
19697
19698
19699
19700
19701
19702
19703
19704  gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
19705
19706    :
19707  fi
19708
19709
19710
19711
19712
19713          GNULIB_GETDTABLESIZE=1
19714
19715
19716
19717
19718
19719$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730  gl_getline_needs_run_time_check=no
19731  ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
19732if test "x$ac_cv_func_getline" = xyes; then :
19733                   gl_getline_needs_run_time_check=yes
19734else
19735  am_cv_func_working_getline=no
19736fi
19737
19738  if test $gl_getline_needs_run_time_check = yes; then
19739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
19740$as_echo_n "checking for working getline function... " >&6; }
19741if ${am_cv_func_working_getline+:} false; then :
19742  $as_echo_n "(cached) " >&6
19743else
19744  echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
19745    if test "$cross_compiling" = yes; then :
19746        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19747/* end confdefs.h.  */
19748
19749#include <features.h>
19750#ifdef __GNU_LIBRARY__
19751 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
19752  Lucky GNU user
19753 #endif
19754#endif
19755
19756_ACEOF
19757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19758  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
19759  am_cv_func_working_getline="guessing yes"
19760else
19761  am_cv_func_working_getline="guessing no"
19762fi
19763rm -f conftest*
19764
19765
19766else
19767  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19768/* end confdefs.h.  */
19769
19770#    include <stdio.h>
19771#    include <stdlib.h>
19772#    include <string.h>
19773    int main ()
19774    {
19775      FILE *in = fopen ("./conftest.data", "r");
19776      if (!in)
19777        return 1;
19778      {
19779        /* Test result for a NULL buffer and a zero size.
19780           Based on a test program from Karl Heuer.  */
19781        char *line = NULL;
19782        size_t siz = 0;
19783        int len = getline (&line, &siz, in);
19784        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
19785          return 2;
19786        free (line);
19787      }
19788      {
19789        /* Test result for a NULL buffer and a non-zero size.
19790           This crashes on FreeBSD 8.0.  */
19791        char *line = NULL;
19792        size_t siz = (size_t)(~0) / 4;
19793        if (getline (&line, &siz, in) == -1)
19794          return 3;
19795        free (line);
19796      }
19797      fclose (in);
19798      return 0;
19799    }
19800
19801_ACEOF
19802if ac_fn_c_try_run "$LINENO"; then :
19803  am_cv_func_working_getline=yes
19804else
19805  am_cv_func_working_getline=no
19806fi
19807rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19808  conftest.$ac_objext conftest.beam conftest.$ac_ext
19809fi
19810
19811fi
19812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
19813$as_echo "$am_cv_func_working_getline" >&6; }
19814  fi
19815
19816  if test $ac_cv_have_decl_getline = no; then
19817    HAVE_DECL_GETLINE=0
19818  fi
19819
19820  case "$am_cv_func_working_getline" in
19821    *no)
19822                        REPLACE_GETLINE=1
19823      ;;
19824  esac
19825
19826  if test $REPLACE_GETLINE = 1; then
19827
19828
19829
19830
19831
19832
19833
19834
19835  gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
19836
19837
19838  :
19839
19840  fi
19841
19842
19843
19844
19845
19846          GNULIB_GETLINE=1
19847
19848
19849
19850
19851
19852$as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
19853
19854
19855
19856
19857
19858
19859
19860
19861  if test $REPLACE_GETOPT = 1; then
19862
19863
19864
19865
19866
19867
19868
19869
19870  gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880  gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
19881
19882
19883
19884
19885        GNULIB_GL_UNISTD_H_GETOPT=1
19886  fi
19887
19888
19889
19890
19891
19892
19893    REPLACE_GETOPT=1
19894
19895  if test $REPLACE_GETOPT = 1; then
19896
19897  GETOPT_H=getopt.h
19898
19899$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
19900
19901
19902
19903  fi
19904
19905  if test $REPLACE_GETOPT = 1; then
19906
19907
19908
19909
19910
19911
19912
19913
19914  gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924  gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
19925
19926
19927
19928
19929        GNULIB_GL_UNISTD_H_GETOPT=1
19930  fi
19931
19932
19933
19934
19935  ac_found=0
19936  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
19937"
19938if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
19939  ac_have_decl=1
19940else
19941  ac_have_decl=0
19942fi
19943
19944cat >>confdefs.h <<_ACEOF
19945#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
19946_ACEOF
19947if test $ac_have_decl = 1; then :
19948  ac_found=1
19949fi
19950
19951  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
19952"
19953if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
19954  ac_have_decl=1
19955else
19956  ac_have_decl=0
19957fi
19958
19959cat >>confdefs.h <<_ACEOF
19960#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
19961_ACEOF
19962if test $ac_have_decl = 1; then :
19963  ac_found=1
19964fi
19965
19966  ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
19967"
19968if test "x$ac_cv_have_decl___argv" = xyes; then :
19969  ac_have_decl=1
19970else
19971  ac_have_decl=0
19972fi
19973
19974cat >>confdefs.h <<_ACEOF
19975#define HAVE_DECL___ARGV $ac_have_decl
19976_ACEOF
19977if test $ac_have_decl = 1; then :
19978  ac_found=1
19979fi
19980
19981
19982  # Incur the cost of this test only if none of the above worked.
19983  if test $ac_found = 0; then
19984    # On OpenBSD 5.1, using the global __progname variable appears to be
19985    # the only way to implement getprogname.
19986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
19987$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
19988if ${gl_cv_var___progname+:} false; then :
19989  $as_echo_n "(cached) " >&6
19990else
19991
19992        gl_cv_var___progname=
19993        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19994/* end confdefs.h.  */
19995extern char *__progname;
19996int
19997main ()
19998{
19999return *__progname;
20000
20001  ;
20002  return 0;
20003}
20004_ACEOF
20005if ac_fn_c_try_link "$LINENO"; then :
20006  gl_cv_var___progname=yes
20007
20008fi
20009rm -f core conftest.err conftest.$ac_objext \
20010    conftest$ac_exeext conftest.$ac_ext
20011
20012
20013fi
20014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
20015$as_echo "$gl_cv_var___progname" >&6; }
20016    if test "$gl_cv_var___progname" = yes; then
20017
20018$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
20019
20020    fi
20021  fi
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037  gl_gettimeofday_timezone=void
20038  if test $ac_cv_func_gettimeofday != yes; then
20039    HAVE_GETTIMEOFDAY=0
20040  else
20041
20042
20043
20044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
20045$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
20046if ${gl_cv_func_gettimeofday_clobber+:} false; then :
20047  $as_echo_n "(cached) " >&6
20048else
20049  if test "$cross_compiling" = yes; then :
20050  # When cross-compiling:
20051      case "$host_os" in
20052                # Guess all is fine on glibc systems.
20053        *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
20054                # If we don't know, assume the worst.
20055        *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
20056      esac
20057
20058else
20059  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20060/* end confdefs.h.  */
20061#include <string.h>
20062          #include <sys/time.h>
20063          #include <time.h>
20064          #include <stdlib.h>
20065
20066int
20067main ()
20068{
20069
20070          time_t t = 0;
20071          struct tm *lt;
20072          struct tm saved_lt;
20073          struct timeval tv;
20074          lt = localtime (&t);
20075          saved_lt = *lt;
20076          gettimeofday (&tv, NULL);
20077          return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
20078
20079  ;
20080  return 0;
20081}
20082_ACEOF
20083if ac_fn_c_try_run "$LINENO"; then :
20084  gl_cv_func_gettimeofday_clobber=no
20085else
20086  gl_cv_func_gettimeofday_clobber=yes
20087fi
20088rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20089  conftest.$ac_objext conftest.beam conftest.$ac_ext
20090fi
20091
20092fi
20093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
20094$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
20095
20096 case "$gl_cv_func_gettimeofday_clobber" in
20097   *yes)
20098     REPLACE_GETTIMEOFDAY=1
20099
20100  REPLACE_GMTIME=1
20101  REPLACE_LOCALTIME=1
20102
20103
20104$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
20105
20106     ;;
20107 esac
20108
20109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
20110$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
20111if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
20112  $as_echo_n "(cached) " >&6
20113else
20114  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20115/* end confdefs.h.  */
20116#include <sys/time.h>
20117              struct timeval c;
20118              int gettimeofday (struct timeval *restrict, void *restrict);
20119
20120int
20121main ()
20122{
20123/* glibc uses struct timezone * rather than the POSIX void *
20124                 if _GNU_SOURCE is defined.  However, since the only portable
20125                 use of gettimeofday uses NULL as the second parameter, and
20126                 since the glibc definition is actually more typesafe, it is
20127                 not worth wrapping this to get a compliant signature.  */
20128              int (*f) (struct timeval *restrict, void *restrict)
20129                = gettimeofday;
20130              int x = f (&c, 0);
20131              return !(x | c.tv_sec | c.tv_usec);
20132
20133  ;
20134  return 0;
20135}
20136_ACEOF
20137if ac_fn_c_try_compile "$LINENO"; then :
20138  gl_cv_func_gettimeofday_posix_signature=yes
20139else
20140  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20141/* end confdefs.h.  */
20142#include <sys/time.h>
20143int gettimeofday (struct timeval *restrict, struct timezone *restrict);
20144
20145int
20146main ()
20147{
20148
20149  ;
20150  return 0;
20151}
20152_ACEOF
20153if ac_fn_c_try_compile "$LINENO"; then :
20154  gl_cv_func_gettimeofday_posix_signature=almost
20155else
20156  gl_cv_func_gettimeofday_posix_signature=no
20157fi
20158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20159fi
20160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20161fi
20162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
20163$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
20164    if test $gl_cv_func_gettimeofday_posix_signature = almost; then
20165      gl_gettimeofday_timezone='struct timezone'
20166    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
20167      REPLACE_GETTIMEOFDAY=1
20168    fi
20169        if test $REPLACE_STRUCT_TIMEVAL = 1; then
20170      REPLACE_GETTIMEOFDAY=1
20171    fi
20172
20173  fi
20174
20175cat >>confdefs.h <<_ACEOF
20176#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
20177_ACEOF
20178
20179
20180  if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
20181
20182
20183
20184
20185
20186
20187
20188
20189  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
20190
20191
20192  for ac_header in sys/timeb.h
20193do :
20194  ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
20195if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
20196  cat >>confdefs.h <<_ACEOF
20197#define HAVE_SYS_TIMEB_H 1
20198_ACEOF
20199
20200fi
20201
20202done
20203
20204  for ac_func in _ftime
20205do :
20206  ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
20207if test "x$ac_cv_func__ftime" = xyes; then :
20208  cat >>confdefs.h <<_ACEOF
20209#define HAVE__FTIME 1
20210_ACEOF
20211
20212fi
20213done
20214
20215
20216  fi
20217
20218
20219
20220
20221
20222          GNULIB_GETTIMEOFDAY=1
20223
20224
20225
20226
20227
20228$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
20229
20230
20231
20232
20233  :
20234
20235
20236
20237
20238  :
20239
20240  :
20241  :
20242  :
20243  :
20244
20245
20246
20247
20248
20249
20250  PRIPTR_PREFIX=
20251  if test -n "$STDINT_H"; then
20252        PRIPTR_PREFIX='"l"'
20253  else
20254        for glpfx in '' l ll I64; do
20255      case $glpfx in
20256        '')  gltype1='int';;
20257        l)   gltype1='long int';;
20258        ll)  gltype1='long long int';;
20259        I64) gltype1='__int64';;
20260      esac
20261      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20262/* end confdefs.h.  */
20263#include <stdint.h>
20264           extern intptr_t foo;
20265           extern $gltype1 foo;
20266int
20267main ()
20268{
20269
20270  ;
20271  return 0;
20272}
20273_ACEOF
20274if ac_fn_c_try_compile "$LINENO"; then :
20275  PRIPTR_PREFIX='"'$glpfx'"'
20276fi
20277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20278      test -n "$PRIPTR_PREFIX" && break
20279    done
20280  fi
20281
20282
20283
20284  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
20285$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
20286if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
20287  $as_echo_n "(cached) " >&6
20288else
20289  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20290/* end confdefs.h.  */
20291/* Work also in C++ mode.  */
20292            #define __STDC_LIMIT_MACROS 1
20293
20294            /* Work if build is not clean.  */
20295            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20296
20297            #include <limits.h>
20298            #if HAVE_STDINT_H
20299             #include <stdint.h>
20300            #endif
20301
20302            #if defined INT32_MAX && defined INTMAX_MAX
20303             #define CONDITION (INT32_MAX < INTMAX_MAX)
20304            #elif HAVE_LONG_LONG_INT
20305             #define CONDITION (sizeof (int) < sizeof (long long int))
20306            #else
20307             #define CONDITION 0
20308            #endif
20309            int test[CONDITION ? 1 : -1];
20310int
20311main ()
20312{
20313
20314  ;
20315  return 0;
20316}
20317_ACEOF
20318if ac_fn_c_try_compile "$LINENO"; then :
20319  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
20320else
20321  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
20322fi
20323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20324fi
20325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
20326$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
20327  if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
20328    INT32_MAX_LT_INTMAX_MAX=1;
20329  else
20330    INT32_MAX_LT_INTMAX_MAX=0;
20331  fi
20332
20333
20334  if test $APPLE_UNIVERSAL_BUILD = 0; then
20335
20336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
20337$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
20338if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
20339  $as_echo_n "(cached) " >&6
20340else
20341  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20342/* end confdefs.h.  */
20343/* Work also in C++ mode.  */
20344            #define __STDC_LIMIT_MACROS 1
20345
20346            /* Work if build is not clean.  */
20347            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20348
20349            #include <limits.h>
20350            #if HAVE_STDINT_H
20351             #include <stdint.h>
20352            #endif
20353
20354            #if defined INT64_MAX
20355             #define CONDITION (INT64_MAX == LONG_MAX)
20356            #elif HAVE_LONG_LONG_INT
20357             #define CONDITION (sizeof (long long int) == sizeof (long int))
20358            #else
20359             #define CONDITION 0
20360            #endif
20361            int test[CONDITION ? 1 : -1];
20362int
20363main ()
20364{
20365
20366  ;
20367  return 0;
20368}
20369_ACEOF
20370if ac_fn_c_try_compile "$LINENO"; then :
20371  gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
20372else
20373  gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
20374fi
20375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20376fi
20377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
20378$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
20379  if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
20380    INT64_MAX_EQ_LONG_MAX=1;
20381  else
20382    INT64_MAX_EQ_LONG_MAX=0;
20383  fi
20384
20385
20386  else
20387    INT64_MAX_EQ_LONG_MAX=-1
20388  fi
20389
20390  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
20391$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
20392if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
20393  $as_echo_n "(cached) " >&6
20394else
20395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20396/* end confdefs.h.  */
20397/* Work also in C++ mode.  */
20398            #define __STDC_LIMIT_MACROS 1
20399
20400            /* Work if build is not clean.  */
20401            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20402
20403            #include <limits.h>
20404            #if HAVE_STDINT_H
20405             #include <stdint.h>
20406            #endif
20407
20408            #if defined UINT32_MAX && defined UINTMAX_MAX
20409             #define CONDITION (UINT32_MAX < UINTMAX_MAX)
20410            #elif HAVE_LONG_LONG_INT
20411             #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
20412            #else
20413             #define CONDITION 0
20414            #endif
20415            int test[CONDITION ? 1 : -1];
20416int
20417main ()
20418{
20419
20420  ;
20421  return 0;
20422}
20423_ACEOF
20424if ac_fn_c_try_compile "$LINENO"; then :
20425  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
20426else
20427  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
20428fi
20429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20430fi
20431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
20432$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
20433  if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
20434    UINT32_MAX_LT_UINTMAX_MAX=1;
20435  else
20436    UINT32_MAX_LT_UINTMAX_MAX=0;
20437  fi
20438
20439
20440  if test $APPLE_UNIVERSAL_BUILD = 0; then
20441
20442  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
20443$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
20444if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
20445  $as_echo_n "(cached) " >&6
20446else
20447  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20448/* end confdefs.h.  */
20449/* Work also in C++ mode.  */
20450            #define __STDC_LIMIT_MACROS 1
20451
20452            /* Work if build is not clean.  */
20453            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20454
20455            #include <limits.h>
20456            #if HAVE_STDINT_H
20457             #include <stdint.h>
20458            #endif
20459
20460            #if defined UINT64_MAX
20461             #define CONDITION (UINT64_MAX == ULONG_MAX)
20462            #elif HAVE_LONG_LONG_INT
20463             #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
20464            #else
20465             #define CONDITION 0
20466            #endif
20467            int test[CONDITION ? 1 : -1];
20468int
20469main ()
20470{
20471
20472  ;
20473  return 0;
20474}
20475_ACEOF
20476if ac_fn_c_try_compile "$LINENO"; then :
20477  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
20478else
20479  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
20480fi
20481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20482fi
20483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
20484$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
20485  if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
20486    UINT64_MAX_EQ_ULONG_MAX=1;
20487  else
20488    UINT64_MAX_EQ_ULONG_MAX=0;
20489  fi
20490
20491
20492  else
20493    UINT64_MAX_EQ_ULONG_MAX=-1
20494  fi
20495
20496
20497
20498
20499
20500
20501
20502
20503  for ac_func in lchown
20504do :
20505  ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
20506if test "x$ac_cv_func_lchown" = xyes; then :
20507  cat >>confdefs.h <<_ACEOF
20508#define HAVE_LCHOWN 1
20509_ACEOF
20510
20511fi
20512done
20513
20514  if test $ac_cv_func_lchown = no; then
20515    HAVE_LCHOWN=0
20516  else
20517        case "$gl_cv_func_chown_slash_works" in
20518      *yes) ;;
20519      *)
20520        REPLACE_LCHOWN=1
20521        ;;
20522    esac
20523    case "$gl_cv_func_chown_ctime_works" in
20524      *yes) ;;
20525      *)
20526        REPLACE_LCHOWN=1
20527        ;;
20528    esac
20529  fi
20530
20531  if test $HAVE_LCHOWN = 0 || test $REPLACE_LCHOWN = 1; then
20532
20533
20534
20535
20536
20537
20538
20539
20540  gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext"
20541
20542  fi
20543
20544
20545
20546
20547
20548          GNULIB_LCHOWN=1
20549
20550
20551
20552
20553
20554$as_echo "#define GNULIB_TEST_LCHOWN 1" >>confdefs.h
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567  LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
20568
20569
20570
20571
20572
20573
20574
20575  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
20576$as_echo_n "checking whether lseek detects pipes... " >&6; }
20577if ${gl_cv_func_lseek_pipe+:} false; then :
20578  $as_echo_n "(cached) " >&6
20579else
20580  case "$host_os" in
20581       mingw*)
20582                                                               gl_cv_func_lseek_pipe=no
20583         ;;
20584       *)
20585         if test $cross_compiling = no; then
20586           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20587/* end confdefs.h.  */
20588
20589#include <sys/types.h> /* for off_t */
20590#include <stdio.h> /* for SEEK_CUR */
20591#if HAVE_UNISTD_H
20592# include <unistd.h>
20593#else /* on Windows with MSVC */
20594# include <io.h>
20595#endif
20596
20597int
20598main ()
20599{
20600
20601  /* Exit with success only if stdin is seekable.  */
20602  return lseek (0, (off_t)0, SEEK_CUR) < 0;
20603
20604  ;
20605  return 0;
20606}
20607_ACEOF
20608if ac_fn_c_try_link "$LINENO"; then :
20609  if test -s conftest$ac_exeext \
20610                 && ./conftest$ac_exeext < conftest.$ac_ext \
20611                 && test 1 = "`echo hi \
20612                   | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
20613                gl_cv_func_lseek_pipe=yes
20614              else
20615                gl_cv_func_lseek_pipe=no
20616              fi
20617
20618else
20619  gl_cv_func_lseek_pipe=no
20620fi
20621rm -f core conftest.err conftest.$ac_objext \
20622    conftest$ac_exeext conftest.$ac_ext
20623         else
20624           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20625/* end confdefs.h.  */
20626
20627#if defined __BEOS__
20628/* BeOS mistakenly return 0 when trying to seek on pipes.  */
20629  Choke me.
20630#endif
20631_ACEOF
20632if ac_fn_c_try_compile "$LINENO"; then :
20633  gl_cv_func_lseek_pipe=yes
20634else
20635  gl_cv_func_lseek_pipe=no
20636fi
20637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20638         fi
20639         ;;
20640     esac
20641
20642fi
20643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
20644$as_echo "$gl_cv_func_lseek_pipe" >&6; }
20645  if test $gl_cv_func_lseek_pipe = no; then
20646    REPLACE_LSEEK=1
20647
20648$as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
20649
20650  fi
20651
20652
20653  if test $WINDOWS_64_BIT_OFF_T = 1; then
20654    REPLACE_LSEEK=1
20655  fi
20656
20657  if test $REPLACE_LSEEK = 1; then
20658
20659
20660
20661
20662
20663
20664
20665
20666  gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
20667
20668  fi
20669
20670
20671
20672
20673
20674          GNULIB_LSEEK=1
20675
20676
20677
20678
20679
20680$as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
20681
20682
20683
20684
20685
20686
20687  if test $ac_cv_func_lstat = yes; then
20688
20689    case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
20690      *no)
20691        REPLACE_LSTAT=1
20692        ;;
20693    esac
20694  else
20695    HAVE_LSTAT=0
20696  fi
20697
20698  if test $REPLACE_LSTAT = 1; then
20699
20700
20701
20702
20703
20704
20705
20706
20707  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
20708
20709    :
20710  fi
20711
20712
20713
20714
20715
20716          GNULIB_LSTAT=1
20717
20718
20719
20720
20721
20722$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
20723
20724
20725
20726
20727
20728
20729      for ac_header in stdlib.h
20730do :
20731  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
20732if test "x$ac_cv_header_stdlib_h" = xyes; then :
20733  cat >>confdefs.h <<_ACEOF
20734#define HAVE_STDLIB_H 1
20735_ACEOF
20736
20737fi
20738
20739done
20740
20741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
20742$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
20743if ${ac_cv_func_malloc_0_nonnull+:} false; then :
20744  $as_echo_n "(cached) " >&6
20745else
20746  if test "$cross_compiling" = yes; then :
20747  case "$host_os" in
20748          # Guess yes on platforms where we know the result.
20749          *-gnu* | freebsd* | netbsd* | openbsd* \
20750          | hpux* | solaris* | cygwin* | mingw*)
20751            ac_cv_func_malloc_0_nonnull=yes ;;
20752          # If we don't know, assume the worst.
20753          *) ac_cv_func_malloc_0_nonnull=no ;;
20754        esac
20755
20756else
20757  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20758/* end confdefs.h.  */
20759#if defined STDC_HEADERS || defined HAVE_STDLIB_H
20760            # include <stdlib.h>
20761            #else
20762            char *malloc ();
20763            #endif
20764
20765int
20766main ()
20767{
20768char *p = malloc (0);
20769            int result = !p;
20770            free (p);
20771            return result;
20772  ;
20773  return 0;
20774}
20775
20776_ACEOF
20777if ac_fn_c_try_run "$LINENO"; then :
20778  ac_cv_func_malloc_0_nonnull=yes
20779else
20780  ac_cv_func_malloc_0_nonnull=no
20781fi
20782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20783  conftest.$ac_objext conftest.beam conftest.$ac_ext
20784fi
20785
20786
20787fi
20788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
20789$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
20790  if test $ac_cv_func_malloc_0_nonnull = yes; then :
20791
20792$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
20793
20794else
20795  $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
20796
20797     REPLACE_MALLOC=1
20798
20799fi
20800
20801
20802  if test $REPLACE_MALLOC = 1; then
20803
20804
20805
20806
20807
20808
20809
20810
20811  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
20812
20813  fi
20814
20815
20816cat >>confdefs.h <<_ACEOF
20817#define GNULIB_MALLOC_GNU 1
20818_ACEOF
20819
20820
20821
20822
20823
20824  if test $gl_cv_func_malloc_posix = yes; then
20825
20826$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
20827
20828  else
20829    REPLACE_MALLOC=1
20830  fi
20831
20832  if test $REPLACE_MALLOC = 1; then
20833
20834
20835
20836
20837
20838
20839
20840
20841  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
20842
20843  fi
20844
20845
20846
20847
20848
20849          GNULIB_MALLOC_POSIX=1
20850
20851
20852
20853
20854
20855$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
20874
20875
20876
20877     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
20878$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
20879if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
20880  $as_echo_n "(cached) " >&6
20881else
20882
20883                  case "$host_os" in
20884                     # Guess no on AIX and OSF/1.
20885        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
20886                     # Guess yes otherwise.
20887        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
20888      esac
20889      if test $LOCALE_JA != none; then
20890        if test "$cross_compiling" = yes; then :
20891  :
20892else
20893  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20894/* end confdefs.h.  */
20895
20896#include <locale.h>
20897#include <string.h>
20898/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20899   <wchar.h>.
20900   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20901   included before <wchar.h>.  */
20902#include <stddef.h>
20903#include <stdio.h>
20904#include <time.h>
20905#include <wchar.h>
20906int main ()
20907{
20908  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20909    {
20910      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20911      mbstate_t state;
20912      wchar_t wc;
20913
20914      memset (&state, '\0', sizeof (mbstate_t));
20915      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20916        if (mbsinit (&state))
20917          return 2;
20918    }
20919  return 0;
20920}
20921_ACEOF
20922if ac_fn_c_try_run "$LINENO"; then :
20923  gl_cv_func_mbrtowc_incomplete_state=yes
20924else
20925  gl_cv_func_mbrtowc_incomplete_state=no
20926fi
20927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20928  conftest.$ac_objext conftest.beam conftest.$ac_ext
20929fi
20930
20931      fi
20932
20933fi
20934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
20935$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
20936
20937
20938
20939
20940     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
20941$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
20942if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
20943  $as_echo_n "(cached) " >&6
20944else
20945
20946                  case "$host_os" in
20947                    # Guess no on Solaris 8.
20948        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
20949                    # Guess yes otherwise.
20950        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
20951      esac
20952      if test $LOCALE_ZH_CN != none; then
20953        if test "$cross_compiling" = yes; then :
20954  :
20955else
20956  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20957/* end confdefs.h.  */
20958
20959#include <locale.h>
20960#include <stdlib.h>
20961#include <string.h>
20962/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20963   <wchar.h>.
20964   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20965   included before <wchar.h>.  */
20966#include <stddef.h>
20967#include <stdio.h>
20968#include <time.h>
20969#include <wchar.h>
20970int main ()
20971{
20972  /* This fails on Solaris 8:
20973     mbrtowc returns 2, and sets wc to 0x00F0.
20974     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
20975  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20976    {
20977      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
20978      mbstate_t state;
20979      wchar_t wc;
20980
20981      memset (&state, '\0', sizeof (mbstate_t));
20982      if (mbrtowc (&wc, input + 3, 6, &state) != 4
20983          && mbtowc (&wc, input + 3, 6) == 4)
20984        return 2;
20985    }
20986  return 0;
20987}
20988_ACEOF
20989if ac_fn_c_try_run "$LINENO"; then :
20990  gl_cv_func_mbrtowc_sanitycheck=yes
20991else
20992  gl_cv_func_mbrtowc_sanitycheck=no
20993fi
20994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20995  conftest.$ac_objext conftest.beam conftest.$ac_ext
20996fi
20997
20998      fi
20999
21000fi
21001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21002$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
21003
21004    REPLACE_MBSTATE_T=0
21005    case "$gl_cv_func_mbrtowc_incomplete_state" in
21006      *yes) ;;
21007      *) REPLACE_MBSTATE_T=1 ;;
21008    esac
21009    case "$gl_cv_func_mbrtowc_sanitycheck" in
21010      *yes) ;;
21011      *) REPLACE_MBSTATE_T=1 ;;
21012    esac
21013  else
21014    REPLACE_MBSTATE_T=1
21015  fi
21016
21017
21018
21019  if test $ac_cv_func_mbrtowc = no; then
21020    HAVE_MBRTOWC=0
21021    ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
21022/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21023   <wchar.h>.
21024   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21025   included before <wchar.h>.  */
21026#include <stddef.h>
21027#include <stdio.h>
21028#include <time.h>
21029#include <wchar.h>
21030
21031"
21032if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
21033  ac_have_decl=1
21034else
21035  ac_have_decl=0
21036fi
21037
21038cat >>confdefs.h <<_ACEOF
21039#define HAVE_DECL_MBRTOWC $ac_have_decl
21040_ACEOF
21041
21042    if test $ac_cv_have_decl_mbrtowc = yes; then
21043                        REPLACE_MBRTOWC=1
21044    fi
21045  else
21046    if test $REPLACE_MBSTATE_T = 1; then
21047      REPLACE_MBRTOWC=1
21048    else
21049
21050
21051
21052     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
21053$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
21054if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
21055  $as_echo_n "(cached) " >&6
21056else
21057
21058                  case "$host_os" in
21059                  # Guess no on Solaris.
21060        solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
21061                  # Guess yes otherwise.
21062        *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
21063      esac
21064      if test $LOCALE_FR_UTF8 != none; then
21065        if test "$cross_compiling" = yes; then :
21066  :
21067else
21068  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21069/* end confdefs.h.  */
21070
21071#include <locale.h>
21072#include <stdlib.h>
21073#include <string.h>
21074/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21075   <wchar.h>.
21076   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21077   included before <wchar.h>.  */
21078#include <stddef.h>
21079#include <stdio.h>
21080#include <time.h>
21081#include <wchar.h>
21082int main ()
21083{
21084  int result = 0;
21085
21086  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
21087    {
21088      char input[] = "\303\237er";
21089      mbstate_t state;
21090      wchar_t wc;
21091      size_t ret;
21092
21093      memset (&state, '\0', sizeof (mbstate_t));
21094      wc = (wchar_t) 0xBADFACE;
21095      ret = mbrtowc (&wc, input, 5, &state);
21096      if (ret != 2)
21097        result |= 1;
21098      if (!mbsinit (&state))
21099        result |= 2;
21100
21101      memset (&state, '\0', sizeof (mbstate_t));
21102      ret = mbrtowc (NULL, input, 5, &state);
21103      if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
21104        result |= 4;
21105      if (!mbsinit (&state))
21106        result |= 8;
21107    }
21108  return result;
21109}
21110_ACEOF
21111if ac_fn_c_try_run "$LINENO"; then :
21112  gl_cv_func_mbrtowc_null_arg1=yes
21113else
21114  gl_cv_func_mbrtowc_null_arg1=no
21115fi
21116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21117  conftest.$ac_objext conftest.beam conftest.$ac_ext
21118fi
21119
21120      fi
21121
21122fi
21123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
21124$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
21125
21126
21127
21128
21129     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
21130$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
21131if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
21132  $as_echo_n "(cached) " >&6
21133else
21134
21135                  case "$host_os" in
21136              # Guess no on OSF/1.
21137        osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
21138              # Guess yes otherwise.
21139        *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
21140      esac
21141      if test $LOCALE_FR_UTF8 != none; then
21142        if test "$cross_compiling" = yes; then :
21143  :
21144else
21145  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21146/* end confdefs.h.  */
21147
21148#include <locale.h>
21149#include <string.h>
21150/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21151   <wchar.h>.
21152   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21153   included before <wchar.h>.  */
21154#include <stddef.h>
21155#include <stdio.h>
21156#include <time.h>
21157#include <wchar.h>
21158int main ()
21159{
21160  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
21161    {
21162      mbstate_t state;
21163      wchar_t wc;
21164      int ret;
21165
21166      memset (&state, '\0', sizeof (mbstate_t));
21167      wc = (wchar_t) 0xBADFACE;
21168      mbrtowc (&wc, NULL, 5, &state);
21169      /* Check that wc was not modified.  */
21170      if (wc != (wchar_t) 0xBADFACE)
21171        return 2;
21172    }
21173  return 0;
21174}
21175_ACEOF
21176if ac_fn_c_try_run "$LINENO"; then :
21177  gl_cv_func_mbrtowc_null_arg2=yes
21178else
21179  gl_cv_func_mbrtowc_null_arg2=no
21180fi
21181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21182  conftest.$ac_objext conftest.beam conftest.$ac_ext
21183fi
21184
21185      fi
21186
21187fi
21188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
21189$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
21190
21191
21192
21193
21194
21195
21196  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
21197$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
21198if ${gl_cv_func_mbrtowc_retval+:} false; then :
21199  $as_echo_n "(cached) " >&6
21200else
21201
21202                  case "$host_os" in
21203                                   # Guess no on HP-UX, Solaris, native Windows.
21204        hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
21205                                   # Guess yes otherwise.
21206        *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
21207      esac
21208      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
21209         || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
21210        if test "$cross_compiling" = yes; then :
21211  :
21212else
21213  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21214/* end confdefs.h.  */
21215
21216#include <locale.h>
21217#include <string.h>
21218/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21219   <wchar.h>.
21220   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21221   included before <wchar.h>.  */
21222#include <stddef.h>
21223#include <stdio.h>
21224#include <time.h>
21225#include <wchar.h>
21226int main ()
21227{
21228  int result = 0;
21229  int found_some_locale = 0;
21230  /* This fails on Solaris.  */
21231  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
21232    {
21233      char input[] = "B\303\274\303\237er"; /* "Büßer" */
21234      mbstate_t state;
21235      wchar_t wc;
21236
21237      memset (&state, '\0', sizeof (mbstate_t));
21238      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21239        {
21240          input[1] = '\0';
21241          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
21242            result |= 1;
21243        }
21244      found_some_locale = 1;
21245    }
21246  /* This fails on HP-UX 11.11.  */
21247  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21248    {
21249      char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21250      mbstate_t state;
21251      wchar_t wc;
21252
21253      memset (&state, '\0', sizeof (mbstate_t));
21254      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21255        {
21256          input[1] = '\0';
21257          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
21258            result |= 2;
21259        }
21260      found_some_locale = 1;
21261    }
21262  /* This fails on native Windows.  */
21263  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
21264    {
21265      char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
21266      mbstate_t state;
21267      wchar_t wc;
21268
21269      memset (&state, '\0', sizeof (mbstate_t));
21270      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
21271        {
21272          input[3] = '\0';
21273          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
21274            result |= 4;
21275        }
21276      found_some_locale = 1;
21277    }
21278  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
21279    {
21280      char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
21281      mbstate_t state;
21282      wchar_t wc;
21283
21284      memset (&state, '\0', sizeof (mbstate_t));
21285      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
21286        {
21287          input[3] = '\0';
21288          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
21289            result |= 8;
21290        }
21291      found_some_locale = 1;
21292    }
21293  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
21294    {
21295      char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
21296      mbstate_t state;
21297      wchar_t wc;
21298
21299      memset (&state, '\0', sizeof (mbstate_t));
21300      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
21301        {
21302          input[3] = '\0';
21303          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
21304            result |= 16;
21305        }
21306      found_some_locale = 1;
21307    }
21308  return (found_some_locale ? result : 77);
21309}
21310_ACEOF
21311if ac_fn_c_try_run "$LINENO"; then :
21312  gl_cv_func_mbrtowc_retval=yes
21313else
21314  if test $? != 77; then
21315             gl_cv_func_mbrtowc_retval=no
21316           fi
21317
21318fi
21319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21320  conftest.$ac_objext conftest.beam conftest.$ac_ext
21321fi
21322
21323      fi
21324
21325fi
21326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
21327$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
21328
21329
21330
21331
21332     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
21333$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
21334if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
21335  $as_echo_n "(cached) " >&6
21336else
21337
21338                  case "$host_os" in
21339                       # Guess no on Solaris 8 and 9.
21340        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
21341                       # Guess yes otherwise.
21342        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
21343      esac
21344      if test $LOCALE_ZH_CN != none; then
21345        if test "$cross_compiling" = yes; then :
21346  :
21347else
21348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21349/* end confdefs.h.  */
21350
21351#include <locale.h>
21352#include <string.h>
21353/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21354   <wchar.h>.
21355   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21356   included before <wchar.h>.  */
21357#include <stddef.h>
21358#include <stdio.h>
21359#include <time.h>
21360#include <wchar.h>
21361int main ()
21362{
21363  /* This fails on Solaris 8 and 9.  */
21364  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21365    {
21366      mbstate_t state;
21367      wchar_t wc;
21368
21369      memset (&state, '\0', sizeof (mbstate_t));
21370      if (mbrtowc (&wc, "", 1, &state) != 0)
21371        return 2;
21372    }
21373  return 0;
21374}
21375_ACEOF
21376if ac_fn_c_try_run "$LINENO"; then :
21377  gl_cv_func_mbrtowc_nul_retval=yes
21378else
21379  gl_cv_func_mbrtowc_nul_retval=no
21380fi
21381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21382  conftest.$ac_objext conftest.beam conftest.$ac_ext
21383fi
21384
21385      fi
21386
21387fi
21388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
21389$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
21390
21391
21392
21393     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
21394$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
21395if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
21396  $as_echo_n "(cached) " >&6
21397else
21398
21399                  case "$host_os" in
21400                     # Guess no on AIX and glibc systems.
21401        aix* | *-gnu*)
21402                    gl_cv_func_mbrtowc_empty_input="guessing no" ;;
21403        *)          gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
21404      esac
21405      if test "$cross_compiling" = yes; then :
21406  :
21407else
21408  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21409/* end confdefs.h.  */
21410
21411           #include <wchar.h>
21412           static wchar_t wc;
21413           static mbstate_t mbs;
21414           int
21415           main (void)
21416           {
21417             return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
21418           }
21419_ACEOF
21420if ac_fn_c_try_run "$LINENO"; then :
21421  gl_cv_func_mbrtowc_empty_input=yes
21422else
21423  gl_cv_func_mbrtowc_empty_input=no
21424fi
21425rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21426  conftest.$ac_objext conftest.beam conftest.$ac_ext
21427fi
21428
21429
21430fi
21431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
21432$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
21433
21434
21435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
21436$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
21437if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
21438  $as_echo_n "(cached) " >&6
21439else
21440
21441               gl_cv_C_locale_sans_EILSEQ="guessing no"
21442
21443     if test "$cross_compiling" = yes; then :
21444  :
21445else
21446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21447/* end confdefs.h.  */
21448#include <limits.h>
21449            #include <locale.h>
21450            #include <wchar.h>
21451
21452int
21453main ()
21454{
21455
21456            int i;
21457            char *locale = setlocale (LC_ALL, "C");
21458            if (! locale)
21459              return 2;
21460            for (i = CHAR_MIN; i <= CHAR_MAX; i++)
21461              {
21462                char c = i;
21463                wchar_t wc;
21464                mbstate_t mbs = { 0, };
21465                size_t ss = mbrtowc (&wc, &c, 1, &mbs);
21466                if (1 < ss)
21467                  return 3;
21468              }
21469            return 0;
21470
21471  ;
21472  return 0;
21473}
21474_ACEOF
21475if ac_fn_c_try_run "$LINENO"; then :
21476  gl_cv_C_locale_sans_EILSEQ=yes
21477else
21478  gl_cv_C_locale_sans_EILSEQ=no
21479fi
21480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21481  conftest.$ac_objext conftest.beam conftest.$ac_ext
21482fi
21483
21484fi
21485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
21486$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
21487
21488      case "$gl_cv_func_mbrtowc_null_arg1" in
21489        *yes) ;;
21490        *)
21491$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
21492
21493           REPLACE_MBRTOWC=1
21494           ;;
21495      esac
21496      case "$gl_cv_func_mbrtowc_null_arg2" in
21497        *yes) ;;
21498        *)
21499$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
21500
21501           REPLACE_MBRTOWC=1
21502           ;;
21503      esac
21504      case "$gl_cv_func_mbrtowc_retval" in
21505        *yes) ;;
21506        *)
21507$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
21508
21509           REPLACE_MBRTOWC=1
21510           ;;
21511      esac
21512      case "$gl_cv_func_mbrtowc_nul_retval" in
21513        *yes) ;;
21514        *)
21515$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
21516
21517           REPLACE_MBRTOWC=1
21518           ;;
21519      esac
21520      case "$gl_cv_func_mbrtowc_empty_input" in
21521        *yes) ;;
21522        *)
21523$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
21524
21525           REPLACE_MBRTOWC=1
21526           ;;
21527      esac
21528      case $gl_cv_C_locale_sans_EILSEQ in
21529        *yes) ;;
21530        *)
21531$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
21532
21533           REPLACE_MBRTOWC=1
21534           ;;
21535      esac
21536    fi
21537  fi
21538
21539  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
21540
21541
21542
21543
21544
21545
21546
21547
21548  gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
21549
21550
21551  :
21552
21553  fi
21554
21555
21556
21557
21558
21559          GNULIB_MBRTOWC=1
21560
21561
21562
21563
21564
21565$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
21581
21582
21583
21584     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21585$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
21586if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
21587  $as_echo_n "(cached) " >&6
21588else
21589
21590                  case "$host_os" in
21591                     # Guess no on AIX and OSF/1.
21592        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21593                     # Guess yes otherwise.
21594        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21595      esac
21596      if test $LOCALE_JA != none; then
21597        if test "$cross_compiling" = yes; then :
21598  :
21599else
21600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21601/* end confdefs.h.  */
21602
21603#include <locale.h>
21604#include <string.h>
21605/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21606   <wchar.h>.
21607   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21608   included before <wchar.h>.  */
21609#include <stddef.h>
21610#include <stdio.h>
21611#include <time.h>
21612#include <wchar.h>
21613int main ()
21614{
21615  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21616    {
21617      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21618      mbstate_t state;
21619      wchar_t wc;
21620
21621      memset (&state, '\0', sizeof (mbstate_t));
21622      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21623        if (mbsinit (&state))
21624          return 2;
21625    }
21626  return 0;
21627}
21628_ACEOF
21629if ac_fn_c_try_run "$LINENO"; then :
21630  gl_cv_func_mbrtowc_incomplete_state=yes
21631else
21632  gl_cv_func_mbrtowc_incomplete_state=no
21633fi
21634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21635  conftest.$ac_objext conftest.beam conftest.$ac_ext
21636fi
21637
21638      fi
21639
21640fi
21641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21642$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
21643
21644
21645
21646
21647     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21648$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
21649if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
21650  $as_echo_n "(cached) " >&6
21651else
21652
21653                  case "$host_os" in
21654                    # Guess no on Solaris 8.
21655        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21656                    # Guess yes otherwise.
21657        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21658      esac
21659      if test $LOCALE_ZH_CN != none; then
21660        if test "$cross_compiling" = yes; then :
21661  :
21662else
21663  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21664/* end confdefs.h.  */
21665
21666#include <locale.h>
21667#include <stdlib.h>
21668#include <string.h>
21669/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21670   <wchar.h>.
21671   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21672   included before <wchar.h>.  */
21673#include <stddef.h>
21674#include <stdio.h>
21675#include <time.h>
21676#include <wchar.h>
21677int main ()
21678{
21679  /* This fails on Solaris 8:
21680     mbrtowc returns 2, and sets wc to 0x00F0.
21681     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
21682  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21683    {
21684      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21685      mbstate_t state;
21686      wchar_t wc;
21687
21688      memset (&state, '\0', sizeof (mbstate_t));
21689      if (mbrtowc (&wc, input + 3, 6, &state) != 4
21690          && mbtowc (&wc, input + 3, 6) == 4)
21691        return 2;
21692    }
21693  return 0;
21694}
21695_ACEOF
21696if ac_fn_c_try_run "$LINENO"; then :
21697  gl_cv_func_mbrtowc_sanitycheck=yes
21698else
21699  gl_cv_func_mbrtowc_sanitycheck=no
21700fi
21701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21702  conftest.$ac_objext conftest.beam conftest.$ac_ext
21703fi
21704
21705      fi
21706
21707fi
21708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21709$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
21710
21711    REPLACE_MBSTATE_T=0
21712    case "$gl_cv_func_mbrtowc_incomplete_state" in
21713      *yes) ;;
21714      *) REPLACE_MBSTATE_T=1 ;;
21715    esac
21716    case "$gl_cv_func_mbrtowc_sanitycheck" in
21717      *yes) ;;
21718      *) REPLACE_MBSTATE_T=1 ;;
21719    esac
21720  else
21721    REPLACE_MBSTATE_T=1
21722  fi
21723
21724
21725
21726  if test $ac_cv_func_mbsinit = no; then
21727    HAVE_MBSINIT=0
21728    ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
21729/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21730   <wchar.h>.
21731   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21732   included before <wchar.h>.  */
21733#include <stddef.h>
21734#include <stdio.h>
21735#include <time.h>
21736#include <wchar.h>
21737
21738"
21739if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
21740  ac_have_decl=1
21741else
21742  ac_have_decl=0
21743fi
21744
21745cat >>confdefs.h <<_ACEOF
21746#define HAVE_DECL_MBSINIT $ac_have_decl
21747_ACEOF
21748
21749    if test $ac_cv_have_decl_mbsinit = yes; then
21750                        REPLACE_MBSINIT=1
21751    fi
21752  else
21753    if test $REPLACE_MBSTATE_T = 1; then
21754      REPLACE_MBSINIT=1
21755    else
21756                        case "$host_os" in
21757        mingw*) REPLACE_MBSINIT=1 ;;
21758      esac
21759    fi
21760  fi
21761
21762  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
21763
21764
21765
21766
21767
21768
21769
21770
21771  gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
21772
21773
21774  :
21775
21776  fi
21777
21778
21779
21780
21781
21782          GNULIB_MBSINIT=1
21783
21784
21785
21786
21787
21788$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
21803
21804
21805
21806     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21807$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
21808if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
21809  $as_echo_n "(cached) " >&6
21810else
21811
21812                  case "$host_os" in
21813                     # Guess no on AIX and OSF/1.
21814        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21815                     # Guess yes otherwise.
21816        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21817      esac
21818      if test $LOCALE_JA != none; then
21819        if test "$cross_compiling" = yes; then :
21820  :
21821else
21822  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21823/* end confdefs.h.  */
21824
21825#include <locale.h>
21826#include <string.h>
21827/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21828   <wchar.h>.
21829   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21830   included before <wchar.h>.  */
21831#include <stddef.h>
21832#include <stdio.h>
21833#include <time.h>
21834#include <wchar.h>
21835int main ()
21836{
21837  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21838    {
21839      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21840      mbstate_t state;
21841      wchar_t wc;
21842
21843      memset (&state, '\0', sizeof (mbstate_t));
21844      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21845        if (mbsinit (&state))
21846          return 2;
21847    }
21848  return 0;
21849}
21850_ACEOF
21851if ac_fn_c_try_run "$LINENO"; then :
21852  gl_cv_func_mbrtowc_incomplete_state=yes
21853else
21854  gl_cv_func_mbrtowc_incomplete_state=no
21855fi
21856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21857  conftest.$ac_objext conftest.beam conftest.$ac_ext
21858fi
21859
21860      fi
21861
21862fi
21863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21864$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
21865
21866
21867
21868
21869     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21870$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
21871if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
21872  $as_echo_n "(cached) " >&6
21873else
21874
21875                  case "$host_os" in
21876                    # Guess no on Solaris 8.
21877        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21878                    # Guess yes otherwise.
21879        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21880      esac
21881      if test $LOCALE_ZH_CN != none; then
21882        if test "$cross_compiling" = yes; then :
21883  :
21884else
21885  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21886/* end confdefs.h.  */
21887
21888#include <locale.h>
21889#include <stdlib.h>
21890#include <string.h>
21891/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21892   <wchar.h>.
21893   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21894   included before <wchar.h>.  */
21895#include <stddef.h>
21896#include <stdio.h>
21897#include <time.h>
21898#include <wchar.h>
21899int main ()
21900{
21901  /* This fails on Solaris 8:
21902     mbrtowc returns 2, and sets wc to 0x00F0.
21903     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
21904  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21905    {
21906      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21907      mbstate_t state;
21908      wchar_t wc;
21909
21910      memset (&state, '\0', sizeof (mbstate_t));
21911      if (mbrtowc (&wc, input + 3, 6, &state) != 4
21912          && mbtowc (&wc, input + 3, 6) == 4)
21913        return 2;
21914    }
21915  return 0;
21916}
21917_ACEOF
21918if ac_fn_c_try_run "$LINENO"; then :
21919  gl_cv_func_mbrtowc_sanitycheck=yes
21920else
21921  gl_cv_func_mbrtowc_sanitycheck=no
21922fi
21923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21924  conftest.$ac_objext conftest.beam conftest.$ac_ext
21925fi
21926
21927      fi
21928
21929fi
21930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21931$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
21932
21933    REPLACE_MBSTATE_T=0
21934    case "$gl_cv_func_mbrtowc_incomplete_state" in
21935      *yes) ;;
21936      *) REPLACE_MBSTATE_T=1 ;;
21937    esac
21938    case "$gl_cv_func_mbrtowc_sanitycheck" in
21939      *yes) ;;
21940      *) REPLACE_MBSTATE_T=1 ;;
21941    esac
21942  else
21943    REPLACE_MBSTATE_T=1
21944  fi
21945
21946
21947
21948  if test $ac_cv_func_mbsrtowcs = no; then
21949    HAVE_MBSRTOWCS=0
21950    ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
21951/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21952   <wchar.h>.
21953   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21954   included before <wchar.h>.  */
21955#include <stddef.h>
21956#include <stdio.h>
21957#include <time.h>
21958#include <wchar.h>
21959
21960"
21961if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
21962  ac_have_decl=1
21963else
21964  ac_have_decl=0
21965fi
21966
21967cat >>confdefs.h <<_ACEOF
21968#define HAVE_DECL_MBSRTOWCS $ac_have_decl
21969_ACEOF
21970
21971    if test $ac_cv_have_decl_mbsrtowcs = yes; then
21972                        REPLACE_MBSRTOWCS=1
21973    fi
21974  else
21975    if test $REPLACE_MBSTATE_T = 1; then
21976      REPLACE_MBSRTOWCS=1
21977    else
21978
21979
21980
21981
21982
21983
21984     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
21985$as_echo_n "checking whether mbsrtowcs works... " >&6; }
21986if ${gl_cv_func_mbsrtowcs_works+:} false; then :
21987  $as_echo_n "(cached) " >&6
21988else
21989
21990                  case "$host_os" in
21991                                   # Guess no on HP-UX, Solaris, mingw.
21992        hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
21993                                   # Guess yes otherwise.
21994        *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
21995      esac
21996      if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
21997        if test "$cross_compiling" = yes; then :
21998  :
21999else
22000  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22001/* end confdefs.h.  */
22002
22003#include <locale.h>
22004#include <string.h>
22005/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22006   <wchar.h>.
22007   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22008   included before <wchar.h>.  */
22009#include <stddef.h>
22010#include <stdio.h>
22011#include <time.h>
22012#include <wchar.h>
22013int main ()
22014{
22015  int result = 0;
22016  /* Test whether the function supports a NULL destination argument.
22017     This fails on native Windows.  */
22018  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
22019    {
22020      const char input[] = "\337er";
22021      const char *src = input;
22022      mbstate_t state;
22023
22024      memset (&state, '\0', sizeof (mbstate_t));
22025      if (mbsrtowcs (NULL, &src, 1, &state) != 3
22026          || src != input)
22027        result |= 1;
22028    }
22029  /* Test whether the function works when started with a conversion state
22030     in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
22031  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22032    {
22033      const char input[] = "B\303\274\303\237er";
22034      mbstate_t state;
22035
22036      memset (&state, '\0', sizeof (mbstate_t));
22037      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
22038        if (!mbsinit (&state))
22039          {
22040            const char *src = input + 2;
22041            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
22042              result |= 2;
22043          }
22044    }
22045  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22046    {
22047      const char input[] = "<\306\374\313\334\270\354>";
22048      mbstate_t state;
22049
22050      memset (&state, '\0', sizeof (mbstate_t));
22051      if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
22052        if (!mbsinit (&state))
22053          {
22054            const char *src = input + 4;
22055            if (mbsrtowcs (NULL, &src, 10, &state) != 3)
22056              result |= 4;
22057          }
22058    }
22059  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22060    {
22061      const char input[] = "B\250\271\201\060\211\070er";
22062      mbstate_t state;
22063
22064      memset (&state, '\0', sizeof (mbstate_t));
22065      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
22066        if (!mbsinit (&state))
22067          {
22068            const char *src = input + 2;
22069            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
22070              result |= 8;
22071          }
22072    }
22073  return result;
22074}
22075_ACEOF
22076if ac_fn_c_try_run "$LINENO"; then :
22077  gl_cv_func_mbsrtowcs_works=yes
22078else
22079  gl_cv_func_mbsrtowcs_works=no
22080fi
22081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22082  conftest.$ac_objext conftest.beam conftest.$ac_ext
22083fi
22084
22085      fi
22086
22087fi
22088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
22089$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
22090
22091      case "$gl_cv_func_mbsrtowcs_works" in
22092        *yes) ;;
22093        *) REPLACE_MBSRTOWCS=1 ;;
22094      esac
22095    fi
22096  fi
22097
22098  if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
22099
22100
22101
22102
22103
22104
22105
22106
22107  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
22118
22119
22120  :
22121
22122  fi
22123
22124
22125
22126
22127
22128          GNULIB_MBSRTOWCS=1
22129
22130
22131
22132
22133
22134$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
22135
22136
22137
22138
22139  if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
22140
22141
22142
22143
22144
22145
22146
22147
22148  gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
22149
22150
22151  for ac_header in bp-sym.h
22152do :
22153  ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
22154if test "x$ac_cv_header_bp_sym_h" = xyes; then :
22155  cat >>confdefs.h <<_ACEOF
22156#define HAVE_BP_SYM_H 1
22157_ACEOF
22158
22159fi
22160
22161done
22162
22163
22164  fi
22165
22166
22167
22168
22169
22170          GNULIB_MEMCHR=1
22171
22172
22173
22174
22175
22176$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186  for ac_func in mempcpy
22187do :
22188  ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
22189if test "x$ac_cv_func_mempcpy" = xyes; then :
22190  cat >>confdefs.h <<_ACEOF
22191#define HAVE_MEMPCPY 1
22192_ACEOF
22193
22194fi
22195done
22196
22197  if test $ac_cv_func_mempcpy = no; then
22198    HAVE_MEMPCPY=0
22199  fi
22200
22201  if test $HAVE_MEMPCPY = 0; then
22202
22203
22204
22205
22206
22207
22208
22209
22210  gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
22211
22212
22213  :
22214
22215  fi
22216
22217
22218
22219
22220
22221          GNULIB_MEMPCPY=1
22222
22223
22224
22225
22226
22227$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
22228
22229
22230
22231
22232
22233
22234
22235
22236  if test $ac_cv_have_decl_memrchr = no; then
22237    HAVE_DECL_MEMRCHR=0
22238  fi
22239
22240  for ac_func in memrchr
22241do :
22242  ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
22243if test "x$ac_cv_func_memrchr" = xyes; then :
22244  cat >>confdefs.h <<_ACEOF
22245#define HAVE_MEMRCHR 1
22246_ACEOF
22247
22248fi
22249done
22250
22251
22252  if test $ac_cv_func_memrchr = no; then
22253
22254
22255
22256
22257
22258
22259
22260
22261  gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
22262
22263    :
22264  fi
22265
22266
22267
22268
22269
22270          GNULIB_MEMRCHR=1
22271
22272
22273
22274
22275
22276$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291  if test $APPLE_UNIVERSAL_BUILD = 1; then
22292    # A universal build on Apple Mac OS X platforms.
22293    # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
22294    # But we need a configuration result that is valid in both modes.
22295    gl_cv_func_working_mktime=no
22296  fi
22297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
22298$as_echo_n "checking for working mktime... " >&6; }
22299if ${gl_cv_func_working_mktime+:} false; then :
22300  $as_echo_n "(cached) " >&6
22301else
22302  if test "$cross_compiling" = yes; then :
22303  gl_cv_func_working_mktime=no
22304else
22305  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22306/* end confdefs.h.  */
22307/* Test program from Paul Eggert and Tony Leneis.  */
22308#include <limits.h>
22309#include <stdlib.h>
22310#include <time.h>
22311
22312#ifdef HAVE_UNISTD_H
22313# include <unistd.h>
22314#endif
22315
22316#if HAVE_DECL_ALARM
22317# include <signal.h>
22318#endif
22319
22320/* Work around redefinition to rpl_putenv by other config tests.  */
22321#undef putenv
22322
22323static time_t time_t_max;
22324static time_t time_t_min;
22325
22326/* Values we'll use to set the TZ environment variable.  */
22327static char *tz_strings[] = {
22328  (char *) 0, "TZ=GMT0", "TZ=JST-9",
22329  "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
22330};
22331#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
22332
22333/* Return 0 if mktime fails to convert a date in the spring-forward gap.
22334   Based on a problem report from Andreas Jaeger.  */
22335static int
22336spring_forward_gap ()
22337{
22338  /* glibc (up to about 1998-10-07) failed this test. */
22339  struct tm tm;
22340
22341  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
22342     instead of "TZ=America/Vancouver" in order to detect the bug even
22343     on systems that don't support the Olson extension, or don't have the
22344     full zoneinfo tables installed.  */
22345  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
22346
22347  tm.tm_year = 98;
22348  tm.tm_mon = 3;
22349  tm.tm_mday = 5;
22350  tm.tm_hour = 2;
22351  tm.tm_min = 0;
22352  tm.tm_sec = 0;
22353  tm.tm_isdst = -1;
22354  return mktime (&tm) != (time_t) -1;
22355}
22356
22357static int
22358mktime_test1 (time_t now)
22359{
22360  struct tm *lt;
22361  return ! (lt = localtime (&now)) || mktime (lt) == now;
22362}
22363
22364static int
22365mktime_test (time_t now)
22366{
22367  return (mktime_test1 (now)
22368          && mktime_test1 ((time_t) (time_t_max - now))
22369          && mktime_test1 ((time_t) (time_t_min + now)));
22370}
22371
22372static int
22373irix_6_4_bug ()
22374{
22375  /* Based on code from Ariel Faigon.  */
22376  struct tm tm;
22377  tm.tm_year = 96;
22378  tm.tm_mon = 3;
22379  tm.tm_mday = 0;
22380  tm.tm_hour = 0;
22381  tm.tm_min = 0;
22382  tm.tm_sec = 0;
22383  tm.tm_isdst = -1;
22384  mktime (&tm);
22385  return tm.tm_mon == 2 && tm.tm_mday == 31;
22386}
22387
22388static int
22389bigtime_test (int j)
22390{
22391  struct tm tm;
22392  time_t now;
22393  tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
22394  now = mktime (&tm);
22395  if (now != (time_t) -1)
22396    {
22397      struct tm *lt = localtime (&now);
22398      if (! (lt
22399             && lt->tm_year == tm.tm_year
22400             && lt->tm_mon == tm.tm_mon
22401             && lt->tm_mday == tm.tm_mday
22402             && lt->tm_hour == tm.tm_hour
22403             && lt->tm_min == tm.tm_min
22404             && lt->tm_sec == tm.tm_sec
22405             && lt->tm_yday == tm.tm_yday
22406             && lt->tm_wday == tm.tm_wday
22407             && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
22408                  == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
22409        return 0;
22410    }
22411  return 1;
22412}
22413
22414static int
22415year_2050_test ()
22416{
22417  /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
22418     ignoring leap seconds.  */
22419  unsigned long int answer = 2527315200UL;
22420
22421  struct tm tm;
22422  time_t t;
22423  tm.tm_year = 2050 - 1900;
22424  tm.tm_mon = 2 - 1;
22425  tm.tm_mday = 1;
22426  tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
22427  tm.tm_isdst = -1;
22428
22429  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
22430     instead of "TZ=America/Vancouver" in order to detect the bug even
22431     on systems that don't support the Olson extension, or don't have the
22432     full zoneinfo tables installed.  */
22433  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
22434
22435  t = mktime (&tm);
22436
22437  /* Check that the result is either a failure, or close enough
22438     to the correct answer that we can assume the discrepancy is
22439     due to leap seconds.  */
22440  return (t == (time_t) -1
22441          || (0 < t && answer - 120 <= t && t <= answer + 120));
22442}
22443
22444int
22445main ()
22446{
22447  int result = 0;
22448  time_t t, delta;
22449  int i, j;
22450  int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
22451
22452#if HAVE_DECL_ALARM
22453  /* This test makes some buggy mktime implementations loop.
22454     Give up after 60 seconds; a mktime slower than that
22455     isn't worth using anyway.  */
22456  signal (SIGALRM, SIG_DFL);
22457  alarm (60);
22458#endif
22459
22460  time_t_max = (! TIME_T_IS_SIGNED
22461                ? (time_t) -1
22462                : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
22463                   * 2 + 1));
22464  time_t_min = (! TIME_T_IS_SIGNED
22465                ? (time_t) 0
22466                : time_t_signed_magnitude
22467                ? ~ (time_t) 0
22468                : ~ time_t_max);
22469
22470  delta = time_t_max / 997; /* a suitable prime number */
22471  for (i = 0; i < N_STRINGS; i++)
22472    {
22473      if (tz_strings[i])
22474        putenv (tz_strings[i]);
22475
22476      for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
22477        if (! mktime_test (t))
22478          result |= 1;
22479      if ((result & 2) == 0
22480          && ! (mktime_test ((time_t) 1)
22481                && mktime_test ((time_t) (60 * 60))
22482                && mktime_test ((time_t) (60 * 60 * 24))))
22483        result |= 2;
22484
22485      for (j = 1; (result & 4) == 0; j <<= 1)
22486        {
22487          if (! bigtime_test (j))
22488            result |= 4;
22489          if (INT_MAX / 2 < j)
22490            break;
22491        }
22492      if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
22493        result |= 8;
22494    }
22495  if (! irix_6_4_bug ())
22496    result |= 16;
22497  if (! spring_forward_gap ())
22498    result |= 32;
22499  if (! year_2050_test ())
22500    result |= 64;
22501  return result;
22502}
22503_ACEOF
22504if ac_fn_c_try_run "$LINENO"; then :
22505  gl_cv_func_working_mktime=yes
22506else
22507  gl_cv_func_working_mktime=no
22508fi
22509rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22510  conftest.$ac_objext conftest.beam conftest.$ac_ext
22511fi
22512
22513
22514fi
22515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
22516$as_echo "$gl_cv_func_working_mktime" >&6; }
22517
22518  if test $gl_cv_func_working_mktime = no; then
22519    REPLACE_MKTIME=1
22520  else
22521    REPLACE_MKTIME=0
22522  fi
22523
22524  if test $REPLACE_MKTIME = 1; then
22525
22526
22527
22528
22529
22530
22531
22532
22533  gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
22534
22535    :
22536  fi
22537
22538
22539
22540
22541
22542          GNULIB_MKTIME=1
22543
22544
22545
22546
22547
22548$as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
22549
22550
22551
22552
22553
22554  if test $REPLACE_MKTIME = 0; then
22555        ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal"
22556if test "x$ac_cv_func___mktime_internal" = xyes; then :
22557
22558$as_echo "#define mktime_internal __mktime_internal" >>confdefs.h
22559
22560
22561else
22562                REPLACE_MKTIME=1
22563
22564fi
22565
22566  fi
22567
22568  if test $REPLACE_MKTIME = 1; then
22569
22570
22571
22572
22573
22574
22575
22576
22577  gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
22578
22579    :
22580  fi
22581
22582  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
22583
22584
22585
22586
22587
22588
22589
22590
22591  gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
22592
22593  fi
22594
22595  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
22596
22597
22598
22599
22600
22601
22602
22603
22604  gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
22605
22606  fi
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks that work with any size object" >&5
22621$as_echo_n "checking for obstacks that work with any size object... " >&6; }
22622if ${ac_cv_func_obstack+:} false; then :
22623  $as_echo_n "(cached) " >&6
22624else
22625  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22626/* end confdefs.h.  */
22627#include "obstack.h"
22628             void *obstack_chunk_alloc (size_t n) { return 0; }
22629             void obstack_chunk_free (void *p) { }
22630             /* Check that an internal function returns size_t, not int.  */
22631             size_t _obstack_memory_used (struct obstack *);
22632
22633int
22634main ()
22635{
22636struct obstack mem;
22637             obstack_init (&mem);
22638             obstack_free (&mem, 0);
22639
22640  ;
22641  return 0;
22642}
22643_ACEOF
22644if ac_fn_c_try_link "$LINENO"; then :
22645  ac_cv_func_obstack=yes
22646else
22647  ac_cv_func_obstack=no
22648fi
22649rm -f core conftest.err conftest.$ac_objext \
22650    conftest$ac_exeext conftest.$ac_ext
22651fi
22652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
22653$as_echo "$ac_cv_func_obstack" >&6; }
22654   if test "$ac_cv_func_obstack" = yes; then
22655
22656$as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
22657
22658   else
22659
22660
22661
22662
22663
22664
22665
22666
22667  gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext"
22668
22669   fi
22670
22671
22672
22673  case "$host_os" in
22674    mingw* | pw*)
22675      REPLACE_OPEN=1
22676      ;;
22677    *)
22678
22679      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
22680$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
22681if ${gl_cv_func_open_slash+:} false; then :
22682  $as_echo_n "(cached) " >&6
22683else
22684  # Assume that if we have lstat, we can also check symlinks.
22685          if test $ac_cv_func_lstat = yes; then
22686            touch conftest.tmp
22687            ln -s conftest.tmp conftest.lnk
22688          fi
22689          if test "$cross_compiling" = yes; then :
22690
22691             case "$host_os" in
22692               freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
22693                 gl_cv_func_open_slash="guessing no" ;;
22694               *)
22695                 gl_cv_func_open_slash="guessing yes" ;;
22696             esac
22697
22698else
22699  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22700/* end confdefs.h.  */
22701
22702#include <fcntl.h>
22703#if HAVE_UNISTD_H
22704# include <unistd.h>
22705#endif
22706int main ()
22707{
22708  int result = 0;
22709#if HAVE_LSTAT
22710  if (open ("conftest.lnk/", O_RDONLY) != -1)
22711    result |= 1;
22712#endif
22713  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
22714    result |= 2;
22715  return result;
22716}
22717_ACEOF
22718if ac_fn_c_try_run "$LINENO"; then :
22719  gl_cv_func_open_slash=yes
22720else
22721  gl_cv_func_open_slash=no
22722fi
22723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22724  conftest.$ac_objext conftest.beam conftest.$ac_ext
22725fi
22726
22727          rm -f conftest.sl conftest.tmp conftest.lnk
22728
22729fi
22730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
22731$as_echo "$gl_cv_func_open_slash" >&6; }
22732      case "$gl_cv_func_open_slash" in
22733        *no)
22734
22735$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
22736
22737          REPLACE_OPEN=1
22738          ;;
22739      esac
22740      ;;
22741  esac
22742
22743    if test $REPLACE_OPEN = 0; then
22744
22745
22746
22747  if test $ac_cv_func_fchdir = no; then
22748    HAVE_FCHDIR=0
22749  fi
22750
22751      if test $HAVE_FCHDIR = 0; then
22752        REPLACE_OPEN=1
22753      fi
22754    fi
22755
22756
22757
22758  if test $REPLACE_OPEN = 1; then
22759
22760
22761
22762
22763
22764
22765
22766
22767  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
22768
22769
22770
22771  :
22772
22773  fi
22774
22775
22776
22777
22778
22779          GNULIB_OPEN=1
22780
22781
22782
22783
22784
22785$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
22786
22787
22788
22789
22790
22791
22792
22793
22794  case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
22795  yes+*yes)
22796    ;;
22797  yes+*)
22798    # Solaris 9 has *at functions, but uniformly mishandles trailing
22799    # slash in all of them.
22800    REPLACE_OPENAT=1
22801    ;;
22802  *)
22803    HAVE_OPENAT=0
22804    ;;
22805  esac
22806
22807  if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
22808
22809
22810
22811
22812
22813
22814
22815
22816  gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
22817
22818
22819
22820  :
22821
22822  fi
22823
22824
22825cat >>confdefs.h <<_ACEOF
22826#define GNULIB_OPENAT 1
22827_ACEOF
22828
22829
22830
22831
22832
22833
22834          GNULIB_OPENAT=1
22835
22836
22837
22838
22839
22840$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
22841
22842
22843
22844
22845
22846
22847  for ac_func in opendir
22848do :
22849  ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
22850if test "x$ac_cv_func_opendir" = xyes; then :
22851  cat >>confdefs.h <<_ACEOF
22852#define HAVE_OPENDIR 1
22853_ACEOF
22854
22855fi
22856done
22857
22858  if test $ac_cv_func_opendir = no; then
22859    HAVE_OPENDIR=0
22860  fi
22861
22862
22863
22864
22865  if test $ac_cv_func_fchdir = no; then
22866    HAVE_FCHDIR=0
22867  fi
22868
22869    if test $HAVE_FCHDIR = 0; then
22870      if test $HAVE_OPENDIR = 1; then
22871        REPLACE_OPENDIR=1
22872      fi
22873    fi
22874
22875      case $host_os,$HAVE_OPENDIR in
22876    os2*,1)
22877      REPLACE_OPENDIR=1;;
22878  esac
22879
22880  if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
22881
22882
22883
22884
22885
22886
22887
22888
22889  gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
22890
22891  fi
22892
22893
22894
22895
22896
22897          GNULIB_OPENDIR=1
22898
22899
22900
22901
22902
22903$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913  ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
22914#include <$ac_cv_struct_tm>
22915
22916"
22917if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
22918
22919cat >>confdefs.h <<_ACEOF
22920#define HAVE_STRUCT_TM_TM_ZONE 1
22921_ACEOF
22922
22923
22924fi
22925
22926if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
22927
22928$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
22929
22930else
22931  ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
22932"
22933if test "x$ac_cv_have_decl_tzname" = xyes; then :
22934  ac_have_decl=1
22935else
22936  ac_have_decl=0
22937fi
22938
22939cat >>confdefs.h <<_ACEOF
22940#define HAVE_DECL_TZNAME $ac_have_decl
22941_ACEOF
22942
22943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
22944$as_echo_n "checking for tzname... " >&6; }
22945if ${ac_cv_var_tzname+:} false; then :
22946  $as_echo_n "(cached) " >&6
22947else
22948  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22949/* end confdefs.h.  */
22950#include <time.h>
22951#if !HAVE_DECL_TZNAME
22952extern char *tzname[];
22953#endif
22954
22955int
22956main ()
22957{
22958return tzname[0][0];
22959  ;
22960  return 0;
22961}
22962_ACEOF
22963if ac_fn_c_try_link "$LINENO"; then :
22964  ac_cv_var_tzname=yes
22965else
22966  ac_cv_var_tzname=no
22967fi
22968rm -f core conftest.err conftest.$ac_objext \
22969    conftest$ac_exeext conftest.$ac_ext
22970fi
22971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
22972$as_echo "$ac_cv_var_tzname" >&6; }
22973  if test $ac_cv_var_tzname = yes; then
22974
22975$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
22976
22977  fi
22978fi
22979
22980
22981
22982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22983/* end confdefs.h.  */
22984
22985#include <time.h> /* for time_t */
22986#include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */
22987#define TYPE_MINIMUM(t) \
22988  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
22989#define TYPE_MAXIMUM(t) \
22990  ((t) ((t) 0 < (t) -1 \
22991        ? (t) -1 \
22992        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
22993typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1];
22994typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1];
22995
22996_ACEOF
22997if ac_fn_c_try_compile "$LINENO"; then :
22998
22999$as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h
23000
23001
23002fi
23003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23004
23005
23006
23007
23008  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
23009"
23010if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
23011  ac_have_decl=1
23012else
23013  ac_have_decl=0
23014fi
23015
23016cat >>confdefs.h <<_ACEOF
23017#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
23018_ACEOF
23019
23020  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
23021"
23022if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
23023  ac_have_decl=1
23024else
23025  ac_have_decl=0
23026fi
23027
23028cat >>confdefs.h <<_ACEOF
23029#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
23030_ACEOF
23031
23032
23033      :
23034
23035
23036  :
23037
23038
23039
23040
23041
23042  for ac_func in raise
23043do :
23044  ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
23045if test "x$ac_cv_func_raise" = xyes; then :
23046  cat >>confdefs.h <<_ACEOF
23047#define HAVE_RAISE 1
23048_ACEOF
23049
23050fi
23051done
23052
23053  if test $ac_cv_func_raise = no; then
23054    HAVE_RAISE=0
23055  else
23056    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23057      REPLACE_RAISE=1
23058    fi
23059
23060  fi
23061
23062  if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
23063
23064
23065
23066
23067
23068
23069
23070
23071  gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
23072
23073    :
23074  fi
23075
23076
23077
23078
23079
23080          GNULIB_RAISE=1
23081
23082
23083
23084
23085
23086$as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
23087
23088
23089
23090
23091
23092
23093
23094  for ac_func in rawmemchr
23095do :
23096  ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
23097if test "x$ac_cv_func_rawmemchr" = xyes; then :
23098  cat >>confdefs.h <<_ACEOF
23099#define HAVE_RAWMEMCHR 1
23100_ACEOF
23101
23102fi
23103done
23104
23105  if test $ac_cv_func_rawmemchr = no; then
23106    HAVE_RAWMEMCHR=0
23107  fi
23108
23109  if test $HAVE_RAWMEMCHR = 0; then
23110
23111
23112
23113
23114
23115
23116
23117
23118  gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
23119
23120    :
23121  fi
23122
23123
23124
23125
23126
23127          GNULIB_RAWMEMCHR=1
23128
23129
23130
23131
23132
23133$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
23134
23135
23136
23137
23138
23139
23140  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23141    REPLACE_READ=1
23142  fi
23143
23144
23145  if test $REPLACE_READ = 1; then
23146
23147
23148
23149
23150
23151
23152
23153
23154  gl_LIBOBJS="$gl_LIBOBJS read.$ac_objext"
23155
23156    :
23157  fi
23158
23159
23160
23161
23162
23163          GNULIB_READ=1
23164
23165
23166
23167
23168
23169$as_echo "#define GNULIB_TEST_READ 1" >>confdefs.h
23170
23171
23172
23173
23174
23175
23176  for ac_func in readdir
23177do :
23178  ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
23179if test "x$ac_cv_func_readdir" = xyes; then :
23180  cat >>confdefs.h <<_ACEOF
23181#define HAVE_READDIR 1
23182_ACEOF
23183
23184fi
23185done
23186
23187  if test $ac_cv_func_readdir = no; then
23188    HAVE_READDIR=0
23189  fi
23190
23191  if test $HAVE_READDIR = 0; then
23192
23193
23194
23195
23196
23197
23198
23199
23200  gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
23201
23202  fi
23203
23204
23205
23206
23207
23208          GNULIB_READDIR=1
23209
23210
23211
23212
23213
23214$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
23215
23216
23217
23218
23219
23220
23221  if test $gl_cv_func_malloc_posix = yes; then
23222
23223$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
23224
23225  else
23226    REPLACE_REALLOC=1
23227  fi
23228
23229  if test $REPLACE_REALLOC = 1; then
23230
23231
23232
23233
23234
23235
23236
23237
23238  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
23239
23240  fi
23241
23242
23243
23244
23245
23246          GNULIB_REALLOC_POSIX=1
23247
23248
23249
23250
23251
23252$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
23253
23254
23255
23256
23257
23258
23259  for ac_func in rewinddir
23260do :
23261  ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
23262if test "x$ac_cv_func_rewinddir" = xyes; then :
23263  cat >>confdefs.h <<_ACEOF
23264#define HAVE_REWINDDIR 1
23265_ACEOF
23266
23267fi
23268done
23269
23270  if test $ac_cv_func_rewinddir = no; then
23271    HAVE_REWINDDIR=0
23272  fi
23273
23274  if test $HAVE_REWINDDIR = 0; then
23275
23276
23277
23278
23279
23280
23281
23282
23283  gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
23284
23285  fi
23286
23287
23288
23289
23290
23291          GNULIB_REWINDDIR=1
23292
23293
23294
23295
23296
23297$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313  :
23314
23315
23316
23317     if test $ac_cv_func_setenv = no; then
23318    HAVE_SETENV=0
23319  else
23320    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
23321$as_echo_n "checking whether setenv validates arguments... " >&6; }
23322if ${gl_cv_func_setenv_works+:} false; then :
23323  $as_echo_n "(cached) " >&6
23324else
23325  if test "$cross_compiling" = yes; then :
23326  case "$host_os" in
23327                 # Guess yes on glibc systems.
23328         *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
23329                 # If we don't know, assume the worst.
23330         *)      gl_cv_func_setenv_works="guessing no" ;;
23331       esac
23332
23333else
23334  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23335/* end confdefs.h.  */
23336
23337       #include <stdlib.h>
23338       #include <errno.h>
23339       #include <string.h>
23340
23341int
23342main ()
23343{
23344
23345       int result = 0;
23346       {
23347         if (setenv ("", "", 0) != -1)
23348           result |= 1;
23349         else if (errno != EINVAL)
23350           result |= 2;
23351       }
23352       {
23353         if (setenv ("a", "=", 1) != 0)
23354           result |= 4;
23355         else if (strcmp (getenv ("a"), "=") != 0)
23356           result |= 8;
23357       }
23358       return result;
23359
23360  ;
23361  return 0;
23362}
23363_ACEOF
23364if ac_fn_c_try_run "$LINENO"; then :
23365  gl_cv_func_setenv_works=yes
23366else
23367  gl_cv_func_setenv_works=no
23368fi
23369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23370  conftest.$ac_objext conftest.beam conftest.$ac_ext
23371fi
23372
23373fi
23374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
23375$as_echo "$gl_cv_func_setenv_works" >&6; }
23376    case "$gl_cv_func_setenv_works" in
23377      *yes) ;;
23378      *)
23379        REPLACE_SETENV=1
23380        ;;
23381    esac
23382  fi
23383
23384  if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
23385
23386
23387
23388
23389
23390
23391
23392
23393  gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
23394
23395  fi
23396
23397
23398
23399
23400
23401          GNULIB_SETENV=1
23402
23403
23404
23405
23406
23407$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
23408
23409
23410
23411
23412
23413
23414
23415
23416
23417
23418
23419
23420
23421
23422     if test $gl_cv_have_include_next = yes; then
23423       gl_cv_next_signal_h='<'signal.h'>'
23424     else
23425       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
23426$as_echo_n "checking absolute name of <signal.h>... " >&6; }
23427if ${gl_cv_next_signal_h+:} false; then :
23428  $as_echo_n "(cached) " >&6
23429else
23430
23431
23432
23433  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23434/* end confdefs.h.  */
23435#include <signal.h>
23436_ACEOF
23437                case "$host_os" in
23438    aix*) gl_absname_cpp="$ac_cpp -C" ;;
23439    *)    gl_absname_cpp="$ac_cpp" ;;
23440  esac
23441
23442  case "$host_os" in
23443    mingw*)
23444                                          gl_dirsep_regex='[/\\]'
23445      ;;
23446    *)
23447      gl_dirsep_regex='\/'
23448      ;;
23449  esac
23450      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23451  gl_header_literal_regex=`echo 'signal.h' \
23452                           | sed -e "$gl_make_literal_regex_sed"`
23453  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23454      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23455      s|^/[^/]|//&|
23456      p
23457      q
23458    }'
23459
23460        gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23461  sed -n "$gl_absolute_header_sed"`
23462
23463           gl_header=$gl_cv_absolute_signal_h
23464           gl_cv_next_signal_h='"'$gl_header'"'
23465
23466
23467fi
23468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
23469$as_echo "$gl_cv_next_signal_h" >&6; }
23470     fi
23471     NEXT_SIGNAL_H=$gl_cv_next_signal_h
23472
23473     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23474       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23475       gl_next_as_first_directive='<'signal.h'>'
23476     else
23477       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23478       gl_next_as_first_directive=$gl_cv_next_signal_h
23479     fi
23480     NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
23481
23482
23483
23484
23485
23486# AIX declares sig_atomic_t to already include volatile, and C89 compilers
23487# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
23488  ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
23489#include <signal.h>
23490
23491"
23492if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
23493
23494else
23495  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
23496fi
23497
23498
23499
23500
23501
23502
23503
23504  ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
23505#include <signal.h>
23506
23507"
23508if test "x$ac_cv_type_sighandler_t" = xyes; then :
23509
23510else
23511  HAVE_SIGHANDLER_T=0
23512fi
23513
23514
23515
23516    for gl_func in pthread_sigmask sigaction     sigaddset sigdelset sigemptyset sigfillset sigismember     sigpending sigprocmask; do
23517    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23518    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23519$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
23520if eval \${$as_gl_Symbol+:} false; then :
23521  $as_echo_n "(cached) " >&6
23522else
23523  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23524/* end confdefs.h.  */
23525#include <signal.h>
23526
23527int
23528main ()
23529{
23530#undef $gl_func
23531  (void) $gl_func;
23532  ;
23533  return 0;
23534}
23535_ACEOF
23536if ac_fn_c_try_compile "$LINENO"; then :
23537  eval "$as_gl_Symbol=yes"
23538else
23539  eval "$as_gl_Symbol=no"
23540fi
23541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23542fi
23543eval ac_res=\$$as_gl_Symbol
23544	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23545$as_echo "$ac_res" >&6; }
23546    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
23547  cat >>confdefs.h <<_ACEOF
23548#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23549_ACEOF
23550
23551                     eval ac_cv_have_decl_$gl_func=yes
23552fi
23553      done
23554
23555
23556
23557
23558               ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
23559"
23560if test "x$ac_cv_have_decl_sleep" = xyes; then :
23561  ac_have_decl=1
23562else
23563  ac_have_decl=0
23564fi
23565
23566cat >>confdefs.h <<_ACEOF
23567#define HAVE_DECL_SLEEP $ac_have_decl
23568_ACEOF
23569
23570
23571  if test $ac_cv_have_decl_sleep != yes; then
23572    HAVE_SLEEP=0
23573  else
23574        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
23575$as_echo_n "checking for working sleep... " >&6; }
23576if ${gl_cv_func_sleep_works+:} false; then :
23577  $as_echo_n "(cached) " >&6
23578else
23579  if test "$cross_compiling" = yes; then :
23580  case "$host_os" in
23581                 # Guess yes on glibc systems.
23582         *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
23583                 # If we don't know, assume the worst.
23584         *)      gl_cv_func_sleep_works="guessing no" ;;
23585       esac
23586
23587else
23588  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23589/* end confdefs.h.  */
23590
23591#include <errno.h>
23592#include <unistd.h>
23593#include <signal.h>
23594static void
23595handle_alarm (int sig)
23596{
23597  if (sig != SIGALRM)
23598    _exit (2);
23599}
23600
23601int
23602main ()
23603{
23604
23605    /* Failure to compile this test due to missing alarm is okay,
23606       since all such platforms (mingw) also lack sleep.  */
23607    unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
23608    unsigned int remaining;
23609    signal (SIGALRM, handle_alarm);
23610    alarm (1);
23611    remaining = sleep (pentecost);
23612    if (remaining > pentecost)
23613      return 3;
23614    if (remaining <= pentecost - 10)
23615      return 4;
23616    return 0;
23617
23618  ;
23619  return 0;
23620}
23621_ACEOF
23622if ac_fn_c_try_run "$LINENO"; then :
23623  gl_cv_func_sleep_works=yes
23624else
23625  gl_cv_func_sleep_works=no
23626fi
23627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23628  conftest.$ac_objext conftest.beam conftest.$ac_ext
23629fi
23630
23631fi
23632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
23633$as_echo "$gl_cv_func_sleep_works" >&6; }
23634    case "$gl_cv_func_sleep_works" in
23635      *yes) ;;
23636      *)
23637        REPLACE_SLEEP=1
23638        ;;
23639    esac
23640  fi
23641
23642  if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
23643
23644
23645
23646
23647
23648
23649
23650
23651  gl_LIBOBJS="$gl_LIBOBJS sleep.$ac_objext"
23652
23653  fi
23654
23655
23656
23657
23658
23659          GNULIB_SLEEP=1
23660
23661
23662
23663
23664
23665$as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
23666
23667
23668
23669
23670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
23671$as_echo_n "checking for ssize_t... " >&6; }
23672if ${gt_cv_ssize_t+:} false; then :
23673  $as_echo_n "(cached) " >&6
23674else
23675  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23676/* end confdefs.h.  */
23677#include <sys/types.h>
23678int
23679main ()
23680{
23681int x = sizeof (ssize_t *) + sizeof (ssize_t);
23682            return !x;
23683  ;
23684  return 0;
23685}
23686_ACEOF
23687if ac_fn_c_try_compile "$LINENO"; then :
23688  gt_cv_ssize_t=yes
23689else
23690  gt_cv_ssize_t=no
23691fi
23692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23693fi
23694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
23695$as_echo "$gt_cv_ssize_t" >&6; }
23696  if test $gt_cv_ssize_t = no; then
23697
23698$as_echo "#define ssize_t int" >>confdefs.h
23699
23700  fi
23701
23702
23703
23704
23705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
23706$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
23707if ${gl_cv_func_stat_dir_slash+:} false; then :
23708  $as_echo_n "(cached) " >&6
23709else
23710  if test "$cross_compiling" = yes; then :
23711  case $host_os in
23712            mingw*) gl_cv_func_stat_dir_slash="guessing no";;
23713            *) gl_cv_func_stat_dir_slash="guessing yes";;
23714          esac
23715else
23716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23717/* end confdefs.h.  */
23718#include <sys/stat.h>
23719
23720int
23721main ()
23722{
23723struct stat st; return stat (".", &st) != stat ("./", &st);
23724  ;
23725  return 0;
23726}
23727_ACEOF
23728if ac_fn_c_try_run "$LINENO"; then :
23729  gl_cv_func_stat_dir_slash=yes
23730else
23731  gl_cv_func_stat_dir_slash=no
23732fi
23733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23734  conftest.$ac_objext conftest.beam conftest.$ac_ext
23735fi
23736
23737fi
23738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
23739$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
23740        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
23741$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
23742if ${gl_cv_func_stat_file_slash+:} false; then :
23743  $as_echo_n "(cached) " >&6
23744else
23745  touch conftest.tmp
23746       # Assume that if we have lstat, we can also check symlinks.
23747       if test $ac_cv_func_lstat = yes; then
23748         ln -s conftest.tmp conftest.lnk
23749       fi
23750       if test "$cross_compiling" = yes; then :
23751  case "$host_os" in
23752                    # Guess yes on glibc systems.
23753            *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
23754                    # If we don't know, assume the worst.
23755            *)      gl_cv_func_stat_file_slash="guessing no" ;;
23756          esac
23757
23758else
23759  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23760/* end confdefs.h.  */
23761#include <sys/stat.h>
23762
23763int
23764main ()
23765{
23766int result = 0;
23767      struct stat st;
23768      if (!stat ("conftest.tmp/", &st))
23769        result |= 1;
23770#if HAVE_LSTAT
23771      if (!stat ("conftest.lnk/", &st))
23772        result |= 2;
23773#endif
23774      return result;
23775
23776  ;
23777  return 0;
23778}
23779_ACEOF
23780if ac_fn_c_try_run "$LINENO"; then :
23781  gl_cv_func_stat_file_slash=yes
23782else
23783  gl_cv_func_stat_file_slash=no
23784fi
23785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23786  conftest.$ac_objext conftest.beam conftest.$ac_ext
23787fi
23788
23789       rm -f conftest.tmp conftest.lnk
23790fi
23791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
23792$as_echo "$gl_cv_func_stat_file_slash" >&6; }
23793  case $gl_cv_func_stat_dir_slash in
23794    *no) REPLACE_STAT=1
23795
23796$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
23797;;
23798  esac
23799  case $gl_cv_func_stat_file_slash in
23800    *no) REPLACE_STAT=1
23801
23802$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
23803;;
23804  esac
23805
23806  if test $REPLACE_STAT = 1; then
23807
23808
23809
23810
23811
23812
23813
23814
23815  gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
23816
23817    :
23818  fi
23819
23820
23821
23822
23823
23824          GNULIB_STAT=1
23825
23826
23827
23828
23829
23830$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
23831
23832
23833
23834
23835
23836
23837
23838  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>
23839     #include <sys/stat.h>
23840"
23841if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
23842
23843cat >>confdefs.h <<_ACEOF
23844#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
23845_ACEOF
23846
23847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
23848$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
23849if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
23850  $as_echo_n "(cached) " >&6
23851else
23852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23853/* end confdefs.h.  */
23854
23855            #include <sys/types.h>
23856            #include <sys/stat.h>
23857            #if HAVE_SYS_TIME_H
23858            # include <sys/time.h>
23859            #endif
23860            #include <time.h>
23861            struct timespec ts;
23862            struct stat st;
23863
23864int
23865main ()
23866{
23867
23868            st.st_atim = ts;
23869
23870  ;
23871  return 0;
23872}
23873_ACEOF
23874if ac_fn_c_try_compile "$LINENO"; then :
23875  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
23876else
23877  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
23878fi
23879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23880fi
23881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
23882$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
23883     if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
23884
23885$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
23886
23887     fi
23888else
23889  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>
23890        #include <sys/stat.h>
23891"
23892if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
23893
23894cat >>confdefs.h <<_ACEOF
23895#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
23896_ACEOF
23897
23898
23899else
23900  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
23901           #include <sys/stat.h>
23902"
23903if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
23904
23905cat >>confdefs.h <<_ACEOF
23906#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
23907_ACEOF
23908
23909
23910else
23911  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>
23912              #include <sys/stat.h>
23913"
23914if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
23915
23916cat >>confdefs.h <<_ACEOF
23917#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
23918_ACEOF
23919
23920
23921fi
23922
23923fi
23924
23925fi
23926
23927fi
23928
23929
23930
23931
23932
23933  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>
23934     #include <sys/stat.h>
23935"
23936if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
23937
23938cat >>confdefs.h <<_ACEOF
23939#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
23940_ACEOF
23941
23942
23943else
23944  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
23945        #include <sys/stat.h>
23946"
23947if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
23948
23949cat >>confdefs.h <<_ACEOF
23950#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
23951_ACEOF
23952
23953
23954else
23955  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>
23956          #include <sys/stat.h>
23957"
23958if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
23959
23960cat >>confdefs.h <<_ACEOF
23961#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
23962_ACEOF
23963
23964
23965fi
23966
23967fi
23968
23969fi
23970
23971
23972
23973  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
23974$as_echo_n "checking for working stdalign.h... " >&6; }
23975if ${gl_cv_header_working_stdalign_h+:} false; then :
23976  $as_echo_n "(cached) " >&6
23977else
23978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23979/* end confdefs.h.  */
23980#include <stdalign.h>
23981            #include <stddef.h>
23982
23983            /* Test that alignof yields a result consistent with offsetof.
23984               This catches GCC bug 52023
23985               <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
23986            #ifdef __cplusplus
23987               template <class t> struct alignof_helper { char a; t b; };
23988            # define ao(type) offsetof (alignof_helper<type>, b)
23989            #else
23990            # define ao(type) offsetof (struct { char a; type b; }, b)
23991            #endif
23992            char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
23993            char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
23994            char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
23995
23996            /* Test _Alignas only on platforms where gnulib can help.  */
23997            #if \
23998                ((defined __cplusplus && 201103 <= __cplusplus) \
23999                 || (defined __APPLE__ && defined __MACH__ \
24000                     ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
24001                     : __GNUC__) \
24002                 || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
24003                 || __ICC || 0x5110 <= __SUNPRO_C \
24004                 || 1300 <= _MSC_VER)
24005              struct alignas_test { char c; char alignas (8) alignas_8; };
24006              char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
24007                                ? 1 : -1];
24008            #endif
24009
24010int
24011main ()
24012{
24013
24014  ;
24015  return 0;
24016}
24017_ACEOF
24018if ac_fn_c_try_compile "$LINENO"; then :
24019  gl_cv_header_working_stdalign_h=yes
24020else
24021  gl_cv_header_working_stdalign_h=no
24022fi
24023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24024fi
24025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
24026$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
24027
24028  if test $gl_cv_header_working_stdalign_h = yes; then
24029    STDALIGN_H=''
24030  else
24031    STDALIGN_H='stdalign.h'
24032  fi
24033
24034
24035   if test -n "$STDALIGN_H"; then
24036  GL_GENERATE_STDALIGN_H_TRUE=
24037  GL_GENERATE_STDALIGN_H_FALSE='#'
24038else
24039  GL_GENERATE_STDALIGN_H_TRUE='#'
24040  GL_GENERATE_STDALIGN_H_FALSE=
24041fi
24042
24043
24044
24045  STDARG_H=''
24046  NEXT_STDARG_H='<stdarg.h>'
24047  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
24048$as_echo_n "checking for va_copy... " >&6; }
24049  if ${gl_cv_func_va_copy+:} false; then :
24050  $as_echo_n "(cached) " >&6
24051else
24052
24053    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24054/* end confdefs.h.  */
24055#include <stdarg.h>
24056int
24057main ()
24058{
24059
24060#ifndef va_copy
24061void (*func) (va_list, va_list) = va_copy;
24062#endif
24063
24064  ;
24065  return 0;
24066}
24067_ACEOF
24068if ac_fn_c_try_compile "$LINENO"; then :
24069  gl_cv_func_va_copy=yes
24070else
24071  gl_cv_func_va_copy=no
24072fi
24073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24074fi
24075
24076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
24077$as_echo "$gl_cv_func_va_copy" >&6; }
24078  if test $gl_cv_func_va_copy = no; then
24079                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24080/* end confdefs.h.  */
24081#if defined _AIX && !defined __GNUC__
24082        AIX vaccine
24083       #endif
24084
24085_ACEOF
24086if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24087  $EGREP "vaccine" >/dev/null 2>&1; then :
24088  gl_aixcc=yes
24089else
24090  gl_aixcc=no
24091fi
24092rm -f conftest*
24093
24094    if test $gl_aixcc = yes; then
24095            STDARG_H=stdarg.h
24096
24097
24098
24099
24100
24101
24102
24103
24104     if test $gl_cv_have_include_next = yes; then
24105       gl_cv_next_stdarg_h='<'stdarg.h'>'
24106     else
24107       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
24108$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
24109if ${gl_cv_next_stdarg_h+:} false; then :
24110  $as_echo_n "(cached) " >&6
24111else
24112
24113
24114
24115  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24116/* end confdefs.h.  */
24117#include <stdarg.h>
24118_ACEOF
24119                case "$host_os" in
24120    aix*) gl_absname_cpp="$ac_cpp -C" ;;
24121    *)    gl_absname_cpp="$ac_cpp" ;;
24122  esac
24123
24124  case "$host_os" in
24125    mingw*)
24126                                          gl_dirsep_regex='[/\\]'
24127      ;;
24128    *)
24129      gl_dirsep_regex='\/'
24130      ;;
24131  esac
24132      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24133  gl_header_literal_regex=`echo 'stdarg.h' \
24134                           | sed -e "$gl_make_literal_regex_sed"`
24135  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24136      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24137      s|^/[^/]|//&|
24138      p
24139      q
24140    }'
24141
24142        gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24143  sed -n "$gl_absolute_header_sed"`
24144
24145           gl_header=$gl_cv_absolute_stdarg_h
24146           gl_cv_next_stdarg_h='"'$gl_header'"'
24147
24148
24149fi
24150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
24151$as_echo "$gl_cv_next_stdarg_h" >&6; }
24152     fi
24153     NEXT_STDARG_H=$gl_cv_next_stdarg_h
24154
24155     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24156       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24157       gl_next_as_first_directive='<'stdarg.h'>'
24158     else
24159       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24160       gl_next_as_first_directive=$gl_cv_next_stdarg_h
24161     fi
24162     NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
24163
24164
24165
24166
24167            if test "$gl_cv_next_stdarg_h" = '""'; then
24168        gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
24169        NEXT_STDARG_H="$gl_cv_next_stdarg_h"
24170      fi
24171    else
24172
24173  saved_as_echo_n="$as_echo_n"
24174  as_echo_n=':'
24175  if ${gl_cv_func___va_copy+:} false; then :
24176  $as_echo_n "(cached) " >&6
24177else
24178
24179        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24180/* end confdefs.h.  */
24181#include <stdarg.h>
24182int
24183main ()
24184{
24185
24186#ifndef __va_copy
24187error, bail out
24188#endif
24189
24190  ;
24191  return 0;
24192}
24193_ACEOF
24194if ac_fn_c_try_compile "$LINENO"; then :
24195  gl_cv_func___va_copy=yes
24196else
24197  gl_cv_func___va_copy=no
24198fi
24199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24200fi
24201
24202  as_echo_n="$saved_as_echo_n"
24203
24204      if test $gl_cv_func___va_copy = yes; then
24205
24206$as_echo "#define va_copy __va_copy" >>confdefs.h
24207
24208      else
24209
24210
24211$as_echo "#define va_copy gl_va_copy" >>confdefs.h
24212
24213      fi
24214    fi
24215  fi
24216
24217   if test -n "$STDARG_H"; then
24218  GL_GENERATE_STDARG_H_TRUE=
24219  GL_GENERATE_STDARG_H_FALSE='#'
24220else
24221  GL_GENERATE_STDARG_H_TRUE='#'
24222  GL_GENERATE_STDARG_H_FALSE=
24223fi
24224
24225
24226
24227
24228
24229
24230  # Define two additional variables used in the Makefile substitution.
24231
24232  if test "$ac_cv_header_stdbool_h" = yes; then
24233    STDBOOL_H=''
24234  else
24235    STDBOOL_H='stdbool.h'
24236  fi
24237
24238   if test -n "$STDBOOL_H"; then
24239  GL_GENERATE_STDBOOL_H_TRUE=
24240  GL_GENERATE_STDBOOL_H_FALSE='#'
24241else
24242  GL_GENERATE_STDBOOL_H_TRUE='#'
24243  GL_GENERATE_STDBOOL_H_FALSE=
24244fi
24245
24246
24247  if test "$ac_cv_type__Bool" = yes; then
24248    HAVE__BOOL=1
24249  else
24250    HAVE__BOOL=0
24251  fi
24252
24253
24254
24255
24256
24257  STDDEF_H=
24258  ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
24259
24260"
24261if test "x$ac_cv_type_max_align_t" = xyes; then :
24262
24263else
24264  HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
24265fi
24266
24267  if test $gt_cv_c_wchar_t = no; then
24268    HAVE_WCHAR_T=0
24269    STDDEF_H=stddef.h
24270  fi
24271  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
24272$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
24273if ${gl_cv_decl_null_works+:} false; then :
24274  $as_echo_n "(cached) " >&6
24275else
24276  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24277/* end confdefs.h.  */
24278#include <stddef.h>
24279      int test[2 * (sizeof NULL == sizeof (void *)) -1];
24280
24281int
24282main ()
24283{
24284
24285  ;
24286  return 0;
24287}
24288_ACEOF
24289if ac_fn_c_try_compile "$LINENO"; then :
24290  gl_cv_decl_null_works=yes
24291else
24292  gl_cv_decl_null_works=no
24293fi
24294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24295fi
24296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
24297$as_echo "$gl_cv_decl_null_works" >&6; }
24298  if test $gl_cv_decl_null_works = no; then
24299    REPLACE_NULL=1
24300    STDDEF_H=stddef.h
24301  fi
24302
24303   if test -n "$STDDEF_H"; then
24304  GL_GENERATE_STDDEF_H_TRUE=
24305  GL_GENERATE_STDDEF_H_FALSE='#'
24306else
24307  GL_GENERATE_STDDEF_H_TRUE='#'
24308  GL_GENERATE_STDDEF_H_FALSE=
24309fi
24310
24311  if test -n "$STDDEF_H"; then
24312
24313
24314
24315
24316
24317
24318
24319
24320     if test $gl_cv_have_include_next = yes; then
24321       gl_cv_next_stddef_h='<'stddef.h'>'
24322     else
24323       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
24324$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
24325if ${gl_cv_next_stddef_h+:} false; then :
24326  $as_echo_n "(cached) " >&6
24327else
24328
24329
24330
24331  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24332/* end confdefs.h.  */
24333#include <stddef.h>
24334_ACEOF
24335                case "$host_os" in
24336    aix*) gl_absname_cpp="$ac_cpp -C" ;;
24337    *)    gl_absname_cpp="$ac_cpp" ;;
24338  esac
24339
24340  case "$host_os" in
24341    mingw*)
24342                                          gl_dirsep_regex='[/\\]'
24343      ;;
24344    *)
24345      gl_dirsep_regex='\/'
24346      ;;
24347  esac
24348      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24349  gl_header_literal_regex=`echo 'stddef.h' \
24350                           | sed -e "$gl_make_literal_regex_sed"`
24351  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24352      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24353      s|^/[^/]|//&|
24354      p
24355      q
24356    }'
24357
24358        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24359  sed -n "$gl_absolute_header_sed"`
24360
24361           gl_header=$gl_cv_absolute_stddef_h
24362           gl_cv_next_stddef_h='"'$gl_header'"'
24363
24364
24365fi
24366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
24367$as_echo "$gl_cv_next_stddef_h" >&6; }
24368     fi
24369     NEXT_STDDEF_H=$gl_cv_next_stddef_h
24370
24371     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24372       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24373       gl_next_as_first_directive='<'stddef.h'>'
24374     else
24375       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24376       gl_next_as_first_directive=$gl_cv_next_stddef_h
24377     fi
24378     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
24379
24380
24381
24382
24383  fi
24384
24385
24386
24387
24388  $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
24389
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399     if test $gl_cv_have_include_next = yes; then
24400       gl_cv_next_stdio_h='<'stdio.h'>'
24401     else
24402       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
24403$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
24404if ${gl_cv_next_stdio_h+:} false; then :
24405  $as_echo_n "(cached) " >&6
24406else
24407
24408
24409
24410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24411/* end confdefs.h.  */
24412#include <stdio.h>
24413_ACEOF
24414                case "$host_os" in
24415    aix*) gl_absname_cpp="$ac_cpp -C" ;;
24416    *)    gl_absname_cpp="$ac_cpp" ;;
24417  esac
24418
24419  case "$host_os" in
24420    mingw*)
24421                                          gl_dirsep_regex='[/\\]'
24422      ;;
24423    *)
24424      gl_dirsep_regex='\/'
24425      ;;
24426  esac
24427      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24428  gl_header_literal_regex=`echo 'stdio.h' \
24429                           | sed -e "$gl_make_literal_regex_sed"`
24430  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24431      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24432      s|^/[^/]|//&|
24433      p
24434      q
24435    }'
24436
24437        gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24438  sed -n "$gl_absolute_header_sed"`
24439
24440           gl_header=$gl_cv_absolute_stdio_h
24441           gl_cv_next_stdio_h='"'$gl_header'"'
24442
24443
24444fi
24445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
24446$as_echo "$gl_cv_next_stdio_h" >&6; }
24447     fi
24448     NEXT_STDIO_H=$gl_cv_next_stdio_h
24449
24450     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24451       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24452       gl_next_as_first_directive='<'stdio.h'>'
24453     else
24454       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24455       gl_next_as_first_directive=$gl_cv_next_stdio_h
24456     fi
24457     NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
24458
24459
24460
24461
24462
24463        { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
24464$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
24465if ${gl_cv_func_printf_attribute_flavor+:} false; then :
24466  $as_echo_n "(cached) " >&6
24467else
24468  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24469/* end confdefs.h.  */
24470
24471       #define __STDC_FORMAT_MACROS 1
24472       #include <stdio.h>
24473       #include <inttypes.h>
24474       /* For non-mingw systems, compilation will trivially succeed.
24475          For mingw, compilation will succeed for older mingw (system
24476          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
24477       #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
24478         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
24479       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
24480       #endif
24481
24482int
24483main ()
24484{
24485
24486  ;
24487  return 0;
24488}
24489_ACEOF
24490if ac_fn_c_try_compile "$LINENO"; then :
24491  gl_cv_func_printf_attribute_flavor=system
24492else
24493  gl_cv_func_printf_attribute_flavor=gnu
24494fi
24495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24496fi
24497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
24498$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
24499  if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
24500
24501$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
24502
24503  fi
24504
24505      GNULIB_FSCANF=1
24506
24507
24508cat >>confdefs.h <<_ACEOF
24509#define GNULIB_FSCANF 1
24510_ACEOF
24511
24512
24513  GNULIB_SCANF=1
24514
24515
24516cat >>confdefs.h <<_ACEOF
24517#define GNULIB_SCANF 1
24518_ACEOF
24519
24520
24521  GNULIB_FGETC=1
24522  GNULIB_GETC=1
24523  GNULIB_GETCHAR=1
24524  GNULIB_FGETS=1
24525  GNULIB_FREAD=1
24526
24527
24528      GNULIB_FPRINTF=1
24529  GNULIB_PRINTF=1
24530  GNULIB_VFPRINTF=1
24531  GNULIB_VPRINTF=1
24532  GNULIB_FPUTC=1
24533  GNULIB_PUTC=1
24534  GNULIB_PUTCHAR=1
24535  GNULIB_FPUTS=1
24536  GNULIB_PUTS=1
24537  GNULIB_FWRITE=1
24538
24539
24540
24541
24542    for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen     renameat snprintf tmpfile vdprintf vsnprintf; do
24543    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24545$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24546if eval \${$as_gl_Symbol+:} false; then :
24547  $as_echo_n "(cached) " >&6
24548else
24549  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24550/* end confdefs.h.  */
24551#include <stdio.h>
24552
24553int
24554main ()
24555{
24556#undef $gl_func
24557  (void) $gl_func;
24558  ;
24559  return 0;
24560}
24561_ACEOF
24562if ac_fn_c_try_compile "$LINENO"; then :
24563  eval "$as_gl_Symbol=yes"
24564else
24565  eval "$as_gl_Symbol=no"
24566fi
24567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24568fi
24569eval ac_res=\$$as_gl_Symbol
24570	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24571$as_echo "$ac_res" >&6; }
24572    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24573  cat >>confdefs.h <<_ACEOF
24574#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24575_ACEOF
24576
24577                     eval ac_cv_have_decl_$gl_func=yes
24578fi
24579      done
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
24591
24592     if test $gl_cv_have_include_next = yes; then
24593       gl_cv_next_stdlib_h='<'stdlib.h'>'
24594     else
24595       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
24596$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
24597if ${gl_cv_next_stdlib_h+:} false; then :
24598  $as_echo_n "(cached) " >&6
24599else
24600
24601
24602
24603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24604/* end confdefs.h.  */
24605#include <stdlib.h>
24606_ACEOF
24607                case "$host_os" in
24608    aix*) gl_absname_cpp="$ac_cpp -C" ;;
24609    *)    gl_absname_cpp="$ac_cpp" ;;
24610  esac
24611
24612  case "$host_os" in
24613    mingw*)
24614                                          gl_dirsep_regex='[/\\]'
24615      ;;
24616    *)
24617      gl_dirsep_regex='\/'
24618      ;;
24619  esac
24620      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24621  gl_header_literal_regex=`echo 'stdlib.h' \
24622                           | sed -e "$gl_make_literal_regex_sed"`
24623  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24624      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24625      s|^/[^/]|//&|
24626      p
24627      q
24628    }'
24629
24630        gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24631  sed -n "$gl_absolute_header_sed"`
24632
24633           gl_header=$gl_cv_absolute_stdlib_h
24634           gl_cv_next_stdlib_h='"'$gl_header'"'
24635
24636
24637fi
24638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
24639$as_echo "$gl_cv_next_stdlib_h" >&6; }
24640     fi
24641     NEXT_STDLIB_H=$gl_cv_next_stdlib_h
24642
24643     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24644       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24645       gl_next_as_first_directive='<'stdlib.h'>'
24646     else
24647       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24648       gl_next_as_first_directive=$gl_cv_next_stdlib_h
24649     fi
24650     NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
24651
24652
24653
24654
24655
24656
24657    for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt     initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps     posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch     secure_getenv setenv setstate setstate_r srandom srandom_r     strtod strtoll strtoull unlockpt unsetenv; do
24658    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24660$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24661if eval \${$as_gl_Symbol+:} false; then :
24662  $as_echo_n "(cached) " >&6
24663else
24664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24665/* end confdefs.h.  */
24666#include <stdlib.h>
24667#if HAVE_SYS_LOADAVG_H
24668# include <sys/loadavg.h>
24669#endif
24670#if HAVE_RANDOM_H
24671# include <random.h>
24672#endif
24673
24674int
24675main ()
24676{
24677#undef $gl_func
24678  (void) $gl_func;
24679  ;
24680  return 0;
24681}
24682_ACEOF
24683if ac_fn_c_try_compile "$LINENO"; then :
24684  eval "$as_gl_Symbol=yes"
24685else
24686  eval "$as_gl_Symbol=no"
24687fi
24688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24689fi
24690eval ac_res=\$$as_gl_Symbol
24691	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24692$as_echo "$ac_res" >&6; }
24693    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24694  cat >>confdefs.h <<_ACEOF
24695#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24696_ACEOF
24697
24698                     eval ac_cv_have_decl_$gl_func=yes
24699fi
24700      done
24701
24702
24703
24704
24705
24706
24707
24708
24709  for ac_func in stpcpy
24710do :
24711  ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
24712if test "x$ac_cv_func_stpcpy" = xyes; then :
24713  cat >>confdefs.h <<_ACEOF
24714#define HAVE_STPCPY 1
24715_ACEOF
24716
24717fi
24718done
24719
24720  if test $ac_cv_func_stpcpy = no; then
24721    HAVE_STPCPY=0
24722  fi
24723
24724  if test $HAVE_STPCPY = 0; then
24725
24726
24727
24728
24729
24730
24731
24732
24733  gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
24734
24735
24736  :
24737
24738  fi
24739
24740
24741
24742
24743
24744          GNULIB_STPCPY=1
24745
24746
24747
24748
24749
24750$as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
24751
24752
24753
24754
24755
24756
24757  for ac_func in strcasecmp
24758do :
24759  ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
24760if test "x$ac_cv_func_strcasecmp" = xyes; then :
24761  cat >>confdefs.h <<_ACEOF
24762#define HAVE_STRCASECMP 1
24763_ACEOF
24764
24765fi
24766done
24767
24768  if test $ac_cv_func_strcasecmp = no; then
24769    HAVE_STRCASECMP=0
24770  fi
24771
24772
24773
24774  for ac_func in strncasecmp
24775do :
24776  ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
24777if test "x$ac_cv_func_strncasecmp" = xyes; then :
24778  cat >>confdefs.h <<_ACEOF
24779#define HAVE_STRNCASECMP 1
24780_ACEOF
24781
24782fi
24783done
24784
24785  if test $ac_cv_func_strncasecmp = yes; then
24786    HAVE_STRNCASECMP=1
24787  else
24788    HAVE_STRNCASECMP=0
24789  fi
24790  ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
24791if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
24792  ac_have_decl=1
24793else
24794  ac_have_decl=0
24795fi
24796
24797cat >>confdefs.h <<_ACEOF
24798#define HAVE_DECL_STRNCASECMP $ac_have_decl
24799_ACEOF
24800
24801  if test $ac_cv_have_decl_strncasecmp = no; then
24802    HAVE_DECL_STRNCASECMP=0
24803  fi
24804
24805
24806  if test $HAVE_STRCASECMP = 0; then
24807
24808
24809
24810
24811
24812
24813
24814
24815  gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
24816
24817
24818  :
24819
24820  fi
24821  if test $HAVE_STRNCASECMP = 0; then
24822
24823
24824
24825
24826
24827
24828
24829
24830  gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
24831
24832
24833  :
24834
24835  fi
24836
24837
24838
24839
24840  for ac_func in strchrnul
24841do :
24842  ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
24843if test "x$ac_cv_func_strchrnul" = xyes; then :
24844  cat >>confdefs.h <<_ACEOF
24845#define HAVE_STRCHRNUL 1
24846_ACEOF
24847
24848fi
24849done
24850
24851  if test $ac_cv_func_strchrnul = no; then
24852    HAVE_STRCHRNUL=0
24853  else
24854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
24855$as_echo_n "checking whether strchrnul works... " >&6; }
24856if ${gl_cv_func_strchrnul_works+:} false; then :
24857  $as_echo_n "(cached) " >&6
24858else
24859  if test "$cross_compiling" = yes; then :
24860           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24861/* end confdefs.h.  */
24862
24863#if defined __CYGWIN__
24864 #include <cygwin/version.h>
24865 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
24866  Lucky user
24867 #endif
24868#else
24869  Lucky user
24870#endif
24871
24872_ACEOF
24873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24874  $EGREP "Lucky user" >/dev/null 2>&1; then :
24875  gl_cv_func_strchrnul_works="guessing yes"
24876else
24877  gl_cv_func_strchrnul_works="guessing no"
24878fi
24879rm -f conftest*
24880
24881
24882else
24883  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24884/* end confdefs.h.  */
24885
24886#include <string.h> /* for strchrnul */
24887
24888int
24889main ()
24890{
24891const char *buf = "a";
24892      return strchrnul (buf, 'b') != buf + 1;
24893
24894  ;
24895  return 0;
24896}
24897_ACEOF
24898if ac_fn_c_try_run "$LINENO"; then :
24899  gl_cv_func_strchrnul_works=yes
24900else
24901  gl_cv_func_strchrnul_works=no
24902fi
24903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24904  conftest.$ac_objext conftest.beam conftest.$ac_ext
24905fi
24906
24907
24908fi
24909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
24910$as_echo "$gl_cv_func_strchrnul_works" >&6; }
24911    case "$gl_cv_func_strchrnul_works" in
24912      *yes) ;;
24913      *) REPLACE_STRCHRNUL=1 ;;
24914    esac
24915  fi
24916
24917  if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
24918
24919
24920
24921
24922
24923
24924
24925
24926  gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
24927
24928    :
24929  fi
24930
24931
24932
24933
24934
24935          GNULIB_STRCHRNUL=1
24936
24937
24938
24939
24940
24941$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
24942
24943
24944
24945
24946
24947
24948
24949  if test $ac_cv_func_strdup = yes; then
24950    if test $gl_cv_func_malloc_posix != yes; then
24951      REPLACE_STRDUP=1
24952    fi
24953  fi
24954
24955  if test $ac_cv_have_decl_strdup = no; then
24956    HAVE_DECL_STRDUP=0
24957  fi
24958
24959  if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
24960
24961
24962
24963
24964
24965
24966
24967
24968  gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
24969
24970    :
24971  fi
24972
24973
24974
24975
24976
24977          GNULIB_STRDUP=1
24978
24979
24980
24981
24982
24983$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
24984
24985
24986
24987
24988
24989
24990
24991
24992  if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
24993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
24994$as_echo_n "checking for working strerror function... " >&6; }
24995if ${gl_cv_func_working_strerror+:} false; then :
24996  $as_echo_n "(cached) " >&6
24997else
24998  if test "$cross_compiling" = yes; then :
24999  case "$host_os" in
25000                   # Guess yes on glibc systems.
25001           *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
25002                   # If we don't know, assume the worst.
25003           *)      gl_cv_func_working_strerror="guessing no" ;;
25004         esac
25005
25006else
25007  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25008/* end confdefs.h.  */
25009#include <string.h>
25010
25011int
25012main ()
25013{
25014if (!*strerror (-2)) return 1;
25015  ;
25016  return 0;
25017}
25018_ACEOF
25019if ac_fn_c_try_run "$LINENO"; then :
25020  gl_cv_func_working_strerror=yes
25021else
25022  gl_cv_func_working_strerror=no
25023fi
25024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25025  conftest.$ac_objext conftest.beam conftest.$ac_ext
25026fi
25027
25028
25029fi
25030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
25031$as_echo "$gl_cv_func_working_strerror" >&6; }
25032    case "$gl_cv_func_working_strerror" in
25033      *yes) ;;
25034      *)
25035                        REPLACE_STRERROR=1
25036        ;;
25037    esac
25038
25039  else
25040            REPLACE_STRERROR=1
25041  fi
25042
25043  if test $REPLACE_STRERROR = 1; then
25044
25045
25046
25047
25048
25049
25050
25051
25052  gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
25053
25054  fi
25055
25056
25057cat >>confdefs.h <<_ACEOF
25058#define GNULIB_STRERROR 1
25059_ACEOF
25060
25061
25062
25063
25064
25065
25066
25067          GNULIB_STRERROR=1
25068
25069
25070
25071
25072
25073$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
25074
25075
25076
25077
25078
25079  if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
25080
25081
25082
25083
25084
25085
25086
25087
25088  gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
25089
25090
25091
25092
25093
25094  if test $ac_cv_header_sys_socket_h != yes; then
25095                    for ac_header in winsock2.h
25096do :
25097  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
25098if test "x$ac_cv_header_winsock2_h" = xyes; then :
25099  cat >>confdefs.h <<_ACEOF
25100#define HAVE_WINSOCK2_H 1
25101_ACEOF
25102
25103fi
25104
25105done
25106
25107  fi
25108  if test "$ac_cv_header_winsock2_h" = yes; then
25109    HAVE_WINSOCK2_H=1
25110    UNISTD_H_HAVE_WINSOCK2_H=1
25111    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
25112  else
25113    HAVE_WINSOCK2_H=0
25114  fi
25115
25116
25117  fi
25118
25119
25120 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
25121
25122
25123
25124
25125
25126
25127
25128$as_echo "#define my_strftime nstrftime" >>confdefs.h
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144  if test $ac_cv_have_decl_strndup = no; then
25145    HAVE_DECL_STRNDUP=0
25146  fi
25147
25148  if test $ac_cv_func_strndup = yes; then
25149    HAVE_STRNDUP=1
25150    # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
25151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
25152$as_echo_n "checking for working strndup... " >&6; }
25153if ${gl_cv_func_strndup_works+:} false; then :
25154  $as_echo_n "(cached) " >&6
25155else
25156  if test "$cross_compiling" = yes; then :
25157
25158          case $host_os in
25159            aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
25160            *)               gl_cv_func_strndup_works="guessing yes";;
25161          esac
25162
25163else
25164  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25165/* end confdefs.h.  */
25166
25167         #include <string.h>
25168                           #include <stdlib.h>
25169int
25170main ()
25171{
25172
25173#if !HAVE_DECL_STRNDUP
25174  extern
25175  #ifdef __cplusplus
25176  "C"
25177  #endif
25178  char *strndup (const char *, size_t);
25179#endif
25180  int result;
25181  char *s;
25182  s = strndup ("some longer string", 15);
25183  free (s);
25184  s = strndup ("shorter string", 13);
25185  result = s[13] != '\0';
25186  free (s);
25187  return result;
25188  ;
25189  return 0;
25190}
25191_ACEOF
25192if ac_fn_c_try_run "$LINENO"; then :
25193  gl_cv_func_strndup_works=yes
25194else
25195  gl_cv_func_strndup_works=no
25196fi
25197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25198  conftest.$ac_objext conftest.beam conftest.$ac_ext
25199fi
25200
25201fi
25202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
25203$as_echo "$gl_cv_func_strndup_works" >&6; }
25204    case $gl_cv_func_strndup_works in
25205      *no) REPLACE_STRNDUP=1 ;;
25206    esac
25207  else
25208    HAVE_STRNDUP=0
25209  fi
25210
25211  if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
25212
25213
25214
25215
25216
25217
25218
25219
25220  gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
25221
25222  fi
25223
25224
25225
25226
25227
25228          GNULIB_STRNDUP=1
25229
25230
25231
25232
25233
25234$as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244  if test $ac_cv_have_decl_strnlen = no; then
25245    HAVE_DECL_STRNLEN=0
25246  else
25247
25248         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
25249$as_echo_n "checking for working strnlen... " >&6; }
25250if ${ac_cv_func_strnlen_working+:} false; then :
25251  $as_echo_n "(cached) " >&6
25252else
25253  if test "$cross_compiling" = yes; then :
25254  # Guess no on AIX systems, yes otherwise.
25255		case "$host_os" in
25256		  aix*) ac_cv_func_strnlen_working=no;;
25257		  *)    ac_cv_func_strnlen_working=yes;;
25258		esac
25259else
25260  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25261/* end confdefs.h.  */
25262$ac_includes_default
25263int
25264main ()
25265{
25266
25267#define S "foobar"
25268#define S_LEN (sizeof S - 1)
25269
25270  /* At least one implementation is buggy: that of AIX 4.3 would
25271     give strnlen (S, 1) == 3.  */
25272
25273  int i;
25274  for (i = 0; i < S_LEN + 1; ++i)
25275    {
25276      int expected = i <= S_LEN ? i : S_LEN;
25277      if (strnlen (S, i) != expected)
25278	return 1;
25279    }
25280  return 0;
25281
25282  ;
25283  return 0;
25284}
25285_ACEOF
25286if ac_fn_c_try_run "$LINENO"; then :
25287  ac_cv_func_strnlen_working=yes
25288else
25289  ac_cv_func_strnlen_working=no
25290fi
25291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25292  conftest.$ac_objext conftest.beam conftest.$ac_ext
25293fi
25294
25295fi
25296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
25297$as_echo "$ac_cv_func_strnlen_working" >&6; }
25298test $ac_cv_func_strnlen_working = no && :
25299
25300
25301    if test $ac_cv_func_strnlen_working = no; then
25302      REPLACE_STRNLEN=1
25303    fi
25304  fi
25305
25306  if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
25307
25308
25309
25310
25311
25312
25313
25314
25315  gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
25316
25317    :
25318  fi
25319
25320
25321
25322
25323
25324          GNULIB_STRNLEN=1
25325
25326
25327
25328
25329
25330$as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
25331
25332
25333
25334
25335  for ac_func in strtol
25336do :
25337  ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
25338if test "x$ac_cv_func_strtol" = xyes; then :
25339  cat >>confdefs.h <<_ACEOF
25340#define HAVE_STRTOL 1
25341_ACEOF
25342
25343fi
25344done
25345
25346
25347  if test $ac_cv_func_strtol = no; then
25348
25349
25350
25351
25352
25353
25354
25355
25356  gl_LIBOBJS="$gl_LIBOBJS strtol.$ac_objext"
25357
25358  fi
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373     if test $gl_cv_have_include_next = yes; then
25374       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
25375     else
25376       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
25377$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
25378if ${gl_cv_next_sys_stat_h+:} false; then :
25379  $as_echo_n "(cached) " >&6
25380else
25381
25382             if test $ac_cv_header_sys_stat_h = yes; then
25383
25384
25385
25386
25387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25388/* end confdefs.h.  */
25389#include <sys/stat.h>
25390_ACEOF
25391                case "$host_os" in
25392    aix*) gl_absname_cpp="$ac_cpp -C" ;;
25393    *)    gl_absname_cpp="$ac_cpp" ;;
25394  esac
25395
25396  case "$host_os" in
25397    mingw*)
25398                                          gl_dirsep_regex='[/\\]'
25399      ;;
25400    *)
25401      gl_dirsep_regex='\/'
25402      ;;
25403  esac
25404      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25405  gl_header_literal_regex=`echo 'sys/stat.h' \
25406                           | sed -e "$gl_make_literal_regex_sed"`
25407  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25408      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25409      s|^/[^/]|//&|
25410      p
25411      q
25412    }'
25413
25414        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25415  sed -n "$gl_absolute_header_sed"`
25416
25417           gl_header=$gl_cv_absolute_sys_stat_h
25418           gl_cv_next_sys_stat_h='"'$gl_header'"'
25419          else
25420               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
25421             fi
25422
25423
25424fi
25425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
25426$as_echo "$gl_cv_next_sys_stat_h" >&6; }
25427     fi
25428     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
25429
25430     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25431       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25432       gl_next_as_first_directive='<'sys/stat.h'>'
25433     else
25434       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25435       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
25436     fi
25437     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
25450
25451$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
25452
25453  fi
25454
25455      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
25456     #include <sys/stat.h>
25457"
25458if test "x$ac_cv_type_nlink_t" = xyes; then :
25459
25460else
25461
25462$as_echo "#define nlink_t int" >>confdefs.h
25463
25464fi
25465
25466
25467
25468    for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
25469    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25470    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25471$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25472if eval \${$as_gl_Symbol+:} false; then :
25473  $as_echo_n "(cached) " >&6
25474else
25475  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25476/* end confdefs.h.  */
25477#include <sys/stat.h>
25478
25479int
25480main ()
25481{
25482#undef $gl_func
25483  (void) $gl_func;
25484  ;
25485  return 0;
25486}
25487_ACEOF
25488if ac_fn_c_try_compile "$LINENO"; then :
25489  eval "$as_gl_Symbol=yes"
25490else
25491  eval "$as_gl_Symbol=no"
25492fi
25493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25494fi
25495eval ac_res=\$$as_gl_Symbol
25496	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25497$as_echo "$ac_res" >&6; }
25498    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25499  cat >>confdefs.h <<_ACEOF
25500#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25501_ACEOF
25502
25503                     eval ac_cv_have_decl_$gl_func=yes
25504fi
25505      done
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517  if test $ac_cv_header_sysexits_h = yes; then
25518    HAVE_SYSEXITS_H=1
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528     if test $gl_cv_have_include_next = yes; then
25529       gl_cv_next_sysexits_h='<'sysexits.h'>'
25530     else
25531       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sysexits.h>" >&5
25532$as_echo_n "checking absolute name of <sysexits.h>... " >&6; }
25533if ${gl_cv_next_sysexits_h+:} false; then :
25534  $as_echo_n "(cached) " >&6
25535else
25536
25537             if test $ac_cv_header_sysexits_h = yes; then
25538
25539
25540
25541
25542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25543/* end confdefs.h.  */
25544#include <sysexits.h>
25545_ACEOF
25546                case "$host_os" in
25547    aix*) gl_absname_cpp="$ac_cpp -C" ;;
25548    *)    gl_absname_cpp="$ac_cpp" ;;
25549  esac
25550
25551  case "$host_os" in
25552    mingw*)
25553                                          gl_dirsep_regex='[/\\]'
25554      ;;
25555    *)
25556      gl_dirsep_regex='\/'
25557      ;;
25558  esac
25559      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25560  gl_header_literal_regex=`echo 'sysexits.h' \
25561                           | sed -e "$gl_make_literal_regex_sed"`
25562  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25563      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25564      s|^/[^/]|//&|
25565      p
25566      q
25567    }'
25568
25569        gl_cv_absolute_sysexits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25570  sed -n "$gl_absolute_header_sed"`
25571
25572           gl_header=$gl_cv_absolute_sysexits_h
25573           gl_cv_next_sysexits_h='"'$gl_header'"'
25574          else
25575               gl_cv_next_sysexits_h='<'sysexits.h'>'
25576             fi
25577
25578
25579fi
25580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sysexits_h" >&5
25581$as_echo "$gl_cv_next_sysexits_h" >&6; }
25582     fi
25583     NEXT_SYSEXITS_H=$gl_cv_next_sysexits_h
25584
25585     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25586       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25587       gl_next_as_first_directive='<'sysexits.h'>'
25588     else
25589       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25590       gl_next_as_first_directive=$gl_cv_next_sysexits_h
25591     fi
25592     NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H=$gl_next_as_first_directive
25593
25594
25595
25596
25597    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25598/* end confdefs.h.  */
25599#include <sysexits.h>
25600int
25601main ()
25602{
25603switch (0)
25604          {
25605          case EX_OK:
25606          case EX_USAGE:
25607          case EX_DATAERR:
25608          case EX_NOINPUT:
25609          case EX_NOUSER:
25610          case EX_NOHOST:
25611          case EX_UNAVAILABLE:
25612          case EX_SOFTWARE:
25613          case EX_OSERR:
25614          case EX_OSFILE:
25615          case EX_CANTCREAT:
25616          case EX_IOERR:
25617          case EX_TEMPFAIL:
25618          case EX_PROTOCOL:
25619          case EX_NOPERM:
25620          case EX_CONFIG:
25621            break;
25622          }
25623
25624  ;
25625  return 0;
25626}
25627_ACEOF
25628if ac_fn_c_try_compile "$LINENO"; then :
25629  SYSEXITS_H=
25630else
25631  SYSEXITS_H=sysexits.h
25632fi
25633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25634  else
25635    HAVE_SYSEXITS_H=0
25636    SYSEXITS_H=sysexits.h
25637  fi
25638
25639
25640   if test -n "$SYSEXITS_H"; then
25641  GL_GENERATE_SYSEXITS_H_TRUE=
25642  GL_GENERATE_SYSEXITS_H_FALSE='#'
25643else
25644  GL_GENERATE_SYSEXITS_H_TRUE='#'
25645  GL_GENERATE_SYSEXITS_H_FALSE=
25646fi
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658      ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
25659"
25660if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
25661  ac_have_decl=1
25662else
25663  ac_have_decl=0
25664fi
25665
25666cat >>confdefs.h <<_ACEOF
25667#define HAVE_DECL_LOCALTIME_R $ac_have_decl
25668_ACEOF
25669
25670  if test $ac_cv_have_decl_localtime_r = no; then
25671    HAVE_DECL_LOCALTIME_R=0
25672  fi
25673
25674
25675  if test $ac_cv_func_localtime_r = yes; then
25676    HAVE_LOCALTIME_R=1
25677    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
25678$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
25679if ${gl_cv_time_r_posix+:} false; then :
25680  $as_echo_n "(cached) " >&6
25681else
25682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25683/* end confdefs.h.  */
25684#include <time.h>
25685int
25686main ()
25687{
25688/* We don't need to append 'restrict's to the argument types,
25689                 even though the POSIX signature has the 'restrict's,
25690                 since C99 says they can't affect type compatibility.  */
25691              struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
25692              if (ptr) return 0;
25693              /* Check the return type is a pointer.
25694                 On HP-UX 10 it is 'int'.  */
25695              *localtime_r (0, 0);
25696  ;
25697  return 0;
25698}
25699
25700_ACEOF
25701if ac_fn_c_try_compile "$LINENO"; then :
25702  gl_cv_time_r_posix=yes
25703else
25704  gl_cv_time_r_posix=no
25705fi
25706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25707
25708fi
25709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
25710$as_echo "$gl_cv_time_r_posix" >&6; }
25711    if test $gl_cv_time_r_posix = yes; then
25712      REPLACE_LOCALTIME_R=0
25713    else
25714      REPLACE_LOCALTIME_R=1
25715    fi
25716  else
25717    HAVE_LOCALTIME_R=0
25718  fi
25719
25720  if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
25721
25722
25723
25724
25725
25726
25727
25728
25729  gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
25730
25731
25732  :
25733
25734  fi
25735
25736
25737
25738
25739
25740          GNULIB_TIME_R=1
25741
25742
25743
25744
25745
25746$as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756  ac_fn_c_check_type "$LINENO" "timezone_t" "ac_cv_type_timezone_t" "#include <time.h>
25757"
25758if test "x$ac_cv_type_timezone_t" = xyes; then :
25759
25760cat >>confdefs.h <<_ACEOF
25761#define HAVE_TIMEZONE_T 1
25762_ACEOF
25763
25764
25765fi
25766
25767  if test "$ac_cv_type_timezone_t" = yes; then
25768    HAVE_TIMEZONE_T=1
25769  fi
25770
25771  if test "$HAVE_TIMEZONE_T" = 0; then
25772
25773
25774
25775
25776
25777
25778
25779
25780  gl_LIBOBJS="$gl_LIBOBJS time_rz.$ac_objext"
25781
25782  fi
25783
25784
25785
25786
25787
25788          GNULIB_TIME_RZ=1
25789
25790
25791
25792
25793
25794$as_echo "#define GNULIB_TEST_TIME_RZ 1" >>confdefs.h
25795
25796
25797
25798
25799
25800
25801  REPLACE_TIMEGM=0
25802
25803  if test $ac_cv_func_timegm = yes; then
25804    if test $gl_cv_func_working_mktime = no; then
25805      # Assume that timegm is buggy if mktime is.
25806      REPLACE_TIMEGM=1
25807    fi
25808  else
25809    HAVE_TIMEGM=0
25810  fi
25811
25812  if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
25813
25814
25815
25816
25817
25818
25819
25820
25821  gl_LIBOBJS="$gl_LIBOBJS timegm.$ac_objext"
25822
25823
25824  :
25825
25826  fi
25827
25828
25829
25830
25831
25832          GNULIB_TIMEGM=1
25833
25834
25835
25836
25837
25838$as_echo "#define GNULIB_TEST_TIMEGM 1" >>confdefs.h
25839
25840
25841
25842  :
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853
25854
25855     if test $gl_cv_have_include_next = yes; then
25856       gl_cv_next_unistd_h='<'unistd.h'>'
25857     else
25858       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
25859$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
25860if ${gl_cv_next_unistd_h+:} false; then :
25861  $as_echo_n "(cached) " >&6
25862else
25863
25864             if test $ac_cv_header_unistd_h = yes; then
25865
25866
25867
25868
25869  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25870/* end confdefs.h.  */
25871#include <unistd.h>
25872_ACEOF
25873                case "$host_os" in
25874    aix*) gl_absname_cpp="$ac_cpp -C" ;;
25875    *)    gl_absname_cpp="$ac_cpp" ;;
25876  esac
25877
25878  case "$host_os" in
25879    mingw*)
25880                                          gl_dirsep_regex='[/\\]'
25881      ;;
25882    *)
25883      gl_dirsep_regex='\/'
25884      ;;
25885  esac
25886      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25887  gl_header_literal_regex=`echo 'unistd.h' \
25888                           | sed -e "$gl_make_literal_regex_sed"`
25889  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25890      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25891      s|^/[^/]|//&|
25892      p
25893      q
25894    }'
25895
25896        gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25897  sed -n "$gl_absolute_header_sed"`
25898
25899           gl_header=$gl_cv_absolute_unistd_h
25900           gl_cv_next_unistd_h='"'$gl_header'"'
25901          else
25902               gl_cv_next_unistd_h='<'unistd.h'>'
25903             fi
25904
25905
25906fi
25907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
25908$as_echo "$gl_cv_next_unistd_h" >&6; }
25909     fi
25910     NEXT_UNISTD_H=$gl_cv_next_unistd_h
25911
25912     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25913       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25914       gl_next_as_first_directive='<'unistd.h'>'
25915     else
25916       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25917       gl_next_as_first_directive=$gl_cv_next_unistd_h
25918     fi
25919     NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
25920
25921
25922
25923
25924  if test $ac_cv_header_unistd_h = yes; then
25925    HAVE_UNISTD_H=1
25926  else
25927    HAVE_UNISTD_H=0
25928  fi
25929
25930
25931
25932
25933
25934
25935
25936    for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat     fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups     gethostname getlogin getlogin_r getpagesize     getusershell setusershell endusershell     group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite     readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r     unlink unlinkat usleep; do
25937    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25938    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25939$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25940if eval \${$as_gl_Symbol+:} false; then :
25941  $as_echo_n "(cached) " >&6
25942else
25943  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25944/* end confdefs.h.  */
25945
25946#if HAVE_UNISTD_H
25947# include <unistd.h>
25948#endif
25949/* Some systems declare various items in the wrong headers.  */
25950#if !(defined __GLIBC__ && !defined __UCLIBC__)
25951# include <fcntl.h>
25952# include <stdio.h>
25953# include <stdlib.h>
25954# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
25955#  include <io.h>
25956# endif
25957#endif
25958
25959int
25960main ()
25961{
25962#undef $gl_func
25963  (void) $gl_func;
25964  ;
25965  return 0;
25966}
25967_ACEOF
25968if ac_fn_c_try_compile "$LINENO"; then :
25969  eval "$as_gl_Symbol=yes"
25970else
25971  eval "$as_gl_Symbol=no"
25972fi
25973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25974fi
25975eval ac_res=\$$as_gl_Symbol
25976	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25977$as_echo "$ac_res" >&6; }
25978    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25979  cat >>confdefs.h <<_ACEOF
25980#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25981_ACEOF
25982
25983                     eval ac_cv_have_decl_$gl_func=yes
25984fi
25985      done
25986
25987
25988
25989
25990
25991
25992
25993$as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
25994
25995
25996
25997
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011
26012
26013
26014
26015  if test $ac_cv_have_decl_unsetenv = no; then
26016    HAVE_DECL_UNSETENV=0
26017  fi
26018  for ac_func in unsetenv
26019do :
26020  ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
26021if test "x$ac_cv_func_unsetenv" = xyes; then :
26022  cat >>confdefs.h <<_ACEOF
26023#define HAVE_UNSETENV 1
26024_ACEOF
26025
26026fi
26027done
26028
26029  if test $ac_cv_func_unsetenv = no; then
26030    HAVE_UNSETENV=0
26031  else
26032    HAVE_UNSETENV=1
26033        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
26034$as_echo_n "checking for unsetenv() return type... " >&6; }
26035if ${gt_cv_func_unsetenv_ret+:} false; then :
26036  $as_echo_n "(cached) " >&6
26037else
26038  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26039/* end confdefs.h.  */
26040
26041#undef _BSD
26042#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
26043#include <stdlib.h>
26044extern
26045#ifdef __cplusplus
26046"C"
26047#endif
26048int unsetenv (const char *name);
26049
26050int
26051main ()
26052{
26053
26054  ;
26055  return 0;
26056}
26057_ACEOF
26058if ac_fn_c_try_compile "$LINENO"; then :
26059  gt_cv_func_unsetenv_ret='int'
26060else
26061  gt_cv_func_unsetenv_ret='void'
26062fi
26063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26064fi
26065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
26066$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
26067    if test $gt_cv_func_unsetenv_ret = 'void'; then
26068
26069$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
26070
26071      REPLACE_UNSETENV=1
26072    fi
26073
26074                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
26075$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
26076if ${gl_cv_func_unsetenv_works+:} false; then :
26077  $as_echo_n "(cached) " >&6
26078else
26079  if test "$cross_compiling" = yes; then :
26080  case "$host_os" in
26081                 # Guess yes on glibc systems.
26082         *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
26083                 # If we don't know, assume the worst.
26084         *)      gl_cv_func_unsetenv_works="guessing no" ;;
26085       esac
26086
26087else
26088  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26089/* end confdefs.h.  */
26090
26091       #include <stdlib.h>
26092       #include <errno.h>
26093       extern char **environ;
26094
26095int
26096main ()
26097{
26098
26099       char entry1[] = "a=1";
26100       char entry2[] = "b=2";
26101       char *env[] = { entry1, entry2, NULL };
26102       if (putenv ((char *) "a=1")) return 1;
26103       if (putenv (entry2)) return 2;
26104       entry2[0] = 'a';
26105       unsetenv ("a");
26106       if (getenv ("a")) return 3;
26107       if (!unsetenv ("") || errno != EINVAL) return 4;
26108       entry2[0] = 'b';
26109       environ = env;
26110       if (!getenv ("a")) return 5;
26111       entry2[0] = 'a';
26112       unsetenv ("a");
26113       if (getenv ("a")) return 6;
26114
26115  ;
26116  return 0;
26117}
26118_ACEOF
26119if ac_fn_c_try_run "$LINENO"; then :
26120  gl_cv_func_unsetenv_works=yes
26121else
26122  gl_cv_func_unsetenv_works=no
26123fi
26124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26125  conftest.$ac_objext conftest.beam conftest.$ac_ext
26126fi
26127
26128fi
26129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
26130$as_echo "$gl_cv_func_unsetenv_works" >&6; }
26131    case "$gl_cv_func_unsetenv_works" in
26132      *yes) ;;
26133      *)
26134        REPLACE_UNSETENV=1
26135        ;;
26136    esac
26137  fi
26138
26139  if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
26140
26141
26142
26143
26144
26145
26146
26147
26148  gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
26149
26150
26151
26152
26153
26154  fi
26155
26156
26157
26158
26159
26160          GNULIB_UNSETENV=1
26161
26162
26163
26164
26165
26166$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176  if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
26177                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
26178$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
26179if ${gl_cv_func_futimesat_works+:} false; then :
26180  $as_echo_n "(cached) " >&6
26181else
26182  touch conftest.file
26183       if test "$cross_compiling" = yes; then :
26184  case "$host_os" in
26185                   # Guess yes on glibc systems.
26186           *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
26187                   # If we don't know, assume the worst.
26188           *)      gl_cv_func_futimesat_works="guessing no" ;;
26189         esac
26190
26191else
26192  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26193/* end confdefs.h.  */
26194
26195#include <stddef.h>
26196#include <sys/times.h>
26197#include <fcntl.h>
26198
26199int
26200main ()
26201{
26202    int fd = open ("conftest.file", O_RDWR);
26203          if (fd < 0) return 1;
26204          if (futimesat (fd, NULL, NULL)) return 2;
26205
26206  ;
26207  return 0;
26208}
26209_ACEOF
26210if ac_fn_c_try_run "$LINENO"; then :
26211  gl_cv_func_futimesat_works=yes
26212else
26213  gl_cv_func_futimesat_works=no
26214fi
26215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26216  conftest.$ac_objext conftest.beam conftest.$ac_ext
26217fi
26218
26219      rm -f conftest.file
26220fi
26221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
26222$as_echo "$gl_cv_func_futimesat_works" >&6; }
26223    case "$gl_cv_func_futimesat_works" in
26224      *yes) ;;
26225      *)
26226
26227$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
26228
26229        ;;
26230    esac
26231  fi
26232
26233
26234
26235
26236
26237  if test $ac_cv_func_utimensat = no; then
26238    HAVE_UTIMENSAT=0
26239  else
26240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether utimensat works" >&5
26241$as_echo_n "checking whether utimensat works... " >&6; }
26242if ${gl_cv_func_utimensat_works+:} false; then :
26243  $as_echo_n "(cached) " >&6
26244else
26245  if test "$cross_compiling" = yes; then :
26246  gl_cv_func_utimensat_works="guessing yes"
26247else
26248  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26249/* end confdefs.h.  */
26250
26251#include <fcntl.h>
26252#include <sys/stat.h>
26253#include <unistd.h>
26254
26255int
26256main ()
26257{
26258int result = 0;
26259              const char *f = "conftest.file";
26260              if (close (creat (f, 0600)))
26261                return 1;
26262              /* Test whether the AT_SYMLINK_NOFOLLOW flag is supported.  */
26263              {
26264                if (utimensat (AT_FDCWD, f, NULL, AT_SYMLINK_NOFOLLOW))
26265                  result |= 2;
26266              }
26267              /* Test whether UTIME_NOW and UTIME_OMIT work.  */
26268              {
26269                struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
26270                if (utimensat (AT_FDCWD, f, ts, 0))
26271                  result |= 4;
26272              }
26273              sleep (1);
26274              {
26275                struct timespec ts[2] = { { 1, UTIME_NOW }, { 1, UTIME_OMIT } };
26276                struct stat st;
26277                if (utimensat (AT_FDCWD, f, ts, 0))
26278                  result |= 8;
26279                if (stat (f, &st))
26280                  result |= 16;
26281                else if (st.st_ctime < st.st_atime)
26282                  result |= 32;
26283              }
26284              return result;
26285
26286  ;
26287  return 0;
26288}
26289_ACEOF
26290if ac_fn_c_try_run "$LINENO"; then :
26291  gl_cv_func_utimensat_works=yes
26292else
26293  gl_cv_func_utimensat_works=no
26294fi
26295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26296  conftest.$ac_objext conftest.beam conftest.$ac_ext
26297fi
26298
26299fi
26300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_utimensat_works" >&5
26301$as_echo "$gl_cv_func_utimensat_works" >&6; }
26302    if test "$gl_cv_func_utimensat_works" = no; then
26303      REPLACE_UTIMENSAT=1
26304    fi
26305  fi
26306
26307  if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
26308
26309
26310
26311
26312
26313
26314
26315
26316  gl_LIBOBJS="$gl_LIBOBJS utimensat.$ac_objext"
26317
26318  fi
26319
26320
26321
26322
26323
26324          GNULIB_UTIMENSAT=1
26325
26326
26327
26328
26329
26330$as_echo "#define GNULIB_TEST_UTIMENSAT 1" >>confdefs.h
26331
26332
26333
26334
26335
26336  if test $ac_cv_func_vasnprintf = no; then
26337
26338
26339
26340
26341
26342
26343
26344
26345
26346
26347  gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357  gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367  gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
26368
26369
26370
26371
26372
26373
26374
26375
26376
26377  gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
26378
26379  if test $ac_cv_func_vasnprintf = yes; then
26380
26381$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
26382
26383  fi
26384
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395  ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
26396if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
26397
26398else
26399
26400$as_echo "#define ptrdiff_t long" >>confdefs.h
26401
26402
26403fi
26404
26405
26406
26407
26408
26409
26410
26411  fi
26412
26413
26414# Check whether --with-packager was given.
26415if test "${with_packager+set}" = set; then :
26416  withval=$with_packager;       case $withval in
26417        yes|no) ;;
26418        *)
26419cat >>confdefs.h <<_ACEOF
26420#define PACKAGE_PACKAGER "$withval"
26421_ACEOF
26422 ;;
26423      esac
26424
26425fi
26426
26427
26428
26429# Check whether --with-packager-version was given.
26430if test "${with_packager_version+set}" = set; then :
26431  withval=$with_packager_version;       case $withval in
26432        yes|no) ;;
26433        *)
26434cat >>confdefs.h <<_ACEOF
26435#define PACKAGE_PACKAGER_VERSION "$withval"
26436_ACEOF
26437 ;;
26438      esac
26439
26440fi
26441
26442
26443
26444# Check whether --with-packager-bug-reports was given.
26445if test "${with_packager_bug_reports+set}" = set; then :
26446  withval=$with_packager_bug_reports;       case $withval in
26447        yes|no) ;;
26448        *)
26449cat >>confdefs.h <<_ACEOF
26450#define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
26451_ACEOF
26452 ;;
26453      esac
26454
26455fi
26456
26457
26458  if test "X$with_packager" = "X" && \
26459     test "X$with_packager_version$with_packager_bug_reports" != "X"
26460  then
26461    as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
26462  fi
26463
26464
26465
26466  gl_cv_func_vsnprintf_usable=no
26467  for ac_func in vsnprintf
26468do :
26469  ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
26470if test "x$ac_cv_func_vsnprintf" = xyes; then :
26471  cat >>confdefs.h <<_ACEOF
26472#define HAVE_VSNPRINTF 1
26473_ACEOF
26474
26475fi
26476done
26477
26478  if test $ac_cv_func_vsnprintf = yes; then
26479
26480
26481
26482  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
26483$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
26484if ${gl_cv_func_snprintf_size1+:} false; then :
26485  $as_echo_n "(cached) " >&6
26486else
26487
26488      if test "$cross_compiling" = yes; then :
26489  gl_cv_func_snprintf_size1="guessing yes"
26490else
26491  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26492/* end confdefs.h.  */
26493
26494#include <stdio.h>
26495#if HAVE_SNPRINTF
26496# define my_snprintf snprintf
26497#else
26498# include <stdarg.h>
26499static int my_snprintf (char *buf, int size, const char *format, ...)
26500{
26501  va_list args;
26502  int ret;
26503  va_start (args, format);
26504  ret = vsnprintf (buf, size, format, args);
26505  va_end (args);
26506  return ret;
26507}
26508#endif
26509int main()
26510{
26511  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
26512  my_snprintf (buf, 1, "%d", 12345);
26513  return buf[1] != 'E';
26514}
26515_ACEOF
26516if ac_fn_c_try_run "$LINENO"; then :
26517  gl_cv_func_snprintf_size1=yes
26518else
26519  gl_cv_func_snprintf_size1=no
26520fi
26521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26522  conftest.$ac_objext conftest.beam conftest.$ac_ext
26523fi
26524
26525
26526fi
26527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
26528$as_echo "$gl_cv_func_snprintf_size1" >&6; }
26529
26530    case "$gl_cv_func_snprintf_size1" in
26531      *yes)
26532
26533        case "$gl_cv_func_snprintf_retval_c99" in
26534          *yes)
26535
26536
26537     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
26538$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
26539if ${gl_cv_func_printf_positions+:} false; then :
26540  $as_echo_n "(cached) " >&6
26541else
26542
26543      if test "$cross_compiling" = yes; then :
26544
26545         case "$host_os" in
26546           netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
26547                         gl_cv_func_printf_positions="guessing no";;
26548           beos*)        gl_cv_func_printf_positions="guessing no";;
26549           mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
26550           *)            gl_cv_func_printf_positions="guessing yes";;
26551         esac
26552
26553else
26554  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26555/* end confdefs.h.  */
26556
26557#include <stdio.h>
26558#include <string.h>
26559/* The string "%2$d %1$d", with dollar characters protected from the shell's
26560   dollar expansion (possibly an autoconf bug).  */
26561static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
26562static char buf[100];
26563int main ()
26564{
26565  sprintf (buf, format, 33, 55);
26566  return (strcmp (buf, "55 33") != 0);
26567}
26568_ACEOF
26569if ac_fn_c_try_run "$LINENO"; then :
26570  gl_cv_func_printf_positions=yes
26571else
26572  gl_cv_func_printf_positions=no
26573fi
26574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26575  conftest.$ac_objext conftest.beam conftest.$ac_ext
26576fi
26577
26578
26579fi
26580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
26581$as_echo "$gl_cv_func_printf_positions" >&6; }
26582
26583            case "$gl_cv_func_printf_positions" in
26584              *yes)
26585                gl_cv_func_vsnprintf_usable=yes
26586                ;;
26587            esac
26588            ;;
26589        esac
26590        ;;
26591    esac
26592  fi
26593  if test $gl_cv_func_vsnprintf_usable = no; then
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604  gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
26605
26606  if test $ac_cv_func_vsnprintf = yes; then
26607    REPLACE_VSNPRINTF=1
26608  else
26609
26610    if test $ac_cv_have_decl_vsnprintf = yes; then
26611                        REPLACE_VSNPRINTF=1
26612    fi
26613  fi
26614  :
26615
26616  fi
26617
26618  if test $ac_cv_have_decl_vsnprintf = no; then
26619    HAVE_DECL_VSNPRINTF=0
26620  fi
26621
26622
26623
26624
26625
26626
26627          GNULIB_VSNPRINTF=1
26628
26629
26630
26631
26632
26633$as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h
26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649     if test $gl_cv_have_include_next = yes; then
26650       gl_cv_next_wchar_h='<'wchar.h'>'
26651     else
26652       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
26653$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
26654if ${gl_cv_next_wchar_h+:} false; then :
26655  $as_echo_n "(cached) " >&6
26656else
26657
26658             if test $ac_cv_header_wchar_h = yes; then
26659
26660
26661
26662
26663  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26664/* end confdefs.h.  */
26665#include <wchar.h>
26666_ACEOF
26667                case "$host_os" in
26668    aix*) gl_absname_cpp="$ac_cpp -C" ;;
26669    *)    gl_absname_cpp="$ac_cpp" ;;
26670  esac
26671
26672  case "$host_os" in
26673    mingw*)
26674                                          gl_dirsep_regex='[/\\]'
26675      ;;
26676    *)
26677      gl_dirsep_regex='\/'
26678      ;;
26679  esac
26680      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26681  gl_header_literal_regex=`echo 'wchar.h' \
26682                           | sed -e "$gl_make_literal_regex_sed"`
26683  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26684      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26685      s|^/[^/]|//&|
26686      p
26687      q
26688    }'
26689
26690        gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26691  sed -n "$gl_absolute_header_sed"`
26692
26693           gl_header=$gl_cv_absolute_wchar_h
26694           gl_cv_next_wchar_h='"'$gl_header'"'
26695          else
26696               gl_cv_next_wchar_h='<'wchar.h'>'
26697             fi
26698
26699
26700fi
26701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
26702$as_echo "$gl_cv_next_wchar_h" >&6; }
26703     fi
26704     NEXT_WCHAR_H=$gl_cv_next_wchar_h
26705
26706     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26707       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26708       gl_next_as_first_directive='<'wchar.h'>'
26709     else
26710       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26711       gl_next_as_first_directive=$gl_cv_next_wchar_h
26712     fi
26713     NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
26714
26715
26716
26717
26718  if test $ac_cv_header_wchar_h = yes; then
26719    HAVE_WCHAR_H=1
26720  else
26721    HAVE_WCHAR_H=0
26722  fi
26723
26724
26725
26726
26727
26728  if test $gt_cv_c_wint_t = yes; then
26729    HAVE_WINT_T=1
26730  else
26731    HAVE_WINT_T=0
26732  fi
26733
26734
26735
26736    for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb      wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset      wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp      wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr      wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth     ; do
26737    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26739$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
26740if eval \${$as_gl_Symbol+:} false; then :
26741  $as_echo_n "(cached) " >&6
26742else
26743  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26744/* end confdefs.h.  */
26745
26746/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26747   <wchar.h>.
26748   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26749   included before <wchar.h>.  */
26750#if !(defined __GLIBC__ && !defined __UCLIBC__)
26751# include <stddef.h>
26752# include <stdio.h>
26753# include <time.h>
26754#endif
26755#include <wchar.h>
26756
26757int
26758main ()
26759{
26760#undef $gl_func
26761  (void) $gl_func;
26762  ;
26763  return 0;
26764}
26765_ACEOF
26766if ac_fn_c_try_compile "$LINENO"; then :
26767  eval "$as_gl_Symbol=yes"
26768else
26769  eval "$as_gl_Symbol=no"
26770fi
26771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26772fi
26773eval ac_res=\$$as_gl_Symbol
26774	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26775$as_echo "$ac_res" >&6; }
26776    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26777  cat >>confdefs.h <<_ACEOF
26778#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26779_ACEOF
26780
26781                     eval ac_cv_have_decl_$gl_func=yes
26782fi
26783      done
26784
26785
26786
26787
26788
26789
26790
26791  if test $ac_cv_func_iswcntrl = yes; then
26792    HAVE_ISWCNTRL=1
26793  else
26794    HAVE_ISWCNTRL=0
26795  fi
26796
26797
26798
26799  if test $gt_cv_c_wint_t = yes; then
26800    HAVE_WINT_T=1
26801  else
26802    HAVE_WINT_T=0
26803  fi
26804
26805
26806
26807
26808
26809
26810
26811
26812
26813
26814
26815     if test $gl_cv_have_include_next = yes; then
26816       gl_cv_next_wctype_h='<'wctype.h'>'
26817     else
26818       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
26819$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
26820if ${gl_cv_next_wctype_h+:} false; then :
26821  $as_echo_n "(cached) " >&6
26822else
26823
26824             if test $ac_cv_header_wctype_h = yes; then
26825
26826
26827
26828
26829  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26830/* end confdefs.h.  */
26831#include <wctype.h>
26832_ACEOF
26833                case "$host_os" in
26834    aix*) gl_absname_cpp="$ac_cpp -C" ;;
26835    *)    gl_absname_cpp="$ac_cpp" ;;
26836  esac
26837
26838  case "$host_os" in
26839    mingw*)
26840                                          gl_dirsep_regex='[/\\]'
26841      ;;
26842    *)
26843      gl_dirsep_regex='\/'
26844      ;;
26845  esac
26846      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26847  gl_header_literal_regex=`echo 'wctype.h' \
26848                           | sed -e "$gl_make_literal_regex_sed"`
26849  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26850      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26851      s|^/[^/]|//&|
26852      p
26853      q
26854    }'
26855
26856        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26857  sed -n "$gl_absolute_header_sed"`
26858
26859           gl_header=$gl_cv_absolute_wctype_h
26860           gl_cv_next_wctype_h='"'$gl_header'"'
26861          else
26862               gl_cv_next_wctype_h='<'wctype.h'>'
26863             fi
26864
26865
26866fi
26867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
26868$as_echo "$gl_cv_next_wctype_h" >&6; }
26869     fi
26870     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
26871
26872     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26873       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26874       gl_next_as_first_directive='<'wctype.h'>'
26875     else
26876       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26877       gl_next_as_first_directive=$gl_cv_next_wctype_h
26878     fi
26879     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
26880
26881
26882
26883
26884  if test $ac_cv_header_wctype_h = yes; then
26885    if test $ac_cv_func_iswcntrl = yes; then
26886                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
26887$as_echo_n "checking whether iswcntrl works... " >&6; }
26888if ${gl_cv_func_iswcntrl_works+:} false; then :
26889  $as_echo_n "(cached) " >&6
26890else
26891
26892          if test "$cross_compiling" = yes; then :
26893  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26894/* end confdefs.h.  */
26895#include <stdlib.h>
26896                          #if __GNU_LIBRARY__ == 1
26897                          Linux libc5 i18n is broken.
26898                          #endif
26899int
26900main ()
26901{
26902
26903  ;
26904  return 0;
26905}
26906_ACEOF
26907if ac_fn_c_try_compile "$LINENO"; then :
26908  gl_cv_func_iswcntrl_works="guessing yes"
26909else
26910  gl_cv_func_iswcntrl_works="guessing no"
26911fi
26912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26913
26914else
26915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26916/* end confdefs.h.  */
26917
26918               /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
26919                  included before <wchar.h>.
26920                  BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
26921                  must be included before <wchar.h>.  */
26922               #include <stddef.h>
26923               #include <stdio.h>
26924               #include <time.h>
26925               #include <wchar.h>
26926               #include <wctype.h>
26927               int main () { return iswprint ('x') == 0; }
26928
26929_ACEOF
26930if ac_fn_c_try_run "$LINENO"; then :
26931  gl_cv_func_iswcntrl_works=yes
26932else
26933  gl_cv_func_iswcntrl_works=no
26934fi
26935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26936  conftest.$ac_objext conftest.beam conftest.$ac_ext
26937fi
26938
26939
26940fi
26941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
26942$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
26943    fi
26944    HAVE_WCTYPE_H=1
26945  else
26946    HAVE_WCTYPE_H=0
26947  fi
26948
26949
26950  case "$gl_cv_func_iswcntrl_works" in
26951    *yes) REPLACE_ISWCNTRL=0 ;;
26952    *)    REPLACE_ISWCNTRL=1 ;;
26953  esac
26954
26955
26956  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
26957        :
26958  fi
26959
26960  if test $REPLACE_ISWCNTRL = 1; then
26961    REPLACE_TOWLOWER=1
26962  else
26963    for ac_func in towlower
26964do :
26965  ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
26966if test "x$ac_cv_func_towlower" = xyes; then :
26967  cat >>confdefs.h <<_ACEOF
26968#define HAVE_TOWLOWER 1
26969_ACEOF
26970
26971fi
26972done
26973
26974    if test $ac_cv_func_towlower = yes; then
26975      REPLACE_TOWLOWER=0
26976    else
26977      ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
26978             included before <wchar.h>.
26979             BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
26980             must be included before <wchar.h>.  */
26981          #include <stddef.h>
26982          #include <stdio.h>
26983          #include <time.h>
26984          #include <wchar.h>
26985          #if HAVE_WCTYPE_H
26986          # include <wctype.h>
26987          #endif
26988
26989"
26990if test "x$ac_cv_have_decl_towlower" = xyes; then :
26991  ac_have_decl=1
26992else
26993  ac_have_decl=0
26994fi
26995
26996cat >>confdefs.h <<_ACEOF
26997#define HAVE_DECL_TOWLOWER $ac_have_decl
26998_ACEOF
26999
27000      if test $ac_cv_have_decl_towlower = yes; then
27001                                REPLACE_TOWLOWER=1
27002      else
27003        REPLACE_TOWLOWER=0
27004      fi
27005    fi
27006  fi
27007
27008
27009  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
27010        :
27011  fi
27012
27013          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
27014$as_echo_n "checking for wctype_t... " >&6; }
27015if ${gl_cv_type_wctype_t+:} false; then :
27016  $as_echo_n "(cached) " >&6
27017else
27018  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27019/* end confdefs.h.  */
27020/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27021               included before <wchar.h>.
27022               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27023               must be included before <wchar.h>.  */
27024            #include <stddef.h>
27025            #include <stdio.h>
27026            #include <time.h>
27027            #include <wchar.h>
27028            #if HAVE_WCTYPE_H
27029            # include <wctype.h>
27030            #endif
27031            wctype_t a;
27032
27033int
27034main ()
27035{
27036
27037  ;
27038  return 0;
27039}
27040_ACEOF
27041if ac_fn_c_try_compile "$LINENO"; then :
27042  gl_cv_type_wctype_t=yes
27043else
27044  gl_cv_type_wctype_t=no
27045fi
27046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27047
27048fi
27049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
27050$as_echo "$gl_cv_type_wctype_t" >&6; }
27051  if test $gl_cv_type_wctype_t = no; then
27052    HAVE_WCTYPE_T=0
27053  fi
27054
27055      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
27056$as_echo_n "checking for wctrans_t... " >&6; }
27057if ${gl_cv_type_wctrans_t+:} false; then :
27058  $as_echo_n "(cached) " >&6
27059else
27060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27061/* end confdefs.h.  */
27062/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27063               included before <wchar.h>.
27064               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27065               must be included before <wchar.h>.  */
27066            #include <stddef.h>
27067            #include <stdio.h>
27068            #include <time.h>
27069            #include <wchar.h>
27070            #include <wctype.h>
27071            wctrans_t a;
27072
27073int
27074main ()
27075{
27076
27077  ;
27078  return 0;
27079}
27080_ACEOF
27081if ac_fn_c_try_compile "$LINENO"; then :
27082  gl_cv_type_wctrans_t=yes
27083else
27084  gl_cv_type_wctrans_t=no
27085fi
27086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27087
27088fi
27089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
27090$as_echo "$gl_cv_type_wctrans_t" >&6; }
27091  if test $gl_cv_type_wctrans_t = no; then
27092    HAVE_WCTRANS_T=0
27093  fi
27094
27095
27096    for gl_func in wctype iswctype wctrans towctrans     ; do
27097    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27099$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27100if eval \${$as_gl_Symbol+:} false; then :
27101  $as_echo_n "(cached) " >&6
27102else
27103  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27104/* end confdefs.h.  */
27105
27106/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27107   <wchar.h>.
27108   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27109   included before <wchar.h>.  */
27110#if !(defined __GLIBC__ && !defined __UCLIBC__)
27111# include <stddef.h>
27112# include <stdio.h>
27113# include <time.h>
27114# include <wchar.h>
27115#endif
27116#include <wctype.h>
27117
27118int
27119main ()
27120{
27121#undef $gl_func
27122  (void) $gl_func;
27123  ;
27124  return 0;
27125}
27126_ACEOF
27127if ac_fn_c_try_compile "$LINENO"; then :
27128  eval "$as_gl_Symbol=yes"
27129else
27130  eval "$as_gl_Symbol=no"
27131fi
27132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27133fi
27134eval ac_res=\$$as_gl_Symbol
27135	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27136$as_echo "$ac_res" >&6; }
27137    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27138  cat >>confdefs.h <<_ACEOF
27139#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27140_ACEOF
27141
27142                     eval ac_cv_have_decl_$gl_func=yes
27143fi
27144      done
27145
27146
27147
27148
27149
27150  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
27151    REPLACE_WRITE=1
27152  fi
27153
27154
27155
27156  if test $REPLACE_WRITE = 1; then
27157
27158
27159
27160
27161
27162
27163
27164
27165  gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
27166
27167    :
27168  fi
27169
27170
27171
27172
27173
27174          GNULIB_WRITE=1
27175
27176
27177
27178
27179
27180$as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
27181
27182
27183
27184  :
27185
27186  :
27187
27188
27189
27190  for ac_header in stdint.h
27191do :
27192  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
27193if test "x$ac_cv_header_stdint_h" = xyes; then :
27194  cat >>confdefs.h <<_ACEOF
27195#define HAVE_STDINT_H 1
27196_ACEOF
27197
27198fi
27199
27200done
27201
27202
27203
27204
27205  :
27206
27207
27208  # End of code from modules
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218  gltests_libdeps=
27219  gltests_ltlibdeps=
27220
27221
27222
27223
27224
27225
27226
27227
27228
27229  gl_source_base='tests'
27230  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
27231
27232  gl_module_indicator_condition=$gltests_WITNESS
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242  LIBGNU_LIBDEPS="$gl_libdeps"
27243
27244  LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
27245
27246
27247# paxutils modules
27248
27249
27250
27251
27252
27253
27254
27255
27256
27257
27258
27259
27260
27261
27262
27263
27264
27265
27266
27267
27268
27269
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279
27280
27281
27282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
27283$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
27284if ${ac_cv_header_time+:} false; then :
27285  $as_echo_n "(cached) " >&6
27286else
27287  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27288/* end confdefs.h.  */
27289#include <sys/types.h>
27290#include <sys/time.h>
27291#include <time.h>
27292
27293int
27294main ()
27295{
27296if ((struct tm *) 0)
27297return 0;
27298  ;
27299  return 0;
27300}
27301_ACEOF
27302if ac_fn_c_try_compile "$LINENO"; then :
27303  ac_cv_header_time=yes
27304else
27305  ac_cv_header_time=no
27306fi
27307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27308fi
27309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
27310$as_echo "$ac_cv_header_time" >&6; }
27311if test $ac_cv_header_time = yes; then
27312
27313$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
27314
27315fi
27316
27317ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
27318if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
27319
27320cat >>confdefs.h <<_ACEOF
27321#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
27322_ACEOF
27323
27324
27325$as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
27326
27327fi
27328
27329
27330
27331
27332
27333
27334
27335
27336  # Set LIB_SETSOCKOPT to -lnsl -lsocket if necessary.
27337  pu_save_LIBS=$LIBS
27338  LIB_SETSOCKOPT=
27339  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
27340$as_echo_n "checking for library containing setsockopt... " >&6; }
27341if ${ac_cv_search_setsockopt+:} false; then :
27342  $as_echo_n "(cached) " >&6
27343else
27344  ac_func_search_save_LIBS=$LIBS
27345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27346/* end confdefs.h.  */
27347
27348/* Override any GCC internal prototype to avoid an error.
27349   Use char because int might match the return type of a GCC
27350   builtin and then its argument prototype would still apply.  */
27351#ifdef __cplusplus
27352extern "C"
27353#endif
27354char setsockopt ();
27355int
27356main ()
27357{
27358return setsockopt ();
27359  ;
27360  return 0;
27361}
27362_ACEOF
27363for ac_lib in '' socket; do
27364  if test -z "$ac_lib"; then
27365    ac_res="none required"
27366  else
27367    ac_res=-l$ac_lib
27368    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
27369  fi
27370  if ac_fn_c_try_link "$LINENO"; then :
27371  ac_cv_search_setsockopt=$ac_res
27372fi
27373rm -f core conftest.err conftest.$ac_objext \
27374    conftest$ac_exeext
27375  if ${ac_cv_search_setsockopt+:} false; then :
27376  break
27377fi
27378done
27379if ${ac_cv_search_setsockopt+:} false; then :
27380
27381else
27382  ac_cv_search_setsockopt=no
27383fi
27384rm conftest.$ac_ext
27385LIBS=$ac_func_search_save_LIBS
27386fi
27387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
27388$as_echo "$ac_cv_search_setsockopt" >&6; }
27389ac_res=$ac_cv_search_setsockopt
27390if test "$ac_res" != no; then :
27391  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27392
27393else
27394  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
27395$as_echo_n "checking for library containing setsockopt... " >&6; }
27396if ${ac_cv_search_setsockopt+:} false; then :
27397  $as_echo_n "(cached) " >&6
27398else
27399  ac_func_search_save_LIBS=$LIBS
27400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27401/* end confdefs.h.  */
27402
27403/* Override any GCC internal prototype to avoid an error.
27404   Use char because int might match the return type of a GCC
27405   builtin and then its argument prototype would still apply.  */
27406#ifdef __cplusplus
27407extern "C"
27408#endif
27409char setsockopt ();
27410int
27411main ()
27412{
27413return setsockopt ();
27414  ;
27415  return 0;
27416}
27417_ACEOF
27418for ac_lib in '' socket; do
27419  if test -z "$ac_lib"; then
27420    ac_res="none required"
27421  else
27422    ac_res=-l$ac_lib
27423    LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
27424  fi
27425  if ac_fn_c_try_link "$LINENO"; then :
27426  ac_cv_search_setsockopt=$ac_res
27427fi
27428rm -f core conftest.err conftest.$ac_objext \
27429    conftest$ac_exeext
27430  if ${ac_cv_search_setsockopt+:} false; then :
27431  break
27432fi
27433done
27434if ${ac_cv_search_setsockopt+:} false; then :
27435
27436else
27437  ac_cv_search_setsockopt=no
27438fi
27439rm conftest.$ac_ext
27440LIBS=$ac_func_search_save_LIBS
27441fi
27442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
27443$as_echo "$ac_cv_search_setsockopt" >&6; }
27444ac_res=$ac_cv_search_setsockopt
27445if test "$ac_res" != no; then :
27446  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27447
27448fi
27449
27450fi
27451
27452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
27453$as_echo_n "checking for library containing setsockopt... " >&6; }
27454if ${ac_cv_search_setsockopt+:} false; then :
27455  $as_echo_n "(cached) " >&6
27456else
27457  ac_func_search_save_LIBS=$LIBS
27458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27459/* end confdefs.h.  */
27460
27461/* Override any GCC internal prototype to avoid an error.
27462   Use char because int might match the return type of a GCC
27463   builtin and then its argument prototype would still apply.  */
27464#ifdef __cplusplus
27465extern "C"
27466#endif
27467char setsockopt ();
27468int
27469main ()
27470{
27471return setsockopt ();
27472  ;
27473  return 0;
27474}
27475_ACEOF
27476for ac_lib in '' nsl; do
27477  if test -z "$ac_lib"; then
27478    ac_res="none required"
27479  else
27480    ac_res=-l$ac_lib
27481    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
27482  fi
27483  if ac_fn_c_try_link "$LINENO"; then :
27484  ac_cv_search_setsockopt=$ac_res
27485fi
27486rm -f core conftest.err conftest.$ac_objext \
27487    conftest$ac_exeext
27488  if ${ac_cv_search_setsockopt+:} false; then :
27489  break
27490fi
27491done
27492if ${ac_cv_search_setsockopt+:} false; then :
27493
27494else
27495  ac_cv_search_setsockopt=no
27496fi
27497rm conftest.$ac_ext
27498LIBS=$ac_func_search_save_LIBS
27499fi
27500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
27501$as_echo "$ac_cv_search_setsockopt" >&6; }
27502ac_res=$ac_cv_search_setsockopt
27503if test "$ac_res" != no; then :
27504  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27505
27506fi
27507
27508
27509  case "$ac_cv_search_setsockopt" in
27510    -l*) LIB_SETSOCKOPT=$ac_cv_search_setsockopt
27511  esac
27512
27513  LIBS=$pu_save_LIBS
27514
27515  enable_rmt() {
27516    if test $ac_cv_header_sys_mtio_h = yes; then
27517      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote tape header files" >&5
27518$as_echo_n "checking for remote tape header files... " >&6; }
27519if ${pu_cv_header_rmt+:} false; then :
27520  $as_echo_n "(cached) " >&6
27521else
27522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27523/* end confdefs.h.  */
27524
27525#if HAVE_SGTTY_H
27526# include <sgtty.h>
27527#endif
27528#include <sys/socket.h>
27529_ACEOF
27530if ac_fn_c_try_cpp "$LINENO"; then :
27531  pu_cv_header_rmt=yes
27532else
27533  pu_cv_header_rmt=no
27534fi
27535rm -f conftest.err conftest.i conftest.$ac_ext
27536fi
27537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_rmt" >&5
27538$as_echo "$pu_cv_header_rmt" >&6; }
27539      test $pu_cv_header_rmt = yes && PU_RMT_PROG='rmt$(EXEEXT)'
27540
27541    fi
27542  }
27543
27544  for ac_header in sys/mtio.h
27545do :
27546  ac_fn_c_check_header_mongrel "$LINENO" "sys/mtio.h" "ac_cv_header_sys_mtio_h" "$ac_includes_default"
27547if test "x$ac_cv_header_sys_mtio_h" = xyes; then :
27548  cat >>confdefs.h <<_ACEOF
27549#define HAVE_SYS_MTIO_H 1
27550_ACEOF
27551
27552fi
27553
27554done
27555
27556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which ioctl field to test for reversed bytes" >&5
27557$as_echo_n "checking which ioctl field to test for reversed bytes... " >&6; }
27558if ${pu_cv_header_mtio_check_field+:} false; then :
27559  $as_echo_n "(cached) " >&6
27560else
27561  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27562/* end confdefs.h.  */
27563#include <sys/mtio.h>
27564
27565_ACEOF
27566if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27567  $EGREP "mt_model" >/dev/null 2>&1; then :
27568  pu_cv_header_mtio_check_field=mt_model
27569else
27570  pu_cv_header_mtio_check_field=mt_type
27571fi
27572rm -f conftest*
27573
27574fi
27575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_mtio_check_field" >&5
27576$as_echo "$pu_cv_header_mtio_check_field" >&6; }
27577
27578cat >>confdefs.h <<_ACEOF
27579#define MTIO_CHECK_FIELD $pu_cv_header_mtio_check_field
27580_ACEOF
27581
27582
27583
27584
27585  if test "x$DEFAULT_RMT_DIR" != x; then
27586	DEFAULT_RMT_COMMAND=$DEFAULT_RMT_DIR/rmt
27587  else
27588	DEFAULT_RMT_DIR='$(libexecdir)'
27589  fi
27590
27591  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build rmt" >&5
27592$as_echo_n "checking whether to build rmt... " >&6; }
27593
27594# Check whether --with-rmt was given.
27595if test "${with_rmt+set}" = set; then :
27596  withval=$with_rmt; case $withval in
27597	       yes|no) as_fn_error $? "Invalid argument to --with-rmt" "$LINENO" 5;;
27598	       /*)     DEFAULT_RMT_COMMAND=$withval
27599	               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, use $withval instead" >&5
27600$as_echo "no, use $withval instead" >&6; };;
27601	       *)      as_fn_error $? "Argument to --with-rmt must be an absolute file name" "$LINENO" 5;;
27602               esac
27603else
27604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27605$as_echo "yes" >&6; }
27606                enable_rmt
27607                if test "$PU_RMT_PROG" = ""; then
27608                  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not building rmt, required header files are missing" >&5
27609$as_echo "$as_me: WARNING: not building rmt, required header files are missing" >&2;}
27610                fi
27611fi
27612
27613
27614
27615  if test "x$DEFAULT_RMT_COMMAND" != x; then
27616
27617cat >>confdefs.h <<_ACEOF
27618#define DEFAULT_RMT_COMMAND "$DEFAULT_RMT_COMMAND"
27619_ACEOF
27620
27621  fi
27622   if test "$pu_cv_header_rmt" = yes; then
27623  PU_RMT_COND_TRUE=
27624  PU_RMT_COND_FALSE='#'
27625else
27626  PU_RMT_COND_TRUE='#'
27627  PU_RMT_COND_FALSE=
27628fi
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639  for ac_header in sys/buf.h
27640do :
27641  ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H
27642#include <sys/param.h>
27643#endif
27644"
27645if test "x$ac_cv_header_sys_buf_h" = xyes; then :
27646  cat >>confdefs.h <<_ACEOF
27647#define HAVE_SYS_BUF_H 1
27648_ACEOF
27649
27650fi
27651
27652done
27653
27654
27655
27656
27657  ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
27658if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
27659
27660cat >>confdefs.h <<_ACEOF
27661#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
27662_ACEOF
27663
27664
27665fi
27666
27667
27668
27669
27670
27671
27672
27673  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
27674$as_echo_n "checking for library containing gethostbyname... " >&6; }
27675if ${ac_cv_search_gethostbyname+:} false; then :
27676  $as_echo_n "(cached) " >&6
27677else
27678  ac_func_search_save_LIBS=$LIBS
27679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27680/* end confdefs.h.  */
27681
27682/* Override any GCC internal prototype to avoid an error.
27683   Use char because int might match the return type of a GCC
27684   builtin and then its argument prototype would still apply.  */
27685#ifdef __cplusplus
27686extern "C"
27687#endif
27688char gethostbyname ();
27689int
27690main ()
27691{
27692return gethostbyname ();
27693  ;
27694  return 0;
27695}
27696_ACEOF
27697for ac_lib in '' nsl; do
27698  if test -z "$ac_lib"; then
27699    ac_res="none required"
27700  else
27701    ac_res=-l$ac_lib
27702    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
27703  fi
27704  if ac_fn_c_try_link "$LINENO"; then :
27705  ac_cv_search_gethostbyname=$ac_res
27706fi
27707rm -f core conftest.err conftest.$ac_objext \
27708    conftest$ac_exeext
27709  if ${ac_cv_search_gethostbyname+:} false; then :
27710  break
27711fi
27712done
27713if ${ac_cv_search_gethostbyname+:} false; then :
27714
27715else
27716  ac_cv_search_gethostbyname=no
27717fi
27718rm conftest.$ac_ext
27719LIBS=$ac_func_search_save_LIBS
27720fi
27721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
27722$as_echo "$ac_cv_search_gethostbyname" >&6; }
27723ac_res=$ac_cv_search_gethostbyname
27724if test "$ac_res" != no; then :
27725  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27726
27727fi
27728
27729
27730
27731# Additional system dependencies (for mingw)
27732for ac_func in  getpwuid getpwnam getgrgid getgrnam pipe fork getuid geteuid getgid setuid setgid mknod symlink link chown
27733do :
27734  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
27735ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
27736if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
27737  cat >>confdefs.h <<_ACEOF
27738#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
27739_ACEOF
27740
27741fi
27742done
27743
27744
27745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for structure packing via __attribute__((packed))" >&5
27746$as_echo_n "checking for structure packing via __attribute__((packed))... " >&6; }
27747  if ${cpio_cv_have_attrib_packed+:} false; then :
27748  $as_echo_n "(cached) " >&6
27749else
27750
27751    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27752/* end confdefs.h.  */
27753
27754int
27755main ()
27756{
27757struct { int i __attribute__((packed)); } s;
27758  ;
27759  return 0;
27760}
27761_ACEOF
27762if ac_fn_c_try_compile "$LINENO"; then :
27763  have_attrib_packed=yes
27764else
27765  have_attrib_packed=no
27766fi
27767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27768
27769fi
27770
27771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_attrib_packed" >&5
27772$as_echo "$have_attrib_packed" >&6; }
27773
27774  if test "$have_attrib_packed" = no; then
27775    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for structure packing via pragma" >&5
27776$as_echo_n "checking for structure packing via pragma... " >&6; }
27777    if ${cpio_cv_have_pragma_pack+:} false; then :
27778  $as_echo_n "(cached) " >&6
27779else
27780
27781      if test "$cross_compiling" = yes; then :
27782  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27784as_fn_error $? "cannot run test program while cross compiling
27785See \`config.log' for more details" "$LINENO" 5; }
27786else
27787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27788/* end confdefs.h.  */
27789
27790int main(int argc, char **argv) {
27791#pragma pack(1)
27792struct { char c; long l; } s;
27793return sizeof(s)==sizeof(s.c)+sizeof(s.l) ? 0:1; }
27794
27795_ACEOF
27796if ac_fn_c_try_run "$LINENO"; then :
27797  have_pragma_pack=yes
27798else
27799  have_pragma_pack=no
27800fi
27801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27802  conftest.$ac_objext conftest.beam conftest.$ac_ext
27803fi
27804
27805
27806fi
27807
27808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pragma_pack" >&5
27809$as_echo "$have_pragma_pack" >&6; }
27810    if test "$have_pragma_pack" = yes; then
27811
27812$as_echo "#define HAVE_PRAGMA_PACK 1" >>confdefs.h
27813
27814    else
27815      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for structure packing via hppa/hp-ux pragma" >&5
27816$as_echo_n "checking for structure packing via hppa/hp-ux pragma... " >&6; }
27817      if ${cpio_cv_have_pragma_pack_hpux+:} false; then :
27818  $as_echo_n "(cached) " >&6
27819else
27820
27821        if test "$cross_compiling" = yes; then :
27822  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27823$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27824as_fn_error $? "cannot run test program while cross compiling
27825See \`config.log' for more details" "$LINENO" 5; }
27826else
27827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27828/* end confdefs.h.  */
27829
27830/* hppa/hp-ux wants pragma outside of function */
27831#pragma pack 1
27832struct { char c; long l; } s;
27833int main(int argc, char **argv) {
27834return sizeof(s)==sizeof(s.c)+sizeof(s.l) ? 0:1; }
27835
27836_ACEOF
27837if ac_fn_c_try_run "$LINENO"; then :
27838  have_pragma_pack_hpux=yes
27839else
27840  have_pragma_pack_hpux=no
27841fi
27842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27843  conftest.$ac_objext conftest.beam conftest.$ac_ext
27844fi
27845
27846
27847fi
27848
27849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pragma_pack_hpux" >&5
27850$as_echo "$have_pragma_pack_hpux" >&6; }
27851
27852$as_echo "#define HAVE_PRAGMA_PACK_HPPA 1" >>confdefs.h
27853
27854    fi
27855  fi
27856
27857  if test "${have_attrib_packed}${have_pragma_pack}$have_pragma_pack_hpux" = "nonono"; then
27858    as_fn_error $? "Need to know how to pack structures with this compiler" "$LINENO" 5
27859  fi
27860
27861  if test "$have_attrib_packed" = yes; then
27862
27863$as_echo "#define HAVE_ATTRIB_PACKED 1" >>confdefs.h
27864
27865  fi
27866
27867
27868
27869  DEFAULT_QUOTING_STYLE="escape"
27870
27871  case $DEFAULT_QUOTING_STYLE in
27872          literal|shell|shell-always|c|escape|locale|clocale) ;;
27873*)  as_fn_error $? "Invalid quoting style" "$LINENO" 5;;
27874esac
27875  DEFAULT_QUOTING_STYLE=`echo ${DEFAULT_QUOTING_STYLE}|sed 's/-/_/g'`_quoting_style
27876
27877cat >>confdefs.h <<_ACEOF
27878#define DEFAULT_QUOTING_STYLE $DEFAULT_QUOTING_STYLE
27879_ACEOF
27880
27881
27882# Check whether --enable-mt was given.
27883if test "${enable_mt+set}" = set; then :
27884  enableval=$enable_mt;
27885fi
27886
27887
27888 if test "$enable_mt" = yes; then
27889  CPIO_MT_COND_TRUE=
27890  CPIO_MT_COND_FALSE='#'
27891else
27892  CPIO_MT_COND_TRUE='#'
27893  CPIO_MT_COND_FALSE=
27894fi
27895
27896
27897for ac_header in unistd.h stdlib.h string.h fcntl.h pwd.h grp.h sys/io/trioctl.h utmp.h getopt.h locale.h libintl.h sys/wait.h utime.h locale.h process.h sys/ioctl.h
27898do :
27899  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27900ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
27901if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27902  cat >>confdefs.h <<_ACEOF
27903#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27904_ACEOF
27905
27906fi
27907
27908done
27909
27910
27911ac_fn_c_check_decl "$LINENO" "errno" "ac_cv_have_decl_errno" "
27912#include <stdio.h>
27913#include <stdlib.h>
27914#include <errno.h>
27915#ifdef HAVE_STRING_H
27916# include <string.h>
27917#else
27918# include <strings.h>
27919#endif
27920#include <pwd.h>
27921#include <grp.h>
27922"
27923if test "x$ac_cv_have_decl_errno" = xyes; then :
27924  ac_have_decl=1
27925else
27926  ac_have_decl=0
27927fi
27928
27929cat >>confdefs.h <<_ACEOF
27930#define HAVE_DECL_ERRNO $ac_have_decl
27931_ACEOF
27932ac_fn_c_check_decl "$LINENO" "getpwnam" "ac_cv_have_decl_getpwnam" "
27933#include <stdio.h>
27934#include <stdlib.h>
27935#include <errno.h>
27936#ifdef HAVE_STRING_H
27937# include <string.h>
27938#else
27939# include <strings.h>
27940#endif
27941#include <pwd.h>
27942#include <grp.h>
27943"
27944if test "x$ac_cv_have_decl_getpwnam" = xyes; then :
27945  ac_have_decl=1
27946else
27947  ac_have_decl=0
27948fi
27949
27950cat >>confdefs.h <<_ACEOF
27951#define HAVE_DECL_GETPWNAM $ac_have_decl
27952_ACEOF
27953ac_fn_c_check_decl "$LINENO" "getgrnam" "ac_cv_have_decl_getgrnam" "
27954#include <stdio.h>
27955#include <stdlib.h>
27956#include <errno.h>
27957#ifdef HAVE_STRING_H
27958# include <string.h>
27959#else
27960# include <strings.h>
27961#endif
27962#include <pwd.h>
27963#include <grp.h>
27964"
27965if test "x$ac_cv_have_decl_getgrnam" = xyes; then :
27966  ac_have_decl=1
27967else
27968  ac_have_decl=0
27969fi
27970
27971cat >>confdefs.h <<_ACEOF
27972#define HAVE_DECL_GETGRNAM $ac_have_decl
27973_ACEOF
27974ac_fn_c_check_decl "$LINENO" "getgrgid" "ac_cv_have_decl_getgrgid" "
27975#include <stdio.h>
27976#include <stdlib.h>
27977#include <errno.h>
27978#ifdef HAVE_STRING_H
27979# include <string.h>
27980#else
27981# include <strings.h>
27982#endif
27983#include <pwd.h>
27984#include <grp.h>
27985"
27986if test "x$ac_cv_have_decl_getgrgid" = xyes; then :
27987  ac_have_decl=1
27988else
27989  ac_have_decl=0
27990fi
27991
27992cat >>confdefs.h <<_ACEOF
27993#define HAVE_DECL_GETGRGID $ac_have_decl
27994_ACEOF
27995ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "
27996#include <stdio.h>
27997#include <stdlib.h>
27998#include <errno.h>
27999#ifdef HAVE_STRING_H
28000# include <string.h>
28001#else
28002# include <strings.h>
28003#endif
28004#include <pwd.h>
28005#include <grp.h>
28006"
28007if test "x$ac_cv_have_decl_strdup" = xyes; then :
28008  ac_have_decl=1
28009else
28010  ac_have_decl=0
28011fi
28012
28013cat >>confdefs.h <<_ACEOF
28014#define HAVE_DECL_STRDUP $ac_have_decl
28015_ACEOF
28016ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "
28017#include <stdio.h>
28018#include <stdlib.h>
28019#include <errno.h>
28020#ifdef HAVE_STRING_H
28021# include <string.h>
28022#else
28023# include <strings.h>
28024#endif
28025#include <pwd.h>
28026#include <grp.h>
28027"
28028if test "x$ac_cv_have_decl_strerror" = xyes; then :
28029  ac_have_decl=1
28030else
28031  ac_have_decl=0
28032fi
28033
28034cat >>confdefs.h <<_ACEOF
28035#define HAVE_DECL_STRERROR $ac_have_decl
28036_ACEOF
28037ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "
28038#include <stdio.h>
28039#include <stdlib.h>
28040#include <errno.h>
28041#ifdef HAVE_STRING_H
28042# include <string.h>
28043#else
28044# include <strings.h>
28045#endif
28046#include <pwd.h>
28047#include <grp.h>
28048"
28049if test "x$ac_cv_have_decl_getenv" = xyes; then :
28050  ac_have_decl=1
28051else
28052  ac_have_decl=0
28053fi
28054
28055cat >>confdefs.h <<_ACEOF
28056#define HAVE_DECL_GETENV $ac_have_decl
28057_ACEOF
28058ac_fn_c_check_decl "$LINENO" "atoi" "ac_cv_have_decl_atoi" "
28059#include <stdio.h>
28060#include <stdlib.h>
28061#include <errno.h>
28062#ifdef HAVE_STRING_H
28063# include <string.h>
28064#else
28065# include <strings.h>
28066#endif
28067#include <pwd.h>
28068#include <grp.h>
28069"
28070if test "x$ac_cv_have_decl_atoi" = xyes; then :
28071  ac_have_decl=1
28072else
28073  ac_have_decl=0
28074fi
28075
28076cat >>confdefs.h <<_ACEOF
28077#define HAVE_DECL_ATOI $ac_have_decl
28078_ACEOF
28079ac_fn_c_check_decl "$LINENO" "exit" "ac_cv_have_decl_exit" "
28080#include <stdio.h>
28081#include <stdlib.h>
28082#include <errno.h>
28083#ifdef HAVE_STRING_H
28084# include <string.h>
28085#else
28086# include <strings.h>
28087#endif
28088#include <pwd.h>
28089#include <grp.h>
28090"
28091if test "x$ac_cv_have_decl_exit" = xyes; then :
28092  ac_have_decl=1
28093else
28094  ac_have_decl=0
28095fi
28096
28097cat >>confdefs.h <<_ACEOF
28098#define HAVE_DECL_EXIT $ac_have_decl
28099_ACEOF
28100
28101
28102# Gettext.
28103
28104      if test "X$prefix" = "XNONE"; then
28105    acl_final_prefix="$ac_default_prefix"
28106  else
28107    acl_final_prefix="$prefix"
28108  fi
28109  if test "X$exec_prefix" = "XNONE"; then
28110    acl_final_exec_prefix='${prefix}'
28111  else
28112    acl_final_exec_prefix="$exec_prefix"
28113  fi
28114  acl_save_prefix="$prefix"
28115  prefix="$acl_final_prefix"
28116  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
28117  prefix="$acl_save_prefix"
28118
28119
28120
28121# Check whether --with-gnu-ld was given.
28122if test "${with_gnu_ld+set}" = set; then :
28123  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
28124else
28125  with_gnu_ld=no
28126fi
28127
28128# Prepare PATH_SEPARATOR.
28129# The user is always right.
28130if test "${PATH_SEPARATOR+set}" != set; then
28131  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
28132  # contains only /bin. Note that ksh looks also at the FPATH variable,
28133  # so we have to set that as well for the test.
28134  PATH_SEPARATOR=:
28135  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
28136    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
28137           || PATH_SEPARATOR=';'
28138       }
28139fi
28140
28141ac_prog=ld
28142if test "$GCC" = yes; then
28143  # Check if gcc -print-prog-name=ld gives a path.
28144  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
28145$as_echo_n "checking for ld used by $CC... " >&6; }
28146  case $host in
28147  *-*-mingw*)
28148    # gcc leaves a trailing carriage return which upsets mingw
28149    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
28150  *)
28151    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
28152  esac
28153  case $ac_prog in
28154    # Accept absolute paths.
28155    [\\/]* | ?:[\\/]*)
28156      re_direlt='/[^/][^/]*/\.\./'
28157      # Canonicalize the pathname of ld
28158      ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
28159      while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
28160        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
28161      done
28162      test -z "$LD" && LD="$ac_prog"
28163      ;;
28164  "")
28165    # If it fails, then pretend we aren't using GCC.
28166    ac_prog=ld
28167    ;;
28168  *)
28169    # If it is relative, then search for the first ld in PATH.
28170    with_gnu_ld=unknown
28171    ;;
28172  esac
28173elif test "$with_gnu_ld" = yes; then
28174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
28175$as_echo_n "checking for GNU ld... " >&6; }
28176else
28177  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
28178$as_echo_n "checking for non-GNU ld... " >&6; }
28179fi
28180if ${acl_cv_path_LD+:} false; then :
28181  $as_echo_n "(cached) " >&6
28182else
28183  if test -z "$LD"; then
28184  acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
28185  for ac_dir in $PATH; do
28186    IFS="$acl_save_ifs"
28187    test -z "$ac_dir" && ac_dir=.
28188    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
28189      acl_cv_path_LD="$ac_dir/$ac_prog"
28190      # Check to see if the program is GNU ld.  I'd rather use --version,
28191      # but apparently some variants of GNU ld only accept -v.
28192      # Break only if it was the GNU/non-GNU ld that we prefer.
28193      case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
28194      *GNU* | *'with BFD'*)
28195        test "$with_gnu_ld" != no && break
28196        ;;
28197      *)
28198        test "$with_gnu_ld" != yes && break
28199        ;;
28200      esac
28201    fi
28202  done
28203  IFS="$acl_save_ifs"
28204else
28205  acl_cv_path_LD="$LD" # Let the user override the test with a path.
28206fi
28207fi
28208
28209LD="$acl_cv_path_LD"
28210if test -n "$LD"; then
28211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
28212$as_echo "$LD" >&6; }
28213else
28214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28215$as_echo "no" >&6; }
28216fi
28217test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
28218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
28219$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
28220if ${acl_cv_prog_gnu_ld+:} false; then :
28221  $as_echo_n "(cached) " >&6
28222else
28223  # I'd rather use --version here, but apparently some GNU lds only accept -v.
28224case `$LD -v 2>&1 </dev/null` in
28225*GNU* | *'with BFD'*)
28226  acl_cv_prog_gnu_ld=yes
28227  ;;
28228*)
28229  acl_cv_prog_gnu_ld=no
28230  ;;
28231esac
28232fi
28233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
28234$as_echo "$acl_cv_prog_gnu_ld" >&6; }
28235with_gnu_ld=$acl_cv_prog_gnu_ld
28236
28237
28238
28239
28240                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
28241$as_echo_n "checking for shared library run path origin... " >&6; }
28242if ${acl_cv_rpath+:} false; then :
28243  $as_echo_n "(cached) " >&6
28244else
28245
28246    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
28247    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
28248    . ./conftest.sh
28249    rm -f ./conftest.sh
28250    acl_cv_rpath=done
28251
28252fi
28253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
28254$as_echo "$acl_cv_rpath" >&6; }
28255  wl="$acl_cv_wl"
28256  acl_libext="$acl_cv_libext"
28257  acl_shlibext="$acl_cv_shlibext"
28258  acl_libname_spec="$acl_cv_libname_spec"
28259  acl_library_names_spec="$acl_cv_library_names_spec"
28260  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
28261  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
28262  acl_hardcode_direct="$acl_cv_hardcode_direct"
28263  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
28264    # Check whether --enable-rpath was given.
28265if test "${enable_rpath+set}" = set; then :
28266  enableval=$enable_rpath; :
28267else
28268  enable_rpath=yes
28269fi
28270
28271
28272
28273
28274  acl_libdirstem=lib
28275  acl_libdirstem2=
28276  case "$host_os" in
28277    solaris*)
28278                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
28279$as_echo_n "checking for 64-bit host... " >&6; }
28280if ${gl_cv_solaris_64bit+:} false; then :
28281  $as_echo_n "(cached) " >&6
28282else
28283  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28284/* end confdefs.h.  */
28285
28286#ifdef _LP64
28287sixtyfour bits
28288#endif
28289
28290_ACEOF
28291if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28292  $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
28293  gl_cv_solaris_64bit=yes
28294else
28295  gl_cv_solaris_64bit=no
28296fi
28297rm -f conftest*
28298
28299
28300fi
28301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
28302$as_echo "$gl_cv_solaris_64bit" >&6; }
28303      if test $gl_cv_solaris_64bit = yes; then
28304        acl_libdirstem=lib/64
28305        case "$host_cpu" in
28306          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
28307          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
28308        esac
28309      fi
28310      ;;
28311    *)
28312      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
28313      if test -n "$searchpath"; then
28314        acl_save_IFS="${IFS= 	}"; IFS=":"
28315        for searchdir in $searchpath; do
28316          if test -d "$searchdir"; then
28317            case "$searchdir" in
28318              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
28319              */../ | */.. )
28320                # Better ignore directories of this form. They are misleading.
28321                ;;
28322              *) searchdir=`cd "$searchdir" && pwd`
28323                 case "$searchdir" in
28324                   */lib64 ) acl_libdirstem=lib64 ;;
28325                 esac ;;
28326            esac
28327          fi
28328        done
28329        IFS="$acl_save_IFS"
28330      fi
28331      ;;
28332  esac
28333  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
28334
28335
28336
28337
28338
28339
28340
28341
28342
28343
28344
28345
28346    use_additional=yes
28347
28348  acl_save_prefix="$prefix"
28349  prefix="$acl_final_prefix"
28350  acl_save_exec_prefix="$exec_prefix"
28351  exec_prefix="$acl_final_exec_prefix"
28352
28353    eval additional_includedir=\"$includedir\"
28354    eval additional_libdir=\"$libdir\"
28355
28356  exec_prefix="$acl_save_exec_prefix"
28357  prefix="$acl_save_prefix"
28358
28359
28360# Check whether --with-libiconv-prefix was given.
28361if test "${with_libiconv_prefix+set}" = set; then :
28362  withval=$with_libiconv_prefix;
28363    if test "X$withval" = "Xno"; then
28364      use_additional=no
28365    else
28366      if test "X$withval" = "X"; then
28367
28368  acl_save_prefix="$prefix"
28369  prefix="$acl_final_prefix"
28370  acl_save_exec_prefix="$exec_prefix"
28371  exec_prefix="$acl_final_exec_prefix"
28372
28373          eval additional_includedir=\"$includedir\"
28374          eval additional_libdir=\"$libdir\"
28375
28376  exec_prefix="$acl_save_exec_prefix"
28377  prefix="$acl_save_prefix"
28378
28379      else
28380        additional_includedir="$withval/include"
28381        additional_libdir="$withval/$acl_libdirstem"
28382        if test "$acl_libdirstem2" != "$acl_libdirstem" \
28383           && ! test -d "$withval/$acl_libdirstem"; then
28384          additional_libdir="$withval/$acl_libdirstem2"
28385        fi
28386      fi
28387    fi
28388
28389fi
28390
28391      LIBICONV=
28392  LTLIBICONV=
28393  INCICONV=
28394  LIBICONV_PREFIX=
28395      HAVE_LIBICONV=
28396  rpathdirs=
28397  ltrpathdirs=
28398  names_already_handled=
28399  names_next_round='iconv '
28400  while test -n "$names_next_round"; do
28401    names_this_round="$names_next_round"
28402    names_next_round=
28403    for name in $names_this_round; do
28404      already_handled=
28405      for n in $names_already_handled; do
28406        if test "$n" = "$name"; then
28407          already_handled=yes
28408          break
28409        fi
28410      done
28411      if test -z "$already_handled"; then
28412        names_already_handled="$names_already_handled $name"
28413                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
28414        eval value=\"\$HAVE_LIB$uppername\"
28415        if test -n "$value"; then
28416          if test "$value" = yes; then
28417            eval value=\"\$LIB$uppername\"
28418            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
28419            eval value=\"\$LTLIB$uppername\"
28420            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
28421          else
28422                                    :
28423          fi
28424        else
28425                              found_dir=
28426          found_la=
28427          found_so=
28428          found_a=
28429          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
28430          if test -n "$acl_shlibext"; then
28431            shrext=".$acl_shlibext"             # typically: shrext=.so
28432          else
28433            shrext=
28434          fi
28435          if test $use_additional = yes; then
28436            dir="$additional_libdir"
28437                                    if test -n "$acl_shlibext"; then
28438              if test -f "$dir/$libname$shrext"; then
28439                found_dir="$dir"
28440                found_so="$dir/$libname$shrext"
28441              else
28442                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
28443                  ver=`(cd "$dir" && \
28444                        for f in "$libname$shrext".*; do echo "$f"; done \
28445                        | sed -e "s,^$libname$shrext\\\\.,," \
28446                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
28447                        | sed 1q ) 2>/dev/null`
28448                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
28449                    found_dir="$dir"
28450                    found_so="$dir/$libname$shrext.$ver"
28451                  fi
28452                else
28453                  eval library_names=\"$acl_library_names_spec\"
28454                  for f in $library_names; do
28455                    if test -f "$dir/$f"; then
28456                      found_dir="$dir"
28457                      found_so="$dir/$f"
28458                      break
28459                    fi
28460                  done
28461                fi
28462              fi
28463            fi
28464                        if test "X$found_dir" = "X"; then
28465              if test -f "$dir/$libname.$acl_libext"; then
28466                found_dir="$dir"
28467                found_a="$dir/$libname.$acl_libext"
28468              fi
28469            fi
28470            if test "X$found_dir" != "X"; then
28471              if test -f "$dir/$libname.la"; then
28472                found_la="$dir/$libname.la"
28473              fi
28474            fi
28475          fi
28476          if test "X$found_dir" = "X"; then
28477            for x in $LDFLAGS $LTLIBICONV; do
28478
28479  acl_save_prefix="$prefix"
28480  prefix="$acl_final_prefix"
28481  acl_save_exec_prefix="$exec_prefix"
28482  exec_prefix="$acl_final_exec_prefix"
28483  eval x=\"$x\"
28484  exec_prefix="$acl_save_exec_prefix"
28485  prefix="$acl_save_prefix"
28486
28487              case "$x" in
28488                -L*)
28489                  dir=`echo "X$x" | sed -e 's/^X-L//'`
28490                                    if test -n "$acl_shlibext"; then
28491                    if test -f "$dir/$libname$shrext"; then
28492                      found_dir="$dir"
28493                      found_so="$dir/$libname$shrext"
28494                    else
28495                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
28496                        ver=`(cd "$dir" && \
28497                              for f in "$libname$shrext".*; do echo "$f"; done \
28498                              | sed -e "s,^$libname$shrext\\\\.,," \
28499                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
28500                              | sed 1q ) 2>/dev/null`
28501                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
28502                          found_dir="$dir"
28503                          found_so="$dir/$libname$shrext.$ver"
28504                        fi
28505                      else
28506                        eval library_names=\"$acl_library_names_spec\"
28507                        for f in $library_names; do
28508                          if test -f "$dir/$f"; then
28509                            found_dir="$dir"
28510                            found_so="$dir/$f"
28511                            break
28512                          fi
28513                        done
28514                      fi
28515                    fi
28516                  fi
28517                                    if test "X$found_dir" = "X"; then
28518                    if test -f "$dir/$libname.$acl_libext"; then
28519                      found_dir="$dir"
28520                      found_a="$dir/$libname.$acl_libext"
28521                    fi
28522                  fi
28523                  if test "X$found_dir" != "X"; then
28524                    if test -f "$dir/$libname.la"; then
28525                      found_la="$dir/$libname.la"
28526                    fi
28527                  fi
28528                  ;;
28529              esac
28530              if test "X$found_dir" != "X"; then
28531                break
28532              fi
28533            done
28534          fi
28535          if test "X$found_dir" != "X"; then
28536                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
28537            if test "X$found_so" != "X"; then
28538                                                        if test "$enable_rpath" = no \
28539                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
28540                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
28541                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
28542              else
28543                                                                                haveit=
28544                for x in $ltrpathdirs; do
28545                  if test "X$x" = "X$found_dir"; then
28546                    haveit=yes
28547                    break
28548                  fi
28549                done
28550                if test -z "$haveit"; then
28551                  ltrpathdirs="$ltrpathdirs $found_dir"
28552                fi
28553                                if test "$acl_hardcode_direct" = yes; then
28554                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
28555                else
28556                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
28557                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
28558                                                            haveit=
28559                    for x in $rpathdirs; do
28560                      if test "X$x" = "X$found_dir"; then
28561                        haveit=yes
28562                        break
28563                      fi
28564                    done
28565                    if test -z "$haveit"; then
28566                      rpathdirs="$rpathdirs $found_dir"
28567                    fi
28568                  else
28569                                                                                haveit=
28570                    for x in $LDFLAGS $LIBICONV; do
28571
28572  acl_save_prefix="$prefix"
28573  prefix="$acl_final_prefix"
28574  acl_save_exec_prefix="$exec_prefix"
28575  exec_prefix="$acl_final_exec_prefix"
28576  eval x=\"$x\"
28577  exec_prefix="$acl_save_exec_prefix"
28578  prefix="$acl_save_prefix"
28579
28580                      if test "X$x" = "X-L$found_dir"; then
28581                        haveit=yes
28582                        break
28583                      fi
28584                    done
28585                    if test -z "$haveit"; then
28586                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
28587                    fi
28588                    if test "$acl_hardcode_minus_L" != no; then
28589                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
28590                    else
28591                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
28592                    fi
28593                  fi
28594                fi
28595              fi
28596            else
28597              if test "X$found_a" != "X"; then
28598                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
28599              else
28600                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
28601              fi
28602            fi
28603                        additional_includedir=
28604            case "$found_dir" in
28605              */$acl_libdirstem | */$acl_libdirstem/)
28606                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
28607                if test "$name" = 'iconv'; then
28608                  LIBICONV_PREFIX="$basedir"
28609                fi
28610                additional_includedir="$basedir/include"
28611                ;;
28612              */$acl_libdirstem2 | */$acl_libdirstem2/)
28613                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
28614                if test "$name" = 'iconv'; then
28615                  LIBICONV_PREFIX="$basedir"
28616                fi
28617                additional_includedir="$basedir/include"
28618                ;;
28619            esac
28620            if test "X$additional_includedir" != "X"; then
28621                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
28622                haveit=
28623                if test "X$additional_includedir" = "X/usr/local/include"; then
28624                  if test -n "$GCC"; then
28625                    case $host_os in
28626                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
28627                    esac
28628                  fi
28629                fi
28630                if test -z "$haveit"; then
28631                  for x in $CPPFLAGS $INCICONV; do
28632
28633  acl_save_prefix="$prefix"
28634  prefix="$acl_final_prefix"
28635  acl_save_exec_prefix="$exec_prefix"
28636  exec_prefix="$acl_final_exec_prefix"
28637  eval x=\"$x\"
28638  exec_prefix="$acl_save_exec_prefix"
28639  prefix="$acl_save_prefix"
28640
28641                    if test "X$x" = "X-I$additional_includedir"; then
28642                      haveit=yes
28643                      break
28644                    fi
28645                  done
28646                  if test -z "$haveit"; then
28647                    if test -d "$additional_includedir"; then
28648                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
28649                    fi
28650                  fi
28651                fi
28652              fi
28653            fi
28654                        if test -n "$found_la"; then
28655                                                        save_libdir="$libdir"
28656              case "$found_la" in
28657                */* | *\\*) . "$found_la" ;;
28658                *) . "./$found_la" ;;
28659              esac
28660              libdir="$save_libdir"
28661                            for dep in $dependency_libs; do
28662                case "$dep" in
28663                  -L*)
28664                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
28665                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
28666                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
28667                      haveit=
28668                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
28669                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
28670                        if test -n "$GCC"; then
28671                          case $host_os in
28672                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
28673                          esac
28674                        fi
28675                      fi
28676                      if test -z "$haveit"; then
28677                        haveit=
28678                        for x in $LDFLAGS $LIBICONV; do
28679
28680  acl_save_prefix="$prefix"
28681  prefix="$acl_final_prefix"
28682  acl_save_exec_prefix="$exec_prefix"
28683  exec_prefix="$acl_final_exec_prefix"
28684  eval x=\"$x\"
28685  exec_prefix="$acl_save_exec_prefix"
28686  prefix="$acl_save_prefix"
28687
28688                          if test "X$x" = "X-L$additional_libdir"; then
28689                            haveit=yes
28690                            break
28691                          fi
28692                        done
28693                        if test -z "$haveit"; then
28694                          if test -d "$additional_libdir"; then
28695                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
28696                          fi
28697                        fi
28698                        haveit=
28699                        for x in $LDFLAGS $LTLIBICONV; do
28700
28701  acl_save_prefix="$prefix"
28702  prefix="$acl_final_prefix"
28703  acl_save_exec_prefix="$exec_prefix"
28704  exec_prefix="$acl_final_exec_prefix"
28705  eval x=\"$x\"
28706  exec_prefix="$acl_save_exec_prefix"
28707  prefix="$acl_save_prefix"
28708
28709                          if test "X$x" = "X-L$additional_libdir"; then
28710                            haveit=yes
28711                            break
28712                          fi
28713                        done
28714                        if test -z "$haveit"; then
28715                          if test -d "$additional_libdir"; then
28716                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
28717                          fi
28718                        fi
28719                      fi
28720                    fi
28721                    ;;
28722                  -R*)
28723                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
28724                    if test "$enable_rpath" != no; then
28725                                                                  haveit=
28726                      for x in $rpathdirs; do
28727                        if test "X$x" = "X$dir"; then
28728                          haveit=yes
28729                          break
28730                        fi
28731                      done
28732                      if test -z "$haveit"; then
28733                        rpathdirs="$rpathdirs $dir"
28734                      fi
28735                                                                  haveit=
28736                      for x in $ltrpathdirs; do
28737                        if test "X$x" = "X$dir"; then
28738                          haveit=yes
28739                          break
28740                        fi
28741                      done
28742                      if test -z "$haveit"; then
28743                        ltrpathdirs="$ltrpathdirs $dir"
28744                      fi
28745                    fi
28746                    ;;
28747                  -l*)
28748                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
28749                    ;;
28750                  *.la)
28751                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
28752                    ;;
28753                  *)
28754                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
28755                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
28756                    ;;
28757                esac
28758              done
28759            fi
28760          else
28761                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
28762            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
28763          fi
28764        fi
28765      fi
28766    done
28767  done
28768  if test "X$rpathdirs" != "X"; then
28769    if test -n "$acl_hardcode_libdir_separator"; then
28770                        alldirs=
28771      for found_dir in $rpathdirs; do
28772        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
28773      done
28774            acl_save_libdir="$libdir"
28775      libdir="$alldirs"
28776      eval flag=\"$acl_hardcode_libdir_flag_spec\"
28777      libdir="$acl_save_libdir"
28778      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
28779    else
28780            for found_dir in $rpathdirs; do
28781        acl_save_libdir="$libdir"
28782        libdir="$found_dir"
28783        eval flag=\"$acl_hardcode_libdir_flag_spec\"
28784        libdir="$acl_save_libdir"
28785        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
28786      done
28787    fi
28788  fi
28789  if test "X$ltrpathdirs" != "X"; then
28790            for found_dir in $ltrpathdirs; do
28791      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
28792    done
28793  fi
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806          am_save_CPPFLAGS="$CPPFLAGS"
28807
28808  for element in $INCICONV; do
28809    haveit=
28810    for x in $CPPFLAGS; do
28811
28812  acl_save_prefix="$prefix"
28813  prefix="$acl_final_prefix"
28814  acl_save_exec_prefix="$exec_prefix"
28815  exec_prefix="$acl_final_exec_prefix"
28816  eval x=\"$x\"
28817  exec_prefix="$acl_save_exec_prefix"
28818  prefix="$acl_save_prefix"
28819
28820      if test "X$x" = "X$element"; then
28821        haveit=yes
28822        break
28823      fi
28824    done
28825    if test -z "$haveit"; then
28826      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
28827    fi
28828  done
28829
28830
28831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
28832$as_echo_n "checking for iconv... " >&6; }
28833if ${am_cv_func_iconv+:} false; then :
28834  $as_echo_n "(cached) " >&6
28835else
28836
28837    am_cv_func_iconv="no, consider installing GNU libiconv"
28838    am_cv_lib_iconv=no
28839    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28840/* end confdefs.h.  */
28841
28842#include <stdlib.h>
28843#include <iconv.h>
28844
28845int
28846main ()
28847{
28848iconv_t cd = iconv_open("","");
28849           iconv(cd,NULL,NULL,NULL,NULL);
28850           iconv_close(cd);
28851  ;
28852  return 0;
28853}
28854_ACEOF
28855if ac_fn_c_try_link "$LINENO"; then :
28856  am_cv_func_iconv=yes
28857fi
28858rm -f core conftest.err conftest.$ac_objext \
28859    conftest$ac_exeext conftest.$ac_ext
28860    if test "$am_cv_func_iconv" != yes; then
28861      am_save_LIBS="$LIBS"
28862      LIBS="$LIBS $LIBICONV"
28863      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28864/* end confdefs.h.  */
28865
28866#include <stdlib.h>
28867#include <iconv.h>
28868
28869int
28870main ()
28871{
28872iconv_t cd = iconv_open("","");
28873             iconv(cd,NULL,NULL,NULL,NULL);
28874             iconv_close(cd);
28875  ;
28876  return 0;
28877}
28878_ACEOF
28879if ac_fn_c_try_link "$LINENO"; then :
28880  am_cv_lib_iconv=yes
28881        am_cv_func_iconv=yes
28882fi
28883rm -f core conftest.err conftest.$ac_objext \
28884    conftest$ac_exeext conftest.$ac_ext
28885      LIBS="$am_save_LIBS"
28886    fi
28887
28888fi
28889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
28890$as_echo "$am_cv_func_iconv" >&6; }
28891  if test "$am_cv_func_iconv" = yes; then
28892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
28893$as_echo_n "checking for working iconv... " >&6; }
28894if ${am_cv_func_iconv_works+:} false; then :
28895  $as_echo_n "(cached) " >&6
28896else
28897
28898                  am_save_LIBS="$LIBS"
28899      if test $am_cv_lib_iconv = yes; then
28900        LIBS="$LIBS $LIBICONV"
28901      fi
28902      am_cv_func_iconv_works=no
28903      for ac_iconv_const in '' 'const'; do
28904        if test "$cross_compiling" = yes; then :
28905  case "$host_os" in
28906             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
28907             *)            am_cv_func_iconv_works="guessing yes" ;;
28908           esac
28909else
28910  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28911/* end confdefs.h.  */
28912
28913#include <iconv.h>
28914#include <string.h>
28915
28916#ifndef ICONV_CONST
28917# define ICONV_CONST $ac_iconv_const
28918#endif
28919
28920int
28921main ()
28922{
28923int result = 0;
28924  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
28925     returns.  */
28926  {
28927    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
28928    if (cd_utf8_to_88591 != (iconv_t)(-1))
28929      {
28930        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
28931        char buf[10];
28932        ICONV_CONST char *inptr = input;
28933        size_t inbytesleft = strlen (input);
28934        char *outptr = buf;
28935        size_t outbytesleft = sizeof (buf);
28936        size_t res = iconv (cd_utf8_to_88591,
28937                            &inptr, &inbytesleft,
28938                            &outptr, &outbytesleft);
28939        if (res == 0)
28940          result |= 1;
28941        iconv_close (cd_utf8_to_88591);
28942      }
28943  }
28944  /* Test against Solaris 10 bug: Failures are not distinguishable from
28945     successful returns.  */
28946  {
28947    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
28948    if (cd_ascii_to_88591 != (iconv_t)(-1))
28949      {
28950        static ICONV_CONST char input[] = "\263";
28951        char buf[10];
28952        ICONV_CONST char *inptr = input;
28953        size_t inbytesleft = strlen (input);
28954        char *outptr = buf;
28955        size_t outbytesleft = sizeof (buf);
28956        size_t res = iconv (cd_ascii_to_88591,
28957                            &inptr, &inbytesleft,
28958                            &outptr, &outbytesleft);
28959        if (res == 0)
28960          result |= 2;
28961        iconv_close (cd_ascii_to_88591);
28962      }
28963  }
28964  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
28965  {
28966    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
28967    if (cd_88591_to_utf8 != (iconv_t)(-1))
28968      {
28969        static ICONV_CONST char input[] = "\304";
28970        static char buf[2] = { (char)0xDE, (char)0xAD };
28971        ICONV_CONST char *inptr = input;
28972        size_t inbytesleft = 1;
28973        char *outptr = buf;
28974        size_t outbytesleft = 1;
28975        size_t res = iconv (cd_88591_to_utf8,
28976                            &inptr, &inbytesleft,
28977                            &outptr, &outbytesleft);
28978        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
28979          result |= 4;
28980        iconv_close (cd_88591_to_utf8);
28981      }
28982  }
28983#if 0 /* This bug could be worked around by the caller.  */
28984  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
28985  {
28986    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
28987    if (cd_88591_to_utf8 != (iconv_t)(-1))
28988      {
28989        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
28990        char buf[50];
28991        ICONV_CONST char *inptr = input;
28992        size_t inbytesleft = strlen (input);
28993        char *outptr = buf;
28994        size_t outbytesleft = sizeof (buf);
28995        size_t res = iconv (cd_88591_to_utf8,
28996                            &inptr, &inbytesleft,
28997                            &outptr, &outbytesleft);
28998        if ((int)res > 0)
28999          result |= 8;
29000        iconv_close (cd_88591_to_utf8);
29001      }
29002  }
29003#endif
29004  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
29005     provided.  */
29006  if (/* Try standardized names.  */
29007      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
29008      /* Try IRIX, OSF/1 names.  */
29009      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
29010      /* Try AIX names.  */
29011      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
29012      /* Try HP-UX names.  */
29013      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
29014    result |= 16;
29015  return result;
29016
29017  ;
29018  return 0;
29019}
29020_ACEOF
29021if ac_fn_c_try_run "$LINENO"; then :
29022  am_cv_func_iconv_works=yes
29023fi
29024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29025  conftest.$ac_objext conftest.beam conftest.$ac_ext
29026fi
29027
29028        test "$am_cv_func_iconv_works" = no || break
29029      done
29030      LIBS="$am_save_LIBS"
29031
29032fi
29033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
29034$as_echo "$am_cv_func_iconv_works" >&6; }
29035    case "$am_cv_func_iconv_works" in
29036      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
29037      *)   am_func_iconv=yes ;;
29038    esac
29039  else
29040    am_func_iconv=no am_cv_lib_iconv=no
29041  fi
29042  if test "$am_func_iconv" = yes; then
29043
29044$as_echo "#define HAVE_ICONV 1" >>confdefs.h
29045
29046  fi
29047  if test "$am_cv_lib_iconv" = yes; then
29048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
29049$as_echo_n "checking how to link with libiconv... " >&6; }
29050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
29051$as_echo "$LIBICONV" >&6; }
29052  else
29053            CPPFLAGS="$am_save_CPPFLAGS"
29054    LIBICONV=
29055    LTLIBICONV=
29056  fi
29057
29058
29059
29060  if test "$am_cv_func_iconv" = yes; then
29061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
29062$as_echo_n "checking for iconv declaration... " >&6; }
29063    if ${am_cv_proto_iconv+:} false; then :
29064  $as_echo_n "(cached) " >&6
29065else
29066
29067      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29068/* end confdefs.h.  */
29069
29070#include <stdlib.h>
29071#include <iconv.h>
29072extern
29073#ifdef __cplusplus
29074"C"
29075#endif
29076#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
29077size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
29078#else
29079size_t iconv();
29080#endif
29081
29082int
29083main ()
29084{
29085
29086  ;
29087  return 0;
29088}
29089_ACEOF
29090if ac_fn_c_try_compile "$LINENO"; then :
29091  am_cv_proto_iconv_arg1=""
29092else
29093  am_cv_proto_iconv_arg1="const"
29094fi
29095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29096      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
29097fi
29098
29099    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
29100    { $as_echo "$as_me:${as_lineno-$LINENO}: result:
29101         $am_cv_proto_iconv" >&5
29102$as_echo "
29103         $am_cv_proto_iconv" >&6; }
29104  else
29105            am_cv_proto_iconv_arg1=""
29106  fi
29107
29108cat >>confdefs.h <<_ACEOF
29109#define ICONV_CONST $am_cv_proto_iconv_arg1
29110_ACEOF
29111
29112
29113
29114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
29115$as_echo_n "checking for a sed that does not truncate output... " >&6; }
29116if ${ac_cv_path_SED+:} false; then :
29117  $as_echo_n "(cached) " >&6
29118else
29119            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
29120     for ac_i in 1 2 3 4 5 6 7; do
29121       ac_script="$ac_script$as_nl$ac_script"
29122     done
29123     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
29124     { ac_script=; unset ac_script;}
29125     if test -z "$SED"; then
29126  ac_path_SED_found=false
29127  # Loop through the user's path and test for each of PROGNAME-LIST
29128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29129for as_dir in $PATH
29130do
29131  IFS=$as_save_IFS
29132  test -z "$as_dir" && as_dir=.
29133    for ac_prog in sed gsed; do
29134    for ac_exec_ext in '' $ac_executable_extensions; do
29135      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
29136      as_fn_executable_p "$ac_path_SED" || continue
29137# Check for GNU ac_path_SED and select it if it is found.
29138  # Check for GNU $ac_path_SED
29139case `"$ac_path_SED" --version 2>&1` in
29140*GNU*)
29141  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
29142*)
29143  ac_count=0
29144  $as_echo_n 0123456789 >"conftest.in"
29145  while :
29146  do
29147    cat "conftest.in" "conftest.in" >"conftest.tmp"
29148    mv "conftest.tmp" "conftest.in"
29149    cp "conftest.in" "conftest.nl"
29150    $as_echo '' >> "conftest.nl"
29151    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
29152    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
29153    as_fn_arith $ac_count + 1 && ac_count=$as_val
29154    if test $ac_count -gt ${ac_path_SED_max-0}; then
29155      # Best one so far, save it but keep looking for a better one
29156      ac_cv_path_SED="$ac_path_SED"
29157      ac_path_SED_max=$ac_count
29158    fi
29159    # 10*(2^10) chars as input seems more than enough
29160    test $ac_count -gt 10 && break
29161  done
29162  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
29163esac
29164
29165      $ac_path_SED_found && break 3
29166    done
29167  done
29168  done
29169IFS=$as_save_IFS
29170  if test -z "$ac_cv_path_SED"; then
29171    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
29172  fi
29173else
29174  ac_cv_path_SED=$SED
29175fi
29176
29177fi
29178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
29179$as_echo "$ac_cv_path_SED" >&6; }
29180 SED="$ac_cv_path_SED"
29181  rm -f conftest.sed
29182
29183
29184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
29185$as_echo_n "checking whether NLS is requested... " >&6; }
29186    # Check whether --enable-nls was given.
29187if test "${enable_nls+set}" = set; then :
29188  enableval=$enable_nls; USE_NLS=$enableval
29189else
29190  USE_NLS=yes
29191fi
29192
29193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
29194$as_echo "$USE_NLS" >&6; }
29195
29196
29197
29198
29199      GETTEXT_MACRO_VERSION=0.19
29200
29201
29202
29203
29204# Prepare PATH_SEPARATOR.
29205# The user is always right.
29206if test "${PATH_SEPARATOR+set}" != set; then
29207  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
29208  # contains only /bin. Note that ksh looks also at the FPATH variable,
29209  # so we have to set that as well for the test.
29210  PATH_SEPARATOR=:
29211  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
29212    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
29213           || PATH_SEPARATOR=';'
29214       }
29215fi
29216
29217# Find out how to test for executable files. Don't use a zero-byte file,
29218# as systems may use methods other than mode bits to determine executability.
29219cat >conf$$.file <<_ASEOF
29220#! /bin/sh
29221exit 0
29222_ASEOF
29223chmod +x conf$$.file
29224if test -x conf$$.file >/dev/null 2>&1; then
29225  ac_executable_p="test -x"
29226else
29227  ac_executable_p="test -f"
29228fi
29229rm -f conf$$.file
29230
29231# Extract the first word of "msgfmt", so it can be a program name with args.
29232set dummy msgfmt; ac_word=$2
29233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29234$as_echo_n "checking for $ac_word... " >&6; }
29235if ${ac_cv_path_MSGFMT+:} false; then :
29236  $as_echo_n "(cached) " >&6
29237else
29238  case "$MSGFMT" in
29239  [\\/]* | ?:[\\/]*)
29240    ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
29241    ;;
29242  *)
29243    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
29244    for ac_dir in $PATH; do
29245      IFS="$ac_save_IFS"
29246      test -z "$ac_dir" && ac_dir=.
29247      for ac_exec_ext in '' $ac_executable_extensions; do
29248        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
29249          echo "$as_me: trying $ac_dir/$ac_word..." >&5
29250          if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
29251     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
29252            ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
29253            break 2
29254          fi
29255        fi
29256      done
29257    done
29258    IFS="$ac_save_IFS"
29259  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
29260    ;;
29261esac
29262fi
29263MSGFMT="$ac_cv_path_MSGFMT"
29264if test "$MSGFMT" != ":"; then
29265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
29266$as_echo "$MSGFMT" >&6; }
29267else
29268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29269$as_echo "no" >&6; }
29270fi
29271
29272  # Extract the first word of "gmsgfmt", so it can be a program name with args.
29273set dummy gmsgfmt; ac_word=$2
29274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29275$as_echo_n "checking for $ac_word... " >&6; }
29276if ${ac_cv_path_GMSGFMT+:} false; then :
29277  $as_echo_n "(cached) " >&6
29278else
29279  case $GMSGFMT in
29280  [\\/]* | ?:[\\/]*)
29281  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
29282  ;;
29283  *)
29284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29285for as_dir in $PATH
29286do
29287  IFS=$as_save_IFS
29288  test -z "$as_dir" && as_dir=.
29289    for ac_exec_ext in '' $ac_executable_extensions; do
29290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29291    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
29292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29293    break 2
29294  fi
29295done
29296  done
29297IFS=$as_save_IFS
29298
29299  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
29300  ;;
29301esac
29302fi
29303GMSGFMT=$ac_cv_path_GMSGFMT
29304if test -n "$GMSGFMT"; then
29305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
29306$as_echo "$GMSGFMT" >&6; }
29307else
29308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29309$as_echo "no" >&6; }
29310fi
29311
29312
29313
29314    case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
29315    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
29316    *) MSGFMT_015=$MSGFMT ;;
29317  esac
29318
29319  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
29320    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
29321    *) GMSGFMT_015=$GMSGFMT ;;
29322  esac
29323
29324
29325
29326# Prepare PATH_SEPARATOR.
29327# The user is always right.
29328if test "${PATH_SEPARATOR+set}" != set; then
29329  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
29330  # contains only /bin. Note that ksh looks also at the FPATH variable,
29331  # so we have to set that as well for the test.
29332  PATH_SEPARATOR=:
29333  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
29334    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
29335           || PATH_SEPARATOR=';'
29336       }
29337fi
29338
29339# Find out how to test for executable files. Don't use a zero-byte file,
29340# as systems may use methods other than mode bits to determine executability.
29341cat >conf$$.file <<_ASEOF
29342#! /bin/sh
29343exit 0
29344_ASEOF
29345chmod +x conf$$.file
29346if test -x conf$$.file >/dev/null 2>&1; then
29347  ac_executable_p="test -x"
29348else
29349  ac_executable_p="test -f"
29350fi
29351rm -f conf$$.file
29352
29353# Extract the first word of "xgettext", so it can be a program name with args.
29354set dummy xgettext; ac_word=$2
29355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29356$as_echo_n "checking for $ac_word... " >&6; }
29357if ${ac_cv_path_XGETTEXT+:} false; then :
29358  $as_echo_n "(cached) " >&6
29359else
29360  case "$XGETTEXT" in
29361  [\\/]* | ?:[\\/]*)
29362    ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
29363    ;;
29364  *)
29365    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
29366    for ac_dir in $PATH; do
29367      IFS="$ac_save_IFS"
29368      test -z "$ac_dir" && ac_dir=.
29369      for ac_exec_ext in '' $ac_executable_extensions; do
29370        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
29371          echo "$as_me: trying $ac_dir/$ac_word..." >&5
29372          if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
29373     (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
29374            ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
29375            break 2
29376          fi
29377        fi
29378      done
29379    done
29380    IFS="$ac_save_IFS"
29381  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
29382    ;;
29383esac
29384fi
29385XGETTEXT="$ac_cv_path_XGETTEXT"
29386if test "$XGETTEXT" != ":"; then
29387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
29388$as_echo "$XGETTEXT" >&6; }
29389else
29390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29391$as_echo "no" >&6; }
29392fi
29393
29394    rm -f messages.po
29395
29396    case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
29397    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
29398    *) XGETTEXT_015=$XGETTEXT ;;
29399  esac
29400
29401
29402
29403# Prepare PATH_SEPARATOR.
29404# The user is always right.
29405if test "${PATH_SEPARATOR+set}" != set; then
29406  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
29407  # contains only /bin. Note that ksh looks also at the FPATH variable,
29408  # so we have to set that as well for the test.
29409  PATH_SEPARATOR=:
29410  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
29411    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
29412           || PATH_SEPARATOR=';'
29413       }
29414fi
29415
29416# Find out how to test for executable files. Don't use a zero-byte file,
29417# as systems may use methods other than mode bits to determine executability.
29418cat >conf$$.file <<_ASEOF
29419#! /bin/sh
29420exit 0
29421_ASEOF
29422chmod +x conf$$.file
29423if test -x conf$$.file >/dev/null 2>&1; then
29424  ac_executable_p="test -x"
29425else
29426  ac_executable_p="test -f"
29427fi
29428rm -f conf$$.file
29429
29430# Extract the first word of "msgmerge", so it can be a program name with args.
29431set dummy msgmerge; ac_word=$2
29432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29433$as_echo_n "checking for $ac_word... " >&6; }
29434if ${ac_cv_path_MSGMERGE+:} false; then :
29435  $as_echo_n "(cached) " >&6
29436else
29437  case "$MSGMERGE" in
29438  [\\/]* | ?:[\\/]*)
29439    ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
29440    ;;
29441  *)
29442    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
29443    for ac_dir in $PATH; do
29444      IFS="$ac_save_IFS"
29445      test -z "$ac_dir" && ac_dir=.
29446      for ac_exec_ext in '' $ac_executable_extensions; do
29447        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
29448          echo "$as_me: trying $ac_dir/$ac_word..." >&5
29449          if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
29450            ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
29451            break 2
29452          fi
29453        fi
29454      done
29455    done
29456    IFS="$ac_save_IFS"
29457  test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
29458    ;;
29459esac
29460fi
29461MSGMERGE="$ac_cv_path_MSGMERGE"
29462if test "$MSGMERGE" != ":"; then
29463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
29464$as_echo "$MSGMERGE" >&6; }
29465else
29466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29467$as_echo "no" >&6; }
29468fi
29469
29470
29471        test -n "$localedir" || localedir='${datadir}/locale'
29472
29473
29474    test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
29475
29476
29477  ac_config_commands="$ac_config_commands po-directories"
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
29505$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
29506if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
29507  $as_echo_n "(cached) " >&6
29508else
29509  gt_save_LIBS="$LIBS"
29510     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
29511     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29512/* end confdefs.h.  */
29513#include <CoreFoundation/CFPreferences.h>
29514int
29515main ()
29516{
29517CFPreferencesCopyAppValue(NULL, NULL)
29518  ;
29519  return 0;
29520}
29521_ACEOF
29522if ac_fn_c_try_link "$LINENO"; then :
29523  gt_cv_func_CFPreferencesCopyAppValue=yes
29524else
29525  gt_cv_func_CFPreferencesCopyAppValue=no
29526fi
29527rm -f core conftest.err conftest.$ac_objext \
29528    conftest$ac_exeext conftest.$ac_ext
29529     LIBS="$gt_save_LIBS"
29530fi
29531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
29532$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
29533  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
29534
29535$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
29536
29537  fi
29538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
29539$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
29540if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
29541  $as_echo_n "(cached) " >&6
29542else
29543  gt_save_LIBS="$LIBS"
29544     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
29545     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29546/* end confdefs.h.  */
29547#include <CoreFoundation/CFLocale.h>
29548int
29549main ()
29550{
29551CFLocaleCopyCurrent();
29552  ;
29553  return 0;
29554}
29555_ACEOF
29556if ac_fn_c_try_link "$LINENO"; then :
29557  gt_cv_func_CFLocaleCopyCurrent=yes
29558else
29559  gt_cv_func_CFLocaleCopyCurrent=no
29560fi
29561rm -f core conftest.err conftest.$ac_objext \
29562    conftest$ac_exeext conftest.$ac_ext
29563     LIBS="$gt_save_LIBS"
29564fi
29565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
29566$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
29567  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
29568
29569$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
29570
29571  fi
29572  INTL_MACOSX_LIBS=
29573  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
29574    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
29575  fi
29576
29577
29578
29579
29580
29581
29582  LIBINTL=
29583  LTLIBINTL=
29584  POSUB=
29585
29586    case " $gt_needs " in
29587    *" need-formatstring-macros "*) gt_api_version=3 ;;
29588    *" need-ngettext "*) gt_api_version=2 ;;
29589    *) gt_api_version=1 ;;
29590  esac
29591  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
29592  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
29593
29594    if test "$USE_NLS" = "yes"; then
29595    gt_use_preinstalled_gnugettext=no
29596
29597
29598        if test $gt_api_version -ge 3; then
29599          gt_revision_test_code='
29600#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
29601#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
29602#endif
29603typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
29604'
29605        else
29606          gt_revision_test_code=
29607        fi
29608        if test $gt_api_version -ge 2; then
29609          gt_expression_test_code=' + * ngettext ("", "", 0)'
29610        else
29611          gt_expression_test_code=
29612        fi
29613
29614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
29615$as_echo_n "checking for GNU gettext in libc... " >&6; }
29616if eval \${$gt_func_gnugettext_libc+:} false; then :
29617  $as_echo_n "(cached) " >&6
29618else
29619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29620/* end confdefs.h.  */
29621
29622#include <libintl.h>
29623#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
29624extern int _nl_msg_cat_cntr;
29625extern int *_nl_domain_bindings;
29626#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
29627#else
29628#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
29629#endif
29630$gt_revision_test_code
29631
29632int
29633main ()
29634{
29635
29636bindtextdomain ("", "");
29637return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
29638
29639  ;
29640  return 0;
29641}
29642_ACEOF
29643if ac_fn_c_try_link "$LINENO"; then :
29644  eval "$gt_func_gnugettext_libc=yes"
29645else
29646  eval "$gt_func_gnugettext_libc=no"
29647fi
29648rm -f core conftest.err conftest.$ac_objext \
29649    conftest$ac_exeext conftest.$ac_ext
29650fi
29651eval ac_res=\$$gt_func_gnugettext_libc
29652	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29653$as_echo "$ac_res" >&6; }
29654
29655        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
29656
29657
29658
29659
29660
29661          am_save_CPPFLAGS="$CPPFLAGS"
29662
29663  for element in $INCICONV; do
29664    haveit=
29665    for x in $CPPFLAGS; do
29666
29667  acl_save_prefix="$prefix"
29668  prefix="$acl_final_prefix"
29669  acl_save_exec_prefix="$exec_prefix"
29670  exec_prefix="$acl_final_exec_prefix"
29671  eval x=\"$x\"
29672  exec_prefix="$acl_save_exec_prefix"
29673  prefix="$acl_save_prefix"
29674
29675      if test "X$x" = "X$element"; then
29676        haveit=yes
29677        break
29678      fi
29679    done
29680    if test -z "$haveit"; then
29681      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
29682    fi
29683  done
29684
29685
29686  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
29687$as_echo_n "checking for iconv... " >&6; }
29688if ${am_cv_func_iconv+:} false; then :
29689  $as_echo_n "(cached) " >&6
29690else
29691
29692    am_cv_func_iconv="no, consider installing GNU libiconv"
29693    am_cv_lib_iconv=no
29694    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29695/* end confdefs.h.  */
29696
29697#include <stdlib.h>
29698#include <iconv.h>
29699
29700int
29701main ()
29702{
29703iconv_t cd = iconv_open("","");
29704           iconv(cd,NULL,NULL,NULL,NULL);
29705           iconv_close(cd);
29706  ;
29707  return 0;
29708}
29709_ACEOF
29710if ac_fn_c_try_link "$LINENO"; then :
29711  am_cv_func_iconv=yes
29712fi
29713rm -f core conftest.err conftest.$ac_objext \
29714    conftest$ac_exeext conftest.$ac_ext
29715    if test "$am_cv_func_iconv" != yes; then
29716      am_save_LIBS="$LIBS"
29717      LIBS="$LIBS $LIBICONV"
29718      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29719/* end confdefs.h.  */
29720
29721#include <stdlib.h>
29722#include <iconv.h>
29723
29724int
29725main ()
29726{
29727iconv_t cd = iconv_open("","");
29728             iconv(cd,NULL,NULL,NULL,NULL);
29729             iconv_close(cd);
29730  ;
29731  return 0;
29732}
29733_ACEOF
29734if ac_fn_c_try_link "$LINENO"; then :
29735  am_cv_lib_iconv=yes
29736        am_cv_func_iconv=yes
29737fi
29738rm -f core conftest.err conftest.$ac_objext \
29739    conftest$ac_exeext conftest.$ac_ext
29740      LIBS="$am_save_LIBS"
29741    fi
29742
29743fi
29744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
29745$as_echo "$am_cv_func_iconv" >&6; }
29746  if test "$am_cv_func_iconv" = yes; then
29747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
29748$as_echo_n "checking for working iconv... " >&6; }
29749if ${am_cv_func_iconv_works+:} false; then :
29750  $as_echo_n "(cached) " >&6
29751else
29752
29753                  am_save_LIBS="$LIBS"
29754      if test $am_cv_lib_iconv = yes; then
29755        LIBS="$LIBS $LIBICONV"
29756      fi
29757      am_cv_func_iconv_works=no
29758      for ac_iconv_const in '' 'const'; do
29759        if test "$cross_compiling" = yes; then :
29760  case "$host_os" in
29761             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
29762             *)            am_cv_func_iconv_works="guessing yes" ;;
29763           esac
29764else
29765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29766/* end confdefs.h.  */
29767
29768#include <iconv.h>
29769#include <string.h>
29770
29771#ifndef ICONV_CONST
29772# define ICONV_CONST $ac_iconv_const
29773#endif
29774
29775int
29776main ()
29777{
29778int result = 0;
29779  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
29780     returns.  */
29781  {
29782    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
29783    if (cd_utf8_to_88591 != (iconv_t)(-1))
29784      {
29785        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
29786        char buf[10];
29787        ICONV_CONST char *inptr = input;
29788        size_t inbytesleft = strlen (input);
29789        char *outptr = buf;
29790        size_t outbytesleft = sizeof (buf);
29791        size_t res = iconv (cd_utf8_to_88591,
29792                            &inptr, &inbytesleft,
29793                            &outptr, &outbytesleft);
29794        if (res == 0)
29795          result |= 1;
29796        iconv_close (cd_utf8_to_88591);
29797      }
29798  }
29799  /* Test against Solaris 10 bug: Failures are not distinguishable from
29800     successful returns.  */
29801  {
29802    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
29803    if (cd_ascii_to_88591 != (iconv_t)(-1))
29804      {
29805        static ICONV_CONST char input[] = "\263";
29806        char buf[10];
29807        ICONV_CONST char *inptr = input;
29808        size_t inbytesleft = strlen (input);
29809        char *outptr = buf;
29810        size_t outbytesleft = sizeof (buf);
29811        size_t res = iconv (cd_ascii_to_88591,
29812                            &inptr, &inbytesleft,
29813                            &outptr, &outbytesleft);
29814        if (res == 0)
29815          result |= 2;
29816        iconv_close (cd_ascii_to_88591);
29817      }
29818  }
29819  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
29820  {
29821    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
29822    if (cd_88591_to_utf8 != (iconv_t)(-1))
29823      {
29824        static ICONV_CONST char input[] = "\304";
29825        static char buf[2] = { (char)0xDE, (char)0xAD };
29826        ICONV_CONST char *inptr = input;
29827        size_t inbytesleft = 1;
29828        char *outptr = buf;
29829        size_t outbytesleft = 1;
29830        size_t res = iconv (cd_88591_to_utf8,
29831                            &inptr, &inbytesleft,
29832                            &outptr, &outbytesleft);
29833        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
29834          result |= 4;
29835        iconv_close (cd_88591_to_utf8);
29836      }
29837  }
29838#if 0 /* This bug could be worked around by the caller.  */
29839  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
29840  {
29841    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
29842    if (cd_88591_to_utf8 != (iconv_t)(-1))
29843      {
29844        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
29845        char buf[50];
29846        ICONV_CONST char *inptr = input;
29847        size_t inbytesleft = strlen (input);
29848        char *outptr = buf;
29849        size_t outbytesleft = sizeof (buf);
29850        size_t res = iconv (cd_88591_to_utf8,
29851                            &inptr, &inbytesleft,
29852                            &outptr, &outbytesleft);
29853        if ((int)res > 0)
29854          result |= 8;
29855        iconv_close (cd_88591_to_utf8);
29856      }
29857  }
29858#endif
29859  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
29860     provided.  */
29861  if (/* Try standardized names.  */
29862      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
29863      /* Try IRIX, OSF/1 names.  */
29864      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
29865      /* Try AIX names.  */
29866      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
29867      /* Try HP-UX names.  */
29868      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
29869    result |= 16;
29870  return result;
29871
29872  ;
29873  return 0;
29874}
29875_ACEOF
29876if ac_fn_c_try_run "$LINENO"; then :
29877  am_cv_func_iconv_works=yes
29878fi
29879rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29880  conftest.$ac_objext conftest.beam conftest.$ac_ext
29881fi
29882
29883        test "$am_cv_func_iconv_works" = no || break
29884      done
29885      LIBS="$am_save_LIBS"
29886
29887fi
29888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
29889$as_echo "$am_cv_func_iconv_works" >&6; }
29890    case "$am_cv_func_iconv_works" in
29891      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
29892      *)   am_func_iconv=yes ;;
29893    esac
29894  else
29895    am_func_iconv=no am_cv_lib_iconv=no
29896  fi
29897  if test "$am_func_iconv" = yes; then
29898
29899$as_echo "#define HAVE_ICONV 1" >>confdefs.h
29900
29901  fi
29902  if test "$am_cv_lib_iconv" = yes; then
29903    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
29904$as_echo_n "checking how to link with libiconv... " >&6; }
29905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
29906$as_echo "$LIBICONV" >&6; }
29907  else
29908            CPPFLAGS="$am_save_CPPFLAGS"
29909    LIBICONV=
29910    LTLIBICONV=
29911  fi
29912
29913
29914
29915
29916
29917
29918
29919
29920
29921
29922
29923    use_additional=yes
29924
29925  acl_save_prefix="$prefix"
29926  prefix="$acl_final_prefix"
29927  acl_save_exec_prefix="$exec_prefix"
29928  exec_prefix="$acl_final_exec_prefix"
29929
29930    eval additional_includedir=\"$includedir\"
29931    eval additional_libdir=\"$libdir\"
29932
29933  exec_prefix="$acl_save_exec_prefix"
29934  prefix="$acl_save_prefix"
29935
29936
29937# Check whether --with-libintl-prefix was given.
29938if test "${with_libintl_prefix+set}" = set; then :
29939  withval=$with_libintl_prefix;
29940    if test "X$withval" = "Xno"; then
29941      use_additional=no
29942    else
29943      if test "X$withval" = "X"; then
29944
29945  acl_save_prefix="$prefix"
29946  prefix="$acl_final_prefix"
29947  acl_save_exec_prefix="$exec_prefix"
29948  exec_prefix="$acl_final_exec_prefix"
29949
29950          eval additional_includedir=\"$includedir\"
29951          eval additional_libdir=\"$libdir\"
29952
29953  exec_prefix="$acl_save_exec_prefix"
29954  prefix="$acl_save_prefix"
29955
29956      else
29957        additional_includedir="$withval/include"
29958        additional_libdir="$withval/$acl_libdirstem"
29959        if test "$acl_libdirstem2" != "$acl_libdirstem" \
29960           && ! test -d "$withval/$acl_libdirstem"; then
29961          additional_libdir="$withval/$acl_libdirstem2"
29962        fi
29963      fi
29964    fi
29965
29966fi
29967
29968      LIBINTL=
29969  LTLIBINTL=
29970  INCINTL=
29971  LIBINTL_PREFIX=
29972      HAVE_LIBINTL=
29973  rpathdirs=
29974  ltrpathdirs=
29975  names_already_handled=
29976  names_next_round='intl '
29977  while test -n "$names_next_round"; do
29978    names_this_round="$names_next_round"
29979    names_next_round=
29980    for name in $names_this_round; do
29981      already_handled=
29982      for n in $names_already_handled; do
29983        if test "$n" = "$name"; then
29984          already_handled=yes
29985          break
29986        fi
29987      done
29988      if test -z "$already_handled"; then
29989        names_already_handled="$names_already_handled $name"
29990                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
29991        eval value=\"\$HAVE_LIB$uppername\"
29992        if test -n "$value"; then
29993          if test "$value" = yes; then
29994            eval value=\"\$LIB$uppername\"
29995            test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
29996            eval value=\"\$LTLIB$uppername\"
29997            test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
29998          else
29999                                    :
30000          fi
30001        else
30002                              found_dir=
30003          found_la=
30004          found_so=
30005          found_a=
30006          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
30007          if test -n "$acl_shlibext"; then
30008            shrext=".$acl_shlibext"             # typically: shrext=.so
30009          else
30010            shrext=
30011          fi
30012          if test $use_additional = yes; then
30013            dir="$additional_libdir"
30014                                    if test -n "$acl_shlibext"; then
30015              if test -f "$dir/$libname$shrext"; then
30016                found_dir="$dir"
30017                found_so="$dir/$libname$shrext"
30018              else
30019                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
30020                  ver=`(cd "$dir" && \
30021                        for f in "$libname$shrext".*; do echo "$f"; done \
30022                        | sed -e "s,^$libname$shrext\\\\.,," \
30023                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
30024                        | sed 1q ) 2>/dev/null`
30025                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
30026                    found_dir="$dir"
30027                    found_so="$dir/$libname$shrext.$ver"
30028                  fi
30029                else
30030                  eval library_names=\"$acl_library_names_spec\"
30031                  for f in $library_names; do
30032                    if test -f "$dir/$f"; then
30033                      found_dir="$dir"
30034                      found_so="$dir/$f"
30035                      break
30036                    fi
30037                  done
30038                fi
30039              fi
30040            fi
30041                        if test "X$found_dir" = "X"; then
30042              if test -f "$dir/$libname.$acl_libext"; then
30043                found_dir="$dir"
30044                found_a="$dir/$libname.$acl_libext"
30045              fi
30046            fi
30047            if test "X$found_dir" != "X"; then
30048              if test -f "$dir/$libname.la"; then
30049                found_la="$dir/$libname.la"
30050              fi
30051            fi
30052          fi
30053          if test "X$found_dir" = "X"; then
30054            for x in $LDFLAGS $LTLIBINTL; do
30055
30056  acl_save_prefix="$prefix"
30057  prefix="$acl_final_prefix"
30058  acl_save_exec_prefix="$exec_prefix"
30059  exec_prefix="$acl_final_exec_prefix"
30060  eval x=\"$x\"
30061  exec_prefix="$acl_save_exec_prefix"
30062  prefix="$acl_save_prefix"
30063
30064              case "$x" in
30065                -L*)
30066                  dir=`echo "X$x" | sed -e 's/^X-L//'`
30067                                    if test -n "$acl_shlibext"; then
30068                    if test -f "$dir/$libname$shrext"; then
30069                      found_dir="$dir"
30070                      found_so="$dir/$libname$shrext"
30071                    else
30072                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
30073                        ver=`(cd "$dir" && \
30074                              for f in "$libname$shrext".*; do echo "$f"; done \
30075                              | sed -e "s,^$libname$shrext\\\\.,," \
30076                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
30077                              | sed 1q ) 2>/dev/null`
30078                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
30079                          found_dir="$dir"
30080                          found_so="$dir/$libname$shrext.$ver"
30081                        fi
30082                      else
30083                        eval library_names=\"$acl_library_names_spec\"
30084                        for f in $library_names; do
30085                          if test -f "$dir/$f"; then
30086                            found_dir="$dir"
30087                            found_so="$dir/$f"
30088                            break
30089                          fi
30090                        done
30091                      fi
30092                    fi
30093                  fi
30094                                    if test "X$found_dir" = "X"; then
30095                    if test -f "$dir/$libname.$acl_libext"; then
30096                      found_dir="$dir"
30097                      found_a="$dir/$libname.$acl_libext"
30098                    fi
30099                  fi
30100                  if test "X$found_dir" != "X"; then
30101                    if test -f "$dir/$libname.la"; then
30102                      found_la="$dir/$libname.la"
30103                    fi
30104                  fi
30105                  ;;
30106              esac
30107              if test "X$found_dir" != "X"; then
30108                break
30109              fi
30110            done
30111          fi
30112          if test "X$found_dir" != "X"; then
30113                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
30114            if test "X$found_so" != "X"; then
30115                                                        if test "$enable_rpath" = no \
30116                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
30117                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
30118                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
30119              else
30120                                                                                haveit=
30121                for x in $ltrpathdirs; do
30122                  if test "X$x" = "X$found_dir"; then
30123                    haveit=yes
30124                    break
30125                  fi
30126                done
30127                if test -z "$haveit"; then
30128                  ltrpathdirs="$ltrpathdirs $found_dir"
30129                fi
30130                                if test "$acl_hardcode_direct" = yes; then
30131                                                      LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
30132                else
30133                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
30134                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
30135                                                            haveit=
30136                    for x in $rpathdirs; do
30137                      if test "X$x" = "X$found_dir"; then
30138                        haveit=yes
30139                        break
30140                      fi
30141                    done
30142                    if test -z "$haveit"; then
30143                      rpathdirs="$rpathdirs $found_dir"
30144                    fi
30145                  else
30146                                                                                haveit=
30147                    for x in $LDFLAGS $LIBINTL; do
30148
30149  acl_save_prefix="$prefix"
30150  prefix="$acl_final_prefix"
30151  acl_save_exec_prefix="$exec_prefix"
30152  exec_prefix="$acl_final_exec_prefix"
30153  eval x=\"$x\"
30154  exec_prefix="$acl_save_exec_prefix"
30155  prefix="$acl_save_prefix"
30156
30157                      if test "X$x" = "X-L$found_dir"; then
30158                        haveit=yes
30159                        break
30160                      fi
30161                    done
30162                    if test -z "$haveit"; then
30163                      LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
30164                    fi
30165                    if test "$acl_hardcode_minus_L" != no; then
30166                                                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
30167                    else
30168                                                                                                                                                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
30169                    fi
30170                  fi
30171                fi
30172              fi
30173            else
30174              if test "X$found_a" != "X"; then
30175                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
30176              else
30177                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
30178              fi
30179            fi
30180                        additional_includedir=
30181            case "$found_dir" in
30182              */$acl_libdirstem | */$acl_libdirstem/)
30183                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
30184                if test "$name" = 'intl'; then
30185                  LIBINTL_PREFIX="$basedir"
30186                fi
30187                additional_includedir="$basedir/include"
30188                ;;
30189              */$acl_libdirstem2 | */$acl_libdirstem2/)
30190                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
30191                if test "$name" = 'intl'; then
30192                  LIBINTL_PREFIX="$basedir"
30193                fi
30194                additional_includedir="$basedir/include"
30195                ;;
30196            esac
30197            if test "X$additional_includedir" != "X"; then
30198                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
30199                haveit=
30200                if test "X$additional_includedir" = "X/usr/local/include"; then
30201                  if test -n "$GCC"; then
30202                    case $host_os in
30203                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
30204                    esac
30205                  fi
30206                fi
30207                if test -z "$haveit"; then
30208                  for x in $CPPFLAGS $INCINTL; do
30209
30210  acl_save_prefix="$prefix"
30211  prefix="$acl_final_prefix"
30212  acl_save_exec_prefix="$exec_prefix"
30213  exec_prefix="$acl_final_exec_prefix"
30214  eval x=\"$x\"
30215  exec_prefix="$acl_save_exec_prefix"
30216  prefix="$acl_save_prefix"
30217
30218                    if test "X$x" = "X-I$additional_includedir"; then
30219                      haveit=yes
30220                      break
30221                    fi
30222                  done
30223                  if test -z "$haveit"; then
30224                    if test -d "$additional_includedir"; then
30225                                            INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
30226                    fi
30227                  fi
30228                fi
30229              fi
30230            fi
30231                        if test -n "$found_la"; then
30232                                                        save_libdir="$libdir"
30233              case "$found_la" in
30234                */* | *\\*) . "$found_la" ;;
30235                *) . "./$found_la" ;;
30236              esac
30237              libdir="$save_libdir"
30238                            for dep in $dependency_libs; do
30239                case "$dep" in
30240                  -L*)
30241                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
30242                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
30243                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
30244                      haveit=
30245                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
30246                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
30247                        if test -n "$GCC"; then
30248                          case $host_os in
30249                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
30250                          esac
30251                        fi
30252                      fi
30253                      if test -z "$haveit"; then
30254                        haveit=
30255                        for x in $LDFLAGS $LIBINTL; do
30256
30257  acl_save_prefix="$prefix"
30258  prefix="$acl_final_prefix"
30259  acl_save_exec_prefix="$exec_prefix"
30260  exec_prefix="$acl_final_exec_prefix"
30261  eval x=\"$x\"
30262  exec_prefix="$acl_save_exec_prefix"
30263  prefix="$acl_save_prefix"
30264
30265                          if test "X$x" = "X-L$additional_libdir"; then
30266                            haveit=yes
30267                            break
30268                          fi
30269                        done
30270                        if test -z "$haveit"; then
30271                          if test -d "$additional_libdir"; then
30272                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
30273                          fi
30274                        fi
30275                        haveit=
30276                        for x in $LDFLAGS $LTLIBINTL; do
30277
30278  acl_save_prefix="$prefix"
30279  prefix="$acl_final_prefix"
30280  acl_save_exec_prefix="$exec_prefix"
30281  exec_prefix="$acl_final_exec_prefix"
30282  eval x=\"$x\"
30283  exec_prefix="$acl_save_exec_prefix"
30284  prefix="$acl_save_prefix"
30285
30286                          if test "X$x" = "X-L$additional_libdir"; then
30287                            haveit=yes
30288                            break
30289                          fi
30290                        done
30291                        if test -z "$haveit"; then
30292                          if test -d "$additional_libdir"; then
30293                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
30294                          fi
30295                        fi
30296                      fi
30297                    fi
30298                    ;;
30299                  -R*)
30300                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
30301                    if test "$enable_rpath" != no; then
30302                                                                  haveit=
30303                      for x in $rpathdirs; do
30304                        if test "X$x" = "X$dir"; then
30305                          haveit=yes
30306                          break
30307                        fi
30308                      done
30309                      if test -z "$haveit"; then
30310                        rpathdirs="$rpathdirs $dir"
30311                      fi
30312                                                                  haveit=
30313                      for x in $ltrpathdirs; do
30314                        if test "X$x" = "X$dir"; then
30315                          haveit=yes
30316                          break
30317                        fi
30318                      done
30319                      if test -z "$haveit"; then
30320                        ltrpathdirs="$ltrpathdirs $dir"
30321                      fi
30322                    fi
30323                    ;;
30324                  -l*)
30325                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
30326                    ;;
30327                  *.la)
30328                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
30329                    ;;
30330                  *)
30331                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
30332                    LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
30333                    ;;
30334                esac
30335              done
30336            fi
30337          else
30338                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
30339            LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
30340          fi
30341        fi
30342      fi
30343    done
30344  done
30345  if test "X$rpathdirs" != "X"; then
30346    if test -n "$acl_hardcode_libdir_separator"; then
30347                        alldirs=
30348      for found_dir in $rpathdirs; do
30349        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
30350      done
30351            acl_save_libdir="$libdir"
30352      libdir="$alldirs"
30353      eval flag=\"$acl_hardcode_libdir_flag_spec\"
30354      libdir="$acl_save_libdir"
30355      LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
30356    else
30357            for found_dir in $rpathdirs; do
30358        acl_save_libdir="$libdir"
30359        libdir="$found_dir"
30360        eval flag=\"$acl_hardcode_libdir_flag_spec\"
30361        libdir="$acl_save_libdir"
30362        LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
30363      done
30364    fi
30365  fi
30366  if test "X$ltrpathdirs" != "X"; then
30367            for found_dir in $ltrpathdirs; do
30368      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
30369    done
30370  fi
30371
30372
30373
30374
30375
30376
30377          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
30378$as_echo_n "checking for GNU gettext in libintl... " >&6; }
30379if eval \${$gt_func_gnugettext_libintl+:} false; then :
30380  $as_echo_n "(cached) " >&6
30381else
30382  gt_save_CPPFLAGS="$CPPFLAGS"
30383            CPPFLAGS="$CPPFLAGS $INCINTL"
30384            gt_save_LIBS="$LIBS"
30385            LIBS="$LIBS $LIBINTL"
30386                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30387/* end confdefs.h.  */
30388
30389#include <libintl.h>
30390#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
30391extern int _nl_msg_cat_cntr;
30392extern
30393#ifdef __cplusplus
30394"C"
30395#endif
30396const char *_nl_expand_alias (const char *);
30397#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
30398#else
30399#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
30400#endif
30401$gt_revision_test_code
30402
30403int
30404main ()
30405{
30406
30407bindtextdomain ("", "");
30408return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
30409
30410  ;
30411  return 0;
30412}
30413_ACEOF
30414if ac_fn_c_try_link "$LINENO"; then :
30415  eval "$gt_func_gnugettext_libintl=yes"
30416else
30417  eval "$gt_func_gnugettext_libintl=no"
30418fi
30419rm -f core conftest.err conftest.$ac_objext \
30420    conftest$ac_exeext conftest.$ac_ext
30421                        if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
30422              LIBS="$LIBS $LIBICONV"
30423              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30424/* end confdefs.h.  */
30425
30426#include <libintl.h>
30427#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
30428extern int _nl_msg_cat_cntr;
30429extern
30430#ifdef __cplusplus
30431"C"
30432#endif
30433const char *_nl_expand_alias (const char *);
30434#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
30435#else
30436#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
30437#endif
30438$gt_revision_test_code
30439
30440int
30441main ()
30442{
30443
30444bindtextdomain ("", "");
30445return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
30446
30447  ;
30448  return 0;
30449}
30450_ACEOF
30451if ac_fn_c_try_link "$LINENO"; then :
30452  LIBINTL="$LIBINTL $LIBICONV"
30453                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
30454                 eval "$gt_func_gnugettext_libintl=yes"
30455
30456fi
30457rm -f core conftest.err conftest.$ac_objext \
30458    conftest$ac_exeext conftest.$ac_ext
30459            fi
30460            CPPFLAGS="$gt_save_CPPFLAGS"
30461            LIBS="$gt_save_LIBS"
30462fi
30463eval ac_res=\$$gt_func_gnugettext_libintl
30464	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30465$as_echo "$ac_res" >&6; }
30466        fi
30467
30468                                        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
30469           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
30470                && test "$PACKAGE" != gettext-runtime \
30471                && test "$PACKAGE" != gettext-tools; }; then
30472          gt_use_preinstalled_gnugettext=yes
30473        else
30474                    LIBINTL=
30475          LTLIBINTL=
30476          INCINTL=
30477        fi
30478
30479
30480
30481    if test -n "$INTL_MACOSX_LIBS"; then
30482      if test "$gt_use_preinstalled_gnugettext" = "yes" \
30483         || test "$nls_cv_use_gnu_gettext" = "yes"; then
30484                LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
30485        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
30486      fi
30487    fi
30488
30489    if test "$gt_use_preinstalled_gnugettext" = "yes" \
30490       || test "$nls_cv_use_gnu_gettext" = "yes"; then
30491
30492$as_echo "#define ENABLE_NLS 1" >>confdefs.h
30493
30494    else
30495      USE_NLS=no
30496    fi
30497  fi
30498
30499  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
30500$as_echo_n "checking whether to use NLS... " >&6; }
30501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
30502$as_echo "$USE_NLS" >&6; }
30503  if test "$USE_NLS" = "yes"; then
30504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
30505$as_echo_n "checking where the gettext function comes from... " >&6; }
30506    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
30507      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
30508        gt_source="external libintl"
30509      else
30510        gt_source="libc"
30511      fi
30512    else
30513      gt_source="included intl directory"
30514    fi
30515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
30516$as_echo "$gt_source" >&6; }
30517  fi
30518
30519  if test "$USE_NLS" = "yes"; then
30520
30521    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
30522      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
30523        { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
30524$as_echo_n "checking how to link with libintl... " >&6; }
30525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
30526$as_echo "$LIBINTL" >&6; }
30527
30528  for element in $INCINTL; do
30529    haveit=
30530    for x in $CPPFLAGS; do
30531
30532  acl_save_prefix="$prefix"
30533  prefix="$acl_final_prefix"
30534  acl_save_exec_prefix="$exec_prefix"
30535  exec_prefix="$acl_final_exec_prefix"
30536  eval x=\"$x\"
30537  exec_prefix="$acl_save_exec_prefix"
30538  prefix="$acl_save_prefix"
30539
30540      if test "X$x" = "X$element"; then
30541        haveit=yes
30542        break
30543      fi
30544    done
30545    if test -z "$haveit"; then
30546      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
30547    fi
30548  done
30549
30550      fi
30551
30552
30553$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
30554
30555
30556$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
30557
30558    fi
30559
30560        POSUB=po
30561  fi
30562
30563
30564
30565    INTLLIBS="$LIBINTL"
30566
30567
30568
30569
30570
30571
30572
30573
30574LIBS="$LIBS $LIB_CLOCK_GETTIME"
30575
30576# Initialize the test suite.
30577ac_config_commands="$ac_config_commands tests/atconfig"
30578
30579ac_config_files="$ac_config_files tests/Makefile tests/atlocal"
30580 # FIXME: tests/preset?
30581
30582AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"}
30583
30584
30585ac_config_files="$ac_config_files Makefile doc/Makefile gnu/Makefile lib/Makefile rmt/Makefile src/Makefile po/Makefile.in"
30586
30587cat >confcache <<\_ACEOF
30588# This file is a shell script that caches the results of configure
30589# tests run on this system so they can be shared between configure
30590# scripts and configure runs, see configure's option --config-cache.
30591# It is not useful on other systems.  If it contains results you don't
30592# want to keep, you may remove or edit it.
30593#
30594# config.status only pays attention to the cache file if you give it
30595# the --recheck option to rerun configure.
30596#
30597# `ac_cv_env_foo' variables (set or unset) will be overridden when
30598# loading this file, other *unset* `ac_cv_foo' will be assigned the
30599# following values.
30600
30601_ACEOF
30602
30603# The following way of writing the cache mishandles newlines in values,
30604# but we know of no workaround that is simple, portable, and efficient.
30605# So, we kill variables containing newlines.
30606# Ultrix sh set writes to stderr and can't be redirected directly,
30607# and sets the high bit in the cache file unless we assign to the vars.
30608(
30609  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
30610    eval ac_val=\$$ac_var
30611    case $ac_val in #(
30612    *${as_nl}*)
30613      case $ac_var in #(
30614      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
30615$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
30616      esac
30617      case $ac_var in #(
30618      _ | IFS | as_nl) ;; #(
30619      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
30620      *) { eval $ac_var=; unset $ac_var;} ;;
30621      esac ;;
30622    esac
30623  done
30624
30625  (set) 2>&1 |
30626    case $as_nl`(ac_space=' '; set) 2>&1` in #(
30627    *${as_nl}ac_space=\ *)
30628      # `set' does not quote correctly, so add quotes: double-quote
30629      # substitution turns \\\\ into \\, and sed turns \\ into \.
30630      sed -n \
30631	"s/'/'\\\\''/g;
30632	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
30633      ;; #(
30634    *)
30635      # `set' quotes correctly as required by POSIX, so do not add quotes.
30636      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
30637      ;;
30638    esac |
30639    sort
30640) |
30641  sed '
30642     /^ac_cv_env_/b end
30643     t clear
30644     :clear
30645     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
30646     t end
30647     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
30648     :end' >>confcache
30649if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
30650  if test -w "$cache_file"; then
30651    if test "x$cache_file" != "x/dev/null"; then
30652      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
30653$as_echo "$as_me: updating cache $cache_file" >&6;}
30654      if test ! -f "$cache_file" || test -h "$cache_file"; then
30655	cat confcache >"$cache_file"
30656      else
30657        case $cache_file in #(
30658        */* | ?:*)
30659	  mv -f confcache "$cache_file"$$ &&
30660	  mv -f "$cache_file"$$ "$cache_file" ;; #(
30661        *)
30662	  mv -f confcache "$cache_file" ;;
30663	esac
30664      fi
30665    fi
30666  else
30667    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
30668$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
30669  fi
30670fi
30671rm -f confcache
30672
30673test "x$prefix" = xNONE && prefix=$ac_default_prefix
30674# Let make expand exec_prefix.
30675test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
30676
30677DEFS=-DHAVE_CONFIG_H
30678
30679ac_libobjs=
30680ac_ltlibobjs=
30681U=
30682for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
30683  # 1. Remove the extension, and $U if already installed.
30684  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
30685  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
30686  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
30687  #    will be set to the directory where LIBOBJS objects are built.
30688  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
30689  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
30690done
30691LIBOBJS=$ac_libobjs
30692
30693LTLIBOBJS=$ac_ltlibobjs
30694
30695
30696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
30697$as_echo_n "checking that generated files are newer than configure... " >&6; }
30698   if test -n "$am_sleep_pid"; then
30699     # Hide warnings about reused PIDs.
30700     wait $am_sleep_pid 2>/dev/null
30701   fi
30702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
30703$as_echo "done" >&6; }
30704 if test -n "$EXEEXT"; then
30705  am__EXEEXT_TRUE=
30706  am__EXEEXT_FALSE='#'
30707else
30708  am__EXEEXT_TRUE='#'
30709  am__EXEEXT_FALSE=
30710fi
30711
30712if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
30713  as_fn_error $? "conditional \"AMDEP\" was never defined.
30714Usually this means the macro was only invoked conditionally." "$LINENO" 5
30715fi
30716if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
30717  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
30718Usually this means the macro was only invoked conditionally." "$LINENO" 5
30719fi
30720if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
30721  as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
30722Usually this means the macro was only invoked conditionally." "$LINENO" 5
30723fi
30724if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
30725  as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
30726Usually this means the macro was only invoked conditionally." "$LINENO" 5
30727fi
30728if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
30729  as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
30730Usually this means the macro was only invoked conditionally." "$LINENO" 5
30731fi
30732if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
30733  as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
30734Usually this means the macro was only invoked conditionally." "$LINENO" 5
30735fi
30736if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
30737  as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
30738Usually this means the macro was only invoked conditionally." "$LINENO" 5
30739fi
30740if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
30741  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
30742Usually this means the macro was only invoked conditionally." "$LINENO" 5
30743fi
30744if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
30745  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
30746Usually this means the macro was only invoked conditionally." "$LINENO" 5
30747fi
30748if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
30749  as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
30750Usually this means the macro was only invoked conditionally." "$LINENO" 5
30751fi
30752if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
30753  as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
30754Usually this means the macro was only invoked conditionally." "$LINENO" 5
30755fi
30756if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
30757  as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
30758Usually this means the macro was only invoked conditionally." "$LINENO" 5
30759fi
30760if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
30761  as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
30762Usually this means the macro was only invoked conditionally." "$LINENO" 5
30763fi
30764if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
30765  as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
30766Usually this means the macro was only invoked conditionally." "$LINENO" 5
30767fi
30768if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
30769  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
30770Usually this means the macro was only invoked conditionally." "$LINENO" 5
30771fi
30772if test -z "${GL_GENERATE_SYSEXITS_H_TRUE}" && test -z "${GL_GENERATE_SYSEXITS_H_FALSE}"; then
30773  as_fn_error $? "conditional \"GL_GENERATE_SYSEXITS_H\" was never defined.
30774Usually this means the macro was only invoked conditionally." "$LINENO" 5
30775fi
30776
30777
30778    gl_libobjs=
30779    gl_ltlibobjs=
30780    if test -n "$gl_LIBOBJS"; then
30781      # Remove the extension.
30782      sed_drop_objext='s/\.o$//;s/\.obj$//'
30783      for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
30784        gl_libobjs="$gl_libobjs $i.$ac_objext"
30785        gl_ltlibobjs="$gl_ltlibobjs $i.lo"
30786      done
30787    fi
30788    gl_LIBOBJS=$gl_libobjs
30789
30790    gl_LTLIBOBJS=$gl_ltlibobjs
30791
30792
30793
30794    gltests_libobjs=
30795    gltests_ltlibobjs=
30796    if test -n "$gltests_LIBOBJS"; then
30797      # Remove the extension.
30798      sed_drop_objext='s/\.o$//;s/\.obj$//'
30799      for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
30800        gltests_libobjs="$gltests_libobjs $i.$ac_objext"
30801        gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
30802      done
30803    fi
30804    gltests_LIBOBJS=$gltests_libobjs
30805
30806    gltests_LTLIBOBJS=$gltests_ltlibobjs
30807
30808
30809if test -z "${PU_RMT_COND_TRUE}" && test -z "${PU_RMT_COND_FALSE}"; then
30810  as_fn_error $? "conditional \"PU_RMT_COND\" was never defined.
30811Usually this means the macro was only invoked conditionally." "$LINENO" 5
30812fi
30813if test -z "${CPIO_MT_COND_TRUE}" && test -z "${CPIO_MT_COND_FALSE}"; then
30814  as_fn_error $? "conditional \"CPIO_MT_COND\" was never defined.
30815Usually this means the macro was only invoked conditionally." "$LINENO" 5
30816fi
30817
30818: "${CONFIG_STATUS=./config.status}"
30819ac_write_fail=0
30820ac_clean_files_save=$ac_clean_files
30821ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30822{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
30823$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
30824as_write_fail=0
30825cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
30826#! $SHELL
30827# Generated by $as_me.
30828# Run this file to recreate the current configuration.
30829# Compiler output produced by configure, useful for debugging
30830# configure, is in config.log if it exists.
30831
30832debug=false
30833ac_cs_recheck=false
30834ac_cs_silent=false
30835
30836SHELL=\${CONFIG_SHELL-$SHELL}
30837export SHELL
30838_ASEOF
30839cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
30840## -------------------- ##
30841## M4sh Initialization. ##
30842## -------------------- ##
30843
30844# Be more Bourne compatible
30845DUALCASE=1; export DUALCASE # for MKS sh
30846if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
30847  emulate sh
30848  NULLCMD=:
30849  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
30850  # is contrary to our usage.  Disable this feature.
30851  alias -g '${1+"$@"}'='"$@"'
30852  setopt NO_GLOB_SUBST
30853else
30854  case `(set -o) 2>/dev/null` in #(
30855  *posix*) :
30856    set -o posix ;; #(
30857  *) :
30858     ;;
30859esac
30860fi
30861
30862
30863as_nl='
30864'
30865export as_nl
30866# Printing a long string crashes Solaris 7 /usr/bin/printf.
30867as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
30868as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
30869as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
30870# Prefer a ksh shell builtin over an external printf program on Solaris,
30871# but without wasting forks for bash or zsh.
30872if test -z "$BASH_VERSION$ZSH_VERSION" \
30873    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
30874  as_echo='print -r --'
30875  as_echo_n='print -rn --'
30876elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
30877  as_echo='printf %s\n'
30878  as_echo_n='printf %s'
30879else
30880  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
30881    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
30882    as_echo_n='/usr/ucb/echo -n'
30883  else
30884    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
30885    as_echo_n_body='eval
30886      arg=$1;
30887      case $arg in #(
30888      *"$as_nl"*)
30889	expr "X$arg" : "X\\(.*\\)$as_nl";
30890	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
30891      esac;
30892      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
30893    '
30894    export as_echo_n_body
30895    as_echo_n='sh -c $as_echo_n_body as_echo'
30896  fi
30897  export as_echo_body
30898  as_echo='sh -c $as_echo_body as_echo'
30899fi
30900
30901# The user is always right.
30902if test "${PATH_SEPARATOR+set}" != set; then
30903  PATH_SEPARATOR=:
30904  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
30905    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
30906      PATH_SEPARATOR=';'
30907  }
30908fi
30909
30910
30911# IFS
30912# We need space, tab and new line, in precisely that order.  Quoting is
30913# there to prevent editors from complaining about space-tab.
30914# (If _AS_PATH_WALK were called with IFS unset, it would disable word
30915# splitting by setting IFS to empty value.)
30916IFS=" ""	$as_nl"
30917
30918# Find who we are.  Look in the path if we contain no directory separator.
30919as_myself=
30920case $0 in #((
30921  *[\\/]* ) as_myself=$0 ;;
30922  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30923for as_dir in $PATH
30924do
30925  IFS=$as_save_IFS
30926  test -z "$as_dir" && as_dir=.
30927    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
30928  done
30929IFS=$as_save_IFS
30930
30931     ;;
30932esac
30933# We did not find ourselves, most probably we were run as `sh COMMAND'
30934# in which case we are not to be found in the path.
30935if test "x$as_myself" = x; then
30936  as_myself=$0
30937fi
30938if test ! -f "$as_myself"; then
30939  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
30940  exit 1
30941fi
30942
30943# Unset variables that we do not need and which cause bugs (e.g. in
30944# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
30945# suppresses any "Segmentation fault" message there.  '((' could
30946# trigger a bug in pdksh 5.2.14.
30947for as_var in BASH_ENV ENV MAIL MAILPATH
30948do eval test x\${$as_var+set} = xset \
30949  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
30950done
30951PS1='$ '
30952PS2='> '
30953PS4='+ '
30954
30955# NLS nuisances.
30956LC_ALL=C
30957export LC_ALL
30958LANGUAGE=C
30959export LANGUAGE
30960
30961# CDPATH.
30962(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
30963
30964
30965# as_fn_error STATUS ERROR [LINENO LOG_FD]
30966# ----------------------------------------
30967# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
30968# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
30969# script with STATUS, using 1 if that was 0.
30970as_fn_error ()
30971{
30972  as_status=$1; test $as_status -eq 0 && as_status=1
30973  if test "$4"; then
30974    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
30975    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
30976  fi
30977  $as_echo "$as_me: error: $2" >&2
30978  as_fn_exit $as_status
30979} # as_fn_error
30980
30981
30982# as_fn_set_status STATUS
30983# -----------------------
30984# Set $? to STATUS, without forking.
30985as_fn_set_status ()
30986{
30987  return $1
30988} # as_fn_set_status
30989
30990# as_fn_exit STATUS
30991# -----------------
30992# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
30993as_fn_exit ()
30994{
30995  set +e
30996  as_fn_set_status $1
30997  exit $1
30998} # as_fn_exit
30999
31000# as_fn_unset VAR
31001# ---------------
31002# Portably unset VAR.
31003as_fn_unset ()
31004{
31005  { eval $1=; unset $1;}
31006}
31007as_unset=as_fn_unset
31008# as_fn_append VAR VALUE
31009# ----------------------
31010# Append the text in VALUE to the end of the definition contained in VAR. Take
31011# advantage of any shell optimizations that allow amortized linear growth over
31012# repeated appends, instead of the typical quadratic growth present in naive
31013# implementations.
31014if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
31015  eval 'as_fn_append ()
31016  {
31017    eval $1+=\$2
31018  }'
31019else
31020  as_fn_append ()
31021  {
31022    eval $1=\$$1\$2
31023  }
31024fi # as_fn_append
31025
31026# as_fn_arith ARG...
31027# ------------------
31028# Perform arithmetic evaluation on the ARGs, and store the result in the
31029# global $as_val. Take advantage of shells that can avoid forks. The arguments
31030# must be portable across $(()) and expr.
31031if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
31032  eval 'as_fn_arith ()
31033  {
31034    as_val=$(( $* ))
31035  }'
31036else
31037  as_fn_arith ()
31038  {
31039    as_val=`expr "$@" || test $? -eq 1`
31040  }
31041fi # as_fn_arith
31042
31043
31044if expr a : '\(a\)' >/dev/null 2>&1 &&
31045   test "X`expr 00001 : '.*\(...\)'`" = X001; then
31046  as_expr=expr
31047else
31048  as_expr=false
31049fi
31050
31051if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
31052  as_basename=basename
31053else
31054  as_basename=false
31055fi
31056
31057if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31058  as_dirname=dirname
31059else
31060  as_dirname=false
31061fi
31062
31063as_me=`$as_basename -- "$0" ||
31064$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31065	 X"$0" : 'X\(//\)$' \| \
31066	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31067$as_echo X/"$0" |
31068    sed '/^.*\/\([^/][^/]*\)\/*$/{
31069	    s//\1/
31070	    q
31071	  }
31072	  /^X\/\(\/\/\)$/{
31073	    s//\1/
31074	    q
31075	  }
31076	  /^X\/\(\/\).*/{
31077	    s//\1/
31078	    q
31079	  }
31080	  s/.*/./; q'`
31081
31082# Avoid depending upon Character Ranges.
31083as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31084as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
31085as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31086as_cr_digits='0123456789'
31087as_cr_alnum=$as_cr_Letters$as_cr_digits
31088
31089ECHO_C= ECHO_N= ECHO_T=
31090case `echo -n x` in #(((((
31091-n*)
31092  case `echo 'xy\c'` in
31093  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
31094  xy)  ECHO_C='\c';;
31095  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
31096       ECHO_T='	';;
31097  esac;;
31098*)
31099  ECHO_N='-n';;
31100esac
31101
31102rm -f conf$$ conf$$.exe conf$$.file
31103if test -d conf$$.dir; then
31104  rm -f conf$$.dir/conf$$.file
31105else
31106  rm -f conf$$.dir
31107  mkdir conf$$.dir 2>/dev/null
31108fi
31109if (echo >conf$$.file) 2>/dev/null; then
31110  if ln -s conf$$.file conf$$ 2>/dev/null; then
31111    as_ln_s='ln -s'
31112    # ... but there are two gotchas:
31113    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31114    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31115    # In both cases, we have to default to `cp -pR'.
31116    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
31117      as_ln_s='cp -pR'
31118  elif ln conf$$.file conf$$ 2>/dev/null; then
31119    as_ln_s=ln
31120  else
31121    as_ln_s='cp -pR'
31122  fi
31123else
31124  as_ln_s='cp -pR'
31125fi
31126rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
31127rmdir conf$$.dir 2>/dev/null
31128
31129
31130# as_fn_mkdir_p
31131# -------------
31132# Create "$as_dir" as a directory, including parents if necessary.
31133as_fn_mkdir_p ()
31134{
31135
31136  case $as_dir in #(
31137  -*) as_dir=./$as_dir;;
31138  esac
31139  test -d "$as_dir" || eval $as_mkdir_p || {
31140    as_dirs=
31141    while :; do
31142      case $as_dir in #(
31143      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31144      *) as_qdir=$as_dir;;
31145      esac
31146      as_dirs="'$as_qdir' $as_dirs"
31147      as_dir=`$as_dirname -- "$as_dir" ||
31148$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31149	 X"$as_dir" : 'X\(//\)[^/]' \| \
31150	 X"$as_dir" : 'X\(//\)$' \| \
31151	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31152$as_echo X"$as_dir" |
31153    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31154	    s//\1/
31155	    q
31156	  }
31157	  /^X\(\/\/\)[^/].*/{
31158	    s//\1/
31159	    q
31160	  }
31161	  /^X\(\/\/\)$/{
31162	    s//\1/
31163	    q
31164	  }
31165	  /^X\(\/\).*/{
31166	    s//\1/
31167	    q
31168	  }
31169	  s/.*/./; q'`
31170      test -d "$as_dir" && break
31171    done
31172    test -z "$as_dirs" || eval "mkdir $as_dirs"
31173  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
31174
31175
31176} # as_fn_mkdir_p
31177if mkdir -p . 2>/dev/null; then
31178  as_mkdir_p='mkdir -p "$as_dir"'
31179else
31180  test -d ./-p && rmdir ./-p
31181  as_mkdir_p=false
31182fi
31183
31184
31185# as_fn_executable_p FILE
31186# -----------------------
31187# Test if FILE is an executable regular file.
31188as_fn_executable_p ()
31189{
31190  test -f "$1" && test -x "$1"
31191} # as_fn_executable_p
31192as_test_x='test -x'
31193as_executable_p=as_fn_executable_p
31194
31195# Sed expression to map a string onto a valid CPP name.
31196as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
31197
31198# Sed expression to map a string onto a valid variable name.
31199as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
31200
31201
31202exec 6>&1
31203## ----------------------------------- ##
31204## Main body of $CONFIG_STATUS script. ##
31205## ----------------------------------- ##
31206_ASEOF
31207test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
31208
31209cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31210# Save the log message, to keep $0 and so on meaningful, and to
31211# report actual input values of CONFIG_FILES etc. instead of their
31212# values after options handling.
31213ac_log="
31214This file was extended by GNU cpio $as_me 2.13, which was
31215generated by GNU Autoconf 2.69.  Invocation command line was
31216
31217  CONFIG_FILES    = $CONFIG_FILES
31218  CONFIG_HEADERS  = $CONFIG_HEADERS
31219  CONFIG_LINKS    = $CONFIG_LINKS
31220  CONFIG_COMMANDS = $CONFIG_COMMANDS
31221  $ $0 $@
31222
31223on `(hostname || uname -n) 2>/dev/null | sed 1q`
31224"
31225
31226_ACEOF
31227
31228case $ac_config_files in *"
31229"*) set x $ac_config_files; shift; ac_config_files=$*;;
31230esac
31231
31232case $ac_config_headers in *"
31233"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
31234esac
31235
31236
31237cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31238# Files that config.status was made for.
31239config_files="$ac_config_files"
31240config_headers="$ac_config_headers"
31241config_commands="$ac_config_commands"
31242
31243_ACEOF
31244
31245cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31246ac_cs_usage="\
31247\`$as_me' instantiates files and other configuration actions
31248from templates according to the current configuration.  Unless the files
31249and actions are specified as TAGs, all are instantiated by default.
31250
31251Usage: $0 [OPTION]... [TAG]...
31252
31253  -h, --help       print this help, then exit
31254  -V, --version    print version number and configuration settings, then exit
31255      --config     print configuration, then exit
31256  -q, --quiet, --silent
31257                   do not print progress messages
31258  -d, --debug      don't remove temporary files
31259      --recheck    update $as_me by reconfiguring in the same conditions
31260      --file=FILE[:TEMPLATE]
31261                   instantiate the configuration file FILE
31262      --header=FILE[:TEMPLATE]
31263                   instantiate the configuration header FILE
31264
31265Configuration files:
31266$config_files
31267
31268Configuration headers:
31269$config_headers
31270
31271Configuration commands:
31272$config_commands
31273
31274Report bugs to <bug-cpio@gnu.org>.
31275GNU cpio home page: <http://www.gnu.org/software/cpio>.
31276General help using GNU software: <http://www.gnu.org/gethelp/>."
31277
31278_ACEOF
31279cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31280ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31281ac_cs_version="\\
31282GNU cpio config.status 2.13
31283configured by $0, generated by GNU Autoconf 2.69,
31284  with options \\"\$ac_cs_config\\"
31285
31286Copyright (C) 2012 Free Software Foundation, Inc.
31287This config.status script is free software; the Free Software Foundation
31288gives unlimited permission to copy, distribute and modify it."
31289
31290ac_pwd='$ac_pwd'
31291srcdir='$srcdir'
31292INSTALL='$INSTALL'
31293MKDIR_P='$MKDIR_P'
31294AWK='$AWK'
31295test -n "\$AWK" || AWK=awk
31296_ACEOF
31297
31298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31299# The default lists apply if the user does not specify any file.
31300ac_need_defaults=:
31301while test $# != 0
31302do
31303  case $1 in
31304  --*=?*)
31305    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31306    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31307    ac_shift=:
31308    ;;
31309  --*=)
31310    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31311    ac_optarg=
31312    ac_shift=:
31313    ;;
31314  *)
31315    ac_option=$1
31316    ac_optarg=$2
31317    ac_shift=shift
31318    ;;
31319  esac
31320
31321  case $ac_option in
31322  # Handling of the options.
31323  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31324    ac_cs_recheck=: ;;
31325  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31326    $as_echo "$ac_cs_version"; exit ;;
31327  --config | --confi | --conf | --con | --co | --c )
31328    $as_echo "$ac_cs_config"; exit ;;
31329  --debug | --debu | --deb | --de | --d | -d )
31330    debug=: ;;
31331  --file | --fil | --fi | --f )
31332    $ac_shift
31333    case $ac_optarg in
31334    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31335    '') as_fn_error $? "missing file argument" ;;
31336    esac
31337    as_fn_append CONFIG_FILES " '$ac_optarg'"
31338    ac_need_defaults=false;;
31339  --header | --heade | --head | --hea )
31340    $ac_shift
31341    case $ac_optarg in
31342    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31343    esac
31344    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31345    ac_need_defaults=false;;
31346  --he | --h)
31347    # Conflict between --help and --header
31348    as_fn_error $? "ambiguous option: \`$1'
31349Try \`$0 --help' for more information.";;
31350  --help | --hel | -h )
31351    $as_echo "$ac_cs_usage"; exit ;;
31352  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31353  | -silent | --silent | --silen | --sile | --sil | --si | --s)
31354    ac_cs_silent=: ;;
31355
31356  # This is an error.
31357  -*) as_fn_error $? "unrecognized option: \`$1'
31358Try \`$0 --help' for more information." ;;
31359
31360  *) as_fn_append ac_config_targets " $1"
31361     ac_need_defaults=false ;;
31362
31363  esac
31364  shift
31365done
31366
31367ac_configure_extra_args=
31368
31369if $ac_cs_silent; then
31370  exec 6>/dev/null
31371  ac_configure_extra_args="$ac_configure_extra_args --silent"
31372fi
31373
31374_ACEOF
31375cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31376if \$ac_cs_recheck; then
31377  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31378  shift
31379  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31380  CONFIG_SHELL='$SHELL'
31381  export CONFIG_SHELL
31382  exec "\$@"
31383fi
31384
31385_ACEOF
31386cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31387exec 5>>config.log
31388{
31389  echo
31390  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31391## Running $as_me. ##
31392_ASBOX
31393  $as_echo "$ac_log"
31394} >&5
31395
31396_ACEOF
31397cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31398#
31399# INIT-COMMANDS
31400#
31401AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
31402# Capture the value of obsolete ALL_LINGUAS because we need it to compute
31403    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
31404    # from automake < 1.5.
31405    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
31406    # Capture the value of LINGUAS because we need it to compute CATALOGS.
31407    LINGUAS="${LINGUAS-%UNSET%}"
31408
31409
31410
31411_ACEOF
31412
31413cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31414
31415# Handling of arguments.
31416for ac_config_target in $ac_config_targets
31417do
31418  case $ac_config_target in
31419    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
31420    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
31421    "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
31422    "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
31423    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
31424    "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;;
31425    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
31426    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
31427    "gnu/Makefile") CONFIG_FILES="$CONFIG_FILES gnu/Makefile" ;;
31428    "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
31429    "rmt/Makefile") CONFIG_FILES="$CONFIG_FILES rmt/Makefile" ;;
31430    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
31431    "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
31432
31433  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
31434  esac
31435done
31436
31437
31438# If the user did not use the arguments to specify the items to instantiate,
31439# then the envvar interface is used.  Set only those that are not.
31440# We use the long form for the default assignment because of an extremely
31441# bizarre bug on SunOS 4.1.3.
31442if $ac_need_defaults; then
31443  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
31444  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
31445  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
31446fi
31447
31448# Have a temporary directory for convenience.  Make it in the build tree
31449# simply because there is no reason against having it here, and in addition,
31450# creating and moving files from /tmp can sometimes cause problems.
31451# Hook for its removal unless debugging.
31452# Note that there is a small window in which the directory will not be cleaned:
31453# after its creation but before its name has been assigned to `$tmp'.
31454$debug ||
31455{
31456  tmp= ac_tmp=
31457  trap 'exit_status=$?
31458  : "${ac_tmp:=$tmp}"
31459  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
31460' 0
31461  trap 'as_fn_exit 1' 1 2 13 15
31462}
31463# Create a (secure) tmp directory for tmp files.
31464
31465{
31466  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31467  test -d "$tmp"
31468}  ||
31469{
31470  tmp=./conf$$-$RANDOM
31471  (umask 077 && mkdir "$tmp")
31472} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31473ac_tmp=$tmp
31474
31475# Set up the scripts for CONFIG_FILES section.
31476# No need to generate them if there are no CONFIG_FILES.
31477# This happens for instance with `./config.status config.h'.
31478if test -n "$CONFIG_FILES"; then
31479
31480
31481ac_cr=`echo X | tr X '\015'`
31482# On cygwin, bash can eat \r inside `` if the user requested igncr.
31483# But we know of no other shell where ac_cr would be empty at this
31484# point, so we can use a bashism as a fallback.
31485if test "x$ac_cr" = x; then
31486  eval ac_cr=\$\'\\r\'
31487fi
31488ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31489if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31490  ac_cs_awk_cr='\\r'
31491else
31492  ac_cs_awk_cr=$ac_cr
31493fi
31494
31495echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
31496_ACEOF
31497
31498
31499{
31500  echo "cat >conf$$subs.awk <<_ACEOF" &&
31501  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31502  echo "_ACEOF"
31503} >conf$$subs.sh ||
31504  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31505ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31506ac_delim='%!_!# '
31507for ac_last_try in false false false false false :; do
31508  . ./conf$$subs.sh ||
31509    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31510
31511  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31512  if test $ac_delim_n = $ac_delim_num; then
31513    break
31514  elif $ac_last_try; then
31515    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31516  else
31517    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31518  fi
31519done
31520rm -f conf$$subs.sh
31521
31522cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31523cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
31524_ACEOF
31525sed -n '
31526h
31527s/^/S["/; s/!.*/"]=/
31528p
31529g
31530s/^[^!]*!//
31531:repl
31532t repl
31533s/'"$ac_delim"'$//
31534t delim
31535:nl
31536h
31537s/\(.\{148\}\)..*/\1/
31538t more1
31539s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31540p
31541n
31542b repl
31543:more1
31544s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31545p
31546g
31547s/.\{148\}//
31548t nl
31549:delim
31550h
31551s/\(.\{148\}\)..*/\1/
31552t more2
31553s/["\\]/\\&/g; s/^/"/; s/$/"/
31554p
31555b
31556:more2
31557s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31558p
31559g
31560s/.\{148\}//
31561t delim
31562' <conf$$subs.awk | sed '
31563/^[^""]/{
31564  N
31565  s/\n//
31566}
31567' >>$CONFIG_STATUS || ac_write_fail=1
31568rm -f conf$$subs.awk
31569cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31570_ACAWK
31571cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
31572  for (key in S) S_is_set[key] = 1
31573  FS = ""
31574
31575}
31576{
31577  line = $ 0
31578  nfields = split(line, field, "@")
31579  substed = 0
31580  len = length(field[1])
31581  for (i = 2; i < nfields; i++) {
31582    key = field[i]
31583    keylen = length(key)
31584    if (S_is_set[key]) {
31585      value = S[key]
31586      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31587      len += length(value) + length(field[++i])
31588      substed = 1
31589    } else
31590      len += 1 + keylen
31591  }
31592
31593  print line
31594}
31595
31596_ACAWK
31597_ACEOF
31598cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31599if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31600  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31601else
31602  cat
31603fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
31604  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31605_ACEOF
31606
31607# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
31608# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
31609# trailing colons and then remove the whole line if VPATH becomes empty
31610# (actually we leave an empty line to preserve line numbers).
31611if test "x$srcdir" = x.; then
31612  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
31613h
31614s///
31615s/^/:/
31616s/[	 ]*$/:/
31617s/:\$(srcdir):/:/g
31618s/:\${srcdir}:/:/g
31619s/:@srcdir@:/:/g
31620s/^:*//
31621s/:*$//
31622x
31623s/\(=[	 ]*\).*/\1/
31624G
31625s/\n//
31626s/^[^=]*=[	 ]*$//
31627}'
31628fi
31629
31630cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31631fi # test -n "$CONFIG_FILES"
31632
31633# Set up the scripts for CONFIG_HEADERS section.
31634# No need to generate them if there are no CONFIG_HEADERS.
31635# This happens for instance with `./config.status Makefile'.
31636if test -n "$CONFIG_HEADERS"; then
31637cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
31638BEGIN {
31639_ACEOF
31640
31641# Transform confdefs.h into an awk script `defines.awk', embedded as
31642# here-document in config.status, that substitutes the proper values into
31643# config.h.in to produce config.h.
31644
31645# Create a delimiter string that does not exist in confdefs.h, to ease
31646# handling of long lines.
31647ac_delim='%!_!# '
31648for ac_last_try in false false :; do
31649  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
31650  if test -z "$ac_tt"; then
31651    break
31652  elif $ac_last_try; then
31653    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
31654  else
31655    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31656  fi
31657done
31658
31659# For the awk script, D is an array of macro values keyed by name,
31660# likewise P contains macro parameters if any.  Preserve backslash
31661# newline sequences.
31662
31663ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31664sed -n '
31665s/.\{148\}/&'"$ac_delim"'/g
31666t rset
31667:rset
31668s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
31669t def
31670d
31671:def
31672s/\\$//
31673t bsnl
31674s/["\\]/\\&/g
31675s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
31676D["\1"]=" \3"/p
31677s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
31678d
31679:bsnl
31680s/["\\]/\\&/g
31681s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
31682D["\1"]=" \3\\\\\\n"\\/p
31683t cont
31684s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
31685t cont
31686d
31687:cont
31688n
31689s/.\{148\}/&'"$ac_delim"'/g
31690t clear
31691:clear
31692s/\\$//
31693t bsnlc
31694s/["\\]/\\&/g; s/^/"/; s/$/"/p
31695d
31696:bsnlc
31697s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
31698b cont
31699' <confdefs.h | sed '
31700s/'"$ac_delim"'/"\\\
31701"/g' >>$CONFIG_STATUS || ac_write_fail=1
31702
31703cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31704  for (key in D) D_is_set[key] = 1
31705  FS = ""
31706}
31707/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
31708  line = \$ 0
31709  split(line, arg, " ")
31710  if (arg[1] == "#") {
31711    defundef = arg[2]
31712    mac1 = arg[3]
31713  } else {
31714    defundef = substr(arg[1], 2)
31715    mac1 = arg[2]
31716  }
31717  split(mac1, mac2, "(") #)
31718  macro = mac2[1]
31719  prefix = substr(line, 1, index(line, defundef) - 1)
31720  if (D_is_set[macro]) {
31721    # Preserve the white space surrounding the "#".
31722    print prefix "define", macro P[macro] D[macro]
31723    next
31724  } else {
31725    # Replace #undef with comments.  This is necessary, for example,
31726    # in the case of _POSIX_SOURCE, which is predefined and required
31727    # on some systems where configure will not decide to define it.
31728    if (defundef == "undef") {
31729      print "/*", prefix defundef, macro, "*/"
31730      next
31731    }
31732  }
31733}
31734{ print }
31735_ACAWK
31736_ACEOF
31737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31738  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
31739fi # test -n "$CONFIG_HEADERS"
31740
31741
31742eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
31743shift
31744for ac_tag
31745do
31746  case $ac_tag in
31747  :[FHLC]) ac_mode=$ac_tag; continue;;
31748  esac
31749  case $ac_mode$ac_tag in
31750  :[FHL]*:*);;
31751  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
31752  :[FH]-) ac_tag=-:-;;
31753  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
31754  esac
31755  ac_save_IFS=$IFS
31756  IFS=:
31757  set x $ac_tag
31758  IFS=$ac_save_IFS
31759  shift
31760  ac_file=$1
31761  shift
31762
31763  case $ac_mode in
31764  :L) ac_source=$1;;
31765  :[FH])
31766    ac_file_inputs=
31767    for ac_f
31768    do
31769      case $ac_f in
31770      -) ac_f="$ac_tmp/stdin";;
31771      *) # Look for the file first in the build tree, then in the source tree
31772	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
31773	 # because $ac_f cannot contain `:'.
31774	 test -f "$ac_f" ||
31775	   case $ac_f in
31776	   [\\/$]*) false;;
31777	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
31778	   esac ||
31779	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
31780      esac
31781      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
31782      as_fn_append ac_file_inputs " '$ac_f'"
31783    done
31784
31785    # Let's still pretend it is `configure' which instantiates (i.e., don't
31786    # use $as_me), people would be surprised to read:
31787    #    /* config.h.  Generated by config.status.  */
31788    configure_input='Generated from '`
31789	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
31790	`' by configure.'
31791    if test x"$ac_file" != x-; then
31792      configure_input="$ac_file.  $configure_input"
31793      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
31794$as_echo "$as_me: creating $ac_file" >&6;}
31795    fi
31796    # Neutralize special characters interpreted by sed in replacement strings.
31797    case $configure_input in #(
31798    *\&* | *\|* | *\\* )
31799       ac_sed_conf_input=`$as_echo "$configure_input" |
31800       sed 's/[\\\\&|]/\\\\&/g'`;; #(
31801    *) ac_sed_conf_input=$configure_input;;
31802    esac
31803
31804    case $ac_tag in
31805    *:-:* | *:-) cat >"$ac_tmp/stdin" \
31806      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
31807    esac
31808    ;;
31809  esac
31810
31811  ac_dir=`$as_dirname -- "$ac_file" ||
31812$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31813	 X"$ac_file" : 'X\(//\)[^/]' \| \
31814	 X"$ac_file" : 'X\(//\)$' \| \
31815	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
31816$as_echo X"$ac_file" |
31817    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31818	    s//\1/
31819	    q
31820	  }
31821	  /^X\(\/\/\)[^/].*/{
31822	    s//\1/
31823	    q
31824	  }
31825	  /^X\(\/\/\)$/{
31826	    s//\1/
31827	    q
31828	  }
31829	  /^X\(\/\).*/{
31830	    s//\1/
31831	    q
31832	  }
31833	  s/.*/./; q'`
31834  as_dir="$ac_dir"; as_fn_mkdir_p
31835  ac_builddir=.
31836
31837case "$ac_dir" in
31838.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
31839*)
31840  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
31841  # A ".." for each directory in $ac_dir_suffix.
31842  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
31843  case $ac_top_builddir_sub in
31844  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
31845  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
31846  esac ;;
31847esac
31848ac_abs_top_builddir=$ac_pwd
31849ac_abs_builddir=$ac_pwd$ac_dir_suffix
31850# for backward compatibility:
31851ac_top_builddir=$ac_top_build_prefix
31852
31853case $srcdir in
31854  .)  # We are building in place.
31855    ac_srcdir=.
31856    ac_top_srcdir=$ac_top_builddir_sub
31857    ac_abs_top_srcdir=$ac_pwd ;;
31858  [\\/]* | ?:[\\/]* )  # Absolute name.
31859    ac_srcdir=$srcdir$ac_dir_suffix;
31860    ac_top_srcdir=$srcdir
31861    ac_abs_top_srcdir=$srcdir ;;
31862  *) # Relative name.
31863    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
31864    ac_top_srcdir=$ac_top_build_prefix$srcdir
31865    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
31866esac
31867ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
31868
31869
31870  case $ac_mode in
31871  :F)
31872  #
31873  # CONFIG_FILE
31874  #
31875
31876  case $INSTALL in
31877  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
31878  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
31879  esac
31880  ac_MKDIR_P=$MKDIR_P
31881  case $MKDIR_P in
31882  [\\/$]* | ?:[\\/]* ) ;;
31883  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
31884  esac
31885_ACEOF
31886
31887cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31888# If the template does not know about datarootdir, expand it.
31889# FIXME: This hack should be removed a few years after 2.60.
31890ac_datarootdir_hack=; ac_datarootdir_seen=
31891ac_sed_dataroot='
31892/datarootdir/ {
31893  p
31894  q
31895}
31896/@datadir@/p
31897/@docdir@/p
31898/@infodir@/p
31899/@localedir@/p
31900/@mandir@/p'
31901case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
31902*datarootdir*) ac_datarootdir_seen=yes;;
31903*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
31904  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
31905$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
31906_ACEOF
31907cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31908  ac_datarootdir_hack='
31909  s&@datadir@&$datadir&g
31910  s&@docdir@&$docdir&g
31911  s&@infodir@&$infodir&g
31912  s&@localedir@&$localedir&g
31913  s&@mandir@&$mandir&g
31914  s&\\\${datarootdir}&$datarootdir&g' ;;
31915esac
31916_ACEOF
31917
31918# Neutralize VPATH when `$srcdir' = `.'.
31919# Shell code in configure.ac might set extrasub.
31920# FIXME: do we really want to maintain this feature?
31921cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31922ac_sed_extra="$ac_vpsub
31923$extrasub
31924_ACEOF
31925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31926:t
31927/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
31928s|@configure_input@|$ac_sed_conf_input|;t t
31929s&@top_builddir@&$ac_top_builddir_sub&;t t
31930s&@top_build_prefix@&$ac_top_build_prefix&;t t
31931s&@srcdir@&$ac_srcdir&;t t
31932s&@abs_srcdir@&$ac_abs_srcdir&;t t
31933s&@top_srcdir@&$ac_top_srcdir&;t t
31934s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
31935s&@builddir@&$ac_builddir&;t t
31936s&@abs_builddir@&$ac_abs_builddir&;t t
31937s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
31938s&@INSTALL@&$ac_INSTALL&;t t
31939s&@MKDIR_P@&$ac_MKDIR_P&;t t
31940$ac_datarootdir_hack
31941"
31942eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
31943  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31944
31945test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
31946  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
31947  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
31948      "$ac_tmp/out"`; test -z "$ac_out"; } &&
31949  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31950which seems to be undefined.  Please make sure it is defined" >&5
31951$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31952which seems to be undefined.  Please make sure it is defined" >&2;}
31953
31954  rm -f "$ac_tmp/stdin"
31955  case $ac_file in
31956  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
31957  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
31958  esac \
31959  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31960 ;;
31961  :H)
31962  #
31963  # CONFIG_HEADER
31964  #
31965  if test x"$ac_file" != x-; then
31966    {
31967      $as_echo "/* $configure_input  */" \
31968      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
31969    } >"$ac_tmp/config.h" \
31970      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31971    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
31972      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
31973$as_echo "$as_me: $ac_file is unchanged" >&6;}
31974    else
31975      rm -f "$ac_file"
31976      mv "$ac_tmp/config.h" "$ac_file" \
31977	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
31978    fi
31979  else
31980    $as_echo "/* $configure_input  */" \
31981      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
31982      || as_fn_error $? "could not create -" "$LINENO" 5
31983  fi
31984# Compute "$ac_file"'s index in $config_headers.
31985_am_arg="$ac_file"
31986_am_stamp_count=1
31987for _am_header in $config_headers :; do
31988  case $_am_header in
31989    $_am_arg | $_am_arg:* )
31990      break ;;
31991    * )
31992      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
31993  esac
31994done
31995echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
31996$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31997	 X"$_am_arg" : 'X\(//\)[^/]' \| \
31998	 X"$_am_arg" : 'X\(//\)$' \| \
31999	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
32000$as_echo X"$_am_arg" |
32001    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32002	    s//\1/
32003	    q
32004	  }
32005	  /^X\(\/\/\)[^/].*/{
32006	    s//\1/
32007	    q
32008	  }
32009	  /^X\(\/\/\)$/{
32010	    s//\1/
32011	    q
32012	  }
32013	  /^X\(\/\).*/{
32014	    s//\1/
32015	    q
32016	  }
32017	  s/.*/./; q'`/stamp-h$_am_stamp_count
32018 ;;
32019
32020  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
32021$as_echo "$as_me: executing $ac_file commands" >&6;}
32022 ;;
32023  esac
32024
32025
32026  case $ac_file$ac_mode in
32027    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
32028  # Older Autoconf quotes --file arguments for eval, but not when files
32029  # are listed without --file.  Let's play safe and only enable the eval
32030  # if we detect the quoting.
32031  case $CONFIG_FILES in
32032  *\'*) eval set x "$CONFIG_FILES" ;;
32033  *)   set x $CONFIG_FILES ;;
32034  esac
32035  shift
32036  for mf
32037  do
32038    # Strip MF so we end up with the name of the file.
32039    mf=`echo "$mf" | sed -e 's/:.*$//'`
32040    # Check whether this is an Automake generated Makefile or not.
32041    # We used to match only the files named 'Makefile.in', but
32042    # some people rename them; so instead we look at the file content.
32043    # Grep'ing the first line is not enough: some people post-process
32044    # each Makefile.in and add a new line on top of each file to say so.
32045    # Grep'ing the whole file is not good either: AIX grep has a line
32046    # limit of 2048, but all sed's we know have understand at least 4000.
32047    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
32048      dirpart=`$as_dirname -- "$mf" ||
32049$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32050	 X"$mf" : 'X\(//\)[^/]' \| \
32051	 X"$mf" : 'X\(//\)$' \| \
32052	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
32053$as_echo X"$mf" |
32054    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32055	    s//\1/
32056	    q
32057	  }
32058	  /^X\(\/\/\)[^/].*/{
32059	    s//\1/
32060	    q
32061	  }
32062	  /^X\(\/\/\)$/{
32063	    s//\1/
32064	    q
32065	  }
32066	  /^X\(\/\).*/{
32067	    s//\1/
32068	    q
32069	  }
32070	  s/.*/./; q'`
32071    else
32072      continue
32073    fi
32074    # Extract the definition of DEPDIR, am__include, and am__quote
32075    # from the Makefile without running 'make'.
32076    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
32077    test -z "$DEPDIR" && continue
32078    am__include=`sed -n 's/^am__include = //p' < "$mf"`
32079    test -z "$am__include" && continue
32080    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
32081    # Find all dependency output files, they are included files with
32082    # $(DEPDIR) in their names.  We invoke sed twice because it is the
32083    # simplest approach to changing $(DEPDIR) to its actual value in the
32084    # expansion.
32085    for file in `sed -n "
32086      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
32087	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
32088      # Make sure the directory exists.
32089      test -f "$dirpart/$file" && continue
32090      fdir=`$as_dirname -- "$file" ||
32091$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32092	 X"$file" : 'X\(//\)[^/]' \| \
32093	 X"$file" : 'X\(//\)$' \| \
32094	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
32095$as_echo X"$file" |
32096    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32097	    s//\1/
32098	    q
32099	  }
32100	  /^X\(\/\/\)[^/].*/{
32101	    s//\1/
32102	    q
32103	  }
32104	  /^X\(\/\/\)$/{
32105	    s//\1/
32106	    q
32107	  }
32108	  /^X\(\/\).*/{
32109	    s//\1/
32110	    q
32111	  }
32112	  s/.*/./; q'`
32113      as_dir=$dirpart/$fdir; as_fn_mkdir_p
32114      # echo "creating $dirpart/$file"
32115      echo '# dummy' > "$dirpart/$file"
32116    done
32117  done
32118}
32119 ;;
32120    "po-directories":C)
32121    for ac_file in $CONFIG_FILES; do
32122      # Support "outfile[:infile[:infile...]]"
32123      case "$ac_file" in
32124        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
32125      esac
32126      # PO directories have a Makefile.in generated from Makefile.in.in.
32127      case "$ac_file" in */Makefile.in)
32128        # Adjust a relative srcdir.
32129        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
32130        ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
32131        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
32132        # In autoconf-2.13 it is called $ac_given_srcdir.
32133        # In autoconf-2.50 it is called $srcdir.
32134        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
32135        case "$ac_given_srcdir" in
32136          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
32137          /*) top_srcdir="$ac_given_srcdir" ;;
32138          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
32139        esac
32140        # Treat a directory as a PO directory if and only if it has a
32141        # POTFILES.in file. This allows packages to have multiple PO
32142        # directories under different names or in different locations.
32143        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
32144          rm -f "$ac_dir/POTFILES"
32145          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
32146          gt_tab=`printf '\t'`
32147          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"
32148          POMAKEFILEDEPS="POTFILES.in"
32149          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
32150          # on $ac_dir but don't depend on user-specified configuration
32151          # parameters.
32152          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
32153            # The LINGUAS file contains the set of available languages.
32154            if test -n "$OBSOLETE_ALL_LINGUAS"; then
32155              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
32156            fi
32157            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
32158            # Hide the ALL_LINGUAS assignment from automake < 1.5.
32159            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
32160            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
32161          else
32162            # The set of available languages was given in configure.in.
32163            # Hide the ALL_LINGUAS assignment from automake < 1.5.
32164            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
32165          fi
32166          # Compute POFILES
32167          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
32168          # Compute UPDATEPOFILES
32169          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
32170          # Compute DUMMYPOFILES
32171          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
32172          # Compute GMOFILES
32173          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
32174          case "$ac_given_srcdir" in
32175            .) srcdirpre= ;;
32176            *) srcdirpre='$(srcdir)/' ;;
32177          esac
32178          POFILES=
32179          UPDATEPOFILES=
32180          DUMMYPOFILES=
32181          GMOFILES=
32182          for lang in $ALL_LINGUAS; do
32183            POFILES="$POFILES $srcdirpre$lang.po"
32184            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
32185            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
32186            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
32187          done
32188          # CATALOGS depends on both $ac_dir and the user's LINGUAS
32189          # environment variable.
32190          INST_LINGUAS=
32191          if test -n "$ALL_LINGUAS"; then
32192            for presentlang in $ALL_LINGUAS; do
32193              useit=no
32194              if test "%UNSET%" != "$LINGUAS"; then
32195                desiredlanguages="$LINGUAS"
32196              else
32197                desiredlanguages="$ALL_LINGUAS"
32198              fi
32199              for desiredlang in $desiredlanguages; do
32200                # Use the presentlang catalog if desiredlang is
32201                #   a. equal to presentlang, or
32202                #   b. a variant of presentlang (because in this case,
32203                #      presentlang can be used as a fallback for messages
32204                #      which are not translated in the desiredlang catalog).
32205                case "$desiredlang" in
32206                  "$presentlang"*) useit=yes;;
32207                esac
32208              done
32209              if test $useit = yes; then
32210                INST_LINGUAS="$INST_LINGUAS $presentlang"
32211              fi
32212            done
32213          fi
32214          CATALOGS=
32215          if test -n "$INST_LINGUAS"; then
32216            for lang in $INST_LINGUAS; do
32217              CATALOGS="$CATALOGS $lang.gmo"
32218            done
32219          fi
32220          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
32221          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"
32222          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
32223            if test -f "$f"; then
32224              case "$f" in
32225                *.orig | *.bak | *~) ;;
32226                *) cat "$f" >> "$ac_dir/Makefile" ;;
32227              esac
32228            fi
32229          done
32230        fi
32231        ;;
32232      esac
32233    done ;;
32234    "tests/atconfig":C) cat >tests/atconfig <<ATEOF
32235# Configurable variable values for building test suites.
32236# Generated by $0.
32237# Copyright (C) 2012 Free Software Foundation, Inc.
32238
32239# The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
32240at_testdir='tests'
32241abs_builddir='$ac_abs_builddir'
32242at_srcdir='$ac_srcdir'
32243abs_srcdir='$ac_abs_srcdir'
32244at_top_srcdir='$ac_top_srcdir'
32245abs_top_srcdir='$ac_abs_top_srcdir'
32246at_top_build_prefix='$ac_top_build_prefix'
32247abs_top_builddir='$ac_abs_top_builddir'
32248
32249# Backward compatibility with Autotest <= 2.59b:
32250at_top_builddir=\$at_top_build_prefix
32251
32252AUTOTEST_PATH='tests'
32253
32254SHELL=\${CONFIG_SHELL-'$SHELL'}
32255ATEOF
32256 ;;
32257
32258  esac
32259done # for ac_tag
32260
32261
32262as_fn_exit 0
32263_ACEOF
32264ac_clean_files=$ac_clean_files_save
32265
32266test $ac_write_fail = 0 ||
32267  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
32268
32269
32270# configure is writing to config.log, and then calls config.status.
32271# config.status does its own redirection, appending to config.log.
32272# Unfortunately, on DOS this fails, as config.log is still kept open
32273# by configure, so config.status won't be able to write to it; its
32274# output is simply discarded.  So we exec the FD to /dev/null,
32275# effectively closing config.log, so it can be properly (re)opened and
32276# appended to by config.status.  When coming back to configure, we
32277# need to make the FD available again.
32278if test "$no_create" != yes; then
32279  ac_cs_success=:
32280  ac_config_status_args=
32281  test "$silent" = yes &&
32282    ac_config_status_args="$ac_config_status_args --quiet"
32283  exec 5>/dev/null
32284  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
32285  exec 5>>config.log
32286  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
32287  # would make configure fail if this is the last instruction.
32288  $ac_cs_success || as_fn_exit 1
32289fi
32290if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
32291  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
32292$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
32293fi
32294
32295