1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.65.23-13e35 for GNU coreutils 8.4.
4#
5# Report bugs to <bug-coreutils@gnu.org>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: bug-coreutils@gnu.org about your system, including any
235$0: error possibly output before this message. Then install
236$0: a modern shell, or manually run the script under such a
237$0: shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error ERROR [LINENO LOG_FD]
363# ---------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with status $?, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$?; test $as_status -eq 0 && as_status=1
370  if test "$3"; then
371    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
373  fi
374  $as_echo "$as_me: error: $1" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='GNU coreutils'
554PACKAGE_TARNAME='coreutils'
555PACKAGE_VERSION='8.4'
556PACKAGE_STRING='GNU coreutils 8.4'
557PACKAGE_BUGREPORT='bug-coreutils@gnu.org'
558PACKAGE_URL='http://www.gnu.org/software/coreutils/'
559
560ac_unique_file="src/ls.c"
561# Factoring default headers for most tests.
562ac_includes_default="\
563#include <stdio.h>
564#ifdef HAVE_SYS_TYPES_H
565# include <sys/types.h>
566#endif
567#ifdef HAVE_SYS_STAT_H
568# include <sys/stat.h>
569#endif
570#ifdef STDC_HEADERS
571# include <stdlib.h>
572# include <stddef.h>
573#else
574# ifdef HAVE_STDLIB_H
575#  include <stdlib.h>
576# endif
577#endif
578#ifdef HAVE_STRING_H
579# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
580#  include <memory.h>
581# endif
582# include <string.h>
583#endif
584#ifdef HAVE_STRINGS_H
585# include <strings.h>
586#endif
587#ifdef HAVE_INTTYPES_H
588# include <inttypes.h>
589#endif
590#ifdef HAVE_STDINT_H
591# include <stdint.h>
592#endif
593#ifdef HAVE_UNISTD_H
594# include <unistd.h>
595#endif"
596
597gl_use_threads_default=
598ac_header_list=
599ac_func_list=
600gl_fnmatch_required=POSIX
601gl_getopt_required=POSIX
602gl_getopt_required=POSIX
603gt_needs=
604ac_subst_vars='gltests_LTLIBOBJS
605gltests_LIBOBJS
606gl_LTLIBOBJS
607gl_LIBOBJS
608am__EXEEXT_FALSE
609am__EXEEXT_TRUE
610LTLIBOBJS
611POSUB
612INTLLIBS
613INTL_MACOSX_LIBS
614XGETTEXT_EXTRA_OPTIONS
615MSGMERGE
616XGETTEXT_015
617XGETTEXT
618GMSGFMT_015
619MSGFMT_015
620GMSGFMT
621MSGFMT
622GETTEXT_MACRO_VERSION
623USE_NLS
624CONFIG_STATUS_DEPENDENCIES
625CROSS_COMPILING_FALSE
626CROSS_COMPILING_TRUE
627NO_INSTALL_PROGS_DEFAULT
628OPTIONAL_PKGLIB_PROGS
629OPTIONAL_BIN_PROGS
630INSTALL_SU
631LIB_GMP
632LIB_CRYPT
633GNULIB_WARN_CFLAGS
634WERROR_CFLAGS
635SEQ_LIBM
636LIB_CAP
637LIB_FDATASYNC
638LIB_XATTR
639LIBOBJS
640ANSI2KNR
641U
642MAN
643HELP2MAN
644LIBTESTS_LIBDEPS
645LIBCOREUTILS_LTLIBDEPS
646LIBCOREUTILS_LIBDEPS
647YIELD_LIB
648abs_aux_dir
649NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
650NEXT_SYS_IOCTL_H
651HAVE_SYS_IOCTL_H
652INET_PTON_LIB
653LOCALE_TR_UTF8
654REPLACE_ISWCNTRL
655WCTYPE_H
656HAVE_WCTYPE_H
657NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
658NEXT_WCTYPE_H
659HAVE_ISWCNTRL
660HAVE_WINT_T
661HAVE_WCHAR_H
662NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
663NEXT_WCHAR_H
664WARN_CFLAGS
665HAVE_UNISTD_H
666NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
667NEXT_UNISTD_H
668SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
669TIME_H_DEFINES_STRUCT_TIMESPEC
670NEXT_AS_FIRST_DIRECTIVE_TIME_H
671NEXT_TIME_H
672HAVE_SYS_UTSNAME_H
673NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H
674NEXT_SYS_UTSNAME_H
675HAVE_STRUCT_UTSNAME
676HAVE_UNAME
677GNULIB_UNAME
678NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
679NEXT_SYS_STAT_H
680POW_LIB
681NEXT_AS_FIRST_DIRECTIVE_STRING_H
682NEXT_STRING_H
683HAVE_RANDOM_H
684NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
685NEXT_STDLIB_H
686NEXT_AS_FIRST_DIRECTIVE_STDIO_H
687NEXT_STDIO_H
688NEXT_AS_FIRST_DIRECTIVE_STDARG_H
689NEXT_STDARG_H
690STDARG_H
691NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
692NEXT_SIGNAL_H
693HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
694HAVE_STRUCT_SIGACTION_SA_SIGACTION
695HAVE_SIGACTION
696HAVE_SIGINFO_T
697HAVE_SIGSET_T
698HAVE_POSIX_SIGNALBLOCKING
699GNULIB_SIGACTION
700GNULIB_SIGPROCMASK
701GNULIB_SIGNAL_H_SIGPIPE
702SELINUX_CONTEXT_H
703NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H
704NEXT_SELINUX_SELINUX_H
705LIB_SELINUX
706DEFAULT_POSIX2_VERSION
707PREFERABLY_POSIX_SHELL
708POSIX_SHELL
709PERL
710NETINET_IN_H
711HAVE_NETINET_IN_H
712NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
713NEXT_NETINET_IN_H
714LIB_NANOSLEEP
715LIBSOCKET
716HAVE_SYS_SELECT_H
717NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
718NEXT_SYS_SELECT_H
719REPLACE_SELECT
720GNULIB_SELECT
721REPLACE_TIMEGM
722REPLACE_STRPTIME
723REPLACE_NANOSLEEP
724REPLACE_MKTIME
725REPLACE_LOCALTIME_R
726UNDEFINE_STRTOK_R
727REPLACE_STRTOK_R
728REPLACE_STRSIGNAL
729REPLACE_STRNDUP
730REPLACE_STRERROR
731REPLACE_STRCASESTR
732REPLACE_STRSTR
733REPLACE_STRDUP
734REPLACE_MEMMEM
735REPLACE_MEMCHR
736HAVE_STRVERSCMP
737HAVE_DECL_STRSIGNAL
738HAVE_DECL_STRERROR
739HAVE_DECL_STRTOK_R
740HAVE_STRCASESTR
741HAVE_STRSEP
742HAVE_STRPBRK
743HAVE_DECL_STRNLEN
744HAVE_DECL_STRNDUP
745HAVE_DECL_STRDUP
746HAVE_STRCHRNUL
747HAVE_STPNCPY
748HAVE_STPCPY
749HAVE_RAWMEMCHR
750HAVE_DECL_MEMRCHR
751HAVE_MEMPCPY
752HAVE_DECL_MEMMEM
753HAVE_MBSLEN
754GNULIB_STRVERSCMP
755GNULIB_STRSIGNAL
756GNULIB_STRERROR
757GNULIB_MBSTOK_R
758GNULIB_MBSSEP
759GNULIB_MBSSPN
760GNULIB_MBSPBRK
761GNULIB_MBSCSPN
762GNULIB_MBSCASESTR
763GNULIB_MBSPCASECMP
764GNULIB_MBSNCASECMP
765GNULIB_MBSCASECMP
766GNULIB_MBSSTR
767GNULIB_MBSRCHR
768GNULIB_MBSCHR
769GNULIB_MBSNLEN
770GNULIB_MBSLEN
771GNULIB_STRTOK_R
772GNULIB_STRCASESTR
773GNULIB_STRSTR
774GNULIB_STRSEP
775GNULIB_STRPBRK
776GNULIB_STRNLEN
777GNULIB_STRNDUP
778GNULIB_STRDUP
779GNULIB_STRCHRNUL
780GNULIB_STPNCPY
781GNULIB_STPCPY
782GNULIB_RAWMEMCHR
783GNULIB_MEMRCHR
784GNULIB_MEMPCPY
785GNULIB_MEMMEM
786GNULIB_MEMCHR
787LOCALE_FR_UTF8
788LOCALE_ZH_CN
789LOCALE_JA
790NEXT_AS_FIRST_DIRECTIVE_MATH_H
791NEXT_MATH_H
792LTLIBMULTITHREAD
793LIBMULTITHREAD
794LTLIBTHREAD
795LIBTHREAD
796LIBPTH_PREFIX
797LTLIBPTH
798LIBPTH
799NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
800NEXT_LOCALE_H
801HAVE_XLOCALE_H
802NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
803NEXT_STDDEF_H
804STDDEF_H
805HAVE_WCHAR_T
806REPLACE_NULL
807REPLACE_DUPLOCALE
808GNULIB_DUPLOCALE
809LOCALCHARSET_TESTS_ENVIRONMENT
810GLIBC21
811HAVE_LANGINFO_ERA
812HAVE_LANGINFO_CODESET
813HAVE_LANGINFO_H
814NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
815NEXT_LANGINFO_H
816REPLACE_NL_LANGINFO
817HAVE_NL_LANGINFO
818GNULIB_NL_LANGINFO
819UINT64_MAX_EQ_ULONG_MAX
820UINT32_MAX_LT_UINTMAX_MAX
821INT64_MAX_EQ_LONG_MAX
822INT32_MAX_LT_INTMAX_MAX
823PRIPTR_PREFIX
824NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
825NEXT_INTTYPES_H
826HAVE_DECL_STRTOUMAX
827HAVE_DECL_STRTOIMAX
828HAVE_DECL_IMAXDIV
829HAVE_DECL_IMAXABS
830GNULIB_STRTOUMAX
831GNULIB_STRTOIMAX
832GNULIB_IMAXDIV
833GNULIB_IMAXABS
834PRI_MACROS_BROKEN
835STDINT_H
836WINT_T_SUFFIX
837WCHAR_T_SUFFIX
838SIG_ATOMIC_T_SUFFIX
839SIZE_T_SUFFIX
840PTRDIFF_T_SUFFIX
841HAVE_SIGNED_WINT_T
842HAVE_SIGNED_WCHAR_T
843HAVE_SIGNED_SIG_ATOMIC_T
844BITSIZEOF_WINT_T
845BITSIZEOF_WCHAR_T
846BITSIZEOF_SIG_ATOMIC_T
847BITSIZEOF_SIZE_T
848BITSIZEOF_PTRDIFF_T
849APPLE_UNIVERSAL_BUILD
850HAVE_SYS_BITYPES_H
851HAVE_SYS_INTTYPES_H
852HAVE_STDINT_H
853NEXT_AS_FIRST_DIRECTIVE_STDINT_H
854NEXT_STDINT_H
855HAVE_SYS_TYPES_H
856HAVE_INTTYPES_H
857HAVE_UNSIGNED_LONG_LONG_INT
858HAVE_LONG_LONG_INT
859NEXT_AS_FIRST_DIRECTIVE_ICONV_H
860NEXT_ICONV_H
861ICONV_H
862REPLACE_ICONV_UTF
863REPLACE_ICONV_OPEN
864REPLACE_ICONV
865LTLIBICONV
866LIBICONV
867GNU_MAKE_FALSE
868GNU_MAKE_TRUE
869SYS_TIME_H
870REPLACE_GETTIMEOFDAY
871HAVE_STRUCT_TIMEVAL
872HAVE_SYS_TIME_H
873NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
874NEXT_SYS_TIME_H
875LTLIBINTL
876LIBINTL
877GETOPT_H
878HAVE_GETOPT_H
879NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
880NEXT_GETOPT_H
881GETLOADAVG_LIBS
882KMEM_GROUP
883NEED_SETGID
884LIB_GETHRXTIME
885GETHOSTNAME_LIB
886YFLAGS
887YACC
888HAVE__BOOL
889STDBOOL_H
890GETADDRINFO_LIB
891INET_NTOP_LIB
892SERVENT_LIB
893HOSTENT_LIB
894NETDB_H
895HAVE_NETDB_H
896NEXT_AS_FIRST_DIRECTIVE_NETDB_H
897NEXT_NETDB_H
898HAVE_DECL_GETNAMEINFO
899HAVE_DECL_GETADDRINFO
900HAVE_DECL_GAI_STRERROR
901HAVE_DECL_FREEADDRINFO
902HAVE_STRUCT_ADDRINFO
903GNULIB_GETADDRINFO
904SYS_SOCKET_H
905HAVE_WS2TCPIP_H
906HAVE_SYS_SOCKET_H
907NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
908NEXT_SYS_SOCKET_H
909HAVE_ACCEPT4
910HAVE_SA_FAMILY_T
911HAVE_STRUCT_SOCKADDR_STORAGE
912GNULIB_ACCEPT4
913GNULIB_SHUTDOWN
914GNULIB_SETSOCKOPT
915GNULIB_SENDTO
916GNULIB_RECVFROM
917GNULIB_SEND
918GNULIB_RECV
919GNULIB_LISTEN
920GNULIB_GETSOCKOPT
921GNULIB_GETSOCKNAME
922GNULIB_GETPEERNAME
923GNULIB_BIND
924GNULIB_ACCEPT
925GNULIB_CONNECT
926GNULIB_SOCKET
927REPLACE_TRUNCL
928REPLACE_SIGNBIT_USING_GCC
929REPLACE_SIGNBIT
930REPLACE_ROUNDL
931REPLACE_ROUNDF
932REPLACE_ROUND
933REPLACE_NAN
934REPLACE_LDEXPL
935REPLACE_ISNAN
936REPLACE_ISINF
937REPLACE_ISFINITE
938REPLACE_HUGE_VAL
939REPLACE_FREXPL
940REPLACE_FREXP
941REPLACE_FLOORL
942REPLACE_FLOORF
943REPLACE_CEILL
944REPLACE_CEILF
945HAVE_DECL_TRUNCF
946HAVE_DECL_TRUNC
947HAVE_DECL_TANL
948HAVE_DECL_SQRTL
949HAVE_DECL_SINL
950HAVE_DECL_LOGL
951HAVE_DECL_LDEXPL
952HAVE_DECL_FREXPL
953HAVE_DECL_EXPL
954HAVE_DECL_COSL
955HAVE_DECL_ATANL
956HAVE_DECL_ASINL
957HAVE_DECL_ACOSL
958HAVE_ISNANL
959HAVE_ISNAND
960HAVE_ISNANF
961GNULIB_TRUNCL
962GNULIB_TRUNCF
963GNULIB_TRUNC
964GNULIB_SIGNBIT
965GNULIB_ROUNDL
966GNULIB_ROUNDF
967GNULIB_ROUND
968GNULIB_MATHL
969GNULIB_LDEXPL
970GNULIB_ISNANL
971GNULIB_ISNAND
972GNULIB_ISNANF
973GNULIB_ISNAN
974GNULIB_ISINF
975GNULIB_ISFINITE
976GNULIB_FREXPL
977GNULIB_FREXP
978GNULIB_FLOORL
979GNULIB_FLOORF
980GNULIB_CEILL
981GNULIB_CEILF
982FNMATCH_H
983FLOAT_H
984NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
985NEXT_FLOAT_H
986NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
987NEXT_FCNTL_H
988REPLACE_UTIMENSAT
989REPLACE_STAT
990REPLACE_MKNOD
991REPLACE_MKFIFO
992REPLACE_MKDIR
993REPLACE_LSTAT
994REPLACE_FUTIMENS
995REPLACE_FSTATAT
996REPLACE_FSTAT
997HAVE_UTIMENSAT
998HAVE_MKNODAT
999HAVE_MKNOD
1000HAVE_MKFIFOAT
1001HAVE_MKFIFO
1002HAVE_MKDIRAT
1003HAVE_LSTAT
1004HAVE_LCHMOD
1005HAVE_FUTIMENS
1006HAVE_FSTATAT
1007HAVE_FCHMODAT
1008GNULIB_UTIMENSAT
1009GNULIB_STAT
1010GNULIB_MKNODAT
1011GNULIB_MKNOD
1012GNULIB_MKFIFOAT
1013GNULIB_MKFIFO
1014GNULIB_MKDIRAT
1015GNULIB_LSTAT
1016GNULIB_LCHMOD
1017GNULIB_FUTIMENS
1018GNULIB_FSTATAT
1019GNULIB_FCHMODAT
1020REPLACE_OPENAT
1021REPLACE_OPEN
1022REPLACE_FCNTL
1023HAVE_OPENAT
1024HAVE_FCNTL
1025GNULIB_OPENAT
1026GNULIB_OPEN
1027GNULIB_FCNTL
1028LIB_EACCESS
1029EOVERFLOW_VALUE
1030EOVERFLOW_HIDDEN
1031ENOLINK_VALUE
1032ENOLINK_HIDDEN
1033EMULTIHOP_VALUE
1034EMULTIHOP_HIDDEN
1035ERRNO_H
1036NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1037NEXT_ERRNO_H
1038NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1039NEXT_DIRENT_H
1040REPLACE_OPENDIR
1041REPLACE_FDOPENDIR
1042REPLACE_CLOSEDIR
1043HAVE_ALPHASORT
1044HAVE_SCANDIR
1045HAVE_FDOPENDIR
1046HAVE_DECL_DIRFD
1047GNULIB_ALPHASORT
1048GNULIB_SCANDIR
1049GNULIB_FDOPENDIR
1050GNULIB_DIRFD
1051NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1052NEXT_CTYPE_H
1053HAVE_ISBLANK
1054GNULIB_ISBLANK
1055REPLACE_VSPRINTF
1056REPLACE_VSNPRINTF
1057REPLACE_VPRINTF
1058REPLACE_VFPRINTF
1059REPLACE_VDPRINTF
1060REPLACE_VASPRINTF
1061REPLACE_STDIO_WRITE_FUNCS
1062REPLACE_SPRINTF
1063REPLACE_SNPRINTF
1064REPLACE_RENAMEAT
1065REPLACE_RENAME
1066REPLACE_REMOVE
1067REPLACE_PRINTF
1068REPLACE_POPEN
1069REPLACE_PERROR
1070REPLACE_OBSTACK_PRINTF
1071REPLACE_GETLINE
1072REPLACE_FTELLO
1073REPLACE_FTELL
1074REPLACE_FSEEKO
1075REPLACE_FSEEK
1076REPLACE_FREOPEN
1077REPLACE_FPURGE
1078REPLACE_FPRINTF
1079REPLACE_FOPEN
1080REPLACE_FFLUSH
1081REPLACE_FCLOSE
1082REPLACE_DPRINTF
1083HAVE_VDPRINTF
1084HAVE_VASPRINTF
1085HAVE_RENAMEAT
1086HAVE_DPRINTF
1087HAVE_DECL_VSNPRINTF
1088HAVE_DECL_SNPRINTF
1089HAVE_DECL_OBSTACK_PRINTF
1090HAVE_DECL_GETLINE
1091HAVE_DECL_GETDELIM
1092HAVE_DECL_FPURGE
1093GNULIB_VSPRINTF_POSIX
1094GNULIB_VSNPRINTF
1095GNULIB_VPRINTF_POSIX
1096GNULIB_VPRINTF
1097GNULIB_VFPRINTF_POSIX
1098GNULIB_VFPRINTF
1099GNULIB_VDPRINTF
1100GNULIB_VASPRINTF
1101GNULIB_STDIO_H_SIGPIPE
1102GNULIB_SPRINTF_POSIX
1103GNULIB_SNPRINTF
1104GNULIB_RENAMEAT
1105GNULIB_RENAME
1106GNULIB_REMOVE
1107GNULIB_PUTS
1108GNULIB_PUTCHAR
1109GNULIB_PUTC
1110GNULIB_PRINTF_POSIX
1111GNULIB_PRINTF
1112GNULIB_POPEN
1113GNULIB_PERROR
1114GNULIB_OBSTACK_PRINTF_POSIX
1115GNULIB_OBSTACK_PRINTF
1116GNULIB_GETLINE
1117GNULIB_GETDELIM
1118GNULIB_FWRITE
1119GNULIB_FTELLO
1120GNULIB_FTELL
1121GNULIB_FSEEKO
1122GNULIB_FSEEK
1123GNULIB_FREOPEN
1124GNULIB_FPUTS
1125GNULIB_FPUTC
1126GNULIB_FPURGE
1127GNULIB_FPRINTF_POSIX
1128GNULIB_FPRINTF
1129GNULIB_FOPEN
1130GNULIB_FFLUSH
1131GNULIB_FCLOSE
1132GNULIB_DPRINTF
1133HAVE_WINSOCK2_H
1134SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1135SYS_IOCTL_H_HAVE_WINSOCK2_H
1136GNULIB_IOCTL
1137LIB_CLOCK_GETTIME
1138UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1139UNISTD_H_HAVE_WINSOCK2_H
1140REPLACE_WRITE
1141REPLACE_USLEEP
1142REPLACE_UNLINKAT
1143REPLACE_UNLINK
1144REPLACE_SYMLINK
1145REPLACE_SLEEP
1146REPLACE_RMDIR
1147REPLACE_READLINK
1148REPLACE_PREAD
1149REPLACE_LSEEK
1150REPLACE_LINKAT
1151REPLACE_LINK
1152REPLACE_LCHOWN
1153REPLACE_GETPAGESIZE
1154REPLACE_GETGROUPS
1155REPLACE_GETCWD
1156REPLACE_FCHOWNAT
1157REPLACE_FCHDIR
1158REPLACE_DUP2
1159REPLACE_DUP
1160REPLACE_CLOSE
1161REPLACE_CHOWN
1162HAVE_USLEEP
1163HAVE_UNLINKAT
1164HAVE_SYS_PARAM_H
1165HAVE_OS_H
1166HAVE_DECL_GETLOGIN_R
1167HAVE_DECL_ENVIRON
1168HAVE_SYMLINKAT
1169HAVE_SYMLINK
1170HAVE_SLEEP
1171HAVE_READLINKAT
1172HAVE_READLINK
1173HAVE_PREAD
1174HAVE_PIPE2
1175HAVE_LINKAT
1176HAVE_LINK
1177HAVE_LCHOWN
1178HAVE_GETUSERSHELL
1179HAVE_GETPAGESIZE
1180HAVE_GETLOGIN
1181HAVE_GETHOSTNAME
1182HAVE_GETGROUPS
1183HAVE_GETDTABLESIZE
1184HAVE_GETDOMAINNAME
1185HAVE_FTRUNCATE
1186HAVE_FSYNC
1187HAVE_FCHOWNAT
1188HAVE_FACCESSAT
1189HAVE_EUIDACCESS
1190HAVE_DUP3
1191HAVE_DUP2
1192HAVE_CHOWN
1193GNULIB_WRITE
1194GNULIB_USLEEP
1195GNULIB_UNLINKAT
1196GNULIB_UNLINK
1197GNULIB_UNISTD_H_SIGPIPE
1198GNULIB_UNISTD_H_GETOPT
1199GNULIB_SYMLINKAT
1200GNULIB_SYMLINK
1201GNULIB_SLEEP
1202GNULIB_RMDIR
1203GNULIB_READLINKAT
1204GNULIB_READLINK
1205GNULIB_PREAD
1206GNULIB_PIPE2
1207GNULIB_LSEEK
1208GNULIB_LINKAT
1209GNULIB_LINK
1210GNULIB_LCHOWN
1211GNULIB_GETUSERSHELL
1212GNULIB_GETPAGESIZE
1213GNULIB_GETLOGIN_R
1214GNULIB_GETLOGIN
1215GNULIB_GETHOSTNAME
1216GNULIB_GETGROUPS
1217GNULIB_GETDTABLESIZE
1218GNULIB_GETDOMAINNAME
1219GNULIB_GETCWD
1220GNULIB_FTRUNCATE
1221GNULIB_FSYNC
1222GNULIB_FCHOWNAT
1223GNULIB_FCHDIR
1224GNULIB_FACCESSAT
1225GNULIB_EUIDACCESS
1226GNULIB_ENVIRON
1227GNULIB_DUP3
1228GNULIB_DUP2
1229GNULIB_CLOSE
1230GNULIB_CHOWN
1231REPLACE_UNSETENV
1232REPLACE_STRTOD
1233REPLACE_SETENV
1234REPLACE_REALPATH
1235REPLACE_PUTENV
1236REPLACE_MKSTEMP
1237REPLACE_CANONICALIZE_FILE_NAME
1238HAVE_UNSETENV
1239HAVE_SYS_LOADAVG_H
1240HAVE_STRUCT_RANDOM_DATA
1241HAVE_STRTOULL
1242HAVE_STRTOLL
1243HAVE_STRTOD
1244HAVE_SETENV
1245HAVE_RPMATCH
1246HAVE_REALPATH
1247HAVE_REALLOC_POSIX
1248HAVE_RANDOM_R
1249HAVE_MKSTEMPS
1250HAVE_MKOSTEMPS
1251HAVE_MKOSTEMP
1252HAVE_MKDTEMP
1253HAVE_MALLOC_POSIX
1254HAVE_GETSUBOPT
1255HAVE_DECL_GETLOADAVG
1256HAVE_CANONICALIZE_FILE_NAME
1257HAVE_ATOLL
1258GNULIB_UNSETENV
1259GNULIB_STRTOULL
1260GNULIB_STRTOLL
1261GNULIB_STRTOD
1262GNULIB_SETENV
1263GNULIB_RPMATCH
1264GNULIB_REALPATH
1265GNULIB_REALLOC_POSIX
1266GNULIB_RANDOM_R
1267GNULIB_PUTENV
1268GNULIB_MKSTEMPS
1269GNULIB_MKSTEMP
1270GNULIB_MKOSTEMPS
1271GNULIB_MKOSTEMP
1272GNULIB_MKDTEMP
1273GNULIB_MALLOC_POSIX
1274GNULIB_GETSUBOPT
1275GNULIB_GETLOADAVG
1276GNULIB_CANONICALIZE_FILE_NAME
1277GNULIB_CALLOC_POSIX
1278GNULIB_ATOLL
1279HAVE_CALLOC_POSIX
1280LOCALE_FR
1281REPLACE_WCWIDTH
1282REPLACE_WCSNRTOMBS
1283REPLACE_WCSRTOMBS
1284REPLACE_WCRTOMB
1285REPLACE_MBSNRTOWCS
1286REPLACE_MBSRTOWCS
1287REPLACE_MBRLEN
1288REPLACE_MBRTOWC
1289REPLACE_MBSINIT
1290REPLACE_WCTOB
1291REPLACE_BTOWC
1292REPLACE_MBSTATE_T
1293HAVE_DECL_WCWIDTH
1294HAVE_DECL_WCTOB
1295HAVE_WCSNRTOMBS
1296HAVE_WCSRTOMBS
1297HAVE_WCRTOMB
1298HAVE_MBSNRTOWCS
1299HAVE_MBSRTOWCS
1300HAVE_MBRLEN
1301HAVE_MBRTOWC
1302HAVE_MBSINIT
1303HAVE_BTOWC
1304GNULIB_WCWIDTH
1305GNULIB_WCSNRTOMBS
1306GNULIB_WCSRTOMBS
1307GNULIB_WCRTOMB
1308GNULIB_MBSNRTOWCS
1309GNULIB_MBSRTOWCS
1310GNULIB_MBRLEN
1311GNULIB_MBRTOWC
1312GNULIB_MBSINIT
1313GNULIB_WCTOB
1314GNULIB_BTOWC
1315NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
1316NEXT_ARPA_INET_H
1317PRAGMA_SYSTEM_HEADER
1318INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1319INCLUDE_NEXT
1320HAVE_ARPA_INET_H
1321HAVE_DECL_INET_PTON
1322HAVE_DECL_INET_NTOP
1323GNULIB_INET_PTON
1324GNULIB_INET_NTOP
1325ALLOCA_H
1326ALLOCA
1327USE_ACL
1328LIB_ACL
1329GL_COND_LIBTOOL_FALSE
1330GL_COND_LIBTOOL_TRUE
1331host_os
1332host_vendor
1333host_cpu
1334host
1335build_os
1336build_vendor
1337build_cpu
1338build
1339LN_S
1340RANLIB
1341EGREP
1342GREP
1343CPP
1344am__fastdepCC_FALSE
1345am__fastdepCC_TRUE
1346CCDEPMODE
1347AMDEPBACKSLASH
1348AMDEP_FALSE
1349AMDEP_TRUE
1350am__quote
1351am__include
1352DEPDIR
1353OBJEXT
1354EXEEXT
1355ac_ct_CC
1356CPPFLAGS
1357LDFLAGS
1358CFLAGS
1359CC
1360AM_BACKSLASH
1361AM_DEFAULT_VERBOSITY
1362am__untar
1363am__tar
1364AMTAR
1365am__leading_dot
1366SET_MAKE
1367AWK
1368mkdir_p
1369MKDIR_P
1370INSTALL_STRIP_PROGRAM
1371STRIP
1372install_sh
1373MAKEINFO
1374AUTOHEADER
1375AUTOMAKE
1376AUTOCONF
1377ACLOCAL
1378VERSION
1379PACKAGE
1380CYGPATH_W
1381am__isrc
1382INSTALL_DATA
1383INSTALL_SCRIPT
1384INSTALL_PROGRAM
1385target_alias
1386host_alias
1387build_alias
1388LIBS
1389ECHO_T
1390ECHO_N
1391ECHO_C
1392DEFS
1393mandir
1394localedir
1395libdir
1396psdir
1397pdfdir
1398dvidir
1399htmldir
1400infodir
1401docdir
1402oldincludedir
1403includedir
1404localstatedir
1405sharedstatedir
1406sysconfdir
1407datadir
1408datarootdir
1409libexecdir
1410sbindir
1411bindir
1412program_transform_name
1413prefix
1414exec_prefix
1415PACKAGE_URL
1416PACKAGE_BUGREPORT
1417PACKAGE_STRING
1418PACKAGE_VERSION
1419PACKAGE_TARNAME
1420PACKAGE_NAME
1421PATH_SEPARATOR
1422SHELL'
1423ac_subst_files=''
1424ac_user_opts='
1425enable_option_checking
1426enable_silent_rules
1427enable_dependency_tracking
1428enable_threads
1429enable_acl
1430enable_assert
1431with_gnu_ld
1432enable_rpath
1433with_libiconv_prefix
1434with_libpth_prefix
1435enable_largefile
1436with_included_regex
1437with_packager
1438with_packager_version
1439with_packager_bug_reports
1440enable_xattr
1441enable_libcap
1442enable_gcc_warnings
1443with_gmp
1444enable_install_program
1445enable_no_install_program
1446enable_nls
1447with_libintl_prefix
1448'
1449      ac_precious_vars='build_alias
1450host_alias
1451target_alias
1452CC
1453CFLAGS
1454LDFLAGS
1455LIBS
1456CPPFLAGS
1457CPP
1458YACC
1459YFLAGS
1460DEFAULT_POSIX2_VERSION'
1461
1462
1463# Initialize some variables set by options.
1464ac_init_help=
1465ac_init_version=false
1466ac_unrecognized_opts=
1467ac_unrecognized_sep=
1468# The variables have the same names as the options, with
1469# dashes changed to underlines.
1470cache_file=/dev/null
1471exec_prefix=NONE
1472no_create=
1473no_recursion=
1474prefix=NONE
1475program_prefix=NONE
1476program_suffix=NONE
1477program_transform_name=s,x,x,
1478silent=
1479site=
1480srcdir=
1481verbose=
1482x_includes=NONE
1483x_libraries=NONE
1484
1485# Installation directory options.
1486# These are left unexpanded so users can "make install exec_prefix=/foo"
1487# and all the variables that are supposed to be based on exec_prefix
1488# by default will actually change.
1489# Use braces instead of parens because sh, perl, etc. also accept them.
1490# (The list follows the same order as the GNU Coding Standards.)
1491bindir='${exec_prefix}/bin'
1492sbindir='${exec_prefix}/sbin'
1493libexecdir='${exec_prefix}/libexec'
1494datarootdir='${prefix}/share'
1495datadir='${datarootdir}'
1496sysconfdir='${prefix}/etc'
1497sharedstatedir='${prefix}/com'
1498localstatedir='${prefix}/var'
1499includedir='${prefix}/include'
1500oldincludedir='/usr/include'
1501docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1502infodir='${datarootdir}/info'
1503htmldir='${docdir}'
1504dvidir='${docdir}'
1505pdfdir='${docdir}'
1506psdir='${docdir}'
1507libdir='${exec_prefix}/lib'
1508localedir='${datarootdir}/locale'
1509mandir='${datarootdir}/man'
1510
1511ac_prev=
1512ac_dashdash=
1513for ac_option
1514do
1515  # If the previous option needs an argument, assign it.
1516  if test -n "$ac_prev"; then
1517    eval $ac_prev=\$ac_option
1518    ac_prev=
1519    continue
1520  fi
1521
1522  case $ac_option in
1523  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1524  *)	ac_optarg=yes ;;
1525  esac
1526
1527  # Accept the important Cygnus configure options, so we can diagnose typos.
1528
1529  case $ac_dashdash$ac_option in
1530  --)
1531    ac_dashdash=yes ;;
1532
1533  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1534    ac_prev=bindir ;;
1535  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1536    bindir=$ac_optarg ;;
1537
1538  -build | --build | --buil | --bui | --bu)
1539    ac_prev=build_alias ;;
1540  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1541    build_alias=$ac_optarg ;;
1542
1543  -cache-file | --cache-file | --cache-fil | --cache-fi \
1544  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1545    ac_prev=cache_file ;;
1546  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1547  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1548    cache_file=$ac_optarg ;;
1549
1550  --config-cache | -C)
1551    cache_file=config.cache ;;
1552
1553  -datadir | --datadir | --datadi | --datad)
1554    ac_prev=datadir ;;
1555  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1556    datadir=$ac_optarg ;;
1557
1558  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1559  | --dataroo | --dataro | --datar)
1560    ac_prev=datarootdir ;;
1561  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1562  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1563    datarootdir=$ac_optarg ;;
1564
1565  -disable-* | --disable-*)
1566    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1567    # Reject names that are not valid shell variable names.
1568    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1569      as_fn_error "invalid feature name: $ac_useropt"
1570    ac_useropt_orig=$ac_useropt
1571    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1572    case $ac_user_opts in
1573      *"
1574"enable_$ac_useropt"
1575"*) ;;
1576      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1577	 ac_unrecognized_sep=', ';;
1578    esac
1579    eval enable_$ac_useropt=no ;;
1580
1581  -docdir | --docdir | --docdi | --doc | --do)
1582    ac_prev=docdir ;;
1583  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1584    docdir=$ac_optarg ;;
1585
1586  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1587    ac_prev=dvidir ;;
1588  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1589    dvidir=$ac_optarg ;;
1590
1591  -enable-* | --enable-*)
1592    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1593    # Reject names that are not valid shell variable names.
1594    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1595      as_fn_error "invalid feature name: $ac_useropt"
1596    ac_useropt_orig=$ac_useropt
1597    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1598    case $ac_user_opts in
1599      *"
1600"enable_$ac_useropt"
1601"*) ;;
1602      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1603	 ac_unrecognized_sep=', ';;
1604    esac
1605    eval enable_$ac_useropt=\$ac_optarg ;;
1606
1607  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1608  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1609  | --exec | --exe | --ex)
1610    ac_prev=exec_prefix ;;
1611  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1612  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1613  | --exec=* | --exe=* | --ex=*)
1614    exec_prefix=$ac_optarg ;;
1615
1616  -gas | --gas | --ga | --g)
1617    # Obsolete; use --with-gas.
1618    with_gas=yes ;;
1619
1620  -help | --help | --hel | --he | -h)
1621    ac_init_help=long ;;
1622  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1623    ac_init_help=recursive ;;
1624  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1625    ac_init_help=short ;;
1626
1627  -host | --host | --hos | --ho)
1628    ac_prev=host_alias ;;
1629  -host=* | --host=* | --hos=* | --ho=*)
1630    host_alias=$ac_optarg ;;
1631
1632  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1633    ac_prev=htmldir ;;
1634  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1635  | --ht=*)
1636    htmldir=$ac_optarg ;;
1637
1638  -includedir | --includedir | --includedi | --included | --include \
1639  | --includ | --inclu | --incl | --inc)
1640    ac_prev=includedir ;;
1641  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1642  | --includ=* | --inclu=* | --incl=* | --inc=*)
1643    includedir=$ac_optarg ;;
1644
1645  -infodir | --infodir | --infodi | --infod | --info | --inf)
1646    ac_prev=infodir ;;
1647  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1648    infodir=$ac_optarg ;;
1649
1650  -libdir | --libdir | --libdi | --libd)
1651    ac_prev=libdir ;;
1652  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1653    libdir=$ac_optarg ;;
1654
1655  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1656  | --libexe | --libex | --libe)
1657    ac_prev=libexecdir ;;
1658  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1659  | --libexe=* | --libex=* | --libe=*)
1660    libexecdir=$ac_optarg ;;
1661
1662  -localedir | --localedir | --localedi | --localed | --locale)
1663    ac_prev=localedir ;;
1664  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1665    localedir=$ac_optarg ;;
1666
1667  -localstatedir | --localstatedir | --localstatedi | --localstated \
1668  | --localstate | --localstat | --localsta | --localst | --locals)
1669    ac_prev=localstatedir ;;
1670  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1671  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1672    localstatedir=$ac_optarg ;;
1673
1674  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1675    ac_prev=mandir ;;
1676  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1677    mandir=$ac_optarg ;;
1678
1679  -nfp | --nfp | --nf)
1680    # Obsolete; use --without-fp.
1681    with_fp=no ;;
1682
1683  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1684  | --no-cr | --no-c | -n)
1685    no_create=yes ;;
1686
1687  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1688  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1689    no_recursion=yes ;;
1690
1691  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1692  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1693  | --oldin | --oldi | --old | --ol | --o)
1694    ac_prev=oldincludedir ;;
1695  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1696  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1697  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1698    oldincludedir=$ac_optarg ;;
1699
1700  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1701    ac_prev=prefix ;;
1702  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1703    prefix=$ac_optarg ;;
1704
1705  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1706  | --program-pre | --program-pr | --program-p)
1707    ac_prev=program_prefix ;;
1708  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1709  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1710    program_prefix=$ac_optarg ;;
1711
1712  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1713  | --program-suf | --program-su | --program-s)
1714    ac_prev=program_suffix ;;
1715  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1716  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1717    program_suffix=$ac_optarg ;;
1718
1719  -program-transform-name | --program-transform-name \
1720  | --program-transform-nam | --program-transform-na \
1721  | --program-transform-n | --program-transform- \
1722  | --program-transform | --program-transfor \
1723  | --program-transfo | --program-transf \
1724  | --program-trans | --program-tran \
1725  | --progr-tra | --program-tr | --program-t)
1726    ac_prev=program_transform_name ;;
1727  -program-transform-name=* | --program-transform-name=* \
1728  | --program-transform-nam=* | --program-transform-na=* \
1729  | --program-transform-n=* | --program-transform-=* \
1730  | --program-transform=* | --program-transfor=* \
1731  | --program-transfo=* | --program-transf=* \
1732  | --program-trans=* | --program-tran=* \
1733  | --progr-tra=* | --program-tr=* | --program-t=*)
1734    program_transform_name=$ac_optarg ;;
1735
1736  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1737    ac_prev=pdfdir ;;
1738  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1739    pdfdir=$ac_optarg ;;
1740
1741  -psdir | --psdir | --psdi | --psd | --ps)
1742    ac_prev=psdir ;;
1743  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1744    psdir=$ac_optarg ;;
1745
1746  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1747  | -silent | --silent | --silen | --sile | --sil)
1748    silent=yes ;;
1749
1750  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1751    ac_prev=sbindir ;;
1752  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1753  | --sbi=* | --sb=*)
1754    sbindir=$ac_optarg ;;
1755
1756  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1757  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1758  | --sharedst | --shareds | --shared | --share | --shar \
1759  | --sha | --sh)
1760    ac_prev=sharedstatedir ;;
1761  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1762  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1763  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1764  | --sha=* | --sh=*)
1765    sharedstatedir=$ac_optarg ;;
1766
1767  -site | --site | --sit)
1768    ac_prev=site ;;
1769  -site=* | --site=* | --sit=*)
1770    site=$ac_optarg ;;
1771
1772  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1773    ac_prev=srcdir ;;
1774  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1775    srcdir=$ac_optarg ;;
1776
1777  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1778  | --syscon | --sysco | --sysc | --sys | --sy)
1779    ac_prev=sysconfdir ;;
1780  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1781  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1782    sysconfdir=$ac_optarg ;;
1783
1784  -target | --target | --targe | --targ | --tar | --ta | --t)
1785    ac_prev=target_alias ;;
1786  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1787    target_alias=$ac_optarg ;;
1788
1789  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1790    verbose=yes ;;
1791
1792  -version | --version | --versio | --versi | --vers | -V)
1793    ac_init_version=: ;;
1794
1795  -with-* | --with-*)
1796    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1797    # Reject names that are not valid shell variable names.
1798    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1799      as_fn_error "invalid package name: $ac_useropt"
1800    ac_useropt_orig=$ac_useropt
1801    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1802    case $ac_user_opts in
1803      *"
1804"with_$ac_useropt"
1805"*) ;;
1806      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1807	 ac_unrecognized_sep=', ';;
1808    esac
1809    eval with_$ac_useropt=\$ac_optarg ;;
1810
1811  -without-* | --without-*)
1812    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1813    # Reject names that are not valid shell variable names.
1814    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1815      as_fn_error "invalid package name: $ac_useropt"
1816    ac_useropt_orig=$ac_useropt
1817    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1818    case $ac_user_opts in
1819      *"
1820"with_$ac_useropt"
1821"*) ;;
1822      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1823	 ac_unrecognized_sep=', ';;
1824    esac
1825    eval with_$ac_useropt=no ;;
1826
1827  --x)
1828    # Obsolete; use --with-x.
1829    with_x=yes ;;
1830
1831  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1832  | --x-incl | --x-inc | --x-in | --x-i)
1833    ac_prev=x_includes ;;
1834  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1835  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1836    x_includes=$ac_optarg ;;
1837
1838  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1839  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1840    ac_prev=x_libraries ;;
1841  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1842  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1843    x_libraries=$ac_optarg ;;
1844
1845  -*) as_fn_error "unrecognized option: \`$ac_option'
1846Try \`$0 --help' for more information."
1847    ;;
1848
1849  *=*)
1850    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1851    # Reject names that are not valid shell variable names.
1852    case $ac_envvar in #(
1853      '' | [0-9]* | *[!_$as_cr_alnum]* )
1854      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1855    esac
1856    eval $ac_envvar=\$ac_optarg
1857    export $ac_envvar ;;
1858
1859  *)
1860    # FIXME: should be removed in autoconf 3.0.
1861    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1862    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1863      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1864    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1865    ;;
1866
1867  esac
1868done
1869
1870if test -n "$ac_prev"; then
1871  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1872  as_fn_error "missing argument to $ac_option"
1873fi
1874
1875if test -n "$ac_unrecognized_opts"; then
1876  case $enable_option_checking in
1877    no) ;;
1878    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1879    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1880  esac
1881fi
1882
1883# Check all directory arguments for consistency.
1884for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1885		datadir sysconfdir sharedstatedir localstatedir includedir \
1886		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1887		libdir localedir mandir
1888do
1889  eval ac_val=\$$ac_var
1890  # Remove trailing slashes.
1891  case $ac_val in
1892    */ )
1893      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1894      eval $ac_var=\$ac_val;;
1895  esac
1896  # Be sure to have absolute directory names.
1897  case $ac_val in
1898    [\\/$]* | ?:[\\/]* )  continue;;
1899    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1900  esac
1901  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1902done
1903
1904# There might be people who depend on the old broken behavior: `$host'
1905# used to hold the argument of --host etc.
1906# FIXME: To remove some day.
1907build=$build_alias
1908host=$host_alias
1909target=$target_alias
1910
1911# FIXME: To remove some day.
1912if test "x$host_alias" != x; then
1913  if test "x$build_alias" = x; then
1914    cross_compiling=maybe
1915    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1916    If a cross compiler is detected then cross compile mode will be used." >&2
1917  elif test "x$build_alias" != "x$host_alias"; then
1918    cross_compiling=yes
1919  fi
1920fi
1921
1922ac_tool_prefix=
1923test -n "$host_alias" && ac_tool_prefix=$host_alias-
1924
1925test "$silent" = yes && exec 6>/dev/null
1926
1927
1928ac_pwd=`pwd` && test -n "$ac_pwd" &&
1929ac_ls_di=`ls -di .` &&
1930ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1931  as_fn_error "working directory cannot be determined"
1932test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1933  as_fn_error "pwd does not report name of working directory"
1934
1935
1936# Find the source files, if location was not specified.
1937if test -z "$srcdir"; then
1938  ac_srcdir_defaulted=yes
1939  # Try the directory containing this script, then the parent directory.
1940  ac_confdir=`$as_dirname -- "$as_myself" ||
1941$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1942	 X"$as_myself" : 'X\(//\)[^/]' \| \
1943	 X"$as_myself" : 'X\(//\)$' \| \
1944	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1945$as_echo X"$as_myself" |
1946    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1947	    s//\1/
1948	    q
1949	  }
1950	  /^X\(\/\/\)[^/].*/{
1951	    s//\1/
1952	    q
1953	  }
1954	  /^X\(\/\/\)$/{
1955	    s//\1/
1956	    q
1957	  }
1958	  /^X\(\/\).*/{
1959	    s//\1/
1960	    q
1961	  }
1962	  s/.*/./; q'`
1963  srcdir=$ac_confdir
1964  if test ! -r "$srcdir/$ac_unique_file"; then
1965    srcdir=..
1966  fi
1967else
1968  ac_srcdir_defaulted=no
1969fi
1970if test ! -r "$srcdir/$ac_unique_file"; then
1971  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1972  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1973fi
1974ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1975ac_abs_confdir=`(
1976	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1977	pwd)`
1978# When building in place, set srcdir=.
1979if test "$ac_abs_confdir" = "$ac_pwd"; then
1980  srcdir=.
1981fi
1982# Remove unnecessary trailing slashes from srcdir.
1983# Double slashes in file names in object file debugging info
1984# mess up M-x gdb in Emacs.
1985case $srcdir in
1986*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1987esac
1988for ac_var in $ac_precious_vars; do
1989  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1990  eval ac_env_${ac_var}_value=\$${ac_var}
1991  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1992  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1993done
1994
1995#
1996# Report the --help message.
1997#
1998if test "$ac_init_help" = "long"; then
1999  # Omit some internal or obsolete options to make the list less imposing.
2000  # This message is too long to be a string in the A/UX 3.1 sh.
2001  cat <<_ACEOF
2002\`configure' configures GNU coreutils 8.4 to adapt to many kinds of systems.
2003
2004Usage: $0 [OPTION]... [VAR=VALUE]...
2005
2006To assign environment variables (e.g., CC, CFLAGS...), specify them as
2007VAR=VALUE.  See below for descriptions of some of the useful variables.
2008
2009Defaults for the options are specified in brackets.
2010
2011Configuration:
2012  -h, --help              display this help and exit
2013      --help=short        display options specific to this package
2014      --help=recursive    display the short help of all the included packages
2015  -V, --version           display version information and exit
2016  -q, --quiet, --silent   do not print \`checking...' messages
2017      --cache-file=FILE   cache test results in FILE [disabled]
2018  -C, --config-cache      alias for \`--cache-file=config.cache'
2019  -n, --no-create         do not create output files
2020      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2021
2022Installation directories:
2023  --prefix=PREFIX         install architecture-independent files in PREFIX
2024                          [$ac_default_prefix]
2025  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2026                          [PREFIX]
2027
2028By default, \`make install' will install all the files in
2029\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2030an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2031for instance \`--prefix=\$HOME'.
2032
2033For better control, use the options below.
2034
2035Fine tuning of the installation directories:
2036  --bindir=DIR            user executables [EPREFIX/bin]
2037  --sbindir=DIR           system admin executables [EPREFIX/sbin]
2038  --libexecdir=DIR        program executables [EPREFIX/libexec]
2039  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2040  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2041  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2042  --libdir=DIR            object code libraries [EPREFIX/lib]
2043  --includedir=DIR        C header files [PREFIX/include]
2044  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2045  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2046  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2047  --infodir=DIR           info documentation [DATAROOTDIR/info]
2048  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2049  --mandir=DIR            man documentation [DATAROOTDIR/man]
2050  --docdir=DIR            documentation root [DATAROOTDIR/doc/coreutils]
2051  --htmldir=DIR           html documentation [DOCDIR]
2052  --dvidir=DIR            dvi documentation [DOCDIR]
2053  --pdfdir=DIR            pdf documentation [DOCDIR]
2054  --psdir=DIR             ps documentation [DOCDIR]
2055_ACEOF
2056
2057  cat <<\_ACEOF
2058
2059Program names:
2060  --program-prefix=PREFIX            prepend PREFIX to installed program names
2061  --program-suffix=SUFFIX            append SUFFIX to installed program names
2062  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2063
2064System types:
2065  --build=BUILD     configure for building on BUILD [guessed]
2066  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2067_ACEOF
2068fi
2069
2070if test -n "$ac_init_help"; then
2071  case $ac_init_help in
2072     short | recursive ) echo "Configuration of GNU coreutils 8.4:";;
2073   esac
2074  cat <<\_ACEOF
2075
2076Optional Features:
2077  --disable-option-checking  ignore unrecognized --enable/--with options
2078  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2079  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2080  --enable-silent-rules          less verbose build output (undo: `make V=1')
2081  --disable-silent-rules         verbose build output (undo: `make V=0')
2082  --disable-dependency-tracking  speeds up one-time build
2083  --enable-dependency-tracking   do not reject slow dependency extractors
2084  --enable-threads={posix|solaris|pth|win32}
2085                          specify multithreading API
2086  --disable-threads       build without multithread safety
2087  --disable-acl           do not support ACLs
2088  --disable-assert        turn off assertions
2089  --disable-rpath         do not hardcode runtime library paths
2090  --disable-largefile     omit support for large files
2091  --disable-xattr         do not support extended attributes
2092  --disable-libcap        disable libcap support
2093  --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
2094  --enable-install-program=PROG_LIST
2095                          install the programs in PROG_LIST (comma-separated,
2096                          default: none)
2097  --enable-no-install-program=PROG_LIST
2098                          do NOT install the programs in PROG_LIST
2099                          (comma-separated, default: arch,hostname,su)
2100  --disable-nls           do not use Native Language Support
2101
2102Optional Packages:
2103  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2104  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2105  --with-gnu-ld           assume the C compiler uses GNU ld default=no
2106  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2107  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2108  --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
2109  --without-libpth-prefix     don't search for libpth in includedir and libdir
2110  --without-included-regex
2111                          don't compile regex; this is the default on systems
2112                          with recent-enough versions of the GNU C Library
2113                          (use with caution on other systems).
2114  --with-packager         String identifying the packager of this software
2115  --with-packager-version Packager-specific version information
2116  --with-packager-bug-reports
2117                          Packager info for bug reports (URL/e-mail/...)
2118  --without-gmp           do not use the GNU MP library for arbitrary
2119                          precision calculation (default: use it if available)
2120  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2121  --without-libintl-prefix     don't search for libintl in includedir and libdir
2122
2123Some influential environment variables:
2124  CC          C compiler command
2125  CFLAGS      C compiler flags
2126  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2127              nonstandard directory <lib dir>
2128  LIBS        libraries to pass to the linker, e.g. -l<library>
2129  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2130              you have headers in a nonstandard directory <include dir>
2131  CPP         C preprocessor
2132  YACC        The `Yet Another C Compiler' implementation to use. Defaults to
2133              `bison -y'. Values other than `bison -y' will most likely break
2134              on most systems.
2135  YFLAGS      YFLAGS contains the list arguments that will be passed by
2136              default to Bison. This script will default YFLAGS to the empty
2137              string to avoid a default value of `-d' given by some make
2138              applications.
2139  DEFAULT_POSIX2_VERSION
2140              POSIX version to default to; see 'config.hin'.
2141
2142Use these variables to override the choices made by `configure' or to help
2143it to find libraries and programs with nonstandard names/locations.
2144
2145Report bugs to <bug-coreutils@gnu.org>.
2146GNU coreutils home page: <http://www.gnu.org/software/coreutils/>.
2147General help using GNU software: <http://www.gnu.org/gethelp/>.
2148_ACEOF
2149ac_status=$?
2150fi
2151
2152if test "$ac_init_help" = "recursive"; then
2153  # If there are subdirs, report their specific --help.
2154  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2155    test -d "$ac_dir" ||
2156      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2157      continue
2158    ac_builddir=.
2159
2160case "$ac_dir" in
2161.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2162*)
2163  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2164  # A ".." for each directory in $ac_dir_suffix.
2165  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2166  case $ac_top_builddir_sub in
2167  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2168  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2169  esac ;;
2170esac
2171ac_abs_top_builddir=$ac_pwd
2172ac_abs_builddir=$ac_pwd$ac_dir_suffix
2173# for backward compatibility:
2174ac_top_builddir=$ac_top_build_prefix
2175
2176case $srcdir in
2177  .)  # We are building in place.
2178    ac_srcdir=.
2179    ac_top_srcdir=$ac_top_builddir_sub
2180    ac_abs_top_srcdir=$ac_pwd ;;
2181  [\\/]* | ?:[\\/]* )  # Absolute name.
2182    ac_srcdir=$srcdir$ac_dir_suffix;
2183    ac_top_srcdir=$srcdir
2184    ac_abs_top_srcdir=$srcdir ;;
2185  *) # Relative name.
2186    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2187    ac_top_srcdir=$ac_top_build_prefix$srcdir
2188    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2189esac
2190ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2191
2192    cd "$ac_dir" || { ac_status=$?; continue; }
2193    # Check for guested configure.
2194    if test -f "$ac_srcdir/configure.gnu"; then
2195      echo &&
2196      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2197    elif test -f "$ac_srcdir/configure"; then
2198      echo &&
2199      $SHELL "$ac_srcdir/configure" --help=recursive
2200    else
2201      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2202    fi || ac_status=$?
2203    cd "$ac_pwd" || { ac_status=$?; break; }
2204  done
2205fi
2206
2207test -n "$ac_init_help" && exit $ac_status
2208if $ac_init_version; then
2209  cat <<\_ACEOF
2210GNU coreutils configure 8.4
2211generated by GNU Autoconf 2.65.23-13e35
2212
2213Copyright (C) 2010 Free Software Foundation, Inc.
2214This configure script is free software; the Free Software Foundation
2215gives unlimited permission to copy, distribute and modify it.
2216_ACEOF
2217  exit
2218fi
2219
2220## ------------------------ ##
2221## Autoconf initialization. ##
2222## ------------------------ ##
2223
2224# ac_fn_c_try_compile LINENO
2225# --------------------------
2226# Try to compile conftest.$ac_ext, and return whether this succeeded.
2227ac_fn_c_try_compile ()
2228{
2229  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2230  rm -f conftest.$ac_objext
2231  if { { ac_try="$ac_compile"
2232case "(($ac_try" in
2233  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2234  *) ac_try_echo=$ac_try;;
2235esac
2236eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2237$as_echo "$ac_try_echo"; } >&5
2238  (eval "$ac_compile") 2>conftest.err
2239  ac_status=$?
2240  if test -s conftest.err; then
2241    grep -v '^ *+' conftest.err >conftest.er1
2242    cat conftest.er1 >&5
2243    mv -f conftest.er1 conftest.err
2244  fi
2245  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2246  test $ac_status = 0; } && {
2247	 test -z "$ac_c_werror_flag" ||
2248	 test ! -s conftest.err
2249       } && test -s conftest.$ac_objext; then :
2250  ac_retval=0
2251else
2252  $as_echo "$as_me: failed program was:" >&5
2253sed 's/^/| /' conftest.$ac_ext >&5
2254
2255	ac_retval=1
2256fi
2257  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2258  as_fn_set_status $ac_retval
2259
2260} # ac_fn_c_try_compile
2261
2262# ac_fn_c_try_cpp LINENO
2263# ----------------------
2264# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2265ac_fn_c_try_cpp ()
2266{
2267  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2268  if { { ac_try="$ac_cpp conftest.$ac_ext"
2269case "(($ac_try" in
2270  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2271  *) ac_try_echo=$ac_try;;
2272esac
2273eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2274$as_echo "$ac_try_echo"; } >&5
2275  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2276  ac_status=$?
2277  if test -s conftest.err; then
2278    grep -v '^ *+' conftest.err >conftest.er1
2279    cat conftest.er1 >&5
2280    mv -f conftest.er1 conftest.err
2281  fi
2282  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2283  test $ac_status = 0; } >/dev/null && {
2284	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2285	 test ! -s conftest.err
2286       }; then :
2287  ac_retval=0
2288else
2289  $as_echo "$as_me: failed program was:" >&5
2290sed 's/^/| /' conftest.$ac_ext >&5
2291
2292    ac_retval=1
2293fi
2294  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2295  as_fn_set_status $ac_retval
2296
2297} # ac_fn_c_try_cpp
2298
2299# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2300# -------------------------------------------------------
2301# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2302# the include files in INCLUDES and setting the cache variable VAR
2303# accordingly.
2304ac_fn_c_check_header_mongrel ()
2305{
2306  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2307  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2309$as_echo_n "checking for $2... " >&6; }
2310if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2311  $as_echo_n "(cached) " >&6
2312fi
2313eval ac_res=\$$3
2314	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2315$as_echo "$ac_res" >&6; }
2316else
2317  # Is the header compilable?
2318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2319$as_echo_n "checking $2 usability... " >&6; }
2320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321/* end confdefs.h.  */
2322$4
2323#include <$2>
2324_ACEOF
2325if ac_fn_c_try_compile "$LINENO"; then :
2326  ac_header_compiler=yes
2327else
2328  ac_header_compiler=no
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2332$as_echo "$ac_header_compiler" >&6; }
2333
2334# Is the header present?
2335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2336$as_echo_n "checking $2 presence... " >&6; }
2337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2338/* end confdefs.h.  */
2339#include <$2>
2340_ACEOF
2341if ac_fn_c_try_cpp "$LINENO"; then :
2342  ac_header_preproc=yes
2343else
2344  ac_header_preproc=no
2345fi
2346rm -f conftest.err conftest.$ac_ext
2347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2348$as_echo "$ac_header_preproc" >&6; }
2349
2350# So?  What about this header?
2351case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2352  yes:no: )
2353    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2354$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2355    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2356$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2357    ;;
2358  no:yes:* )
2359    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2360$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2361    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2362$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2363    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2364$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2365    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2366$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2367    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2368$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2369( cat <<\_ASBOX
2370## ------------------------------------ ##
2371## Report this to bug-coreutils@gnu.org ##
2372## ------------------------------------ ##
2373_ASBOX
2374     ) | sed "s/^/$as_me: WARNING:     /" >&2
2375    ;;
2376esac
2377  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2378$as_echo_n "checking for $2... " >&6; }
2379if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2380  $as_echo_n "(cached) " >&6
2381else
2382  eval "$3=\$ac_header_compiler"
2383fi
2384eval ac_res=\$$3
2385	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2386$as_echo "$ac_res" >&6; }
2387fi
2388  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2389
2390} # ac_fn_c_check_header_mongrel
2391
2392# ac_fn_c_try_run LINENO
2393# ----------------------
2394# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2395# that executables *can* be run.
2396ac_fn_c_try_run ()
2397{
2398  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2399  if { { ac_try="$ac_link"
2400case "(($ac_try" in
2401  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2402  *) ac_try_echo=$ac_try;;
2403esac
2404eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2405$as_echo "$ac_try_echo"; } >&5
2406  (eval "$ac_link") 2>&5
2407  ac_status=$?
2408  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2409  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2410  { { case "(($ac_try" in
2411  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2412  *) ac_try_echo=$ac_try;;
2413esac
2414eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2415$as_echo "$ac_try_echo"; } >&5
2416  (eval "$ac_try") 2>&5
2417  ac_status=$?
2418  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2419  test $ac_status = 0; }; }; then :
2420  ac_retval=0
2421else
2422  $as_echo "$as_me: program exited with status $ac_status" >&5
2423       $as_echo "$as_me: failed program was:" >&5
2424sed 's/^/| /' conftest.$ac_ext >&5
2425
2426       ac_retval=$ac_status
2427fi
2428  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2429  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2430  as_fn_set_status $ac_retval
2431
2432} # ac_fn_c_try_run
2433
2434# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2435# -------------------------------------------------------
2436# Tests whether HEADER exists and can be compiled using the include files in
2437# INCLUDES, setting the cache variable VAR accordingly.
2438ac_fn_c_check_header_compile ()
2439{
2440  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2442$as_echo_n "checking for $2... " >&6; }
2443if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2444  $as_echo_n "(cached) " >&6
2445else
2446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2447/* end confdefs.h.  */
2448$4
2449#include <$2>
2450_ACEOF
2451if ac_fn_c_try_compile "$LINENO"; then :
2452  eval "$3=yes"
2453else
2454  eval "$3=no"
2455fi
2456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2457fi
2458eval ac_res=\$$3
2459	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2460$as_echo "$ac_res" >&6; }
2461  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2462
2463} # ac_fn_c_check_header_compile
2464
2465# ac_fn_c_try_link LINENO
2466# -----------------------
2467# Try to link conftest.$ac_ext, and return whether this succeeded.
2468ac_fn_c_try_link ()
2469{
2470  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2471  rm -f conftest.$ac_objext conftest$ac_exeext
2472  if { { ac_try="$ac_link"
2473case "(($ac_try" in
2474  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2475  *) ac_try_echo=$ac_try;;
2476esac
2477eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2478$as_echo "$ac_try_echo"; } >&5
2479  (eval "$ac_link") 2>conftest.err
2480  ac_status=$?
2481  if test -s conftest.err; then
2482    grep -v '^ *+' conftest.err >conftest.er1
2483    cat conftest.er1 >&5
2484    mv -f conftest.er1 conftest.err
2485  fi
2486  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2487  test $ac_status = 0; } && {
2488	 test -z "$ac_c_werror_flag" ||
2489	 test ! -s conftest.err
2490       } && test -s conftest$ac_exeext && {
2491	 test "$cross_compiling" = yes ||
2492	 $as_test_x conftest$ac_exeext
2493       }; then :
2494  ac_retval=0
2495else
2496  $as_echo "$as_me: failed program was:" >&5
2497sed 's/^/| /' conftest.$ac_ext >&5
2498
2499	ac_retval=1
2500fi
2501  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2502  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2503  # interfere with the next link command; also delete a directory that is
2504  # left behind by Apple's compiler.  We do this before executing the actions.
2505  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2506  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2507  as_fn_set_status $ac_retval
2508
2509} # ac_fn_c_try_link
2510
2511# ac_fn_c_check_func LINENO FUNC VAR
2512# ----------------------------------
2513# Tests whether FUNC exists, setting the cache variable VAR accordingly
2514ac_fn_c_check_func ()
2515{
2516  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2517  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2518$as_echo_n "checking for $2... " >&6; }
2519if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2520  $as_echo_n "(cached) " >&6
2521else
2522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2523/* end confdefs.h.  */
2524/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2525   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2526#define $2 innocuous_$2
2527
2528/* System header to define __stub macros and hopefully few prototypes,
2529    which can conflict with char $2 (); below.
2530    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2531    <limits.h> exists even on freestanding compilers.  */
2532
2533#ifdef __STDC__
2534# include <limits.h>
2535#else
2536# include <assert.h>
2537#endif
2538
2539#undef $2
2540
2541/* Override any GCC internal prototype to avoid an error.
2542   Use char because int might match the return type of a GCC
2543   builtin and then its argument prototype would still apply.  */
2544#ifdef __cplusplus
2545extern "C"
2546#endif
2547char $2 ();
2548/* The GNU C library defines this for functions which it implements
2549    to always fail with ENOSYS.  Some functions are actually named
2550    something starting with __ and the normal name is an alias.  */
2551#if defined __stub_$2 || defined __stub___$2
2552choke me
2553#endif
2554
2555int
2556main ()
2557{
2558return $2 ();
2559  ;
2560  return 0;
2561}
2562_ACEOF
2563if ac_fn_c_try_link "$LINENO"; then :
2564  eval "$3=yes"
2565else
2566  eval "$3=no"
2567fi
2568rm -f core conftest.err conftest.$ac_objext \
2569    conftest$ac_exeext conftest.$ac_ext
2570fi
2571eval ac_res=\$$3
2572	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2573$as_echo "$ac_res" >&6; }
2574  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2575
2576} # ac_fn_c_check_func
2577
2578# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2579# -------------------------------------------
2580# Tests whether TYPE exists after having included INCLUDES, setting cache
2581# variable VAR accordingly.
2582ac_fn_c_check_type ()
2583{
2584  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2586$as_echo_n "checking for $2... " >&6; }
2587if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2588  $as_echo_n "(cached) " >&6
2589else
2590  eval "$3=no"
2591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2592/* end confdefs.h.  */
2593$4
2594int
2595main ()
2596{
2597if (sizeof ($2))
2598	 return 0;
2599  ;
2600  return 0;
2601}
2602_ACEOF
2603if ac_fn_c_try_compile "$LINENO"; then :
2604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2605/* end confdefs.h.  */
2606$4
2607int
2608main ()
2609{
2610if (sizeof (($2)))
2611	    return 0;
2612  ;
2613  return 0;
2614}
2615_ACEOF
2616if ac_fn_c_try_compile "$LINENO"; then :
2617
2618else
2619  eval "$3=yes"
2620fi
2621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2622fi
2623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2624fi
2625eval ac_res=\$$3
2626	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2627$as_echo "$ac_res" >&6; }
2628  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2629
2630} # ac_fn_c_check_type
2631
2632# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2633# ---------------------------------------------
2634# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2635# accordingly.
2636ac_fn_c_check_decl ()
2637{
2638  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2639  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2640$as_echo_n "checking whether $2 is declared... " >&6; }
2641if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2642  $as_echo_n "(cached) " >&6
2643else
2644  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2645/* end confdefs.h.  */
2646$4
2647int
2648main ()
2649{
2650#ifndef $2
2651  (void) $2;
2652#endif
2653
2654  ;
2655  return 0;
2656}
2657_ACEOF
2658if ac_fn_c_try_compile "$LINENO"; then :
2659  eval "$3=yes"
2660else
2661  eval "$3=no"
2662fi
2663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2664fi
2665eval ac_res=\$$3
2666	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2667$as_echo "$ac_res" >&6; }
2668  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2669
2670} # ac_fn_c_check_decl
2671
2672# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2673# --------------------------------------------
2674# Tries to find the compile-time value of EXPR in a program that includes
2675# INCLUDES, setting VAR accordingly. Returns whether the value could be
2676# computed
2677ac_fn_c_compute_int ()
2678{
2679  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2680  if test "$cross_compiling" = yes; then
2681    # Depending upon the size, compute the lo and hi bounds.
2682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2683/* end confdefs.h.  */
2684$4
2685int
2686main ()
2687{
2688static int test_array [1 - 2 * !(($2) >= 0)];
2689test_array [0] = 0
2690
2691  ;
2692  return 0;
2693}
2694_ACEOF
2695if ac_fn_c_try_compile "$LINENO"; then :
2696  ac_lo=0 ac_mid=0
2697  while :; do
2698    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2699/* end confdefs.h.  */
2700$4
2701int
2702main ()
2703{
2704static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2705test_array [0] = 0
2706
2707  ;
2708  return 0;
2709}
2710_ACEOF
2711if ac_fn_c_try_compile "$LINENO"; then :
2712  ac_hi=$ac_mid; break
2713else
2714  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2715			if test $ac_lo -le $ac_mid; then
2716			  ac_lo= ac_hi=
2717			  break
2718			fi
2719			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2720fi
2721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2722  done
2723else
2724  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2725/* end confdefs.h.  */
2726$4
2727int
2728main ()
2729{
2730static int test_array [1 - 2 * !(($2) < 0)];
2731test_array [0] = 0
2732
2733  ;
2734  return 0;
2735}
2736_ACEOF
2737if ac_fn_c_try_compile "$LINENO"; then :
2738  ac_hi=-1 ac_mid=-1
2739  while :; do
2740    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2741/* end confdefs.h.  */
2742$4
2743int
2744main ()
2745{
2746static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2747test_array [0] = 0
2748
2749  ;
2750  return 0;
2751}
2752_ACEOF
2753if ac_fn_c_try_compile "$LINENO"; then :
2754  ac_lo=$ac_mid; break
2755else
2756  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2757			if test $ac_mid -le $ac_hi; then
2758			  ac_lo= ac_hi=
2759			  break
2760			fi
2761			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2762fi
2763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2764  done
2765else
2766  ac_lo= ac_hi=
2767fi
2768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2769fi
2770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2771# Binary search between lo and hi bounds.
2772while test "x$ac_lo" != "x$ac_hi"; do
2773  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2774  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2775/* end confdefs.h.  */
2776$4
2777int
2778main ()
2779{
2780static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2781test_array [0] = 0
2782
2783  ;
2784  return 0;
2785}
2786_ACEOF
2787if ac_fn_c_try_compile "$LINENO"; then :
2788  ac_hi=$ac_mid
2789else
2790  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2791fi
2792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2793done
2794case $ac_lo in #((
2795?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2796'') ac_retval=1 ;;
2797esac
2798  else
2799    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2800/* end confdefs.h.  */
2801$4
2802static long int longval () { return $2; }
2803static unsigned long int ulongval () { return $2; }
2804#include <stdio.h>
2805#include <stdlib.h>
2806int
2807main ()
2808{
2809
2810  FILE *f = fopen ("conftest.val", "w");
2811  if (! f)
2812    return 1;
2813  if (($2) < 0)
2814    {
2815      long int i = longval ();
2816      if (i != ($2))
2817	return 1;
2818      fprintf (f, "%ld", i);
2819    }
2820  else
2821    {
2822      unsigned long int i = ulongval ();
2823      if (i != ($2))
2824	return 1;
2825      fprintf (f, "%lu", i);
2826    }
2827  /* Do not output a trailing newline, as this causes \r\n confusion
2828     on some platforms.  */
2829  return ferror (f) || fclose (f) != 0;
2830
2831  ;
2832  return 0;
2833}
2834_ACEOF
2835if ac_fn_c_try_run "$LINENO"; then :
2836  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2837else
2838  ac_retval=1
2839fi
2840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2841  conftest.$ac_objext conftest.beam conftest.$ac_ext
2842rm -f conftest.val
2843
2844  fi
2845  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2846  as_fn_set_status $ac_retval
2847
2848} # ac_fn_c_compute_int
2849
2850# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2851# ----------------------------------------------------
2852# Tries to find if the field MEMBER exists in type AGGR, after including
2853# INCLUDES, setting cache variable VAR accordingly.
2854ac_fn_c_check_member ()
2855{
2856  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2858$as_echo_n "checking for $2.$3... " >&6; }
2859if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2860  $as_echo_n "(cached) " >&6
2861else
2862  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2863/* end confdefs.h.  */
2864$5
2865int
2866main ()
2867{
2868static $2 ac_aggr;
2869if (ac_aggr.$3)
2870return 0;
2871  ;
2872  return 0;
2873}
2874_ACEOF
2875if ac_fn_c_try_compile "$LINENO"; then :
2876  eval "$4=yes"
2877else
2878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2879/* end confdefs.h.  */
2880$5
2881int
2882main ()
2883{
2884static $2 ac_aggr;
2885if (sizeof ac_aggr.$3)
2886return 0;
2887  ;
2888  return 0;
2889}
2890_ACEOF
2891if ac_fn_c_try_compile "$LINENO"; then :
2892  eval "$4=yes"
2893else
2894  eval "$4=no"
2895fi
2896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2897fi
2898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2899fi
2900eval ac_res=\$$4
2901	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2902$as_echo "$ac_res" >&6; }
2903  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2904
2905} # ac_fn_c_check_member
2906cat >config.log <<_ACEOF
2907This file contains any messages produced by compilers while
2908running configure, to aid debugging if configure makes a mistake.
2909
2910It was created by GNU coreutils $as_me 8.4, which was
2911generated by GNU Autoconf 2.65.23-13e35.  Invocation command line was
2912
2913  $ $0 $@
2914
2915_ACEOF
2916exec 5>>config.log
2917{
2918cat <<_ASUNAME
2919## --------- ##
2920## Platform. ##
2921## --------- ##
2922
2923hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2924uname -m = `(uname -m) 2>/dev/null || echo unknown`
2925uname -r = `(uname -r) 2>/dev/null || echo unknown`
2926uname -s = `(uname -s) 2>/dev/null || echo unknown`
2927uname -v = `(uname -v) 2>/dev/null || echo unknown`
2928
2929/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2930/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2931
2932/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2933/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2934/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2935/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2936/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2937/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2938/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2939
2940_ASUNAME
2941
2942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2943for as_dir in $PATH
2944do
2945  IFS=$as_save_IFS
2946  test -z "$as_dir" && as_dir=.
2947    $as_echo "PATH: $as_dir"
2948  done
2949IFS=$as_save_IFS
2950
2951} >&5
2952
2953cat >&5 <<_ACEOF
2954
2955
2956## ----------- ##
2957## Core tests. ##
2958## ----------- ##
2959
2960_ACEOF
2961
2962
2963# Keep a trace of the command line.
2964# Strip out --no-create and --no-recursion so they do not pile up.
2965# Strip out --silent because we don't want to record it for future runs.
2966# Also quote any args containing shell meta-characters.
2967# Make two passes to allow for proper duplicate-argument suppression.
2968ac_configure_args=
2969ac_configure_args0=
2970ac_configure_args1=
2971ac_must_keep_next=false
2972for ac_pass in 1 2
2973do
2974  for ac_arg
2975  do
2976    case $ac_arg in
2977    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2978    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2979    | -silent | --silent | --silen | --sile | --sil)
2980      continue ;;
2981    *\'*)
2982      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2983    esac
2984    case $ac_pass in
2985    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2986    2)
2987      as_fn_append ac_configure_args1 " '$ac_arg'"
2988      if test $ac_must_keep_next = true; then
2989	ac_must_keep_next=false # Got value, back to normal.
2990      else
2991	case $ac_arg in
2992	  *=* | --config-cache | -C | -disable-* | --disable-* \
2993	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2994	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2995	  | -with-* | --with-* | -without-* | --without-* | --x)
2996	    case "$ac_configure_args0 " in
2997	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2998	    esac
2999	    ;;
3000	  -* ) ac_must_keep_next=true ;;
3001	esac
3002      fi
3003      as_fn_append ac_configure_args " '$ac_arg'"
3004      ;;
3005    esac
3006  done
3007done
3008{ ac_configure_args0=; unset ac_configure_args0;}
3009{ ac_configure_args1=; unset ac_configure_args1;}
3010
3011# When interrupted or exit'd, cleanup temporary files, and complete
3012# config.log.  We remove comments because anyway the quotes in there
3013# would cause problems or look ugly.
3014# WARNING: Use '\'' to represent an apostrophe within the trap.
3015# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3016trap 'exit_status=$?
3017  # Save into config.log some information that might help in debugging.
3018  {
3019    echo
3020
3021    cat <<\_ASBOX
3022## ---------------- ##
3023## Cache variables. ##
3024## ---------------- ##
3025_ASBOX
3026    echo
3027    # The following way of writing the cache mishandles newlines in values,
3028(
3029  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3030    eval ac_val=\$$ac_var
3031    case $ac_val in #(
3032    *${as_nl}*)
3033      case $ac_var in #(
3034      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3035$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3036      esac
3037      case $ac_var in #(
3038      _ | IFS | as_nl) ;; #(
3039      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3040      *) { eval $ac_var=; unset $ac_var;} ;;
3041      esac ;;
3042    esac
3043  done
3044  (set) 2>&1 |
3045    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3046    *${as_nl}ac_space=\ *)
3047      sed -n \
3048	"s/'\''/'\''\\\\'\'''\''/g;
3049	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3050      ;; #(
3051    *)
3052      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3053      ;;
3054    esac |
3055    sort
3056)
3057    echo
3058
3059    cat <<\_ASBOX
3060## ----------------- ##
3061## Output variables. ##
3062## ----------------- ##
3063_ASBOX
3064    echo
3065    for ac_var in $ac_subst_vars
3066    do
3067      eval ac_val=\$$ac_var
3068      case $ac_val in
3069      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3070      esac
3071      $as_echo "$ac_var='\''$ac_val'\''"
3072    done | sort
3073    echo
3074
3075    if test -n "$ac_subst_files"; then
3076      cat <<\_ASBOX
3077## ------------------- ##
3078## File substitutions. ##
3079## ------------------- ##
3080_ASBOX
3081      echo
3082      for ac_var in $ac_subst_files
3083      do
3084	eval ac_val=\$$ac_var
3085	case $ac_val in
3086	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3087	esac
3088	$as_echo "$ac_var='\''$ac_val'\''"
3089      done | sort
3090      echo
3091    fi
3092
3093    if test -s confdefs.h; then
3094      cat <<\_ASBOX
3095## ----------- ##
3096## confdefs.h. ##
3097## ----------- ##
3098_ASBOX
3099      echo
3100      cat confdefs.h
3101      echo
3102    fi
3103    test "$ac_signal" != 0 &&
3104      $as_echo "$as_me: caught signal $ac_signal"
3105    $as_echo "$as_me: exit $exit_status"
3106  } >&5
3107  rm -f core *.core core.conftest.* &&
3108    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3109    exit $exit_status
3110' 0
3111for ac_signal in 1 2 13 15; do
3112  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3113done
3114ac_signal=0
3115
3116# confdefs.h avoids OS command line length limits that DEFS can exceed.
3117rm -f -r conftest* confdefs.h
3118
3119$as_echo "/* confdefs.h */" > confdefs.h
3120
3121# Predefined preprocessor variables.
3122
3123cat >>confdefs.h <<_ACEOF
3124#define PACKAGE_NAME "$PACKAGE_NAME"
3125_ACEOF
3126
3127cat >>confdefs.h <<_ACEOF
3128#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3129_ACEOF
3130
3131cat >>confdefs.h <<_ACEOF
3132#define PACKAGE_VERSION "$PACKAGE_VERSION"
3133_ACEOF
3134
3135cat >>confdefs.h <<_ACEOF
3136#define PACKAGE_STRING "$PACKAGE_STRING"
3137_ACEOF
3138
3139cat >>confdefs.h <<_ACEOF
3140#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3141_ACEOF
3142
3143cat >>confdefs.h <<_ACEOF
3144#define PACKAGE_URL "$PACKAGE_URL"
3145_ACEOF
3146
3147
3148# Let the site file select an alternate cache file if it wants to.
3149# Prefer an explicitly selected file to automatically selected ones.
3150ac_site_file1=NONE
3151ac_site_file2=NONE
3152if test -n "$CONFIG_SITE"; then
3153  ac_site_file1=$CONFIG_SITE
3154elif test "x$prefix" != xNONE; then
3155  ac_site_file1=$prefix/share/config.site
3156  ac_site_file2=$prefix/etc/config.site
3157else
3158  ac_site_file1=$ac_default_prefix/share/config.site
3159  ac_site_file2=$ac_default_prefix/etc/config.site
3160fi
3161for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3162do
3163  test "x$ac_site_file" = xNONE && continue
3164  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3165    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3166$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3167    sed 's/^/| /' "$ac_site_file" >&5
3168    . "$ac_site_file"
3169  fi
3170done
3171
3172if test -r "$cache_file"; then
3173  # Some versions of bash will fail to source /dev/null (special files
3174  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3175  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3176    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3177$as_echo "$as_me: loading cache $cache_file" >&6;}
3178    case $cache_file in
3179      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3180      *)                      . "./$cache_file";;
3181    esac
3182  fi
3183else
3184  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3185$as_echo "$as_me: creating cache $cache_file" >&6;}
3186  >$cache_file
3187fi
3188
3189as_fn_append ac_header_list " arpa/inet.h"
3190as_fn_append ac_func_list " pathconf"
3191as_fn_append ac_func_list " btowc"
3192as_fn_append ac_func_list " canonicalize_file_name"
3193as_fn_append ac_func_list " realpath"
3194as_fn_append ac_func_list " chown"
3195as_fn_append ac_func_list " fchown"
3196as_fn_append ac_header_list " sys/socket.h"
3197as_fn_append ac_header_list " ctype.h"
3198as_fn_append ac_header_list " dirent.h"
3199as_fn_append ac_func_list " fdopendir"
3200as_fn_append ac_func_list " dup2"
3201as_fn_append ac_header_list " errno.h"
3202as_fn_append ac_func_list " faccessat"
3203as_fn_append ac_header_list " libgen.h"
3204as_fn_append ac_func_list " lchmod"
3205as_fn_append ac_func_list " access"
3206as_fn_append ac_func_list " fchdir"
3207as_fn_append ac_func_list " fcntl"
3208as_fn_append ac_header_list " fcntl.h"
3209as_fn_append ac_header_list " sys/param.h"
3210as_fn_append ac_func_list " mempcpy"
3211as_fn_append ac_header_list " float.h"
3212as_fn_append ac_func_list " isblank"
3213as_fn_append ac_func_list " iswctype"
3214as_fn_append ac_func_list " mbsrtowcs"
3215as_fn_append ac_func_list " wmemchr"
3216as_fn_append ac_func_list " wmemcpy"
3217as_fn_append ac_func_list " wmempcpy"
3218as_fn_append ac_header_list " wctype.h"
3219gl_fnmatch_required=GNU
3220as_fn_append ac_header_list " stdio_ext.h"
3221as_fn_append ac_func_list " __fpending"
3222as_fn_append ac_func_list " fpurge"
3223as_fn_append ac_func_list " __fpurge"
3224as_fn_append ac_func_list " __freading"
3225as_fn_append ac_header_list " sys/vfs.h"
3226as_fn_append ac_header_list " sys/fs_types.h"
3227as_fn_append ac_func_list " fsync"
3228as_fn_append ac_func_list " ftruncate"
3229as_fn_append ac_func_list " fstatfs"
3230as_fn_append ac_header_list " netdb.h"
3231as_fn_append ac_header_list " netinet/in.h"
3232as_fn_append ac_func_list " microuptime"
3233as_fn_append ac_func_list " nanouptime"
3234as_fn_append ac_func_list " flockfile"
3235as_fn_append ac_func_list " funlockfile"
3236gl_getopt_required=GNU
3237as_fn_append ac_header_list " getopt.h"
3238as_fn_append ac_header_list " termios.h"
3239as_fn_append ac_func_list " __fsetlocking"
3240as_fn_append ac_func_list " tcgetattr"
3241as_fn_append ac_func_list " tcsetattr"
3242as_fn_append ac_func_list " gettimeofday"
3243as_fn_append ac_func_list " nanotime"
3244as_fn_append ac_header_list " sys/time.h"
3245as_fn_append ac_header_list " grp.h"
3246as_fn_append ac_header_list " iconv.h"
3247as_fn_append ac_header_list " stdint.h"
3248as_fn_append ac_header_list " wchar.h"
3249as_fn_append ac_header_list " inttypes.h"
3250as_fn_append ac_header_list " langinfo.h"
3251as_fn_append ac_func_list " link"
3252as_fn_append ac_func_list " readlink"
3253as_fn_append ac_func_list " linkat"
3254as_fn_append ac_func_list " symlink"
3255as_fn_append ac_header_list " stddef.h"
3256as_fn_append ac_header_list " xlocale.h"
3257as_fn_append ac_header_list " locale.h"
3258as_fn_append ac_func_list " lstat"
3259as_fn_append ac_header_list " math.h"
3260as_fn_append ac_func_list " mbsinit"
3261as_fn_append ac_func_list " mbrtowc"
3262as_fn_append ac_func_list " mbrlen"
3263as_fn_append ac_func_list " mbslen"
3264as_fn_append ac_func_list " isascii"
3265as_fn_append ac_header_list " sys/mman.h"
3266as_fn_append ac_func_list " mprotect"
3267as_fn_append ac_func_list " getgrouplist"
3268as_fn_append ac_header_list " unistd.h"
3269as_fn_append ac_func_list " fchmod"
3270as_fn_append ac_func_list " alarm"
3271as_fn_append ac_header_list " sys/statvfs.h"
3272as_fn_append ac_header_list " sys/select.h"
3273as_fn_append ac_func_list " nl_langinfo"
3274gl_printf_safe=yes
3275as_fn_append ac_header_list " utmp.h"
3276as_fn_append ac_header_list " utmpx.h"
3277as_fn_append ac_func_list " utmpname"
3278as_fn_append ac_func_list " utmpxname"
3279as_fn_append ac_func_list " wcscoll"
3280as_fn_append ac_header_list " selinux/selinux.h"
3281as_fn_append ac_func_list " setenv"
3282as_fn_append ac_func_list " settimeofday"
3283as_fn_append ac_func_list " stime"
3284as_fn_append ac_func_list " sigaction"
3285as_fn_append ac_func_list " sigaltstack"
3286as_fn_append ac_func_list " siginterrupt"
3287as_fn_append ac_header_list " signal.h"
3288as_fn_append ac_header_list " stdarg.h"
3289as_fn_append ac_header_list " stdio.h"
3290as_fn_append ac_header_list " stdlib.h"
3291as_fn_append ac_func_list " tzset"
3292as_fn_append ac_header_list " string.h"
3293as_fn_append ac_func_list " strndup"
3294as_fn_append ac_func_list " symlinkat"
3295as_fn_append ac_func_list " readlinkat"
3296as_fn_append ac_header_list " sys/stat.h"
3297as_fn_append ac_header_list " sys/utsname.h"
3298as_fn_append ac_header_list " time.h"
3299as_fn_append ac_func_list " pipe"
3300as_fn_append ac_header_list " utime.h"
3301as_fn_append ac_func_list " futimes"
3302as_fn_append ac_func_list " futimesat"
3303as_fn_append ac_func_list " futimens"
3304as_fn_append ac_func_list " utimensat"
3305as_fn_append ac_func_list " lutimes"
3306as_fn_append ac_func_list " vasnprintf"
3307as_fn_append ac_func_list " wcrtomb"
3308as_fn_append ac_func_list " iswcntrl"
3309as_fn_append ac_func_list " wcwidth"
3310as_fn_append ac_header_list " priv.h"
3311as_fn_append ac_func_list " getegid"
3312as_fn_append ac_func_list " getdtablesize"
3313as_fn_append ac_func_list " newlocale"
3314as_fn_append ac_header_list " sys/wait.h"
3315as_fn_append ac_func_list " sleep"
3316as_fn_append ac_header_list " sys/ioctl.h"
3317as_fn_append ac_func_list " shutdown"
3318as_fn_append ac_func_list " usleep"
3319as_fn_append ac_func_list " wctob"
3320as_fn_append ac_header_list " hurd.h"
3321as_fn_append ac_header_list " paths.h"
3322as_fn_append ac_header_list " stropts.h"
3323as_fn_append ac_header_list " sys/resource.h"
3324as_fn_append ac_header_list " sys/systeminfo.h"
3325as_fn_append ac_header_list " syslog.h"
3326as_fn_append ac_header_list " pwd.h"
3327as_fn_append ac_func_list " strxfrm"
3328as_fn_append ac_func_list " directio"
3329as_fn_append ac_func_list " endgrent"
3330as_fn_append ac_func_list " endpwent"
3331as_fn_append ac_func_list " iswspace"
3332as_fn_append ac_func_list " mkfifo"
3333as_fn_append ac_func_list " setgroups"
3334as_fn_append ac_func_list " sethostname"
3335as_fn_append ac_func_list " sync"
3336as_fn_append ac_func_list " sysctl"
3337as_fn_append ac_func_list " sysinfo"
3338as_fn_append ac_func_list " tcgetpgrp"
3339as_fn_append ac_header_list " OS.h"
3340gt_needs="$gt_needs need-formatstring-macros"
3341# Check that the precious variables saved in the cache have kept the same
3342# value.
3343ac_cache_corrupted=false
3344for ac_var in $ac_precious_vars; do
3345  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3346  eval ac_new_set=\$ac_env_${ac_var}_set
3347  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3348  eval ac_new_val=\$ac_env_${ac_var}_value
3349  case $ac_old_set,$ac_new_set in
3350    set,)
3351      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3352$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3353      ac_cache_corrupted=: ;;
3354    ,set)
3355      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3356$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3357      ac_cache_corrupted=: ;;
3358    ,);;
3359    *)
3360      if test "x$ac_old_val" != "x$ac_new_val"; then
3361	# differences in whitespace do not lead to failure.
3362	ac_old_val_w=`echo x $ac_old_val`
3363	ac_new_val_w=`echo x $ac_new_val`
3364	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3365	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3366$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3367	  ac_cache_corrupted=:
3368	else
3369	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3370$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3371	  eval $ac_var=\$ac_old_val
3372	fi
3373	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3374$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3375	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3376$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3377      fi;;
3378  esac
3379  # Pass precious variables to config.status.
3380  if test "$ac_new_set" = set; then
3381    case $ac_new_val in
3382    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3383    *) ac_arg=$ac_var=$ac_new_val ;;
3384    esac
3385    case " $ac_configure_args " in
3386      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3387      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3388    esac
3389  fi
3390done
3391if $ac_cache_corrupted; then
3392  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3393$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3394  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3395$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3396  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3397fi
3398## -------------------- ##
3399## Main body of script. ##
3400## -------------------- ##
3401
3402ac_ext=c
3403ac_cpp='$CPP $CPPFLAGS'
3404ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3405ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3406ac_compiler_gnu=$ac_cv_c_compiler_gnu
3407
3408
3409
3410
3411
3412ac_aux_dir=
3413for ac_dir in build-aux "$srcdir"/build-aux; do
3414  if test -f "$ac_dir/install-sh"; then
3415    ac_aux_dir=$ac_dir
3416    ac_install_sh="$ac_aux_dir/install-sh -c"
3417    break
3418  elif test -f "$ac_dir/install.sh"; then
3419    ac_aux_dir=$ac_dir
3420    ac_install_sh="$ac_aux_dir/install.sh -c"
3421    break
3422  elif test -f "$ac_dir/shtool"; then
3423    ac_aux_dir=$ac_dir
3424    ac_install_sh="$ac_aux_dir/shtool install -c"
3425    break
3426  fi
3427done
3428if test -z "$ac_aux_dir"; then
3429  as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3430fi
3431
3432# These three variables are undocumented and unsupported,
3433# and are intended to be withdrawn in a future Autoconf release.
3434# They can cause serious problems if a builder's source tree is in a directory
3435# whose full name contains unusual characters.
3436ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3437ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3438ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3439
3440
3441ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
3442
3443
3444am__api_version='1.11a'
3445
3446# Find a good install program.  We prefer a C program (faster),
3447# so one script is as good as another.  But avoid the broken or
3448# incompatible versions:
3449# SysV /etc/install, /usr/sbin/install
3450# SunOS /usr/etc/install
3451# IRIX /sbin/install
3452# AIX /bin/install
3453# AmigaOS /C/install, which installs bootblocks on floppy discs
3454# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3455# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3456# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3457# OS/2's system install, which has a completely different semantic
3458# ./install, which can be erroneously created by make from ./install.sh.
3459# Reject install programs that cannot install multiple files.
3460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3461$as_echo_n "checking for a BSD-compatible install... " >&6; }
3462if test -z "$INSTALL"; then
3463if test "${ac_cv_path_install+set}" = set; then :
3464  $as_echo_n "(cached) " >&6
3465else
3466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3467for as_dir in $PATH
3468do
3469  IFS=$as_save_IFS
3470  test -z "$as_dir" && as_dir=.
3471    # Account for people who put trailing slashes in PATH elements.
3472case $as_dir/ in #((
3473  ./ | .// | /[cC]/* | \
3474  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3475  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3476  /usr/ucb/* ) ;;
3477  *)
3478    # OSF1 and SCO ODT 3.0 have their own names for install.
3479    # Don't use installbsd from OSF since it installs stuff as root
3480    # by default.
3481    for ac_prog in ginstall scoinst install; do
3482      for ac_exec_ext in '' $ac_executable_extensions; do
3483	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3484	  if test $ac_prog = install &&
3485	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3486	    # AIX install.  It has an incompatible calling convention.
3487	    :
3488	  elif test $ac_prog = install &&
3489	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3490	    # program-specific install script used by HP pwplus--don't use.
3491	    :
3492	  else
3493	    rm -rf conftest.one conftest.two conftest.dir
3494	    echo one > conftest.one
3495	    echo two > conftest.two
3496	    mkdir conftest.dir
3497	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3498	      test -s conftest.one && test -s conftest.two &&
3499	      test -s conftest.dir/conftest.one &&
3500	      test -s conftest.dir/conftest.two
3501	    then
3502	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3503	      break 3
3504	    fi
3505	  fi
3506	fi
3507      done
3508    done
3509    ;;
3510esac
3511
3512  done
3513IFS=$as_save_IFS
3514
3515rm -rf conftest.one conftest.two conftest.dir
3516
3517fi
3518  if test "${ac_cv_path_install+set}" = set; then
3519    INSTALL=$ac_cv_path_install
3520  else
3521    # As a last resort, use the slow shell script.  Don't cache a
3522    # value for INSTALL within a source directory, because that will
3523    # break other packages using the cache if that directory is
3524    # removed, or if the value is a relative name.
3525    INSTALL=$ac_install_sh
3526  fi
3527fi
3528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3529$as_echo "$INSTALL" >&6; }
3530
3531# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3532# It thinks the first close brace ends the variable substitution.
3533test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3534
3535test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3536
3537test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3538
3539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3540$as_echo_n "checking whether build environment is sane... " >&6; }
3541# Reject unsafe characters in $srcdir or the absolute working directory
3542# name.  Accept space and tab only in the latter.
3543am_lf='
3544'
3545case `pwd` in
3546  *[\\\"\#\$\&\'\`$am_lf]*)
3547    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
3548esac
3549case $srcdir in
3550  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
3551    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3552esac
3553
3554# Do `set' in a subshell so we don't clobber the current shell's
3555# arguments.  Must try -L first in case configure is actually a
3556# symlink; some systems play weird games with the mod time of symlinks
3557# (eg FreeBSD returns the mod time of the symlink's containing
3558# directory).
3559if (
3560   for am_try in 1 2; do
3561     echo timestamp > conftest.file
3562     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3563     if test "$*" = "X"; then
3564	# -L didn't work.
3565	set X `ls -t "$srcdir/configure" conftest.file`
3566     fi
3567     rm -f conftest.file
3568     if test "$*" != "X $srcdir/configure conftest.file" \
3569	&& test "$*" != "X conftest.file $srcdir/configure"; then
3570
3571	# If neither matched, then we have a broken ls.  This can happen
3572	# if, for instance, CONFIG_SHELL is bash and it inherits a
3573	# broken ls alias from the environment.  This has actually
3574	# happened.  Such a system could not be considered "sane".
3575	as_fn_error "ls -t appears to fail.  Make sure there is not a broken
3576  alias in your environment" "$LINENO" 5
3577     fi
3578     if test "$2" = conftest.file || test $am_try -eq 2; then
3579       break
3580     fi
3581     # Just in case.
3582     sleep 1
3583   done
3584   test "$2" = conftest.file
3585   )
3586then
3587   # Ok.
3588   :
3589else
3590   as_fn_error "newly created file is older than distributed files!
3591Check your system clock" "$LINENO" 5
3592fi
3593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3594$as_echo "yes" >&6; }
3595test "$program_prefix" != NONE &&
3596  program_transform_name="s&^&$program_prefix&;$program_transform_name"
3597# Use a double $ so make ignores it.
3598test "$program_suffix" != NONE &&
3599  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3600# Double any \ or $.
3601# By default was `s,x,x', remove it if useless.
3602ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3603program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3604
3605# expand $ac_aux_dir to an absolute path
3606am_aux_dir=`cd $ac_aux_dir && pwd`
3607
3608if test x"${MISSING+set}" != xset; then
3609  case $am_aux_dir in
3610  *\ * | *\	*)
3611    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3612  *)
3613    MISSING="\${SHELL} $am_aux_dir/missing" ;;
3614  esac
3615fi
3616# Use eval to expand $SHELL
3617if eval "$MISSING --run true"; then
3618  am_missing_run="$MISSING --run "
3619else
3620  am_missing_run=
3621  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3622$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3623fi
3624
3625if test x"${install_sh}" != xset; then
3626  case $am_aux_dir in
3627  *\ * | *\	*)
3628    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3629  *)
3630    install_sh="\${SHELL} $am_aux_dir/install-sh"
3631  esac
3632fi
3633
3634# Installed binaries are usually stripped using `strip' when the user
3635# run `make install-strip'.  However `strip' might not be the right
3636# tool to use in cross-compilation environments, therefore Automake
3637# will honor the `STRIP' environment variable to overrule this program.
3638if test "$cross_compiling" != no; then
3639  if test -n "$ac_tool_prefix"; then
3640  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3641set dummy ${ac_tool_prefix}strip; ac_word=$2
3642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3643$as_echo_n "checking for $ac_word... " >&6; }
3644if test "${ac_cv_prog_STRIP+set}" = set; then :
3645  $as_echo_n "(cached) " >&6
3646else
3647  if test -n "$STRIP"; then
3648  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3649else
3650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3651for as_dir in $PATH
3652do
3653  IFS=$as_save_IFS
3654  test -z "$as_dir" && as_dir=.
3655    for ac_exec_ext in '' $ac_executable_extensions; do
3656  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3657    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3659    break 2
3660  fi
3661done
3662  done
3663IFS=$as_save_IFS
3664
3665fi
3666fi
3667STRIP=$ac_cv_prog_STRIP
3668if test -n "$STRIP"; then
3669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3670$as_echo "$STRIP" >&6; }
3671else
3672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3673$as_echo "no" >&6; }
3674fi
3675
3676
3677fi
3678if test -z "$ac_cv_prog_STRIP"; then
3679  ac_ct_STRIP=$STRIP
3680  # Extract the first word of "strip", so it can be a program name with args.
3681set dummy strip; ac_word=$2
3682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3683$as_echo_n "checking for $ac_word... " >&6; }
3684if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3685  $as_echo_n "(cached) " >&6
3686else
3687  if test -n "$ac_ct_STRIP"; then
3688  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3689else
3690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3691for as_dir in $PATH
3692do
3693  IFS=$as_save_IFS
3694  test -z "$as_dir" && as_dir=.
3695    for ac_exec_ext in '' $ac_executable_extensions; do
3696  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3697    ac_cv_prog_ac_ct_STRIP="strip"
3698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3699    break 2
3700  fi
3701done
3702  done
3703IFS=$as_save_IFS
3704
3705fi
3706fi
3707ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3708if test -n "$ac_ct_STRIP"; then
3709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3710$as_echo "$ac_ct_STRIP" >&6; }
3711else
3712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3713$as_echo "no" >&6; }
3714fi
3715
3716  if test "x$ac_ct_STRIP" = x; then
3717    STRIP=":"
3718  else
3719    case $cross_compiling:$ac_tool_warned in
3720yes:)
3721{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3722$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3723ac_tool_warned=yes ;;
3724esac
3725    STRIP=$ac_ct_STRIP
3726  fi
3727else
3728  STRIP="$ac_cv_prog_STRIP"
3729fi
3730
3731fi
3732INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3733
3734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3735$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3736if test -z "$MKDIR_P"; then
3737  if test "${ac_cv_path_mkdir+set}" = set; then :
3738  $as_echo_n "(cached) " >&6
3739else
3740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3741for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3742do
3743  IFS=$as_save_IFS
3744  test -z "$as_dir" && as_dir=.
3745    for ac_prog in mkdir gmkdir; do
3746	 for ac_exec_ext in '' $ac_executable_extensions; do
3747	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3748	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3749	     'mkdir (GNU coreutils) '* | \
3750	     'mkdir (coreutils) '* | \
3751	     'mkdir (fileutils) '4.1*)
3752	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3753	       break 3;;
3754	   esac
3755	 done
3756       done
3757  done
3758IFS=$as_save_IFS
3759
3760fi
3761
3762  test -d ./--version && rmdir ./--version
3763  if test "${ac_cv_path_mkdir+set}" = set; then
3764    MKDIR_P="$ac_cv_path_mkdir -p"
3765  else
3766    # As a last resort, use the slow shell script.  Don't cache a
3767    # value for MKDIR_P within a source directory, because that will
3768    # break other packages using the cache if that directory is
3769    # removed, or if the value is a relative name.
3770    MKDIR_P="$ac_install_sh -d"
3771  fi
3772fi
3773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3774$as_echo "$MKDIR_P" >&6; }
3775
3776mkdir_p="$MKDIR_P"
3777case $mkdir_p in
3778  [\\/$]* | ?:[\\/]*) ;;
3779  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3780esac
3781
3782for ac_prog in gawk mawk nawk awk
3783do
3784  # Extract the first word of "$ac_prog", so it can be a program name with args.
3785set dummy $ac_prog; ac_word=$2
3786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3787$as_echo_n "checking for $ac_word... " >&6; }
3788if test "${ac_cv_prog_AWK+set}" = set; then :
3789  $as_echo_n "(cached) " >&6
3790else
3791  if test -n "$AWK"; then
3792  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3793else
3794as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3795for as_dir in $PATH
3796do
3797  IFS=$as_save_IFS
3798  test -z "$as_dir" && as_dir=.
3799    for ac_exec_ext in '' $ac_executable_extensions; do
3800  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3801    ac_cv_prog_AWK="$ac_prog"
3802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3803    break 2
3804  fi
3805done
3806  done
3807IFS=$as_save_IFS
3808
3809fi
3810fi
3811AWK=$ac_cv_prog_AWK
3812if test -n "$AWK"; then
3813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3814$as_echo "$AWK" >&6; }
3815else
3816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3817$as_echo "no" >&6; }
3818fi
3819
3820
3821  test -n "$AWK" && break
3822done
3823
3824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3825$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3826set x ${MAKE-make}
3827ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3828if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3829  $as_echo_n "(cached) " >&6
3830else
3831  cat >conftest.make <<\_ACEOF
3832SHELL = /bin/sh
3833all:
3834	@echo '@@@%%%=$(MAKE)=@@@%%%'
3835_ACEOF
3836# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3837case `${MAKE-make} -f conftest.make 2>/dev/null` in
3838  *@@@%%%=?*=@@@%%%*)
3839    eval ac_cv_prog_make_${ac_make}_set=yes;;
3840  *)
3841    eval ac_cv_prog_make_${ac_make}_set=no;;
3842esac
3843rm -f conftest.make
3844fi
3845if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3847$as_echo "yes" >&6; }
3848  SET_MAKE=
3849else
3850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3851$as_echo "no" >&6; }
3852  SET_MAKE="MAKE=${MAKE-make}"
3853fi
3854
3855rm -rf .tst 2>/dev/null
3856mkdir .tst 2>/dev/null
3857if test -d .tst; then
3858  am__leading_dot=.
3859else
3860  am__leading_dot=_
3861fi
3862rmdir .tst 2>/dev/null
3863
3864if test "`cd $srcdir && pwd`" != "`pwd`"; then
3865  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3866  # is not polluted with repeated "-I."
3867  am__isrc=' -I$(srcdir)'
3868  # test to see if srcdir already configured
3869  if test -f $srcdir/config.status; then
3870    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3871  fi
3872fi
3873
3874# test whether we have cygpath
3875if test -z "$CYGPATH_W"; then
3876  if (cygpath --version) >/dev/null 2>/dev/null; then
3877    CYGPATH_W='cygpath -w'
3878  else
3879    CYGPATH_W=echo
3880  fi
3881fi
3882
3883
3884# Define the identity of the package.
3885 PACKAGE='coreutils'
3886 VERSION='8.4'
3887
3888
3889cat >>confdefs.h <<_ACEOF
3890#define PACKAGE "$PACKAGE"
3891_ACEOF
3892
3893
3894cat >>confdefs.h <<_ACEOF
3895#define VERSION "$VERSION"
3896_ACEOF
3897
3898# Some tools Automake needs.
3899
3900ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3901
3902
3903AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3904
3905
3906AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3907
3908
3909AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3910
3911
3912MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3913
3914# We need awk for the "check" target.  The system "awk" is bad on
3915# some platforms.
3916# Always define AMTAR for backward compatibility.
3917
3918AMTAR=${AMTAR-"${am_missing_run}tar"}
3919
3920am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3921
3922
3923
3924
3925
3926# Check whether --enable-silent-rules was given.
3927if test "${enable_silent_rules+set}" = set; then :
3928  enableval=$enable_silent_rules;
3929fi
3930
3931case $enable_silent_rules in
3932yes) AM_DEFAULT_VERBOSITY=0;;
3933no)  AM_DEFAULT_VERBOSITY=1;;
3934*)   AM_DEFAULT_VERBOSITY=0;;
3935esac
3936AM_BACKSLASH='\'
3937 # make --enable-silent-rules the default.
3938
3939DEPDIR="${am__leading_dot}deps"
3940
3941ac_config_commands="$ac_config_commands depfiles"
3942
3943
3944am_make=${MAKE-make}
3945cat > confinc << 'END'
3946am__doit:
3947	@echo this is the am__doit target
3948.PHONY: am__doit
3949END
3950# If we don't find an include directive, just comment out the code.
3951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3952$as_echo_n "checking for style of include used by $am_make... " >&6; }
3953am__include="#"
3954am__quote=
3955_am_result=none
3956# First try GNU make style include.
3957echo "include confinc" > confmf
3958# Ignore all kinds of additional output from `make'.
3959case `$am_make -s -f confmf 2> /dev/null` in #(
3960*the\ am__doit\ target*)
3961  am__include=include
3962  am__quote=
3963  _am_result=GNU
3964  ;;
3965esac
3966# Now try BSD make style include.
3967if test "$am__include" = "#"; then
3968   echo '.include "confinc"' > confmf
3969   case `$am_make -s -f confmf 2> /dev/null` in #(
3970   *the\ am__doit\ target*)
3971     am__include=.include
3972     am__quote="\""
3973     _am_result=BSD
3974     ;;
3975   esac
3976fi
3977
3978
3979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3980$as_echo "$_am_result" >&6; }
3981rm -f confinc confmf
3982
3983# Check whether --enable-dependency-tracking was given.
3984if test "${enable_dependency_tracking+set}" = set; then :
3985  enableval=$enable_dependency_tracking;
3986fi
3987
3988if test "x$enable_dependency_tracking" != xno; then
3989  am_depcomp="$ac_aux_dir/depcomp"
3990  AMDEPBACKSLASH='\'
3991fi
3992 if test "x$enable_dependency_tracking" != xno; then
3993  AMDEP_TRUE=
3994  AMDEP_FALSE='#'
3995else
3996  AMDEP_TRUE='#'
3997  AMDEP_FALSE=
3998fi
3999
4000
4001ac_ext=c
4002ac_cpp='$CPP $CPPFLAGS'
4003ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4004ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4005ac_compiler_gnu=$ac_cv_c_compiler_gnu
4006if test -n "$ac_tool_prefix"; then
4007  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4008set dummy ${ac_tool_prefix}gcc; ac_word=$2
4009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4010$as_echo_n "checking for $ac_word... " >&6; }
4011if test "${ac_cv_prog_CC+set}" = set; then :
4012  $as_echo_n "(cached) " >&6
4013else
4014  if test -n "$CC"; then
4015  ac_cv_prog_CC="$CC" # Let the user override the test.
4016else
4017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4018for as_dir in $PATH
4019do
4020  IFS=$as_save_IFS
4021  test -z "$as_dir" && as_dir=.
4022    for ac_exec_ext in '' $ac_executable_extensions; do
4023  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4024    ac_cv_prog_CC="${ac_tool_prefix}gcc"
4025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4026    break 2
4027  fi
4028done
4029  done
4030IFS=$as_save_IFS
4031
4032fi
4033fi
4034CC=$ac_cv_prog_CC
4035if test -n "$CC"; then
4036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4037$as_echo "$CC" >&6; }
4038else
4039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4040$as_echo "no" >&6; }
4041fi
4042
4043
4044fi
4045if test -z "$ac_cv_prog_CC"; then
4046  ac_ct_CC=$CC
4047  # Extract the first word of "gcc", so it can be a program name with args.
4048set dummy gcc; ac_word=$2
4049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4050$as_echo_n "checking for $ac_word... " >&6; }
4051if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4052  $as_echo_n "(cached) " >&6
4053else
4054  if test -n "$ac_ct_CC"; then
4055  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4056else
4057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4058for as_dir in $PATH
4059do
4060  IFS=$as_save_IFS
4061  test -z "$as_dir" && as_dir=.
4062    for ac_exec_ext in '' $ac_executable_extensions; do
4063  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4064    ac_cv_prog_ac_ct_CC="gcc"
4065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4066    break 2
4067  fi
4068done
4069  done
4070IFS=$as_save_IFS
4071
4072fi
4073fi
4074ac_ct_CC=$ac_cv_prog_ac_ct_CC
4075if test -n "$ac_ct_CC"; then
4076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4077$as_echo "$ac_ct_CC" >&6; }
4078else
4079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4080$as_echo "no" >&6; }
4081fi
4082
4083  if test "x$ac_ct_CC" = x; then
4084    CC=""
4085  else
4086    case $cross_compiling:$ac_tool_warned in
4087yes:)
4088{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4089$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4090ac_tool_warned=yes ;;
4091esac
4092    CC=$ac_ct_CC
4093  fi
4094else
4095  CC="$ac_cv_prog_CC"
4096fi
4097
4098if test -z "$CC"; then
4099          if test -n "$ac_tool_prefix"; then
4100    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4101set dummy ${ac_tool_prefix}cc; ac_word=$2
4102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4103$as_echo_n "checking for $ac_word... " >&6; }
4104if test "${ac_cv_prog_CC+set}" = set; then :
4105  $as_echo_n "(cached) " >&6
4106else
4107  if test -n "$CC"; then
4108  ac_cv_prog_CC="$CC" # Let the user override the test.
4109else
4110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4111for as_dir in $PATH
4112do
4113  IFS=$as_save_IFS
4114  test -z "$as_dir" && as_dir=.
4115    for ac_exec_ext in '' $ac_executable_extensions; do
4116  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4117    ac_cv_prog_CC="${ac_tool_prefix}cc"
4118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4119    break 2
4120  fi
4121done
4122  done
4123IFS=$as_save_IFS
4124
4125fi
4126fi
4127CC=$ac_cv_prog_CC
4128if test -n "$CC"; then
4129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4130$as_echo "$CC" >&6; }
4131else
4132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4133$as_echo "no" >&6; }
4134fi
4135
4136
4137  fi
4138fi
4139if test -z "$CC"; then
4140  # Extract the first word of "cc", so it can be a program name with args.
4141set dummy cc; ac_word=$2
4142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4143$as_echo_n "checking for $ac_word... " >&6; }
4144if test "${ac_cv_prog_CC+set}" = set; then :
4145  $as_echo_n "(cached) " >&6
4146else
4147  if test -n "$CC"; then
4148  ac_cv_prog_CC="$CC" # Let the user override the test.
4149else
4150  ac_prog_rejected=no
4151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4152for as_dir in $PATH
4153do
4154  IFS=$as_save_IFS
4155  test -z "$as_dir" && as_dir=.
4156    for ac_exec_ext in '' $ac_executable_extensions; do
4157  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4158    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4159       ac_prog_rejected=yes
4160       continue
4161     fi
4162    ac_cv_prog_CC="cc"
4163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4164    break 2
4165  fi
4166done
4167  done
4168IFS=$as_save_IFS
4169
4170if test $ac_prog_rejected = yes; then
4171  # We found a bogon in the path, so make sure we never use it.
4172  set dummy $ac_cv_prog_CC
4173  shift
4174  if test $# != 0; then
4175    # We chose a different compiler from the bogus one.
4176    # However, it has the same basename, so the bogon will be chosen
4177    # first if we set CC to just the basename; use the full file name.
4178    shift
4179    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4180  fi
4181fi
4182fi
4183fi
4184CC=$ac_cv_prog_CC
4185if test -n "$CC"; then
4186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4187$as_echo "$CC" >&6; }
4188else
4189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4190$as_echo "no" >&6; }
4191fi
4192
4193
4194fi
4195if test -z "$CC"; then
4196  if test -n "$ac_tool_prefix"; then
4197  for ac_prog in cl.exe
4198  do
4199    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4200set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4202$as_echo_n "checking for $ac_word... " >&6; }
4203if test "${ac_cv_prog_CC+set}" = set; then :
4204  $as_echo_n "(cached) " >&6
4205else
4206  if test -n "$CC"; then
4207  ac_cv_prog_CC="$CC" # Let the user override the test.
4208else
4209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4210for as_dir in $PATH
4211do
4212  IFS=$as_save_IFS
4213  test -z "$as_dir" && as_dir=.
4214    for ac_exec_ext in '' $ac_executable_extensions; do
4215  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4216    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4218    break 2
4219  fi
4220done
4221  done
4222IFS=$as_save_IFS
4223
4224fi
4225fi
4226CC=$ac_cv_prog_CC
4227if test -n "$CC"; then
4228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4229$as_echo "$CC" >&6; }
4230else
4231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4232$as_echo "no" >&6; }
4233fi
4234
4235
4236    test -n "$CC" && break
4237  done
4238fi
4239if test -z "$CC"; then
4240  ac_ct_CC=$CC
4241  for ac_prog in cl.exe
4242do
4243  # Extract the first word of "$ac_prog", so it can be a program name with args.
4244set dummy $ac_prog; ac_word=$2
4245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4246$as_echo_n "checking for $ac_word... " >&6; }
4247if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4248  $as_echo_n "(cached) " >&6
4249else
4250  if test -n "$ac_ct_CC"; then
4251  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4252else
4253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4254for as_dir in $PATH
4255do
4256  IFS=$as_save_IFS
4257  test -z "$as_dir" && as_dir=.
4258    for ac_exec_ext in '' $ac_executable_extensions; do
4259  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4260    ac_cv_prog_ac_ct_CC="$ac_prog"
4261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4262    break 2
4263  fi
4264done
4265  done
4266IFS=$as_save_IFS
4267
4268fi
4269fi
4270ac_ct_CC=$ac_cv_prog_ac_ct_CC
4271if test -n "$ac_ct_CC"; then
4272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4273$as_echo "$ac_ct_CC" >&6; }
4274else
4275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4276$as_echo "no" >&6; }
4277fi
4278
4279
4280  test -n "$ac_ct_CC" && break
4281done
4282
4283  if test "x$ac_ct_CC" = x; then
4284    CC=""
4285  else
4286    case $cross_compiling:$ac_tool_warned in
4287yes:)
4288{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4289$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4290ac_tool_warned=yes ;;
4291esac
4292    CC=$ac_ct_CC
4293  fi
4294fi
4295
4296fi
4297
4298
4299test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4300$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4301as_fn_error "no acceptable C compiler found in \$PATH
4302See \`config.log' for more details." "$LINENO" 5; }
4303
4304# Provide some information about the compiler.
4305$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4306set X $ac_compile
4307ac_compiler=$2
4308for ac_option in --version -v -V -qversion; do
4309  { { ac_try="$ac_compiler $ac_option >&5"
4310case "(($ac_try" in
4311  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4312  *) ac_try_echo=$ac_try;;
4313esac
4314eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4315$as_echo "$ac_try_echo"; } >&5
4316  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4317  ac_status=$?
4318  if test -s conftest.err; then
4319    sed '10a\
4320... rest of stderr output deleted ...
4321         10q' conftest.err >conftest.er1
4322    cat conftest.er1 >&5
4323  fi
4324  rm -f conftest.er1 conftest.err
4325  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4326  test $ac_status = 0; }
4327done
4328
4329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4330/* end confdefs.h.  */
4331
4332int
4333main ()
4334{
4335
4336  ;
4337  return 0;
4338}
4339_ACEOF
4340ac_clean_files_save=$ac_clean_files
4341ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4342# Try to create an executable without -o first, disregard a.out.
4343# It will help us diagnose broken compilers, and finding out an intuition
4344# of exeext.
4345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4346$as_echo_n "checking whether the C compiler works... " >&6; }
4347ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4348
4349# The possible output files:
4350ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4351
4352ac_rmfiles=
4353for ac_file in $ac_files
4354do
4355  case $ac_file in
4356    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4357    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4358  esac
4359done
4360rm -f $ac_rmfiles
4361
4362if { { ac_try="$ac_link_default"
4363case "(($ac_try" in
4364  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4365  *) ac_try_echo=$ac_try;;
4366esac
4367eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4368$as_echo "$ac_try_echo"; } >&5
4369  (eval "$ac_link_default") 2>&5
4370  ac_status=$?
4371  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4372  test $ac_status = 0; }; then :
4373  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4374# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4375# in a Makefile.  We should not override ac_cv_exeext if it was cached,
4376# so that the user can short-circuit this test for compilers unknown to
4377# Autoconf.
4378for ac_file in $ac_files ''
4379do
4380  test -f "$ac_file" || continue
4381  case $ac_file in
4382    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4383	;;
4384    [ab].out )
4385	# We found the default executable, but exeext='' is most
4386	# certainly right.
4387	break;;
4388    *.* )
4389	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4390	then :; else
4391	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4392	fi
4393	# We set ac_cv_exeext here because the later test for it is not
4394	# safe: cross compilers may not add the suffix if given an `-o'
4395	# argument, so we may need to know it at that point already.
4396	# Even if this section looks crufty: it has the advantage of
4397	# actually working.
4398	break;;
4399    * )
4400	break;;
4401  esac
4402done
4403test "$ac_cv_exeext" = no && ac_cv_exeext=
4404
4405else
4406  ac_file=''
4407fi
4408if test -z "$ac_file"; then :
4409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4410$as_echo "no" >&6; }
4411$as_echo "$as_me: failed program was:" >&5
4412sed 's/^/| /' conftest.$ac_ext >&5
4413
4414{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4415$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4416{ as_fn_set_status 77
4417as_fn_error "C compiler cannot create executables
4418See \`config.log' for more details." "$LINENO" 5; }; }
4419else
4420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4421$as_echo "yes" >&6; }
4422fi
4423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4424$as_echo_n "checking for C compiler default output file name... " >&6; }
4425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4426$as_echo "$ac_file" >&6; }
4427ac_exeext=$ac_cv_exeext
4428
4429rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4430ac_clean_files=$ac_clean_files_save
4431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4432$as_echo_n "checking for suffix of executables... " >&6; }
4433if { { ac_try="$ac_link"
4434case "(($ac_try" in
4435  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4436  *) ac_try_echo=$ac_try;;
4437esac
4438eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4439$as_echo "$ac_try_echo"; } >&5
4440  (eval "$ac_link") 2>&5
4441  ac_status=$?
4442  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4443  test $ac_status = 0; }; then :
4444  # If both `conftest.exe' and `conftest' are `present' (well, observable)
4445# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4446# work properly (i.e., refer to `conftest.exe'), while it won't with
4447# `rm'.
4448for ac_file in conftest.exe conftest conftest.*; do
4449  test -f "$ac_file" || continue
4450  case $ac_file in
4451    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4452    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4453	  break;;
4454    * ) break;;
4455  esac
4456done
4457else
4458  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4459$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4460as_fn_error "cannot compute suffix of executables: cannot compile and link
4461See \`config.log' for more details." "$LINENO" 5; }
4462fi
4463rm -f conftest conftest$ac_cv_exeext
4464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4465$as_echo "$ac_cv_exeext" >&6; }
4466
4467rm -f conftest.$ac_ext
4468EXEEXT=$ac_cv_exeext
4469ac_exeext=$EXEEXT
4470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4471/* end confdefs.h.  */
4472#include <stdio.h>
4473int
4474main ()
4475{
4476FILE *f = fopen ("conftest.out", "w");
4477 return ferror (f) || fclose (f) != 0;
4478
4479  ;
4480  return 0;
4481}
4482_ACEOF
4483ac_clean_files="$ac_clean_files conftest.out"
4484# Check that the compiler produces executables we can run.  If not, either
4485# the compiler is broken, or we cross compile.
4486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4487$as_echo_n "checking whether we are cross compiling... " >&6; }
4488if test "$cross_compiling" != yes; then
4489  { { ac_try="$ac_link"
4490case "(($ac_try" in
4491  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4492  *) ac_try_echo=$ac_try;;
4493esac
4494eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4495$as_echo "$ac_try_echo"; } >&5
4496  (eval "$ac_link") 2>&5
4497  ac_status=$?
4498  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4499  test $ac_status = 0; }
4500  if { ac_try='./conftest$ac_cv_exeext'
4501  { { case "(($ac_try" in
4502  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4503  *) ac_try_echo=$ac_try;;
4504esac
4505eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4506$as_echo "$ac_try_echo"; } >&5
4507  (eval "$ac_try") 2>&5
4508  ac_status=$?
4509  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4510  test $ac_status = 0; }; }; then
4511    cross_compiling=no
4512  else
4513    if test "$cross_compiling" = maybe; then
4514	cross_compiling=yes
4515    else
4516	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4517$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4518as_fn_error "cannot run C compiled programs.
4519If you meant to cross compile, use \`--host'.
4520See \`config.log' for more details." "$LINENO" 5; }
4521    fi
4522  fi
4523fi
4524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4525$as_echo "$cross_compiling" >&6; }
4526
4527rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4528ac_clean_files=$ac_clean_files_save
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4530$as_echo_n "checking for suffix of object files... " >&6; }
4531if test "${ac_cv_objext+set}" = set; then :
4532  $as_echo_n "(cached) " >&6
4533else
4534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4535/* end confdefs.h.  */
4536
4537int
4538main ()
4539{
4540
4541  ;
4542  return 0;
4543}
4544_ACEOF
4545rm -f conftest.o conftest.obj
4546if { { ac_try="$ac_compile"
4547case "(($ac_try" in
4548  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4549  *) ac_try_echo=$ac_try;;
4550esac
4551eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4552$as_echo "$ac_try_echo"; } >&5
4553  (eval "$ac_compile") 2>&5
4554  ac_status=$?
4555  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4556  test $ac_status = 0; }; then :
4557  for ac_file in conftest.o conftest.obj conftest.*; do
4558  test -f "$ac_file" || continue;
4559  case $ac_file in
4560    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4561    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4562       break;;
4563  esac
4564done
4565else
4566  $as_echo "$as_me: failed program was:" >&5
4567sed 's/^/| /' conftest.$ac_ext >&5
4568
4569{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4570$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4571as_fn_error "cannot compute suffix of object files: cannot compile
4572See \`config.log' for more details." "$LINENO" 5; }
4573fi
4574rm -f conftest.$ac_cv_objext conftest.$ac_ext
4575fi
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4577$as_echo "$ac_cv_objext" >&6; }
4578OBJEXT=$ac_cv_objext
4579ac_objext=$OBJEXT
4580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4581$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4582if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4583  $as_echo_n "(cached) " >&6
4584else
4585  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4586/* end confdefs.h.  */
4587
4588int
4589main ()
4590{
4591#ifndef __GNUC__
4592       choke me
4593#endif
4594
4595  ;
4596  return 0;
4597}
4598_ACEOF
4599if ac_fn_c_try_compile "$LINENO"; then :
4600  ac_compiler_gnu=yes
4601else
4602  ac_compiler_gnu=no
4603fi
4604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4605ac_cv_c_compiler_gnu=$ac_compiler_gnu
4606
4607fi
4608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4609$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4610if test $ac_compiler_gnu = yes; then
4611  GCC=yes
4612else
4613  GCC=
4614fi
4615ac_test_CFLAGS=${CFLAGS+set}
4616ac_save_CFLAGS=$CFLAGS
4617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4618$as_echo_n "checking whether $CC accepts -g... " >&6; }
4619if test "${ac_cv_prog_cc_g+set}" = set; then :
4620  $as_echo_n "(cached) " >&6
4621else
4622  ac_save_c_werror_flag=$ac_c_werror_flag
4623   ac_c_werror_flag=yes
4624   ac_cv_prog_cc_g=no
4625   CFLAGS="-g"
4626   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4627/* end confdefs.h.  */
4628
4629int
4630main ()
4631{
4632
4633  ;
4634  return 0;
4635}
4636_ACEOF
4637if ac_fn_c_try_compile "$LINENO"; then :
4638  ac_cv_prog_cc_g=yes
4639else
4640  CFLAGS=""
4641      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4642/* end confdefs.h.  */
4643
4644int
4645main ()
4646{
4647
4648  ;
4649  return 0;
4650}
4651_ACEOF
4652if ac_fn_c_try_compile "$LINENO"; then :
4653
4654else
4655  ac_c_werror_flag=$ac_save_c_werror_flag
4656	 CFLAGS="-g"
4657	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4658/* end confdefs.h.  */
4659
4660int
4661main ()
4662{
4663
4664  ;
4665  return 0;
4666}
4667_ACEOF
4668if ac_fn_c_try_compile "$LINENO"; then :
4669  ac_cv_prog_cc_g=yes
4670fi
4671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4672fi
4673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4674fi
4675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4676   ac_c_werror_flag=$ac_save_c_werror_flag
4677fi
4678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4679$as_echo "$ac_cv_prog_cc_g" >&6; }
4680if test "$ac_test_CFLAGS" = set; then
4681  CFLAGS=$ac_save_CFLAGS
4682elif test $ac_cv_prog_cc_g = yes; then
4683  if test "$GCC" = yes; then
4684    CFLAGS="-g -O2"
4685  else
4686    CFLAGS="-g"
4687  fi
4688else
4689  if test "$GCC" = yes; then
4690    CFLAGS="-O2"
4691  else
4692    CFLAGS=
4693  fi
4694fi
4695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4696$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4697if test "${ac_cv_prog_cc_c89+set}" = set; then :
4698  $as_echo_n "(cached) " >&6
4699else
4700  ac_cv_prog_cc_c89=no
4701ac_save_CC=$CC
4702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4703/* end confdefs.h.  */
4704#include <stdarg.h>
4705#include <stdio.h>
4706#include <sys/types.h>
4707#include <sys/stat.h>
4708/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4709struct buf { int x; };
4710FILE * (*rcsopen) (struct buf *, struct stat *, int);
4711static char *e (p, i)
4712     char **p;
4713     int i;
4714{
4715  return p[i];
4716}
4717static char *f (char * (*g) (char **, int), char **p, ...)
4718{
4719  char *s;
4720  va_list v;
4721  va_start (v,p);
4722  s = g (p, va_arg (v,int));
4723  va_end (v);
4724  return s;
4725}
4726
4727/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4728   function prototypes and stuff, but not '\xHH' hex character constants.
4729   These don't provoke an error unfortunately, instead are silently treated
4730   as 'x'.  The following induces an error, until -std is added to get
4731   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4732   array size at least.  It's necessary to write '\x00'==0 to get something
4733   that's true only with -std.  */
4734int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4735
4736/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4737   inside strings and character constants.  */
4738#define FOO(x) 'x'
4739int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4740
4741int test (int i, double x);
4742struct s1 {int (*f) (int a);};
4743struct s2 {int (*f) (double a);};
4744int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4745int argc;
4746char **argv;
4747int
4748main ()
4749{
4750return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4751  ;
4752  return 0;
4753}
4754_ACEOF
4755for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4756	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4757do
4758  CC="$ac_save_CC $ac_arg"
4759  if ac_fn_c_try_compile "$LINENO"; then :
4760  ac_cv_prog_cc_c89=$ac_arg
4761fi
4762rm -f core conftest.err conftest.$ac_objext
4763  test "x$ac_cv_prog_cc_c89" != "xno" && break
4764done
4765rm -f conftest.$ac_ext
4766CC=$ac_save_CC
4767
4768fi
4769# AC_CACHE_VAL
4770case "x$ac_cv_prog_cc_c89" in
4771  x)
4772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4773$as_echo "none needed" >&6; } ;;
4774  xno)
4775    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4776$as_echo "unsupported" >&6; } ;;
4777  *)
4778    CC="$CC $ac_cv_prog_cc_c89"
4779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4780$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4781esac
4782if test "x$ac_cv_prog_cc_c89" != xno; then :
4783
4784fi
4785
4786ac_ext=c
4787ac_cpp='$CPP $CPPFLAGS'
4788ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4789ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4790ac_compiler_gnu=$ac_cv_c_compiler_gnu
4791
4792depcc="$CC"   am_compiler_list=
4793
4794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4795$as_echo_n "checking dependency style of $depcc... " >&6; }
4796if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
4797  $as_echo_n "(cached) " >&6
4798else
4799  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4800  # We make a subdir and do the tests there.  Otherwise we can end up
4801  # making bogus files that we don't know about and never remove.  For
4802  # instance it was reported that on HP-UX the gcc test will end up
4803  # making a dummy file named `D' -- because `-MD' means `put the output
4804  # in D'.
4805  mkdir conftest.dir
4806  # Copy depcomp to subdir because otherwise we won't find it if we're
4807  # using a relative directory.
4808  cp "$am_depcomp" conftest.dir
4809  cd conftest.dir
4810  # We will build objects and dependencies in a subdirectory because
4811  # it helps to detect inapplicable dependency modes.  For instance
4812  # both Tru64's cc and ICC support -MD to output dependencies as a
4813  # side effect of compilation, but ICC will put the dependencies in
4814  # the current directory while Tru64 will put them in the object
4815  # directory.
4816  mkdir sub
4817
4818  am_cv_CC_dependencies_compiler_type=none
4819  if test "$am_compiler_list" = ""; then
4820     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4821  fi
4822  am__universal=false
4823  case " $depcc " in #(
4824     *\ -arch\ *\ -arch\ *) am__universal=true ;;
4825     esac
4826
4827  for depmode in $am_compiler_list; do
4828    # Setup a source with many dependencies, because some compilers
4829    # like to wrap large dependency lists on column 80 (with \), and
4830    # we should not choose a depcomp mode which is confused by this.
4831    #
4832    # We need to recreate these files for each test, as the compiler may
4833    # overwrite some of them when testing with obscure command lines.
4834    # This happens at least with the AIX C compiler.
4835    : > sub/conftest.c
4836    for i in 1 2 3 4 5 6; do
4837      echo '#include "conftst'$i'.h"' >> sub/conftest.c
4838      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4839      # Solaris 8's {/usr,}/bin/sh.
4840      touch sub/conftst$i.h
4841    done
4842    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4843
4844    # We check with `-c' and `-o' for the sake of the "dashmstdout"
4845    # mode.  It turns out that the SunPro C++ compiler does not properly
4846    # handle `-M -o', and we need to detect this.  Also, some Intel
4847    # versions had trouble with output in subdirs
4848    am__obj=sub/conftest.${OBJEXT-o}
4849    am__minus_obj="-o $am__obj"
4850    case $depmode in
4851    gcc)
4852      # This depmode causes a compiler race in universal mode.
4853      test "$am__universal" = false || continue
4854      ;;
4855    nosideeffect)
4856      # after this tag, mechanisms are not by side-effect, so they'll
4857      # only be used when explicitly requested
4858      if test "x$enable_dependency_tracking" = xyes; then
4859	continue
4860      else
4861	break
4862      fi
4863      ;;
4864    msvisualcpp | msvcmsys)
4865      # This compiler won't grok `-c -o', but also, the minuso test has
4866      # not run yet.  These depmodes are late enough in the game, and
4867      # so weak that their functioning should not be impacted.
4868      am__obj=conftest.${OBJEXT-o}
4869      am__minus_obj=
4870      ;;
4871    none) break ;;
4872    esac
4873    if depmode=$depmode \
4874       source=sub/conftest.c object=$am__obj \
4875       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4876       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4877         >/dev/null 2>conftest.err &&
4878       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4879       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4880       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4881       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4882      # icc doesn't choke on unknown options, it will just issue warnings
4883      # or remarks (even with -Werror).  So we grep stderr for any message
4884      # that says an option was ignored or not supported.
4885      # When given -MP, icc 7.0 and 7.1 complain thusly:
4886      #   icc: Command line warning: ignoring option '-M'; no argument required
4887      # The diagnosis changed in icc 8.0:
4888      #   icc: Command line remark: option '-MP' not supported
4889      if (grep 'ignoring option' conftest.err ||
4890          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4891        am_cv_CC_dependencies_compiler_type=$depmode
4892        break
4893      fi
4894    fi
4895  done
4896
4897  cd ..
4898  rm -rf conftest.dir
4899else
4900  am_cv_CC_dependencies_compiler_type=none
4901fi
4902
4903fi
4904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4905$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4906CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4907
4908 if
4909  test "x$enable_dependency_tracking" != xno \
4910  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4911  am__fastdepCC_TRUE=
4912  am__fastdepCC_FALSE='#'
4913else
4914  am__fastdepCC_TRUE='#'
4915  am__fastdepCC_FALSE=
4916fi
4917
4918
4919   case $ac_cv_prog_cc_stdc in #(
4920  no) :
4921    ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
4922  *) :
4923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4924$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4925if test "${ac_cv_prog_cc_c99+set}" = set; then :
4926  $as_echo_n "(cached) " >&6
4927else
4928  ac_cv_prog_cc_c99=no
4929ac_save_CC=$CC
4930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4931/* end confdefs.h.  */
4932#include <stdarg.h>
4933#include <stdbool.h>
4934#include <stdlib.h>
4935#include <wchar.h>
4936#include <stdio.h>
4937
4938// Check varargs macros.  These examples are taken from C99 6.10.3.5.
4939#define debug(...) fprintf (stderr, __VA_ARGS__)
4940#define showlist(...) puts (#__VA_ARGS__)
4941#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4942static void
4943test_varargs_macros (void)
4944{
4945  int x = 1234;
4946  int y = 5678;
4947  debug ("Flag");
4948  debug ("X = %d\n", x);
4949  showlist (The first, second, and third items.);
4950  report (x>y, "x is %d but y is %d", x, y);
4951}
4952
4953// Check long long types.
4954#define BIG64 18446744073709551615ull
4955#define BIG32 4294967295ul
4956#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4957#if !BIG_OK
4958  your preprocessor is broken;
4959#endif
4960#if BIG_OK
4961#else
4962  your preprocessor is broken;
4963#endif
4964static long long int bignum = -9223372036854775807LL;
4965static unsigned long long int ubignum = BIG64;
4966
4967struct incomplete_array
4968{
4969  int datasize;
4970  double data[];
4971};
4972
4973struct named_init {
4974  int number;
4975  const wchar_t *name;
4976  double average;
4977};
4978
4979typedef const char *ccp;
4980
4981static inline int
4982test_restrict (ccp restrict text)
4983{
4984  // See if C++-style comments work.
4985  // Iterate through items via the restricted pointer.
4986  // Also check for declarations in for loops.
4987  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4988    continue;
4989  return 0;
4990}
4991
4992// Check varargs and va_copy.
4993static void
4994test_varargs (const char *format, ...)
4995{
4996  va_list args;
4997  va_start (args, format);
4998  va_list args_copy;
4999  va_copy (args_copy, args);
5000
5001  const char *str;
5002  int number;
5003  float fnumber;
5004
5005  while (*format)
5006    {
5007      switch (*format++)
5008	{
5009	case 's': // string
5010	  str = va_arg (args_copy, const char *);
5011	  break;
5012	case 'd': // int
5013	  number = va_arg (args_copy, int);
5014	  break;
5015	case 'f': // float
5016	  fnumber = va_arg (args_copy, double);
5017	  break;
5018	default:
5019	  break;
5020	}
5021    }
5022  va_end (args_copy);
5023  va_end (args);
5024}
5025
5026int
5027main ()
5028{
5029
5030  // Check bool.
5031  _Bool success = false;
5032
5033  // Check restrict.
5034  if (test_restrict ("String literal") == 0)
5035    success = true;
5036  char *restrict newvar = "Another string";
5037
5038  // Check varargs.
5039  test_varargs ("s, d' f .", "string", 65, 34.234);
5040  test_varargs_macros ();
5041
5042  // Check flexible array members.
5043  struct incomplete_array *ia =
5044    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5045  ia->datasize = 10;
5046  for (int i = 0; i < ia->datasize; ++i)
5047    ia->data[i] = i * 1.234;
5048
5049  // Check named initializers.
5050  struct named_init ni = {
5051    .number = 34,
5052    .name = L"Test wide string",
5053    .average = 543.34343,
5054  };
5055
5056  ni.number = 58;
5057
5058  int dynamic_array[ni.number];
5059  dynamic_array[ni.number - 1] = 543;
5060
5061  // work around unused variable warnings
5062  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5063	  || dynamic_array[ni.number - 1] != 543);
5064
5065  ;
5066  return 0;
5067}
5068_ACEOF
5069for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
5070do
5071  CC="$ac_save_CC $ac_arg"
5072  if ac_fn_c_try_compile "$LINENO"; then :
5073  ac_cv_prog_cc_c99=$ac_arg
5074fi
5075rm -f core conftest.err conftest.$ac_objext
5076  test "x$ac_cv_prog_cc_c99" != "xno" && break
5077done
5078rm -f conftest.$ac_ext
5079CC=$ac_save_CC
5080
5081fi
5082# AC_CACHE_VAL
5083case "x$ac_cv_prog_cc_c99" in
5084  x)
5085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5086$as_echo "none needed" >&6; } ;;
5087  xno)
5088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5089$as_echo "unsupported" >&6; } ;;
5090  *)
5091    CC="$CC $ac_cv_prog_cc_c99"
5092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5093$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5094esac
5095if test "x$ac_cv_prog_cc_c99" != xno; then :
5096  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5097else
5098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5099$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5100if test "${ac_cv_prog_cc_c89+set}" = set; then :
5101  $as_echo_n "(cached) " >&6
5102else
5103  ac_cv_prog_cc_c89=no
5104ac_save_CC=$CC
5105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5106/* end confdefs.h.  */
5107#include <stdarg.h>
5108#include <stdio.h>
5109#include <sys/types.h>
5110#include <sys/stat.h>
5111/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5112struct buf { int x; };
5113FILE * (*rcsopen) (struct buf *, struct stat *, int);
5114static char *e (p, i)
5115     char **p;
5116     int i;
5117{
5118  return p[i];
5119}
5120static char *f (char * (*g) (char **, int), char **p, ...)
5121{
5122  char *s;
5123  va_list v;
5124  va_start (v,p);
5125  s = g (p, va_arg (v,int));
5126  va_end (v);
5127  return s;
5128}
5129
5130/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5131   function prototypes and stuff, but not '\xHH' hex character constants.
5132   These don't provoke an error unfortunately, instead are silently treated
5133   as 'x'.  The following induces an error, until -std is added to get
5134   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5135   array size at least.  It's necessary to write '\x00'==0 to get something
5136   that's true only with -std.  */
5137int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5138
5139/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5140   inside strings and character constants.  */
5141#define FOO(x) 'x'
5142int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5143
5144int test (int i, double x);
5145struct s1 {int (*f) (int a);};
5146struct s2 {int (*f) (double a);};
5147int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5148int argc;
5149char **argv;
5150int
5151main ()
5152{
5153return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5154  ;
5155  return 0;
5156}
5157_ACEOF
5158for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5159	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5160do
5161  CC="$ac_save_CC $ac_arg"
5162  if ac_fn_c_try_compile "$LINENO"; then :
5163  ac_cv_prog_cc_c89=$ac_arg
5164fi
5165rm -f core conftest.err conftest.$ac_objext
5166  test "x$ac_cv_prog_cc_c89" != "xno" && break
5167done
5168rm -f conftest.$ac_ext
5169CC=$ac_save_CC
5170
5171fi
5172# AC_CACHE_VAL
5173case "x$ac_cv_prog_cc_c89" in
5174  x)
5175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5176$as_echo "none needed" >&6; } ;;
5177  xno)
5178    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5179$as_echo "unsupported" >&6; } ;;
5180  *)
5181    CC="$CC $ac_cv_prog_cc_c89"
5182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5183$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5184esac
5185if test "x$ac_cv_prog_cc_c89" != xno; then :
5186  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5187else
5188  ac_cv_prog_cc_stdc=no
5189fi
5190
5191fi
5192 ;;
5193esac
5194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5195$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5196  if test "${ac_cv_prog_cc_stdc+set}" = set; then :
5197  $as_echo_n "(cached) " >&6
5198fi
5199
5200  case $ac_cv_prog_cc_stdc in #(
5201  no) :
5202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5203$as_echo "unsupported" >&6; } ;; #(
5204  '') :
5205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5206$as_echo "none needed" >&6; } ;; #(
5207  *) :
5208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
5209$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
5210esac
5211
5212if test "x$CC" != xcc; then
5213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5214$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5215else
5216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5217$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5218fi
5219set dummy $CC; ac_cc=`$as_echo "$2" |
5220		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5221if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
5222  $as_echo_n "(cached) " >&6
5223else
5224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5225/* end confdefs.h.  */
5226
5227int
5228main ()
5229{
5230
5231  ;
5232  return 0;
5233}
5234_ACEOF
5235# Make sure it works both with $CC and with simple cc.
5236# We do the test twice because some compilers refuse to overwrite an
5237# existing .o file with -o, though they will create one.
5238ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5239rm -f conftest2.*
5240if { { case "(($ac_try" in
5241  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5242  *) ac_try_echo=$ac_try;;
5243esac
5244eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5245$as_echo "$ac_try_echo"; } >&5
5246  (eval "$ac_try") 2>&5
5247  ac_status=$?
5248  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5249  test $ac_status = 0; } &&
5250   test -f conftest2.$ac_objext && { { case "(($ac_try" in
5251  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5252  *) ac_try_echo=$ac_try;;
5253esac
5254eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5255$as_echo "$ac_try_echo"; } >&5
5256  (eval "$ac_try") 2>&5
5257  ac_status=$?
5258  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5259  test $ac_status = 0; };
5260then
5261  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5262  if test "x$CC" != xcc; then
5263    # Test first that cc exists at all.
5264    if { ac_try='cc -c conftest.$ac_ext >&5'
5265  { { case "(($ac_try" in
5266  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5267  *) ac_try_echo=$ac_try;;
5268esac
5269eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5270$as_echo "$ac_try_echo"; } >&5
5271  (eval "$ac_try") 2>&5
5272  ac_status=$?
5273  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5274  test $ac_status = 0; }; }; then
5275      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5276      rm -f conftest2.*
5277      if { { case "(($ac_try" in
5278  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5279  *) ac_try_echo=$ac_try;;
5280esac
5281eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5282$as_echo "$ac_try_echo"; } >&5
5283  (eval "$ac_try") 2>&5
5284  ac_status=$?
5285  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5286  test $ac_status = 0; } &&
5287	 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5288  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5289  *) ac_try_echo=$ac_try;;
5290esac
5291eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5292$as_echo "$ac_try_echo"; } >&5
5293  (eval "$ac_try") 2>&5
5294  ac_status=$?
5295  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5296  test $ac_status = 0; };
5297      then
5298	# cc works too.
5299	:
5300      else
5301	# cc exists but doesn't like -o.
5302	eval ac_cv_prog_cc_${ac_cc}_c_o=no
5303      fi
5304    fi
5305  fi
5306else
5307  eval ac_cv_prog_cc_${ac_cc}_c_o=no
5308fi
5309rm -f core conftest*
5310
5311fi
5312if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5314$as_echo "yes" >&6; }
5315else
5316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5317$as_echo "no" >&6; }
5318
5319$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5320
5321fi
5322
5323# FIXME: we rely on the cache variable name because
5324# there is no other way.
5325set dummy $CC
5326am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5327eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5328if test "$am_t" != yes; then
5329   # Losing compiler, so override with the script.
5330   # FIXME: It is wrong to rewrite CC.
5331   # But if we don't then we get into trouble of one sort or another.
5332   # A longer-term fix would be to have automake use am__CC in this case,
5333   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5334   CC="$am_aux_dir/compile $CC"
5335fi
5336
5337
5338ac_ext=c
5339ac_cpp='$CPP $CPPFLAGS'
5340ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5341ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5342ac_compiler_gnu=$ac_cv_c_compiler_gnu
5343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5344$as_echo_n "checking how to run the C preprocessor... " >&6; }
5345# On Suns, sometimes $CPP names a directory.
5346if test -n "$CPP" && test -d "$CPP"; then
5347  CPP=
5348fi
5349if test -z "$CPP"; then
5350  if test "${ac_cv_prog_CPP+set}" = set; then :
5351  $as_echo_n "(cached) " >&6
5352else
5353      # Double quotes because CPP needs to be expanded
5354    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5355    do
5356      ac_preproc_ok=false
5357for ac_c_preproc_warn_flag in '' yes
5358do
5359  # Use a header file that comes with gcc, so configuring glibc
5360  # with a fresh cross-compiler works.
5361  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5362  # <limits.h> exists even on freestanding compilers.
5363  # On the NeXT, cc -E runs the code through the compiler's parser,
5364  # not just through cpp. "Syntax error" is here to catch this case.
5365  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5366/* end confdefs.h.  */
5367#ifdef __STDC__
5368# include <limits.h>
5369#else
5370# include <assert.h>
5371#endif
5372		     Syntax error
5373_ACEOF
5374if ac_fn_c_try_cpp "$LINENO"; then :
5375
5376else
5377  # Broken: fails on valid input.
5378continue
5379fi
5380rm -f conftest.err conftest.$ac_ext
5381
5382  # OK, works on sane cases.  Now check whether nonexistent headers
5383  # can be detected and how.
5384  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5385/* end confdefs.h.  */
5386#include <ac_nonexistent.h>
5387_ACEOF
5388if ac_fn_c_try_cpp "$LINENO"; then :
5389  # Broken: success on invalid input.
5390continue
5391else
5392  # Passes both tests.
5393ac_preproc_ok=:
5394break
5395fi
5396rm -f conftest.err conftest.$ac_ext
5397
5398done
5399# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5400rm -f conftest.err conftest.$ac_ext
5401if $ac_preproc_ok; then :
5402  break
5403fi
5404
5405    done
5406    ac_cv_prog_CPP=$CPP
5407
5408fi
5409  CPP=$ac_cv_prog_CPP
5410else
5411  ac_cv_prog_CPP=$CPP
5412fi
5413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5414$as_echo "$CPP" >&6; }
5415ac_preproc_ok=false
5416for ac_c_preproc_warn_flag in '' yes
5417do
5418  # Use a header file that comes with gcc, so configuring glibc
5419  # with a fresh cross-compiler works.
5420  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5421  # <limits.h> exists even on freestanding compilers.
5422  # On the NeXT, cc -E runs the code through the compiler's parser,
5423  # not just through cpp. "Syntax error" is here to catch this case.
5424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5425/* end confdefs.h.  */
5426#ifdef __STDC__
5427# include <limits.h>
5428#else
5429# include <assert.h>
5430#endif
5431		     Syntax error
5432_ACEOF
5433if ac_fn_c_try_cpp "$LINENO"; then :
5434
5435else
5436  # Broken: fails on valid input.
5437continue
5438fi
5439rm -f conftest.err conftest.$ac_ext
5440
5441  # OK, works on sane cases.  Now check whether nonexistent headers
5442  # can be detected and how.
5443  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5444/* end confdefs.h.  */
5445#include <ac_nonexistent.h>
5446_ACEOF
5447if ac_fn_c_try_cpp "$LINENO"; then :
5448  # Broken: success on invalid input.
5449continue
5450else
5451  # Passes both tests.
5452ac_preproc_ok=:
5453break
5454fi
5455rm -f conftest.err conftest.$ac_ext
5456
5457done
5458# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5459rm -f conftest.err conftest.$ac_ext
5460if $ac_preproc_ok; then :
5461
5462else
5463  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5464$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5465as_fn_error "C preprocessor \"$CPP\" fails sanity check
5466See \`config.log' for more details." "$LINENO" 5; }
5467fi
5468
5469ac_ext=c
5470ac_cpp='$CPP $CPPFLAGS'
5471ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5472ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5473ac_compiler_gnu=$ac_cv_c_compiler_gnu
5474
5475
5476
5477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5478$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5479if test "${ac_cv_path_GREP+set}" = set; then :
5480  $as_echo_n "(cached) " >&6
5481else
5482  if test -z "$GREP"; then
5483  ac_path_GREP_found=false
5484  # Loop through the user's path and test for each of PROGNAME-LIST
5485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5486for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5487do
5488  IFS=$as_save_IFS
5489  test -z "$as_dir" && as_dir=.
5490    for ac_prog in grep ggrep; do
5491    for ac_exec_ext in '' $ac_executable_extensions; do
5492      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5493      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5494# Check for GNU ac_path_GREP and select it if it is found.
5495  # Check for GNU $ac_path_GREP
5496case `"$ac_path_GREP" --version 2>&1` in
5497*GNU*)
5498  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5499*)
5500  ac_count=0
5501  $as_echo_n 0123456789 >"conftest.in"
5502  while :
5503  do
5504    cat "conftest.in" "conftest.in" >"conftest.tmp"
5505    mv "conftest.tmp" "conftest.in"
5506    cp "conftest.in" "conftest.nl"
5507    $as_echo 'GREP' >> "conftest.nl"
5508    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5509    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5510    as_fn_arith $ac_count + 1 && ac_count=$as_val
5511    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5512      # Best one so far, save it but keep looking for a better one
5513      ac_cv_path_GREP="$ac_path_GREP"
5514      ac_path_GREP_max=$ac_count
5515    fi
5516    # 10*(2^10) chars as input seems more than enough
5517    test $ac_count -gt 10 && break
5518  done
5519  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5520esac
5521
5522      $ac_path_GREP_found && break 3
5523    done
5524  done
5525  done
5526IFS=$as_save_IFS
5527  if test -z "$ac_cv_path_GREP"; then
5528    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5529  fi
5530else
5531  ac_cv_path_GREP=$GREP
5532fi
5533
5534fi
5535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5536$as_echo "$ac_cv_path_GREP" >&6; }
5537 GREP="$ac_cv_path_GREP"
5538
5539
5540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5541$as_echo_n "checking for egrep... " >&6; }
5542if test "${ac_cv_path_EGREP+set}" = set; then :
5543  $as_echo_n "(cached) " >&6
5544else
5545  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5546   then ac_cv_path_EGREP="$GREP -E"
5547   else
5548     if test -z "$EGREP"; then
5549  ac_path_EGREP_found=false
5550  # Loop through the user's path and test for each of PROGNAME-LIST
5551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5552for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5553do
5554  IFS=$as_save_IFS
5555  test -z "$as_dir" && as_dir=.
5556    for ac_prog in egrep; do
5557    for ac_exec_ext in '' $ac_executable_extensions; do
5558      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5559      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5560# Check for GNU ac_path_EGREP and select it if it is found.
5561  # Check for GNU $ac_path_EGREP
5562case `"$ac_path_EGREP" --version 2>&1` in
5563*GNU*)
5564  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5565*)
5566  ac_count=0
5567  $as_echo_n 0123456789 >"conftest.in"
5568  while :
5569  do
5570    cat "conftest.in" "conftest.in" >"conftest.tmp"
5571    mv "conftest.tmp" "conftest.in"
5572    cp "conftest.in" "conftest.nl"
5573    $as_echo 'EGREP' >> "conftest.nl"
5574    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5575    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5576    as_fn_arith $ac_count + 1 && ac_count=$as_val
5577    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5578      # Best one so far, save it but keep looking for a better one
5579      ac_cv_path_EGREP="$ac_path_EGREP"
5580      ac_path_EGREP_max=$ac_count
5581    fi
5582    # 10*(2^10) chars as input seems more than enough
5583    test $ac_count -gt 10 && break
5584  done
5585  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5586esac
5587
5588      $ac_path_EGREP_found && break 3
5589    done
5590  done
5591  done
5592IFS=$as_save_IFS
5593  if test -z "$ac_cv_path_EGREP"; then
5594    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5595  fi
5596else
5597  ac_cv_path_EGREP=$EGREP
5598fi
5599
5600   fi
5601fi
5602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5603$as_echo "$ac_cv_path_EGREP" >&6; }
5604 EGREP="$ac_cv_path_EGREP"
5605
5606
5607if test $ac_cv_c_compiler_gnu = yes; then
5608    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
5609$as_echo_n "checking whether $CC needs -traditional... " >&6; }
5610if test "${ac_cv_prog_gcc_traditional+set}" = set; then :
5611  $as_echo_n "(cached) " >&6
5612else
5613    ac_pattern="Autoconf.*'x'"
5614  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5615/* end confdefs.h.  */
5616#include <sgtty.h>
5617Autoconf TIOCGETP
5618_ACEOF
5619if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5620  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
5621  ac_cv_prog_gcc_traditional=yes
5622else
5623  ac_cv_prog_gcc_traditional=no
5624fi
5625rm -f conftest*
5626
5627
5628  if test $ac_cv_prog_gcc_traditional = no; then
5629    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5630/* end confdefs.h.  */
5631#include <termio.h>
5632Autoconf TCGETA
5633_ACEOF
5634if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5635  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
5636  ac_cv_prog_gcc_traditional=yes
5637fi
5638rm -f conftest*
5639
5640  fi
5641fi
5642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
5643$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
5644  if test $ac_cv_prog_gcc_traditional = yes; then
5645    CC="$CC -traditional"
5646  fi
5647fi
5648
5649if test -n "$ac_tool_prefix"; then
5650  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5651set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5653$as_echo_n "checking for $ac_word... " >&6; }
5654if test "${ac_cv_prog_RANLIB+set}" = set; then :
5655  $as_echo_n "(cached) " >&6
5656else
5657  if test -n "$RANLIB"; then
5658  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5659else
5660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5661for as_dir in $PATH
5662do
5663  IFS=$as_save_IFS
5664  test -z "$as_dir" && as_dir=.
5665    for ac_exec_ext in '' $ac_executable_extensions; do
5666  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5667    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5669    break 2
5670  fi
5671done
5672  done
5673IFS=$as_save_IFS
5674
5675fi
5676fi
5677RANLIB=$ac_cv_prog_RANLIB
5678if test -n "$RANLIB"; then
5679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5680$as_echo "$RANLIB" >&6; }
5681else
5682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5683$as_echo "no" >&6; }
5684fi
5685
5686
5687fi
5688if test -z "$ac_cv_prog_RANLIB"; then
5689  ac_ct_RANLIB=$RANLIB
5690  # Extract the first word of "ranlib", so it can be a program name with args.
5691set dummy ranlib; ac_word=$2
5692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5693$as_echo_n "checking for $ac_word... " >&6; }
5694if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5695  $as_echo_n "(cached) " >&6
5696else
5697  if test -n "$ac_ct_RANLIB"; then
5698  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5699else
5700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5701for as_dir in $PATH
5702do
5703  IFS=$as_save_IFS
5704  test -z "$as_dir" && as_dir=.
5705    for ac_exec_ext in '' $ac_executable_extensions; do
5706  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5707    ac_cv_prog_ac_ct_RANLIB="ranlib"
5708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5709    break 2
5710  fi
5711done
5712  done
5713IFS=$as_save_IFS
5714
5715fi
5716fi
5717ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5718if test -n "$ac_ct_RANLIB"; then
5719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5720$as_echo "$ac_ct_RANLIB" >&6; }
5721else
5722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5723$as_echo "no" >&6; }
5724fi
5725
5726  if test "x$ac_ct_RANLIB" = x; then
5727    RANLIB=":"
5728  else
5729    case $cross_compiling:$ac_tool_warned in
5730yes:)
5731{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5732$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5733ac_tool_warned=yes ;;
5734esac
5735    RANLIB=$ac_ct_RANLIB
5736  fi
5737else
5738  RANLIB="$ac_cv_prog_RANLIB"
5739fi
5740
5741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5742$as_echo_n "checking whether ln -s works... " >&6; }
5743LN_S=$as_ln_s
5744if test "$LN_S" = "ln -s"; then
5745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5746$as_echo "yes" >&6; }
5747else
5748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5749$as_echo "no, using $LN_S" >&6; }
5750fi
5751
5752# Make sure we can run config.sub.
5753$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5754  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5755
5756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5757$as_echo_n "checking build system type... " >&6; }
5758if test "${ac_cv_build+set}" = set; then :
5759  $as_echo_n "(cached) " >&6
5760else
5761  ac_build_alias=$build_alias
5762test "x$ac_build_alias" = x &&
5763  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5764test "x$ac_build_alias" = x &&
5765  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
5766ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5767  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5768
5769fi
5770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5771$as_echo "$ac_cv_build" >&6; }
5772case $ac_cv_build in
5773*-*-*) ;;
5774*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
5775esac
5776build=$ac_cv_build
5777ac_save_IFS=$IFS; IFS='-'
5778set x $ac_cv_build
5779shift
5780build_cpu=$1
5781build_vendor=$2
5782shift; shift
5783# Remember, the first character of IFS is used to create $*,
5784# except with old shells:
5785build_os=$*
5786IFS=$ac_save_IFS
5787case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5788
5789
5790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5791$as_echo_n "checking host system type... " >&6; }
5792if test "${ac_cv_host+set}" = set; then :
5793  $as_echo_n "(cached) " >&6
5794else
5795  if test "x$host_alias" = x; then
5796  ac_cv_host=$ac_cv_build
5797else
5798  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5799    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5800fi
5801
5802fi
5803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5804$as_echo "$ac_cv_host" >&6; }
5805case $ac_cv_host in
5806*-*-*) ;;
5807*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
5808esac
5809host=$ac_cv_host
5810ac_save_IFS=$IFS; IFS='-'
5811set x $ac_cv_host
5812shift
5813host_cpu=$1
5814host_vendor=$2
5815shift; shift
5816# Remember, the first character of IFS is used to create $*,
5817# except with old shells:
5818host_os=$*
5819IFS=$ac_save_IFS
5820case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5821
5822
5823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5824$as_echo_n "checking for ANSI C header files... " >&6; }
5825if test "${ac_cv_header_stdc+set}" = set; then :
5826  $as_echo_n "(cached) " >&6
5827else
5828  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5829/* end confdefs.h.  */
5830#include <stdlib.h>
5831#include <stdarg.h>
5832#include <string.h>
5833#include <float.h>
5834
5835int
5836main ()
5837{
5838
5839  ;
5840  return 0;
5841}
5842_ACEOF
5843if ac_fn_c_try_compile "$LINENO"; then :
5844  ac_cv_header_stdc=yes
5845else
5846  ac_cv_header_stdc=no
5847fi
5848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5849
5850if test $ac_cv_header_stdc = yes; then
5851  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5853/* end confdefs.h.  */
5854#include <string.h>
5855
5856_ACEOF
5857if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5858  $EGREP "memchr" >/dev/null 2>&1; then :
5859
5860else
5861  ac_cv_header_stdc=no
5862fi
5863rm -f conftest*
5864
5865fi
5866
5867if test $ac_cv_header_stdc = yes; then
5868  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5869  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5870/* end confdefs.h.  */
5871#include <stdlib.h>
5872
5873_ACEOF
5874if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5875  $EGREP "free" >/dev/null 2>&1; then :
5876
5877else
5878  ac_cv_header_stdc=no
5879fi
5880rm -f conftest*
5881
5882fi
5883
5884if test $ac_cv_header_stdc = yes; then
5885  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5886  if test "$cross_compiling" = yes; then :
5887  :
5888else
5889  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5890/* end confdefs.h.  */
5891#include <ctype.h>
5892#include <stdlib.h>
5893#if ((' ' & 0x0FF) == 0x020)
5894# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5895# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5896#else
5897# define ISLOWER(c) \
5898		   (('a' <= (c) && (c) <= 'i') \
5899		     || ('j' <= (c) && (c) <= 'r') \
5900		     || ('s' <= (c) && (c) <= 'z'))
5901# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5902#endif
5903
5904#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5905int
5906main ()
5907{
5908  int i;
5909  for (i = 0; i < 256; i++)
5910    if (XOR (islower (i), ISLOWER (i))
5911	|| toupper (i) != TOUPPER (i))
5912      return 2;
5913  return 0;
5914}
5915_ACEOF
5916if ac_fn_c_try_run "$LINENO"; then :
5917
5918else
5919  ac_cv_header_stdc=no
5920fi
5921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5922  conftest.$ac_objext conftest.beam conftest.$ac_ext
5923fi
5924
5925fi
5926fi
5927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5928$as_echo "$ac_cv_header_stdc" >&6; }
5929if test $ac_cv_header_stdc = yes; then
5930
5931$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5932
5933fi
5934
5935# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5936for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5937		  inttypes.h stdint.h unistd.h
5938do :
5939  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5940ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5941"
5942eval as_val=\$$as_ac_Header
5943   if test "x$as_val" = x""yes; then :
5944  cat >>confdefs.h <<_ACEOF
5945#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5946_ACEOF
5947
5948fi
5949
5950done
5951
5952
5953
5954
5955
5956  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5957if test "x$ac_cv_header_minix_config_h" = x""yes; then :
5958  MINIX=yes
5959else
5960  MINIX=
5961fi
5962
5963
5964  if test "$MINIX" = yes; then
5965
5966$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5967
5968
5969$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5970
5971
5972$as_echo "#define _MINIX 1" >>confdefs.h
5973
5974  fi
5975
5976        case "$host_os" in
5977    hpux*)
5978
5979$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5980
5981      ;;
5982  esac
5983
5984
5985  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5986$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5987if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
5988  $as_echo_n "(cached) " >&6
5989else
5990  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5991/* end confdefs.h.  */
5992
5993#         define __EXTENSIONS__ 1
5994          $ac_includes_default
5995int
5996main ()
5997{
5998
5999  ;
6000  return 0;
6001}
6002_ACEOF
6003if ac_fn_c_try_compile "$LINENO"; then :
6004  ac_cv_safe_to_define___extensions__=yes
6005else
6006  ac_cv_safe_to_define___extensions__=no
6007fi
6008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6009fi
6010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6011$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6012  test $ac_cv_safe_to_define___extensions__ = yes &&
6013    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6014
6015  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6016
6017  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6018
6019  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6020
6021  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6022
6023
6024
6025
6026
6027
6028
6029
6030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6031$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6032if test "${ac_cv_sys_largefile_source+set}" = set; then :
6033  $as_echo_n "(cached) " >&6
6034else
6035  while :; do
6036  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6037/* end confdefs.h.  */
6038#include <sys/types.h> /* for off_t */
6039     #include <stdio.h>
6040int
6041main ()
6042{
6043int (*fp) (FILE *, off_t, int) = fseeko;
6044     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6045  ;
6046  return 0;
6047}
6048_ACEOF
6049if ac_fn_c_try_link "$LINENO"; then :
6050  ac_cv_sys_largefile_source=no; break
6051fi
6052rm -f core conftest.err conftest.$ac_objext \
6053    conftest$ac_exeext conftest.$ac_ext
6054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6055/* end confdefs.h.  */
6056#define _LARGEFILE_SOURCE 1
6057#include <sys/types.h> /* for off_t */
6058     #include <stdio.h>
6059int
6060main ()
6061{
6062int (*fp) (FILE *, off_t, int) = fseeko;
6063     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6064  ;
6065  return 0;
6066}
6067_ACEOF
6068if ac_fn_c_try_link "$LINENO"; then :
6069  ac_cv_sys_largefile_source=1; break
6070fi
6071rm -f core conftest.err conftest.$ac_objext \
6072    conftest$ac_exeext conftest.$ac_ext
6073  ac_cv_sys_largefile_source=unknown
6074  break
6075done
6076fi
6077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6078$as_echo "$ac_cv_sys_largefile_source" >&6; }
6079case $ac_cv_sys_largefile_source in #(
6080  no | unknown) ;;
6081  *)
6082cat >>confdefs.h <<_ACEOF
6083#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6084_ACEOF
6085;;
6086esac
6087rm -rf conftest*
6088
6089# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6090# in glibc 2.1.3, but that breaks too many other things.
6091# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6092if test $ac_cv_sys_largefile_source != unknown; then
6093
6094$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
6095
6096fi
6097
6098
6099
6100
6101  # IEEE behaviour is the default on all CPUs except Alpha and SH
6102  # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6103  # and the GCC 4.1.2 manual).
6104  case "$host_cpu" in
6105    alpha*)
6106      # On Alpha systems, a compiler option provides the behaviour.
6107      # See the ieee(3) manual page, also available at
6108      # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
6109      if test -n "$GCC"; then
6110        # GCC has the option -mieee.
6111        CPPFLAGS="$CPPFLAGS -mieee"
6112      else
6113        # Compaq (ex-DEC) C has the option -ieee.
6114        CPPFLAGS="$CPPFLAGS -ieee"
6115      fi
6116      ;;
6117    sh*)
6118      if test -n "$GCC"; then
6119        # GCC has the option -mieee.
6120        CPPFLAGS="$CPPFLAGS -mieee"
6121      fi
6122      ;;
6123  esac
6124
6125
6126
6127
6128
6129
6130  # Check whether --enable-threads was given.
6131if test "${enable_threads+set}" = set; then :
6132  enableval=$enable_threads; gl_use_threads=$enableval
6133else
6134  if test -n "$gl_use_threads_default"; then
6135       gl_use_threads="$gl_use_threads_default"
6136     else
6137       case "$host_os" in
6138                                                               osf*) gl_use_threads=no ;;
6139         cygwin*)
6140               case `uname -r` in
6141                 1.[0-5].*) gl_use_threads=no ;;
6142                 *)         gl_use_threads=yes ;;
6143               esac
6144               ;;
6145         *)    gl_use_threads=yes ;;
6146       esac
6147     fi
6148
6149fi
6150
6151  if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
6152    # For using <pthread.h>:
6153    case "$host_os" in
6154      osf*)
6155        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6156        # groks <pthread.h>. cc also understands the flag -pthread, but
6157        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6158        # 2. putting a flag into CPPFLAGS that has an effect on the linker
6159        # causes the AC_TRY_LINK test below to succeed unexpectedly,
6160        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6161        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
6162        ;;
6163    esac
6164    # Some systems optimize for single-threaded programs by default, and
6165    # need special flags to disable these optimizations. For example, the
6166    # definition of 'errno' in <errno.h>.
6167    case "$host_os" in
6168      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
6169      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
6170    esac
6171  fi
6172
6173
6174
6175
6176
6177
6178
6179
6180  if test -z "$AB_PACKAGE"; then
6181    AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE}
6182  fi
6183  { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild project... $AB_PACKAGE" >&5
6184$as_echo "$as_me: autobuild project... $AB_PACKAGE" >&6;}
6185
6186  if test -z "$AB_VERSION"; then
6187    AB_VERSION=${PACKAGE_VERSION:-$VERSION}
6188  fi
6189  { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild revision... $AB_VERSION" >&5
6190$as_echo "$as_me: autobuild revision... $AB_VERSION" >&6;}
6191
6192  hostname=`hostname`
6193  if test "$hostname"; then
6194    { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild hostname... $hostname" >&5
6195$as_echo "$as_me: autobuild hostname... $hostname" >&6;}
6196  fi
6197
6198
6199
6200  date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ`
6201  if test "$?" != 0; then
6202    date=`date`
6203  fi
6204  if test "$date"; then
6205    { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild timestamp... $date" >&5
6206$as_echo "$as_me: autobuild timestamp... $date" >&6;}
6207  fi
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6225$as_echo_n "checking for inline... " >&6; }
6226if test "${ac_cv_c_inline+set}" = set; then :
6227  $as_echo_n "(cached) " >&6
6228else
6229  ac_cv_c_inline=no
6230for ac_kw in inline __inline__ __inline; do
6231  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6232/* end confdefs.h.  */
6233#ifndef __cplusplus
6234typedef int foo_t;
6235static $ac_kw foo_t static_foo () {return 0; }
6236$ac_kw foo_t foo () {return 0; }
6237#endif
6238
6239_ACEOF
6240if ac_fn_c_try_compile "$LINENO"; then :
6241  ac_cv_c_inline=$ac_kw
6242fi
6243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6244  test "$ac_cv_c_inline" != no && break
6245done
6246
6247fi
6248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6249$as_echo "$ac_cv_c_inline" >&6; }
6250
6251case $ac_cv_c_inline in
6252  inline | yes) ;;
6253  *)
6254    case $ac_cv_c_inline in
6255      no) ac_val=;;
6256      *) ac_val=$ac_cv_c_inline;;
6257    esac
6258    cat >>confdefs.h <<_ACEOF
6259#ifndef __cplusplus
6260#define inline $ac_val
6261#endif
6262_ACEOF
6263    ;;
6264esac
6265
6266# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6267# for constant arguments.  Useless!
6268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6269$as_echo_n "checking for working alloca.h... " >&6; }
6270if test "${ac_cv_working_alloca_h+set}" = set; then :
6271  $as_echo_n "(cached) " >&6
6272else
6273  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6274/* end confdefs.h.  */
6275#include <alloca.h>
6276int
6277main ()
6278{
6279char *p = (char *) alloca (2 * sizeof (int));
6280			  if (p) return 0;
6281  ;
6282  return 0;
6283}
6284_ACEOF
6285if ac_fn_c_try_link "$LINENO"; then :
6286  ac_cv_working_alloca_h=yes
6287else
6288  ac_cv_working_alloca_h=no
6289fi
6290rm -f core conftest.err conftest.$ac_objext \
6291    conftest$ac_exeext conftest.$ac_ext
6292fi
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6294$as_echo "$ac_cv_working_alloca_h" >&6; }
6295if test $ac_cv_working_alloca_h = yes; then
6296
6297$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6298
6299fi
6300
6301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6302$as_echo_n "checking for alloca... " >&6; }
6303if test "${ac_cv_func_alloca_works+set}" = set; then :
6304  $as_echo_n "(cached) " >&6
6305else
6306  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6307/* end confdefs.h.  */
6308#ifdef __GNUC__
6309# define alloca __builtin_alloca
6310#else
6311# ifdef _MSC_VER
6312#  include <malloc.h>
6313#  define alloca _alloca
6314# else
6315#  ifdef HAVE_ALLOCA_H
6316#   include <alloca.h>
6317#  else
6318#   ifdef _AIX
6319 #pragma alloca
6320#   else
6321#    ifndef alloca /* predefined by HP cc +Olibcalls */
6322char *alloca ();
6323#    endif
6324#   endif
6325#  endif
6326# endif
6327#endif
6328
6329int
6330main ()
6331{
6332char *p = (char *) alloca (1);
6333				    if (p) return 0;
6334  ;
6335  return 0;
6336}
6337_ACEOF
6338if ac_fn_c_try_link "$LINENO"; then :
6339  ac_cv_func_alloca_works=yes
6340else
6341  ac_cv_func_alloca_works=no
6342fi
6343rm -f core conftest.err conftest.$ac_objext \
6344    conftest$ac_exeext conftest.$ac_ext
6345fi
6346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6347$as_echo "$ac_cv_func_alloca_works" >&6; }
6348
6349if test $ac_cv_func_alloca_works = yes; then
6350
6351$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
6352
6353else
6354  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6355# that cause trouble.  Some versions do not even contain alloca or
6356# contain a buggy version.  If you still want to use their alloca,
6357# use ar to extract alloca.o from them instead of compiling alloca.c.
6358
6359
6360
6361
6362
6363ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
6364
6365$as_echo "#define C_ALLOCA 1" >>confdefs.h
6366
6367
6368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
6369$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
6370if test "${ac_cv_os_cray+set}" = set; then :
6371  $as_echo_n "(cached) " >&6
6372else
6373  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6374/* end confdefs.h.  */
6375#if defined CRAY && ! defined CRAY2
6376webecray
6377#else
6378wenotbecray
6379#endif
6380
6381_ACEOF
6382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6383  $EGREP "webecray" >/dev/null 2>&1; then :
6384  ac_cv_os_cray=yes
6385else
6386  ac_cv_os_cray=no
6387fi
6388rm -f conftest*
6389
6390fi
6391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6392$as_echo "$ac_cv_os_cray" >&6; }
6393if test $ac_cv_os_cray = yes; then
6394  for ac_func in _getb67 GETB67 getb67; do
6395    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6396ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6397eval as_val=\$$as_ac_var
6398   if test "x$as_val" = x""yes; then :
6399
6400cat >>confdefs.h <<_ACEOF
6401#define CRAY_STACKSEG_END $ac_func
6402_ACEOF
6403
6404    break
6405fi
6406
6407  done
6408fi
6409
6410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6411$as_echo_n "checking stack direction for C alloca... " >&6; }
6412if test "${ac_cv_c_stack_direction+set}" = set; then :
6413  $as_echo_n "(cached) " >&6
6414else
6415  if test "$cross_compiling" = yes; then :
6416  ac_cv_c_stack_direction=0
6417else
6418  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6419/* end confdefs.h.  */
6420$ac_includes_default
6421int
6422find_stack_direction ()
6423{
6424  static char *addr = 0;
6425  auto char dummy;
6426  if (addr == 0)
6427    {
6428      addr = &dummy;
6429      return find_stack_direction ();
6430    }
6431  else
6432    return (&dummy > addr) ? 1 : -1;
6433}
6434
6435int
6436main ()
6437{
6438  return find_stack_direction () < 0;
6439}
6440_ACEOF
6441if ac_fn_c_try_run "$LINENO"; then :
6442  ac_cv_c_stack_direction=1
6443else
6444  ac_cv_c_stack_direction=-1
6445fi
6446rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6447  conftest.$ac_objext conftest.beam conftest.$ac_ext
6448fi
6449
6450fi
6451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6452$as_echo "$ac_cv_c_stack_direction" >&6; }
6453cat >>confdefs.h <<_ACEOF
6454#define STACK_DIRECTION $ac_cv_c_stack_direction
6455_ACEOF
6456
6457
6458fi
6459
6460
6461  GNULIB_INET_NTOP=0;
6462  GNULIB_INET_PTON=0;
6463    HAVE_DECL_INET_NTOP=1;
6464  HAVE_DECL_INET_PTON=1;
6465
6466
6467
6468
6469  for ac_header in $ac_header_list
6470do :
6471  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6472ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6473"
6474eval as_val=\$$as_ac_Header
6475   if test "x$as_val" = x""yes; then :
6476  cat >>confdefs.h <<_ACEOF
6477#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6478_ACEOF
6479
6480fi
6481
6482done
6483
6484
6485
6486
6487
6488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
6489$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
6490if test "${gl_cv_have_include_next+set}" = set; then :
6491  $as_echo_n "(cached) " >&6
6492else
6493  rm -rf conftestd1a conftestd1b conftestd2
6494     mkdir conftestd1a conftestd1b conftestd2
6495                                                  cat <<EOF > conftestd1a/conftest.h
6496#define DEFINED_IN_CONFTESTD1
6497#include_next <conftest.h>
6498#ifdef DEFINED_IN_CONFTESTD2
6499int foo;
6500#else
6501#error "include_next doesn't work"
6502#endif
6503EOF
6504     cat <<EOF > conftestd1b/conftest.h
6505#define DEFINED_IN_CONFTESTD1
6506#include <stdio.h>
6507#include_next <conftest.h>
6508#ifdef DEFINED_IN_CONFTESTD2
6509int foo;
6510#else
6511#error "include_next doesn't work"
6512#endif
6513EOF
6514     cat <<EOF > conftestd2/conftest.h
6515#ifndef DEFINED_IN_CONFTESTD1
6516#error "include_next test doesn't work"
6517#endif
6518#define DEFINED_IN_CONFTESTD2
6519EOF
6520     gl_save_CPPFLAGS="$CPPFLAGS"
6521     CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
6522     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6523/* end confdefs.h.  */
6524#include <conftest.h>
6525_ACEOF
6526if ac_fn_c_try_compile "$LINENO"; then :
6527  gl_cv_have_include_next=yes
6528else
6529  CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
6530        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6531/* end confdefs.h.  */
6532#include <conftest.h>
6533_ACEOF
6534if ac_fn_c_try_compile "$LINENO"; then :
6535  gl_cv_have_include_next=buggy
6536else
6537  gl_cv_have_include_next=no
6538fi
6539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6540
6541fi
6542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6543     CPPFLAGS="$gl_save_CPPFLAGS"
6544     rm -rf conftestd1a conftestd1b conftestd2
6545
6546fi
6547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
6548$as_echo "$gl_cv_have_include_next" >&6; }
6549  PRAGMA_SYSTEM_HEADER=
6550  if test $gl_cv_have_include_next = yes; then
6551    INCLUDE_NEXT=include_next
6552    INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6553    if test -n "$GCC"; then
6554      PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
6555    fi
6556  else
6557    if test $gl_cv_have_include_next = buggy; then
6558      INCLUDE_NEXT=include
6559      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
6560    else
6561      INCLUDE_NEXT=include
6562      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
6563    fi
6564  fi
6565
6566
6567
6568
6569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
6570$as_echo_n "checking for d_ino member in directory struct... " >&6; }
6571if test "${gl_cv_struct_dirent_d_ino+set}" = set; then :
6572  $as_echo_n "(cached) " >&6
6573else
6574  if test "$cross_compiling" = yes; then :
6575  gl_cv_struct_dirent_d_ino=no
6576else
6577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6578/* end confdefs.h.  */
6579#include <sys/types.h>
6580             #include <sys/stat.h>
6581             #include <dirent.h>
6582
6583int
6584main ()
6585{
6586DIR *dp = opendir (".");
6587             struct dirent *e;
6588             struct stat st;
6589             if (! dp)
6590               return 1;
6591             e = readdir (dp);
6592             return ! (e
6593                       && stat (e->d_name, &st) == 0
6594                       && e->d_ino == st.st_ino);
6595  ;
6596  return 0;
6597}
6598_ACEOF
6599if ac_fn_c_try_run "$LINENO"; then :
6600  gl_cv_struct_dirent_d_ino=yes
6601else
6602  gl_cv_struct_dirent_d_ino=no
6603fi
6604rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6605  conftest.$ac_objext conftest.beam conftest.$ac_ext
6606fi
6607
6608fi
6609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
6610$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
6611   if test $gl_cv_struct_dirent_d_ino = yes; then
6612
6613$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
6614
6615   fi
6616
6617
6618
6619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system is Windows or MSDOS" >&5
6620$as_echo_n "checking whether system is Windows or MSDOS... " >&6; }
6621if test "${ac_cv_win_or_dos+set}" = set; then :
6622  $as_echo_n "(cached) " >&6
6623else
6624
6625        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6626/* end confdefs.h.  */
6627
6628int
6629main ()
6630{
6631
6632#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
6633neither MSDOS nor Windows
6634#endif
6635  ;
6636  return 0;
6637}
6638_ACEOF
6639if ac_fn_c_try_compile "$LINENO"; then :
6640  ac_cv_win_or_dos=yes
6641else
6642  ac_cv_win_or_dos=no
6643fi
6644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6645
6646fi
6647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_win_or_dos" >&5
6648$as_echo "$ac_cv_win_or_dos" >&6; }
6649
6650    if test x"$ac_cv_win_or_dos" = xyes; then
6651      ac_fs_accepts_drive_letter_prefix=1
6652      ac_fs_backslash_is_file_name_separator=1
6653      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether drive letter can start relative path" >&5
6654$as_echo_n "checking whether drive letter can start relative path... " >&6; }
6655if test "${ac_cv_drive_letter_can_be_relative+set}" = set; then :
6656  $as_echo_n "(cached) " >&6
6657else
6658
6659          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6660/* end confdefs.h.  */
6661
6662int
6663main ()
6664{
6665
6666#if defined __CYGWIN__
6667drive letters are always absolute
6668#endif
6669  ;
6670  return 0;
6671}
6672_ACEOF
6673if ac_fn_c_try_compile "$LINENO"; then :
6674  ac_cv_drive_letter_can_be_relative=yes
6675else
6676  ac_cv_drive_letter_can_be_relative=no
6677fi
6678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6679
6680fi
6681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_drive_letter_can_be_relative" >&5
6682$as_echo "$ac_cv_drive_letter_can_be_relative" >&6; }
6683      if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then
6684        ac_fs_drive_letter_can_be_relative=1
6685      else
6686        ac_fs_drive_letter_can_be_relative=0
6687      fi
6688    else
6689      ac_fs_accepts_drive_letter_prefix=0
6690      ac_fs_backslash_is_file_name_separator=0
6691      ac_fs_drive_letter_can_be_relative=0
6692    fi
6693
6694
6695cat >>confdefs.h <<_ACEOF
6696#define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix
6697_ACEOF
6698
6699
6700
6701
6702
6703cat >>confdefs.h <<_ACEOF
6704#define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator
6705_ACEOF
6706
6707
6708
6709cat >>confdefs.h <<_ACEOF
6710#define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE $ac_fs_drive_letter_can_be_relative
6711_ACEOF
6712
6713
6714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
6715$as_echo_n "checking for long file names... " >&6; }
6716if test "${ac_cv_sys_long_file_names+set}" = set; then :
6717  $as_echo_n "(cached) " >&6
6718else
6719  ac_cv_sys_long_file_names=yes
6720# Test for long file names in all the places we know might matter:
6721#      .		the current directory, where building will happen
6722#      $prefix/lib	where we will be installing things
6723#      $exec_prefix/lib	likewise
6724#      $TMPDIR		if set, where it might want to write temporary files
6725#      /tmp		where it might want to write temporary files
6726#      /var/tmp		likewise
6727#      /usr/tmp		likewise
6728for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
6729  # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
6730  # in the usual case where exec_prefix is '${prefix}'.
6731  case $ac_dir in #(
6732    . | /* | ?:[\\/]*) ;; #(
6733    *) continue;;
6734  esac
6735  test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
6736  ac_xdir=$ac_dir/cf$$
6737  (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
6738  ac_tf1=$ac_xdir/conftest9012345
6739  ac_tf2=$ac_xdir/conftest9012346
6740  touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
6741    ac_cv_sys_long_file_names=no
6742  rm -f -r "$ac_xdir" 2>/dev/null
6743  test $ac_cv_sys_long_file_names = no && break
6744done
6745fi
6746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
6747$as_echo "$ac_cv_sys_long_file_names" >&6; }
6748if test $ac_cv_sys_long_file_names = yes; then
6749
6750$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
6751
6752fi
6753
6754
6755
6756
6757  for ac_func in $ac_func_list
6758do :
6759  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6760ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6761eval as_val=\$$as_ac_var
6762   if test "x$as_val" = x""yes; then :
6763  cat >>confdefs.h <<_ACEOF
6764#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6765_ACEOF
6766
6767fi
6768done
6769
6770
6771
6772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
6773$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
6774if test "${ac_cv_c_restrict+set}" = set; then :
6775  $as_echo_n "(cached) " >&6
6776else
6777  ac_cv_c_restrict=no
6778   # The order here caters to the fact that C++ does not require restrict.
6779   for ac_kw in __restrict __restrict__ _Restrict restrict; do
6780     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6781/* end confdefs.h.  */
6782typedef int * int_ptr;
6783        int foo (int_ptr $ac_kw ip) {
6784        return ip[0];
6785       }
6786int
6787main ()
6788{
6789int s[1];
6790        int * $ac_kw t = s;
6791        t[0] = 0;
6792        return foo(t)
6793  ;
6794  return 0;
6795}
6796_ACEOF
6797if ac_fn_c_try_compile "$LINENO"; then :
6798  ac_cv_c_restrict=$ac_kw
6799fi
6800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6801     test "$ac_cv_c_restrict" != no && break
6802   done
6803
6804fi
6805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
6806$as_echo "$ac_cv_c_restrict" >&6; }
6807
6808 case $ac_cv_c_restrict in
6809   restrict) ;;
6810   no) $as_echo "#define restrict /**/" >>confdefs.h
6811 ;;
6812   *)  cat >>confdefs.h <<_ACEOF
6813#define restrict $ac_cv_c_restrict
6814_ACEOF
6815 ;;
6816 esac
6817
6818
6819  GNULIB_BTOWC=0;
6820  GNULIB_WCTOB=0;
6821  GNULIB_MBSINIT=0;
6822  GNULIB_MBRTOWC=0;
6823  GNULIB_MBRLEN=0;
6824  GNULIB_MBSRTOWCS=0;
6825  GNULIB_MBSNRTOWCS=0;
6826  GNULIB_WCRTOMB=0;
6827  GNULIB_WCSRTOMBS=0;
6828  GNULIB_WCSNRTOMBS=0;
6829  GNULIB_WCWIDTH=0;
6830    HAVE_BTOWC=1;
6831  HAVE_MBSINIT=1;
6832  HAVE_MBRTOWC=1;
6833  HAVE_MBRLEN=1;
6834  HAVE_MBSRTOWCS=1;
6835  HAVE_MBSNRTOWCS=1;
6836  HAVE_WCRTOMB=1;
6837  HAVE_WCSRTOMBS=1;
6838  HAVE_WCSNRTOMBS=1;
6839  HAVE_DECL_WCTOB=1;
6840  HAVE_DECL_WCWIDTH=1;
6841  REPLACE_MBSTATE_T=0;
6842  REPLACE_BTOWC=0;
6843  REPLACE_WCTOB=0;
6844  REPLACE_MBSINIT=0;
6845  REPLACE_MBRTOWC=0;
6846  REPLACE_MBRLEN=0;
6847  REPLACE_MBSRTOWCS=0;
6848  REPLACE_MBSNRTOWCS=0;
6849  REPLACE_WCRTOMB=0;
6850  REPLACE_WCSRTOMBS=0;
6851  REPLACE_WCSNRTOMBS=0;
6852  REPLACE_WCWIDTH=0;
6853
6854
6855            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
6856$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
6857if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
6858  $as_echo_n "(cached) " >&6
6859else
6860  gl_cv_header_wchar_h_correct_inline=yes
6861     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6862/* end confdefs.h.  */
6863
6864       #define wcstod renamed_wcstod
6865#include <wchar.h>
6866extern int zero (void);
6867int main () { return zero(); }
6868
6869_ACEOF
6870     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6871  (eval $ac_compile) 2>&5
6872  ac_status=$?
6873  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6874  test $ac_status = 0; }; then
6875       mv conftest.$ac_objext conftest1.$ac_objext
6876       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6877/* end confdefs.h.  */
6878
6879         #define wcstod renamed_wcstod
6880#include <wchar.h>
6881int zero (void) { return 0; }
6882
6883_ACEOF
6884       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6885  (eval $ac_compile) 2>&5
6886  ac_status=$?
6887  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6888  test $ac_status = 0; }; then
6889         mv conftest.$ac_objext conftest2.$ac_objext
6890         if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
6891           :
6892         else
6893           gl_cv_header_wchar_h_correct_inline=no
6894         fi
6895       fi
6896     fi
6897     rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
6898
6899fi
6900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
6901$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
6902  if test $gl_cv_header_wchar_h_correct_inline = no; then
6903    as_fn_error "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
6904This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
6905C99 mode. You have four options:
6906  - Add the flag -fgnu89-inline to CC and reconfigure, or
6907  - Fix your include files, using parts of
6908    <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
6909  - Use a gcc version older than 4.3, or
6910  - Don't use the flags -std=c99 or -std=gnu99.
6911Configuration aborted." "$LINENO" 5
6912  fi
6913
6914
6915
6916
6917  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
6918$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
6919if test "${am_cv_langinfo_codeset+set}" = set; then :
6920  $as_echo_n "(cached) " >&6
6921else
6922  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6923/* end confdefs.h.  */
6924#include <langinfo.h>
6925int
6926main ()
6927{
6928char* cs = nl_langinfo(CODESET); return !cs;
6929  ;
6930  return 0;
6931}
6932_ACEOF
6933if ac_fn_c_try_link "$LINENO"; then :
6934  am_cv_langinfo_codeset=yes
6935else
6936  am_cv_langinfo_codeset=no
6937fi
6938rm -f core conftest.err conftest.$ac_objext \
6939    conftest$ac_exeext conftest.$ac_ext
6940
6941fi
6942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
6943$as_echo "$am_cv_langinfo_codeset" >&6; }
6944  if test $am_cv_langinfo_codeset = yes; then
6945
6946$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
6947
6948  fi
6949
6950
6951
6952
6953  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
6954$as_echo_n "checking for a traditional french locale... " >&6; }
6955if test "${gt_cv_locale_fr+set}" = set; then :
6956  $as_echo_n "(cached) " >&6
6957else
6958
6959    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6960/* end confdefs.h.  */
6961
6962#include <locale.h>
6963#include <time.h>
6964#if HAVE_LANGINFO_CODESET
6965# include <langinfo.h>
6966#endif
6967#include <stdlib.h>
6968#include <string.h>
6969struct tm t;
6970char buf[16];
6971int main () {
6972  /* Check whether the given locale name is recognized by the system.  */
6973  if (setlocale (LC_ALL, "") == NULL) return 1;
6974  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
6975     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
6976     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
6977     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
6978     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
6979     some unit tests fail.  */
6980#if HAVE_LANGINFO_CODESET
6981  {
6982    const char *cs = nl_langinfo (CODESET);
6983    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
6984      return 1;
6985  }
6986#endif
6987#ifdef __CYGWIN__
6988  /* On Cygwin, avoid locale names without encoding suffix, because the
6989     locale_charset() function relies on the encoding suffix.  Note that
6990     LC_ALL is set on the command line.  */
6991  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
6992#endif
6993  /* Check whether in the abbreviation of the second month, the second
6994     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
6995     one byte long. This excludes the UTF-8 encoding.  */
6996  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
6997  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
6998  /* Check whether the decimal separator is a comma.
6999     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
7000     are nl_langinfo(RADIXCHAR) are both ".".  */
7001  if (localeconv () ->decimal_point[0] != ',') return 1;
7002  return 0;
7003}
7004
7005_ACEOF
7006    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7007  (eval $ac_link) 2>&5
7008  ac_status=$?
7009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7010  test $ac_status = 0; } && test -s conftest$ac_exeext; then
7011      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
7012      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
7013      # configure script would override the LC_ALL setting. Likewise for
7014      # LC_CTYPE, which is also set at the beginning of the configure script.
7015      # Test for the usual locale name.
7016      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7017        gt_cv_locale_fr=fr_FR
7018      else
7019        # Test for the locale name with explicit encoding suffix.
7020        if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7021          gt_cv_locale_fr=fr_FR.ISO-8859-1
7022        else
7023          # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
7024          if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7025            gt_cv_locale_fr=fr_FR.ISO8859-1
7026          else
7027            # Test for the HP-UX locale name.
7028            if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7029              gt_cv_locale_fr=fr_FR.iso88591
7030            else
7031              # Test for the Solaris 7 locale name.
7032              if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7033                gt_cv_locale_fr=fr
7034              else
7035                # None found.
7036                gt_cv_locale_fr=none
7037              fi
7038            fi
7039          fi
7040        fi
7041      fi
7042    fi
7043    rm -fr conftest*
7044
7045fi
7046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
7047$as_echo "$gt_cv_locale_fr" >&6; }
7048  LOCALE_FR=$gt_cv_locale_fr
7049
7050
7051
7052  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
7053$as_echo_n "checking whether strtold conforms to C99... " >&6; }
7054if test "${gl_cv_func_c99_strtold+set}" = set; then :
7055  $as_echo_n "(cached) " >&6
7056else
7057  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7058/* end confdefs.h.  */
7059/* On HP-UX before 11.23, strtold returns a struct instead of
7060                long double.  Reject implementations like that, by requiring
7061                compatibility with the C99 prototype.  */
7062             #include <stdlib.h>
7063             static long double (*p) (char const *, char **) = strtold;
7064             static long double
7065             test (char const *nptr, char **endptr)
7066             {
7067               long double r;
7068               r = strtold (nptr, endptr);
7069               return r;
7070             }
7071int
7072main ()
7073{
7074return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
7075  ;
7076  return 0;
7077}
7078_ACEOF
7079if ac_fn_c_try_link "$LINENO"; then :
7080  gl_cv_func_c99_strtold=yes
7081else
7082  gl_cv_func_c99_strtold=no
7083fi
7084rm -f core conftest.err conftest.$ac_objext \
7085    conftest$ac_exeext conftest.$ac_ext
7086fi
7087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
7088$as_echo "$gl_cv_func_c99_strtold" >&6; }
7089  if test $gl_cv_func_c99_strtold = yes; then
7090
7091$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
7092
7093  fi
7094
7095ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7096if test "x$ac_cv_type_size_t" = x""yes; then :
7097
7098else
7099
7100cat >>confdefs.h <<_ACEOF
7101#define size_t unsigned int
7102_ACEOF
7103
7104fi
7105
7106
7107  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
7108$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
7109if test "${gl_cv_func_malloc_posix+set}" = set; then :
7110  $as_echo_n "(cached) " >&6
7111else
7112
7113                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7114/* end confdefs.h.  */
7115
7116int
7117main ()
7118{
7119#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7120         choke me
7121         #endif
7122
7123  ;
7124  return 0;
7125}
7126_ACEOF
7127if ac_fn_c_try_compile "$LINENO"; then :
7128  gl_cv_func_malloc_posix=yes
7129else
7130  gl_cv_func_malloc_posix=no
7131fi
7132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7133
7134fi
7135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
7136$as_echo "$gl_cv_func_malloc_posix" >&6; }
7137
7138
7139  GNULIB_ATOLL=0;
7140  GNULIB_CALLOC_POSIX=0;
7141  GNULIB_CANONICALIZE_FILE_NAME=0;
7142  GNULIB_GETLOADAVG=0;
7143  GNULIB_GETSUBOPT=0;
7144  GNULIB_MALLOC_POSIX=0;
7145  GNULIB_MKDTEMP=0;
7146  GNULIB_MKOSTEMP=0;
7147  GNULIB_MKOSTEMPS=0;
7148  GNULIB_MKSTEMP=0;
7149  GNULIB_MKSTEMPS=0;
7150  GNULIB_PUTENV=0;
7151  GNULIB_RANDOM_R=0;
7152  GNULIB_REALLOC_POSIX=0;
7153  GNULIB_REALPATH=0;
7154  GNULIB_RPMATCH=0;
7155  GNULIB_SETENV=0;
7156  GNULIB_STRTOD=0;
7157  GNULIB_STRTOLL=0;
7158  GNULIB_STRTOULL=0;
7159  GNULIB_UNSETENV=0;
7160    HAVE_ATOLL=1;
7161  HAVE_CALLOC_POSIX=1;
7162  HAVE_CANONICALIZE_FILE_NAME=1;
7163  HAVE_DECL_GETLOADAVG=1;
7164  HAVE_GETSUBOPT=1;
7165  HAVE_MALLOC_POSIX=1;
7166  HAVE_MKDTEMP=1;
7167  HAVE_MKOSTEMP=1;
7168  HAVE_MKOSTEMPS=1;
7169  HAVE_MKSTEMPS=1;
7170  HAVE_RANDOM_R=1;
7171  HAVE_REALLOC_POSIX=1;
7172  HAVE_REALPATH=1;
7173  HAVE_RPMATCH=1;
7174  HAVE_SETENV=1;
7175  HAVE_STRTOD=1;
7176  HAVE_STRTOLL=1;
7177  HAVE_STRTOULL=1;
7178  HAVE_STRUCT_RANDOM_DATA=1;
7179  HAVE_SYS_LOADAVG_H=0;
7180  HAVE_UNSETENV=1;
7181  REPLACE_CANONICALIZE_FILE_NAME=0;
7182  REPLACE_MKSTEMP=0;
7183  REPLACE_PUTENV=0;
7184  REPLACE_REALPATH=0;
7185  REPLACE_SETENV=0;
7186  REPLACE_STRTOD=0;
7187  REPLACE_UNSETENV=0;
7188
7189
7190
7191
7192
7193  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7194$as_echo_n "checking whether // is distinct from /... " >&6; }
7195if test "${gl_cv_double_slash_root+set}" = set; then :
7196  $as_echo_n "(cached) " >&6
7197else
7198   if test x"$cross_compiling" = xyes ; then
7199        # When cross-compiling, there is no way to tell whether // is special
7200        # short of a list of hosts.  However, the only known hosts to date
7201        # that have a distinct // are Apollo DomainOS (too old to port to),
7202        # Cygwin, and z/OS.  If anyone knows of another system for which // has
7203        # special semantics and is distinct from /, please report it to
7204        # <bug-gnulib@gnu.org>.
7205        case $host in
7206          *-cygwin | i370-ibm-openedition)
7207            gl_cv_double_slash_root=yes ;;
7208          *)
7209            # Be optimistic and assume that / and // are the same when we
7210            # don't know.
7211            gl_cv_double_slash_root='unknown, assuming no' ;;
7212        esac
7213      else
7214        set x `ls -di / // 2>/dev/null`
7215        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7216          gl_cv_double_slash_root=no
7217        else
7218          gl_cv_double_slash_root=yes
7219        fi
7220      fi
7221fi
7222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7223$as_echo "$gl_cv_double_slash_root" >&6; }
7224  if test "$gl_cv_double_slash_root" = yes; then
7225
7226$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7227
7228  fi
7229
7230
7231
7232
7233
7234  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
7235$as_echo_n "checking whether realpath works... " >&6; }
7236if test "${gl_cv_func_realpath_works+set}" = set; then :
7237  $as_echo_n "(cached) " >&6
7238else
7239
7240    touch conftest.a
7241    if test "$cross_compiling" = yes; then :
7242  gl_cv_func_realpath_works="guessing no"
7243else
7244  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7245/* end confdefs.h.  */
7246
7247
7248        #include <stdlib.h>
7249
7250int
7251main ()
7252{
7253
7254        char *name1 = realpath ("conftest.a", NULL);
7255        char *name2 = realpath ("conftest.b/../conftest.a", NULL);
7256        char *name3 = realpath ("conftest.a/", NULL);
7257        return !(name1 && *name1 == '/' && !name2 && !name3);
7258
7259  ;
7260  return 0;
7261}
7262
7263_ACEOF
7264if ac_fn_c_try_run "$LINENO"; then :
7265  gl_cv_func_realpath_works=yes
7266else
7267  gl_cv_func_realpath_works=no
7268fi
7269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7270  conftest.$ac_objext conftest.beam conftest.$ac_ext
7271fi
7272
7273
7274fi
7275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
7276$as_echo "$gl_cv_func_realpath_works" >&6; }
7277  if test "$gl_cv_func_realpath_works" = yes; then
7278
7279$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
7280
7281  fi
7282
7283
7284  GNULIB_CHOWN=0;
7285  GNULIB_CLOSE=0;
7286  GNULIB_DUP2=0;
7287  GNULIB_DUP3=0;
7288  GNULIB_ENVIRON=0;
7289  GNULIB_EUIDACCESS=0;
7290  GNULIB_FACCESSAT=0;
7291  GNULIB_FCHDIR=0;
7292  GNULIB_FCHOWNAT=0;
7293  GNULIB_FSYNC=0;
7294  GNULIB_FTRUNCATE=0;
7295  GNULIB_GETCWD=0;
7296  GNULIB_GETDOMAINNAME=0;
7297  GNULIB_GETDTABLESIZE=0;
7298  GNULIB_GETGROUPS=0;
7299  GNULIB_GETHOSTNAME=0;
7300  GNULIB_GETLOGIN=0;
7301  GNULIB_GETLOGIN_R=0;
7302  GNULIB_GETPAGESIZE=0;
7303  GNULIB_GETUSERSHELL=0;
7304  GNULIB_LCHOWN=0;
7305  GNULIB_LINK=0;
7306  GNULIB_LINKAT=0;
7307  GNULIB_LSEEK=0;
7308  GNULIB_PIPE2=0;
7309  GNULIB_PREAD=0;
7310  GNULIB_READLINK=0;
7311  GNULIB_READLINKAT=0;
7312  GNULIB_RMDIR=0;
7313  GNULIB_SLEEP=0;
7314  GNULIB_SYMLINK=0;
7315  GNULIB_SYMLINKAT=0;
7316  GNULIB_UNISTD_H_GETOPT=0;
7317  GNULIB_UNISTD_H_SIGPIPE=0;
7318  GNULIB_UNLINK=0;
7319  GNULIB_UNLINKAT=0;
7320  GNULIB_USLEEP=0;
7321  GNULIB_WRITE=0;
7322    HAVE_CHOWN=1;
7323  HAVE_DUP2=1;
7324  HAVE_DUP3=1;
7325  HAVE_EUIDACCESS=1;
7326  HAVE_FACCESSAT=1;
7327  HAVE_FCHOWNAT=1;
7328  HAVE_FSYNC=1;
7329  HAVE_FTRUNCATE=1;
7330  HAVE_GETDOMAINNAME=1;
7331  HAVE_GETDTABLESIZE=1;
7332  HAVE_GETGROUPS=1;
7333  HAVE_GETHOSTNAME=1;
7334  HAVE_GETLOGIN=1;
7335  HAVE_GETPAGESIZE=1;
7336  HAVE_GETUSERSHELL=1;
7337  HAVE_LCHOWN=1;
7338  HAVE_LINK=1;
7339  HAVE_LINKAT=1;
7340  HAVE_PIPE2=1;
7341  HAVE_PREAD=1;
7342  HAVE_READLINK=1;
7343  HAVE_READLINKAT=1;
7344  HAVE_SLEEP=1;
7345  HAVE_SYMLINK=1;
7346  HAVE_SYMLINKAT=1;
7347  HAVE_DECL_ENVIRON=1;
7348  HAVE_DECL_GETLOGIN_R=1;
7349  HAVE_OS_H=0;
7350  HAVE_SYS_PARAM_H=0;
7351  HAVE_UNLINKAT=1;
7352  HAVE_USLEEP=1;
7353  REPLACE_CHOWN=0;
7354  REPLACE_CLOSE=0;
7355  REPLACE_DUP=0;
7356  REPLACE_DUP2=0;
7357  REPLACE_FCHDIR=0;
7358  REPLACE_FCHOWNAT=0;
7359  REPLACE_GETCWD=0;
7360  REPLACE_GETGROUPS=0;
7361  REPLACE_GETPAGESIZE=0;
7362  REPLACE_LCHOWN=0;
7363  REPLACE_LINK=0;
7364  REPLACE_LINKAT=0;
7365  REPLACE_LSEEK=0;
7366  REPLACE_PREAD=0;
7367  REPLACE_READLINK=0;
7368  REPLACE_RMDIR=0;
7369  REPLACE_SLEEP=0;
7370  REPLACE_SYMLINK=0;
7371  REPLACE_UNLINK=0;
7372  REPLACE_UNLINKAT=0;
7373  REPLACE_USLEEP=0;
7374  REPLACE_WRITE=0;
7375  UNISTD_H_HAVE_WINSOCK2_H=0;
7376  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7377
7378
7379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7380$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
7381if test "${ac_cv_type_uid_t+set}" = set; then :
7382  $as_echo_n "(cached) " >&6
7383else
7384  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7385/* end confdefs.h.  */
7386#include <sys/types.h>
7387
7388_ACEOF
7389if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7390  $EGREP "uid_t" >/dev/null 2>&1; then :
7391  ac_cv_type_uid_t=yes
7392else
7393  ac_cv_type_uid_t=no
7394fi
7395rm -f conftest*
7396
7397fi
7398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7399$as_echo "$ac_cv_type_uid_t" >&6; }
7400if test $ac_cv_type_uid_t = no; then
7401
7402$as_echo "#define uid_t int" >>confdefs.h
7403
7404
7405$as_echo "#define gid_t int" >>confdefs.h
7406
7407fi
7408
7409for ac_header in unistd.h
7410do :
7411  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
7412if test "x$ac_cv_header_unistd_h" = x""yes; then :
7413  cat >>confdefs.h <<_ACEOF
7414#define HAVE_UNISTD_H 1
7415_ACEOF
7416
7417fi
7418
7419done
7420
7421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
7422$as_echo_n "checking for working chown... " >&6; }
7423if test "${ac_cv_func_chown_works+set}" = set; then :
7424  $as_echo_n "(cached) " >&6
7425else
7426  if test "$cross_compiling" = yes; then :
7427  ac_cv_func_chown_works=no
7428else
7429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7430/* end confdefs.h.  */
7431$ac_includes_default
7432#include <fcntl.h>
7433
7434int
7435main ()
7436{
7437  char *f = "conftest.chown";
7438  struct stat before, after;
7439
7440  if (creat (f, 0600) < 0)
7441    return 1;
7442  if (stat (f, &before) < 0)
7443    return 1;
7444  if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
7445    return 1;
7446  if (stat (f, &after) < 0)
7447    return 1;
7448  return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
7449
7450  ;
7451  return 0;
7452}
7453_ACEOF
7454if ac_fn_c_try_run "$LINENO"; then :
7455  ac_cv_func_chown_works=yes
7456else
7457  ac_cv_func_chown_works=no
7458fi
7459rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7460  conftest.$ac_objext conftest.beam conftest.$ac_ext
7461fi
7462
7463rm -f conftest.chown
7464
7465fi
7466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
7467$as_echo "$ac_cv_func_chown_works" >&6; }
7468if test $ac_cv_func_chown_works = yes; then
7469
7470$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
7471
7472fi
7473
7474
7475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
7476$as_echo_n "checking whether chown dereferences symlinks... " >&6; }
7477if test "${gl_cv_func_chown_follows_symlink+set}" = set; then :
7478  $as_echo_n "(cached) " >&6
7479else
7480
7481      if test "$cross_compiling" = yes; then :
7482  gl_cv_func_chown_follows_symlink=yes
7483
7484else
7485  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7486/* end confdefs.h.  */
7487
7488#include <unistd.h>
7489#include <stdlib.h>
7490#include <errno.h>
7491
7492        int
7493        main ()
7494        {
7495          char const *dangling_symlink = "conftest.dangle";
7496
7497          unlink (dangling_symlink);
7498          if (symlink ("conftest.no-such", dangling_symlink))
7499            abort ();
7500
7501          /* Exit successfully on a conforming system,
7502             i.e., where chown must fail with ENOENT.  */
7503          exit ( ! (chown (dangling_symlink, getuid (), getgid ()) != 0
7504                    && errno == ENOENT));
7505        }
7506
7507_ACEOF
7508if ac_fn_c_try_run "$LINENO"; then :
7509  gl_cv_func_chown_follows_symlink=yes
7510else
7511  gl_cv_func_chown_follows_symlink=no
7512fi
7513rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7514  conftest.$ac_objext conftest.beam conftest.$ac_ext
7515fi
7516
7517
7518
7519fi
7520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
7521$as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
7522
7523  if test $gl_cv_func_chown_follows_symlink = no; then
7524
7525$as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
7526
7527  fi
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540    if test $ac_cv_func_chown = no; then
7541    HAVE_CHOWN=0
7542
7543
7544
7545
7546
7547
7548
7549
7550  gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
7551
7552  else
7553        if test $gl_cv_func_chown_follows_symlink = no; then
7554      REPLACE_CHOWN=1
7555
7556
7557
7558
7559
7560
7561
7562
7563  gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
7564
7565    fi
7566
7567        if test $ac_cv_func_chown_works = no; then
7568
7569$as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
7570
7571      REPLACE_CHOWN=1
7572
7573
7574
7575
7576
7577
7578
7579
7580  gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
7581
7582    fi
7583
7584            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
7585$as_echo_n "checking whether chown honors trailing slash... " >&6; }
7586if test "${gl_cv_func_chown_slash_works+set}" = set; then :
7587  $as_echo_n "(cached) " >&6
7588else
7589  touch conftest.file && rm -f conftest.link
7590       if test "$cross_compiling" = yes; then :
7591  gl_cv_func_chown_slash_works="guessing no"
7592else
7593  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7594/* end confdefs.h.  */
7595
7596#include <unistd.h>
7597#include <stdlib.h>
7598#include <errno.h>
7599
7600int
7601main ()
7602{
7603    if (symlink ("conftest.file", "conftest.link")) return 1;
7604          if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
7605
7606  ;
7607  return 0;
7608}
7609_ACEOF
7610if ac_fn_c_try_run "$LINENO"; then :
7611  gl_cv_func_chown_slash_works=yes
7612else
7613  gl_cv_func_chown_slash_works=no
7614fi
7615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7616  conftest.$ac_objext conftest.beam conftest.$ac_ext
7617fi
7618
7619      rm -f conftest.link conftest.file
7620fi
7621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
7622$as_echo "$gl_cv_func_chown_slash_works" >&6; }
7623    if test "$gl_cv_func_chown_slash_works" != yes; then
7624
7625$as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
7626
7627      REPLACE_CHOWN=1
7628
7629
7630
7631
7632
7633
7634
7635
7636  gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
7637
7638    fi
7639
7640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
7641$as_echo_n "checking whether chown always updates ctime... " >&6; }
7642if test "${gl_cv_func_chown_ctime_works+set}" = set; then :
7643  $as_echo_n "(cached) " >&6
7644else
7645  if test "$cross_compiling" = yes; then :
7646  gl_cv_func_chown_ctime_works="guessing no"
7647else
7648  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7649/* end confdefs.h.  */
7650
7651#include <unistd.h>
7652#include <stdlib.h>
7653#include <errno.h>
7654#include <fcntl.h>
7655#include <sys/stat.h>
7656
7657int
7658main ()
7659{
7660    struct stat st1, st2;
7661          if (close (creat ("conftest.file", 0600))) return 1;
7662          if (stat ("conftest.file", &st1)) return 2;
7663          sleep (1);
7664          if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
7665          if (stat ("conftest.file", &st2)) return 4;
7666          if (st2.st_ctime <= st1.st_ctime) return 5;
7667
7668  ;
7669  return 0;
7670}
7671_ACEOF
7672if ac_fn_c_try_run "$LINENO"; then :
7673  gl_cv_func_chown_ctime_works=yes
7674else
7675  gl_cv_func_chown_ctime_works=no
7676fi
7677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7678  conftest.$ac_objext conftest.beam conftest.$ac_ext
7679fi
7680
7681      rm -f conftest.file
7682fi
7683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
7684$as_echo "$gl_cv_func_chown_ctime_works" >&6; }
7685    if test "$gl_cv_func_chown_ctime_works" != yes; then
7686
7687$as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
7688
7689      REPLACE_CHOWN=1
7690
7691
7692
7693
7694
7695
7696
7697
7698  gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
7699
7700    fi
7701
7702    if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
7703
7704
7705
7706
7707
7708
7709
7710
7711  gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
7712
7713    fi
7714  fi
7715
7716
7717  GNULIB_IOCTL=0;
7718    SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
7719  SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7720
7721
7722
7723
7724
7725  GNULIB_DPRINTF=0;
7726  GNULIB_FCLOSE=0;
7727  GNULIB_FFLUSH=0;
7728  GNULIB_FOPEN=0;
7729  GNULIB_FPRINTF=0;
7730  GNULIB_FPRINTF_POSIX=0;
7731  GNULIB_FPURGE=0;
7732  GNULIB_FPUTC=0;
7733  GNULIB_FPUTS=0;
7734  GNULIB_FREOPEN=0;
7735  GNULIB_FSEEK=0;
7736  GNULIB_FSEEKO=0;
7737  GNULIB_FTELL=0;
7738  GNULIB_FTELLO=0;
7739  GNULIB_FWRITE=0;
7740  GNULIB_GETDELIM=0;
7741  GNULIB_GETLINE=0;
7742  GNULIB_OBSTACK_PRINTF=0;
7743  GNULIB_OBSTACK_PRINTF_POSIX=0;
7744  GNULIB_PERROR=0;
7745  GNULIB_POPEN=0;
7746  GNULIB_PRINTF=0;
7747  GNULIB_PRINTF_POSIX=0;
7748  GNULIB_PUTC=0;
7749  GNULIB_PUTCHAR=0;
7750  GNULIB_PUTS=0;
7751  GNULIB_REMOVE=0;
7752  GNULIB_RENAME=0;
7753  GNULIB_RENAMEAT=0;
7754  GNULIB_SNPRINTF=0;
7755  GNULIB_SPRINTF_POSIX=0;
7756  GNULIB_STDIO_H_SIGPIPE=0;
7757  GNULIB_VASPRINTF=0;
7758  GNULIB_VDPRINTF=0;
7759  GNULIB_VFPRINTF=0;
7760  GNULIB_VFPRINTF_POSIX=0;
7761  GNULIB_VPRINTF=0;
7762  GNULIB_VPRINTF_POSIX=0;
7763  GNULIB_VSNPRINTF=0;
7764  GNULIB_VSPRINTF_POSIX=0;
7765    HAVE_DECL_FPURGE=1;
7766  HAVE_DECL_GETDELIM=1;
7767  HAVE_DECL_GETLINE=1;
7768  HAVE_DECL_OBSTACK_PRINTF=1;
7769  HAVE_DECL_SNPRINTF=1;
7770  HAVE_DECL_VSNPRINTF=1;
7771  HAVE_DPRINTF=1;
7772  HAVE_RENAMEAT=1;
7773  HAVE_VASPRINTF=1;
7774  HAVE_VDPRINTF=1;
7775  REPLACE_DPRINTF=0;
7776  REPLACE_FCLOSE=0;
7777  REPLACE_FFLUSH=0;
7778  REPLACE_FOPEN=0;
7779  REPLACE_FPRINTF=0;
7780  REPLACE_FPURGE=0;
7781  REPLACE_FREOPEN=0;
7782  REPLACE_FSEEK=0;
7783  REPLACE_FSEEKO=0;
7784  REPLACE_FTELL=0;
7785  REPLACE_FTELLO=0;
7786  REPLACE_GETLINE=0;
7787  REPLACE_OBSTACK_PRINTF=0;
7788  REPLACE_PERROR=0;
7789  REPLACE_POPEN=0;
7790  REPLACE_PRINTF=0;
7791  REPLACE_REMOVE=0;
7792  REPLACE_RENAME=0;
7793  REPLACE_RENAMEAT=0;
7794  REPLACE_SNPRINTF=0;
7795  REPLACE_SPRINTF=0;
7796  REPLACE_STDIO_WRITE_FUNCS=0;
7797  REPLACE_VASPRINTF=0;
7798  REPLACE_VDPRINTF=0;
7799  REPLACE_VFPRINTF=0;
7800  REPLACE_VPRINTF=0;
7801  REPLACE_VSNPRINTF=0;
7802  REPLACE_VSPRINTF=0;
7803
7804
7805   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
7806$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
7807if test "${ac_cv_c_bigendian+set}" = set; then :
7808  $as_echo_n "(cached) " >&6
7809else
7810  ac_cv_c_bigendian=unknown
7811    # See if we're dealing with a universal compiler.
7812    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7813/* end confdefs.h.  */
7814#ifndef __APPLE_CC__
7815	       not a universal capable compiler
7816	     #endif
7817	     typedef int dummy;
7818
7819_ACEOF
7820if ac_fn_c_try_compile "$LINENO"; then :
7821
7822	# Check for potential -arch flags.  It is not universal unless
7823	# there are at least two -arch flags with different values.
7824	ac_arch=
7825	ac_prev=
7826	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
7827	 if test -n "$ac_prev"; then
7828	   case $ac_word in
7829	     i?86 | x86_64 | ppc | ppc64)
7830	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
7831		 ac_arch=$ac_word
7832	       else
7833		 ac_cv_c_bigendian=universal
7834		 break
7835	       fi
7836	       ;;
7837	   esac
7838	   ac_prev=
7839	 elif test "x$ac_word" = "x-arch"; then
7840	   ac_prev=arch
7841	 fi
7842       done
7843fi
7844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7845    if test $ac_cv_c_bigendian = unknown; then
7846      # See if sys/param.h defines the BYTE_ORDER macro.
7847      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7848/* end confdefs.h.  */
7849#include <sys/types.h>
7850	     #include <sys/param.h>
7851
7852int
7853main ()
7854{
7855#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
7856		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
7857		     && LITTLE_ENDIAN)
7858	      bogus endian macros
7859	     #endif
7860
7861  ;
7862  return 0;
7863}
7864_ACEOF
7865if ac_fn_c_try_compile "$LINENO"; then :
7866  # It does; now see whether it defined to BIG_ENDIAN or not.
7867	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7868/* end confdefs.h.  */
7869#include <sys/types.h>
7870		#include <sys/param.h>
7871
7872int
7873main ()
7874{
7875#if BYTE_ORDER != BIG_ENDIAN
7876		 not big endian
7877		#endif
7878
7879  ;
7880  return 0;
7881}
7882_ACEOF
7883if ac_fn_c_try_compile "$LINENO"; then :
7884  ac_cv_c_bigendian=yes
7885else
7886  ac_cv_c_bigendian=no
7887fi
7888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7889fi
7890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7891    fi
7892    if test $ac_cv_c_bigendian = unknown; then
7893      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
7894      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7895/* end confdefs.h.  */
7896#include <limits.h>
7897
7898int
7899main ()
7900{
7901#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
7902	      bogus endian macros
7903	     #endif
7904
7905  ;
7906  return 0;
7907}
7908_ACEOF
7909if ac_fn_c_try_compile "$LINENO"; then :
7910  # It does; now see whether it defined to _BIG_ENDIAN or not.
7911	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7912/* end confdefs.h.  */
7913#include <limits.h>
7914
7915int
7916main ()
7917{
7918#ifndef _BIG_ENDIAN
7919		 not big endian
7920		#endif
7921
7922  ;
7923  return 0;
7924}
7925_ACEOF
7926if ac_fn_c_try_compile "$LINENO"; then :
7927  ac_cv_c_bigendian=yes
7928else
7929  ac_cv_c_bigendian=no
7930fi
7931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7932fi
7933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7934    fi
7935    if test $ac_cv_c_bigendian = unknown; then
7936      # Compile a test program.
7937      if test "$cross_compiling" = yes; then :
7938  # Try to guess by grepping values from an object file.
7939	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7940/* end confdefs.h.  */
7941short int ascii_mm[] =
7942		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
7943		short int ascii_ii[] =
7944		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
7945		int use_ascii (int i) {
7946		  return ascii_mm[i] + ascii_ii[i];
7947		}
7948		short int ebcdic_ii[] =
7949		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
7950		short int ebcdic_mm[] =
7951		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
7952		int use_ebcdic (int i) {
7953		  return ebcdic_mm[i] + ebcdic_ii[i];
7954		}
7955		extern int foo;
7956
7957int
7958main ()
7959{
7960return use_ascii (foo) == use_ebcdic (foo);
7961  ;
7962  return 0;
7963}
7964_ACEOF
7965if ac_fn_c_try_compile "$LINENO"; then :
7966  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
7967	      ac_cv_c_bigendian=yes
7968	    fi
7969	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
7970	      if test "$ac_cv_c_bigendian" = unknown; then
7971		ac_cv_c_bigendian=no
7972	      else
7973		# finding both strings is unlikely to happen, but who knows?
7974		ac_cv_c_bigendian=unknown
7975	      fi
7976	    fi
7977fi
7978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7979else
7980  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7981/* end confdefs.h.  */
7982$ac_includes_default
7983int
7984main ()
7985{
7986
7987	     /* Are we little or big endian?  From Harbison&Steele.  */
7988	     union
7989	     {
7990	       long int l;
7991	       char c[sizeof (long int)];
7992	     } u;
7993	     u.l = 1;
7994	     return u.c[sizeof (long int) - 1] == 1;
7995
7996  ;
7997  return 0;
7998}
7999_ACEOF
8000if ac_fn_c_try_run "$LINENO"; then :
8001  ac_cv_c_bigendian=no
8002else
8003  ac_cv_c_bigendian=yes
8004fi
8005rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8006  conftest.$ac_objext conftest.beam conftest.$ac_ext
8007fi
8008
8009    fi
8010fi
8011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
8012$as_echo "$ac_cv_c_bigendian" >&6; }
8013 case $ac_cv_c_bigendian in #(
8014   yes)
8015     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
8016;; #(
8017   no)
8018      ;; #(
8019   universal)
8020
8021$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8022
8023     ;; #(
8024   *)
8025     as_fn_error "unknown endianness
8026 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
8027 esac
8028
8029
8030
8031  GNULIB_ISBLANK=0;
8032    HAVE_ISBLANK=1;
8033
8034
8035
8036
8037     GNULIB_DIRFD=0;
8038  GNULIB_FDOPENDIR=0;
8039  GNULIB_SCANDIR=0;
8040  GNULIB_ALPHASORT=0;
8041    HAVE_DECL_DIRFD=1;
8042  HAVE_FDOPENDIR=1;
8043  HAVE_SCANDIR=1;
8044  HAVE_ALPHASORT=1;
8045  REPLACE_CLOSEDIR=0;
8046  REPLACE_FDOPENDIR=0;
8047  REPLACE_OPENDIR=0;
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062  gl_LIBOBJS="$gl_LIBOBJS basename-lgpl.$ac_objext"
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072  gl_LIBOBJS="$gl_LIBOBJS dirname-lgpl.$ac_objext"
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082  gl_LIBOBJS="$gl_LIBOBJS stripslash.$ac_objext"
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
8097$as_echo_n "checking if environ is properly declared... " >&6; }
8098  if test "${gt_cv_var_environ_declaration+set}" = set; then :
8099  $as_echo_n "(cached) " >&6
8100else
8101
8102    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8103/* end confdefs.h.  */
8104#include <unistd.h>
8105      extern struct { int foo; } environ;
8106int
8107main ()
8108{
8109environ.foo = 1;
8110  ;
8111  return 0;
8112}
8113_ACEOF
8114if ac_fn_c_try_compile "$LINENO"; then :
8115  gt_cv_var_environ_declaration=no
8116else
8117  gt_cv_var_environ_declaration=yes
8118fi
8119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8120fi
8121
8122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
8123$as_echo "$gt_cv_var_environ_declaration" >&6; }
8124  if test $gt_cv_var_environ_declaration = yes; then
8125
8126$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
8127
8128  fi
8129
8130
8131  if test $gt_cv_var_environ_declaration != yes; then
8132    HAVE_DECL_ENVIRON=0
8133  fi
8134
8135
8136
8137
8138
8139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8140$as_echo_n "checking for complete errno.h... " >&6; }
8141if test "${gl_cv_header_errno_h_complete+set}" = set; then :
8142  $as_echo_n "(cached) " >&6
8143else
8144
8145    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8146/* end confdefs.h.  */
8147
8148#include <errno.h>
8149#if !defined ENOMSG
8150booboo
8151#endif
8152#if !defined EIDRM
8153booboo
8154#endif
8155#if !defined ENOLINK
8156booboo
8157#endif
8158#if !defined EPROTO
8159booboo
8160#endif
8161#if !defined EMULTIHOP
8162booboo
8163#endif
8164#if !defined EBADMSG
8165booboo
8166#endif
8167#if !defined EOVERFLOW
8168booboo
8169#endif
8170#if !defined ENOTSUP
8171booboo
8172#endif
8173#if !defined ESTALE
8174booboo
8175#endif
8176#if !defined ECANCELED
8177booboo
8178#endif
8179
8180_ACEOF
8181if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8182  $EGREP "booboo" >/dev/null 2>&1; then :
8183  gl_cv_header_errno_h_complete=no
8184else
8185  gl_cv_header_errno_h_complete=yes
8186fi
8187rm -f conftest*
8188
8189
8190fi
8191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8192$as_echo "$gl_cv_header_errno_h_complete" >&6; }
8193  if test $gl_cv_header_errno_h_complete = yes; then
8194    ERRNO_H=''
8195  else
8196
8197
8198
8199
8200
8201
8202     if test $gl_cv_have_include_next = yes; then
8203       gl_cv_next_errno_h='<'errno.h'>'
8204     else
8205       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8206$as_echo_n "checking absolute name of <errno.h>... " >&6; }
8207if test "${gl_cv_next_errno_h+set}" = set; then :
8208  $as_echo_n "(cached) " >&6
8209else
8210
8211          if test $ac_cv_header_errno_h = yes; then
8212            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8213/* end confdefs.h.  */
8214#include <errno.h>
8215
8216_ACEOF
8217                                                                                                case "$host_os" in
8218              aix*) gl_absname_cpp="$ac_cpp -C" ;;
8219              *)    gl_absname_cpp="$ac_cpp" ;;
8220            esac
8221                                                gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8222               sed -n '\#/errno.h#{
8223                 s#.*"\(.*/errno.h\)".*#\1#
8224                 s#^/[^/]#//&#
8225                 p
8226                 q
8227               }'`'"'
8228          else
8229            gl_cv_next_errno_h='<'errno.h'>'
8230          fi
8231
8232fi
8233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8234$as_echo "$gl_cv_next_errno_h" >&6; }
8235     fi
8236     NEXT_ERRNO_H=$gl_cv_next_errno_h
8237
8238     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8239       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8240       gl_next_as_first_directive='<'errno.h'>'
8241     else
8242       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8243       gl_next_as_first_directive=$gl_cv_next_errno_h
8244     fi
8245     NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8246
8247
8248
8249    ERRNO_H='errno.h'
8250  fi
8251
8252
8253  if test -n "$ERRNO_H"; then
8254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8255$as_echo_n "checking for EMULTIHOP value... " >&6; }
8256if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
8257  $as_echo_n "(cached) " >&6
8258else
8259
8260      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8261/* end confdefs.h.  */
8262
8263#include <errno.h>
8264#ifdef EMULTIHOP
8265yes
8266#endif
8267
8268_ACEOF
8269if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8270  $EGREP "yes" >/dev/null 2>&1; then :
8271  gl_cv_header_errno_h_EMULTIHOP=yes
8272else
8273  gl_cv_header_errno_h_EMULTIHOP=no
8274fi
8275rm -f conftest*
8276
8277      if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8278        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8279/* end confdefs.h.  */
8280
8281#define _XOPEN_SOURCE_EXTENDED 1
8282#include <errno.h>
8283#ifdef EMULTIHOP
8284yes
8285#endif
8286
8287_ACEOF
8288if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8289  $EGREP "yes" >/dev/null 2>&1; then :
8290  gl_cv_header_errno_h_EMULTIHOP=hidden
8291fi
8292rm -f conftest*
8293
8294        if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8295                              if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
8296#define _XOPEN_SOURCE_EXTENDED 1
8297#include <errno.h>
8298/* The following two lines are a workaround against an autoconf-2.52 bug.  */
8299#include <stdio.h>
8300#include <stdlib.h>
8301"; then :
8302
8303fi
8304
8305        fi
8306      fi
8307
8308fi
8309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8310$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8311    case $gl_cv_header_errno_h_EMULTIHOP in
8312      yes | no)
8313        EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8314        ;;
8315      *)
8316        EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8317        ;;
8318    esac
8319
8320
8321  fi
8322
8323
8324  if test -n "$ERRNO_H"; then
8325    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8326$as_echo_n "checking for ENOLINK value... " >&6; }
8327if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
8328  $as_echo_n "(cached) " >&6
8329else
8330
8331      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8332/* end confdefs.h.  */
8333
8334#include <errno.h>
8335#ifdef ENOLINK
8336yes
8337#endif
8338
8339_ACEOF
8340if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8341  $EGREP "yes" >/dev/null 2>&1; then :
8342  gl_cv_header_errno_h_ENOLINK=yes
8343else
8344  gl_cv_header_errno_h_ENOLINK=no
8345fi
8346rm -f conftest*
8347
8348      if test $gl_cv_header_errno_h_ENOLINK = no; then
8349        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8350/* end confdefs.h.  */
8351
8352#define _XOPEN_SOURCE_EXTENDED 1
8353#include <errno.h>
8354#ifdef ENOLINK
8355yes
8356#endif
8357
8358_ACEOF
8359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8360  $EGREP "yes" >/dev/null 2>&1; then :
8361  gl_cv_header_errno_h_ENOLINK=hidden
8362fi
8363rm -f conftest*
8364
8365        if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8366                              if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
8367#define _XOPEN_SOURCE_EXTENDED 1
8368#include <errno.h>
8369/* The following two lines are a workaround against an autoconf-2.52 bug.  */
8370#include <stdio.h>
8371#include <stdlib.h>
8372"; then :
8373
8374fi
8375
8376        fi
8377      fi
8378
8379fi
8380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8381$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
8382    case $gl_cv_header_errno_h_ENOLINK in
8383      yes | no)
8384        ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8385        ;;
8386      *)
8387        ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8388        ;;
8389    esac
8390
8391
8392  fi
8393
8394
8395  if test -n "$ERRNO_H"; then
8396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8397$as_echo_n "checking for EOVERFLOW value... " >&6; }
8398if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
8399  $as_echo_n "(cached) " >&6
8400else
8401
8402      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8403/* end confdefs.h.  */
8404
8405#include <errno.h>
8406#ifdef EOVERFLOW
8407yes
8408#endif
8409
8410_ACEOF
8411if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8412  $EGREP "yes" >/dev/null 2>&1; then :
8413  gl_cv_header_errno_h_EOVERFLOW=yes
8414else
8415  gl_cv_header_errno_h_EOVERFLOW=no
8416fi
8417rm -f conftest*
8418
8419      if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8420        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8421/* end confdefs.h.  */
8422
8423#define _XOPEN_SOURCE_EXTENDED 1
8424#include <errno.h>
8425#ifdef EOVERFLOW
8426yes
8427#endif
8428
8429_ACEOF
8430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8431  $EGREP "yes" >/dev/null 2>&1; then :
8432  gl_cv_header_errno_h_EOVERFLOW=hidden
8433fi
8434rm -f conftest*
8435
8436        if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8437                              if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
8438#define _XOPEN_SOURCE_EXTENDED 1
8439#include <errno.h>
8440/* The following two lines are a workaround against an autoconf-2.52 bug.  */
8441#include <stdio.h>
8442#include <stdlib.h>
8443"; then :
8444
8445fi
8446
8447        fi
8448      fi
8449
8450fi
8451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8452$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8453    case $gl_cv_header_errno_h_EOVERFLOW in
8454      yes | no)
8455        EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8456        ;;
8457      *)
8458        EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8459        ;;
8460    esac
8461
8462
8463  fi
8464
8465
8466ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8467if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
8468  ac_have_decl=1
8469else
8470  ac_have_decl=0
8471fi
8472
8473cat >>confdefs.h <<_ACEOF
8474#define HAVE_DECL_STRERROR_R $ac_have_decl
8475_ACEOF
8476
8477for ac_func in strerror_r
8478do :
8479  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8480if test "x$ac_cv_func_strerror_r" = x""yes; then :
8481  cat >>confdefs.h <<_ACEOF
8482#define HAVE_STRERROR_R 1
8483_ACEOF
8484
8485fi
8486done
8487
8488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8489$as_echo_n "checking whether strerror_r returns char *... " >&6; }
8490if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
8491  $as_echo_n "(cached) " >&6
8492else
8493
8494    ac_cv_func_strerror_r_char_p=no
8495    if test $ac_cv_have_decl_strerror_r = yes; then
8496      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8497/* end confdefs.h.  */
8498$ac_includes_default
8499int
8500main ()
8501{
8502
8503	  char buf[100];
8504	  char x = *strerror_r (0, buf, sizeof buf);
8505	  char *p = strerror_r (0, buf, sizeof buf);
8506	  return !p || x;
8507
8508  ;
8509  return 0;
8510}
8511_ACEOF
8512if ac_fn_c_try_compile "$LINENO"; then :
8513  ac_cv_func_strerror_r_char_p=yes
8514fi
8515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8516    else
8517      # strerror_r is not declared.  Choose between
8518      # systems that have relatively inaccessible declarations for the
8519      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
8520      # former has a strerror_r that returns char*, while the latter
8521      # has a strerror_r that returns `int'.
8522      # This test should segfault on the DEC system.
8523      if test "$cross_compiling" = yes; then :
8524  :
8525else
8526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8527/* end confdefs.h.  */
8528$ac_includes_default
8529	extern char *strerror_r ();
8530int
8531main ()
8532{
8533char buf[100];
8534	  char x = *strerror_r (0, buf, sizeof buf);
8535	  return ! isalpha (x);
8536  ;
8537  return 0;
8538}
8539_ACEOF
8540if ac_fn_c_try_run "$LINENO"; then :
8541  ac_cv_func_strerror_r_char_p=yes
8542fi
8543rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8544  conftest.$ac_objext conftest.beam conftest.$ac_ext
8545fi
8546
8547    fi
8548
8549fi
8550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8551$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
8552if test $ac_cv_func_strerror_r_char_p = yes; then
8553
8554$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8555
8556fi
8557
8558
8559  XGETTEXT_EXTRA_OPTIONS=
8560
8561
8562
8563
8564
8565ac_fn_c_check_decl "$LINENO" "setregid" "ac_cv_have_decl_setregid" "$ac_includes_default"
8566if test "x$ac_cv_have_decl_setregid" = x""yes; then :
8567  ac_have_decl=1
8568else
8569  ac_have_decl=0
8570fi
8571
8572cat >>confdefs.h <<_ACEOF
8573#define HAVE_DECL_SETREGID $ac_have_decl
8574_ACEOF
8575
8576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
8577$as_echo_n "checking type of array argument to getgroups... " >&6; }
8578if test "${ac_cv_type_getgroups+set}" = set; then :
8579  $as_echo_n "(cached) " >&6
8580else
8581  if test "$cross_compiling" = yes; then :
8582  ac_cv_type_getgroups=cross
8583else
8584  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8585/* end confdefs.h.  */
8586/* Thanks to Mike Rendell for this test.  */
8587$ac_includes_default
8588#define NGID 256
8589#undef MAX
8590#define MAX(x, y) ((x) > (y) ? (x) : (y))
8591
8592int
8593main ()
8594{
8595  gid_t gidset[NGID];
8596  int i, n;
8597  union { gid_t gval; long int lval; }  val;
8598
8599  val.lval = -1;
8600  for (i = 0; i < NGID; i++)
8601    gidset[i] = val.gval;
8602  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
8603		 gidset);
8604  /* Exit non-zero if getgroups seems to require an array of ints.  This
8605     happens when gid_t is short int but getgroups modifies an array
8606     of ints.  */
8607  return n > 0 && gidset[n] != val.gval;
8608}
8609_ACEOF
8610if ac_fn_c_try_run "$LINENO"; then :
8611  ac_cv_type_getgroups=gid_t
8612else
8613  ac_cv_type_getgroups=int
8614fi
8615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8616  conftest.$ac_objext conftest.beam conftest.$ac_ext
8617fi
8618
8619if test $ac_cv_type_getgroups = cross; then
8620        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8621/* end confdefs.h.  */
8622#include <unistd.h>
8623
8624_ACEOF
8625if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8626  $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
8627  ac_cv_type_getgroups=gid_t
8628else
8629  ac_cv_type_getgroups=int
8630fi
8631rm -f conftest*
8632
8633fi
8634fi
8635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
8636$as_echo "$ac_cv_type_getgroups" >&6; }
8637
8638cat >>confdefs.h <<_ACEOF
8639#define GETGROUPS_T $ac_cv_type_getgroups
8640_ACEOF
8641
8642
8643ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
8644if test "x$ac_cv_func_getgroups" = x""yes; then :
8645
8646fi
8647
8648
8649# If we don't yet have getgroups, see if it's in -lbsd.
8650# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
8651ac_save_LIBS=$LIBS
8652if test $ac_cv_func_getgroups = no; then
8653  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
8654$as_echo_n "checking for getgroups in -lbsd... " >&6; }
8655if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
8656  $as_echo_n "(cached) " >&6
8657else
8658  ac_check_lib_save_LIBS=$LIBS
8659LIBS="-lbsd  $LIBS"
8660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8661/* end confdefs.h.  */
8662
8663/* Override any GCC internal prototype to avoid an error.
8664   Use char because int might match the return type of a GCC
8665   builtin and then its argument prototype would still apply.  */
8666#ifdef __cplusplus
8667extern "C"
8668#endif
8669char getgroups ();
8670int
8671main ()
8672{
8673return getgroups ();
8674  ;
8675  return 0;
8676}
8677_ACEOF
8678if ac_fn_c_try_link "$LINENO"; then :
8679  ac_cv_lib_bsd_getgroups=yes
8680else
8681  ac_cv_lib_bsd_getgroups=no
8682fi
8683rm -f core conftest.err conftest.$ac_objext \
8684    conftest$ac_exeext conftest.$ac_ext
8685LIBS=$ac_check_lib_save_LIBS
8686fi
8687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
8688$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
8689if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
8690  GETGROUPS_LIB=-lbsd
8691fi
8692
8693fi
8694
8695# Run the program to test the functionality of the system-supplied
8696# getgroups function only if there is such a function.
8697if test $ac_cv_func_getgroups = yes; then
8698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
8699$as_echo_n "checking for working getgroups... " >&6; }
8700if test "${ac_cv_func_getgroups_works+set}" = set; then :
8701  $as_echo_n "(cached) " >&6
8702else
8703  if test "$cross_compiling" = yes; then :
8704  ac_cv_func_getgroups_works=no
8705else
8706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8707/* end confdefs.h.  */
8708$ac_includes_default
8709int
8710main ()
8711{
8712/* On Ultrix 4.3, getgroups (0, 0) always fails.  */
8713       return getgroups (0, 0) == -1;
8714  ;
8715  return 0;
8716}
8717_ACEOF
8718if ac_fn_c_try_run "$LINENO"; then :
8719  ac_cv_func_getgroups_works=yes
8720else
8721  ac_cv_func_getgroups_works=no
8722fi
8723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8724  conftest.$ac_objext conftest.beam conftest.$ac_ext
8725fi
8726
8727
8728fi
8729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
8730$as_echo "$ac_cv_func_getgroups_works" >&6; }
8731else
8732  ac_cv_func_getgroups_works=no
8733fi
8734if test $ac_cv_func_getgroups_works = yes; then
8735
8736$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
8737
8738fi
8739LIBS=$ac_save_LIBS
8740
8741
8742  GNULIB_FCNTL=0;
8743  GNULIB_OPEN=0;
8744  GNULIB_OPENAT=0;
8745    HAVE_FCNTL=1;
8746  HAVE_OPENAT=1;
8747  REPLACE_FCNTL=0;
8748  REPLACE_OPEN=0;
8749  REPLACE_OPENAT=0;
8750
8751
8752     GNULIB_FCHMODAT=0;
8753  GNULIB_FSTATAT=0;
8754  GNULIB_FUTIMENS=0;
8755  GNULIB_LCHMOD=0;
8756  GNULIB_LSTAT=0;
8757  GNULIB_MKDIRAT=0;
8758  GNULIB_MKFIFO=0;
8759  GNULIB_MKFIFOAT=0;
8760  GNULIB_MKNOD=0;
8761  GNULIB_MKNODAT=0;
8762  GNULIB_STAT=0;
8763  GNULIB_UTIMENSAT=0;
8764    HAVE_FCHMODAT=1;
8765  HAVE_FSTATAT=1;
8766  HAVE_FUTIMENS=1;
8767  HAVE_LCHMOD=1;
8768  HAVE_LSTAT=1;
8769  HAVE_MKDIRAT=1;
8770  HAVE_MKFIFO=1;
8771  HAVE_MKFIFOAT=1;
8772  HAVE_MKNOD=1;
8773  HAVE_MKNODAT=1;
8774  HAVE_UTIMENSAT=1;
8775  REPLACE_FSTAT=0;
8776  REPLACE_FSTATAT=0;
8777  REPLACE_FUTIMENS=0;
8778  REPLACE_LSTAT=0;
8779  REPLACE_MKDIR=0;
8780  REPLACE_MKFIFO=0;
8781  REPLACE_MKNOD=0;
8782  REPLACE_STAT=0;
8783  REPLACE_UTIMENSAT=0;
8784
8785
8786
8787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
8788$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
8789if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
8790  $as_echo_n "(cached) " >&6
8791else
8792  rm -f conftest.sym conftest.file
8793echo >conftest.file
8794if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
8795  if test "$cross_compiling" = yes; then :
8796  ac_cv_func_lstat_dereferences_slashed_symlink=no
8797else
8798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8799/* end confdefs.h.  */
8800$ac_includes_default
8801int
8802main ()
8803{
8804struct stat sbuf;
8805     /* Linux will dereference the symlink and fail, as required by POSIX.
8806	That is better in the sense that it means we will not
8807	have to compile and use the lstat wrapper.  */
8808     return lstat ("conftest.sym/", &sbuf) == 0;
8809  ;
8810  return 0;
8811}
8812_ACEOF
8813if ac_fn_c_try_run "$LINENO"; then :
8814  ac_cv_func_lstat_dereferences_slashed_symlink=yes
8815else
8816  ac_cv_func_lstat_dereferences_slashed_symlink=no
8817fi
8818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8819  conftest.$ac_objext conftest.beam conftest.$ac_ext
8820fi
8821
8822else
8823  # If the `ln -s' command failed, then we probably don't even
8824  # have an lstat function.
8825  ac_cv_func_lstat_dereferences_slashed_symlink=no
8826fi
8827rm -f conftest.sym conftest.file
8828
8829fi
8830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
8831$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
8832
8833test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
8834
8835cat >>confdefs.h <<_ACEOF
8836#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
8837_ACEOF
8838
8839
8840if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
8841
8842
8843
8844
8845
8846
8847
8848
8849  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
8850
8851fi
8852
8853
8854
8855
8856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
8857$as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
8858if test "${gl_cv_func_unlink_works+set}" = set; then :
8859  $as_echo_n "(cached) " >&6
8860else
8861  touch conftest.file
8862     # Assume that if we have lstat, we can also check symlinks.
8863     if test $ac_cv_func_lstat = yes; then
8864       ln -s conftest.file conftest.lnk
8865     fi
8866     if test "$cross_compiling" = yes; then :
8867  gl_cv_func_unlink_works="guessing no"
8868else
8869  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8870/* end confdefs.h.  */
8871#include <unistd.h>
8872           #include <errno.h>
8873
8874int
8875main ()
8876{
8877if (!unlink ("conftest.file/") || errno != ENOTDIR) return 1;
8878#if HAVE_LSTAT
8879      if (!unlink ("conftest.lnk/") || errno != ENOTDIR) return 2;
8880#endif
8881
8882  ;
8883  return 0;
8884}
8885_ACEOF
8886if ac_fn_c_try_run "$LINENO"; then :
8887  gl_cv_func_unlink_works=yes
8888else
8889  gl_cv_func_unlink_works=no
8890fi
8891rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8892  conftest.$ac_objext conftest.beam conftest.$ac_ext
8893fi
8894
8895     rm -f conftest.file conftest.lnk
8896fi
8897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_works" >&5
8898$as_echo "$gl_cv_func_unlink_works" >&6; }
8899  if test x"$gl_cv_func_unlink_works" != xyes; then
8900    REPLACE_UNLINK=1
8901
8902
8903
8904
8905
8906
8907
8908
8909  gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
8910
8911  fi
8912
8913ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8914if test "x$ac_cv_type_mode_t" = x""yes; then :
8915
8916else
8917
8918cat >>confdefs.h <<_ACEOF
8919#define mode_t int
8920_ACEOF
8921
8922fi
8923
8924
8925
8926  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
8927$as_echo_n "checking for promoted mode_t type... " >&6; }
8928if test "${gl_cv_promoted_mode_t+set}" = set; then :
8929  $as_echo_n "(cached) " >&6
8930else
8931
8932                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8933/* end confdefs.h.  */
8934#include <sys/types.h>
8935int
8936main ()
8937{
8938typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
8939  ;
8940  return 0;
8941}
8942_ACEOF
8943if ac_fn_c_try_compile "$LINENO"; then :
8944  gl_cv_promoted_mode_t='int'
8945else
8946  gl_cv_promoted_mode_t='mode_t'
8947fi
8948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8949
8950fi
8951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
8952$as_echo "$gl_cv_promoted_mode_t" >&6; }
8953
8954cat >>confdefs.h <<_ACEOF
8955#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
8956_ACEOF
8957
8958
8959
8960
8961  GNULIB_OPENAT=1
8962
8963
8964  GNULIB_FCHMODAT=1
8965  GNULIB_FSTATAT=1
8966  GNULIB_MKDIRAT=1
8967
8968
8969  GNULIB_FCHOWNAT=1
8970  GNULIB_UNLINKAT=1
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980  gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020  for ac_func in fchmodat fstatat mkdirat openat unlinkat
9021do :
9022  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9023ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9024eval as_val=\$$as_ac_var
9025   if test "x$as_val" = x""yes; then :
9026  cat >>confdefs.h <<_ACEOF
9027#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9028_ACEOF
9029
9030else
9031
9032    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
9033
9034fi
9035done
9036
9037
9038
9039
9040  case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in
9041  yes+yes)
9042    # GNU/Hurd has unlinkat, but it has the same bug as unlink.
9043    if test $REPLACE_UNLINK = 1; then
9044
9045
9046
9047
9048
9049
9050
9051
9052  gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
9053
9054      REPLACE_UNLINKAT=1
9055    fi ;;
9056  yes+*)
9057    # Solaris 9 has *at functions, but uniformly mishandles trailing
9058    # slash in all of them.
9059
9060
9061
9062
9063
9064
9065
9066
9067  gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
9068
9069    REPLACE_OPENAT=1
9070
9071
9072
9073
9074
9075
9076
9077
9078  gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
9079
9080    REPLACE_FSTATAT=1
9081
9082
9083
9084
9085
9086
9087
9088
9089  gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
9090
9091    REPLACE_UNLINKAT=1
9092    ;;
9093  *)
9094    HAVE_OPENAT=0
9095    HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
9096    HAVE_FSTATAT=0 # No known system with fstatat but not openat
9097
9098
9099
9100  :
9101;;
9102  esac
9103  if test $ac_cv_func_fchmodat != yes; then
9104    HAVE_FCHMODAT=0
9105  fi
9106  if test $ac_cv_func_mkdirat != yes; then
9107    HAVE_MKDIRAT=0
9108  fi
9109
9110
9111  ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
9112if test "x$ac_cv_func_fchownat" = x""yes; then :
9113
9114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
9115$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
9116if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then :
9117  $as_echo_n "(cached) " >&6
9118else
9119
9120     gl_dangle=conftest.dangle
9121     # Remove any remnants of a previous test.
9122     rm -f $gl_dangle
9123     # Arrange for deletion of the temporary file this test creates.
9124     ac_clean_files="$ac_clean_files $gl_dangle"
9125     ln -s conftest.no-such $gl_dangle
9126     if test "$cross_compiling" = yes; then :
9127  gl_cv_func_fchownat_nofollow_works=no
9128else
9129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9130/* end confdefs.h.  */
9131
9132#include <fcntl.h>
9133#include <unistd.h>
9134#include <stdlib.h>
9135#include <errno.h>
9136#include <sys/types.h>
9137int
9138main ()
9139{
9140  return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
9141                    AT_SYMLINK_NOFOLLOW) != 0
9142          && errno == ENOENT);
9143}
9144
9145_ACEOF
9146if ac_fn_c_try_run "$LINENO"; then :
9147  gl_cv_func_fchownat_nofollow_works=yes
9148else
9149  gl_cv_func_fchownat_nofollow_works=no
9150fi
9151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9152  conftest.$ac_objext conftest.beam conftest.$ac_ext
9153fi
9154
9155
9156fi
9157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
9158$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
9159  if test $gl_cv_func_fchownat_nofollow_works = no; then :
9160  REPLACE_FCHOWNAT=1
9161
9162$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
9163
9164fi
9165
9166else
9167  HAVE_FCHOWNAT=0
9168fi
9169
9170  if test $REPLACE_CHOWN = 1; then
9171    REPLACE_FCHOWNAT=1
9172  fi
9173  if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
9174
9175
9176
9177
9178
9179
9180
9181
9182  gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
9183
9184  fi
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
9196$as_echo_n "checking for working fcntl.h... " >&6; }
9197if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
9198  $as_echo_n "(cached) " >&6
9199else
9200  if test "$cross_compiling" = yes; then :
9201  gl_cv_header_working_fcntl_h=cross-compiling
9202else
9203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9204/* end confdefs.h.  */
9205#include <sys/types.h>
9206           #include <sys/stat.h>
9207           #include <unistd.h>
9208           #include <fcntl.h>
9209           #ifndef O_NOATIME
9210            #define O_NOATIME 0
9211           #endif
9212           #ifndef O_NOFOLLOW
9213            #define O_NOFOLLOW 0
9214           #endif
9215           static int const constants[] =
9216            {
9217              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
9218              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
9219            };
9220
9221int
9222main ()
9223{
9224
9225            int status = !constants;
9226            {
9227              static char const sym[] = "conftest.sym";
9228              if (symlink (".", sym) != 0
9229                  || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
9230                status |= 32;
9231              unlink (sym);
9232            }
9233            {
9234              static char const file[] = "confdefs.h";
9235              int fd = open (file, O_RDONLY | O_NOATIME);
9236              char c;
9237              struct stat st0, st1;
9238              if (fd < 0
9239                  || fstat (fd, &st0) != 0
9240                  || sleep (1) != 0
9241                  || read (fd, &c, 1) != 1
9242                  || close (fd) != 0
9243                  || stat (file, &st1) != 0
9244                  || st0.st_atime != st1.st_atime)
9245                status |= 64;
9246            }
9247            return status;
9248  ;
9249  return 0;
9250}
9251_ACEOF
9252if ac_fn_c_try_run "$LINENO"; then :
9253  gl_cv_header_working_fcntl_h=yes
9254else
9255  case $? in #(
9256        32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
9257        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
9258        96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
9259         *) gl_cv_header_working_fcntl_h='no';;
9260        esac
9261fi
9262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9263  conftest.$ac_objext conftest.beam conftest.$ac_ext
9264fi
9265
9266fi
9267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
9268$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
9269
9270  case $gl_cv_header_working_fcntl_h in #(
9271  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
9272  *) ac_val=1;;
9273  esac
9274
9275cat >>confdefs.h <<_ACEOF
9276#define HAVE_WORKING_O_NOATIME $ac_val
9277_ACEOF
9278
9279
9280  case $gl_cv_header_working_fcntl_h in #(
9281  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
9282  *) ac_val=1;;
9283  esac
9284
9285cat >>confdefs.h <<_ACEOF
9286#define HAVE_WORKING_O_NOFOLLOW $ac_val
9287_ACEOF
9288
9289
9290
9291
9292
9293
9294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
9295$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
9296if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
9297  $as_echo_n "(cached) " >&6
9298else
9299  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9300/* end confdefs.h.  */
9301
9302#include <sys/types.h>
9303#include <sys/stat.h>
9304int
9305main ()
9306{
9307struct stat s; s.st_dm_mode;
9308  ;
9309  return 0;
9310}
9311_ACEOF
9312if ac_fn_c_try_compile "$LINENO"; then :
9313  ac_cv_struct_st_dm_mode=yes
9314else
9315  ac_cv_struct_st_dm_mode=no
9316fi
9317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9318fi
9319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
9320$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
9321
9322  if test $ac_cv_struct_st_dm_mode = yes; then
9323
9324$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
9325
9326  fi
9327
9328
9329ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
9330if test "x$ac_cv_have_decl_strmode" = x""yes; then :
9331  ac_have_decl=1
9332else
9333  ac_have_decl=0
9334fi
9335
9336cat >>confdefs.h <<_ACEOF
9337#define HAVE_DECL_STRMODE $ac_have_decl
9338_ACEOF
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351  gl_LIBOBJS="$gl_LIBOBJS filenamecat-lgpl.$ac_objext"
9352
9353
9354
9355
9356
9357
9358
9359
9360   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
9361$as_echo_n "checking for mbstate_t... " >&6; }
9362if test "${ac_cv_type_mbstate_t+set}" = set; then :
9363  $as_echo_n "(cached) " >&6
9364else
9365  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9366/* end confdefs.h.  */
9367$ac_includes_default
9368#           include <wchar.h>
9369int
9370main ()
9371{
9372mbstate_t x; return sizeof x;
9373  ;
9374  return 0;
9375}
9376_ACEOF
9377if ac_fn_c_try_compile "$LINENO"; then :
9378  ac_cv_type_mbstate_t=yes
9379else
9380  ac_cv_type_mbstate_t=no
9381fi
9382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9383fi
9384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
9385$as_echo "$ac_cv_type_mbstate_t" >&6; }
9386   if test $ac_cv_type_mbstate_t = yes; then
9387
9388$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
9389
9390   else
9391
9392$as_echo "#define mbstate_t int" >>confdefs.h
9393
9394   fi
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421  GNULIB_CEILF=0;
9422  GNULIB_CEILL=0;
9423  GNULIB_FLOORF=0;
9424  GNULIB_FLOORL=0;
9425  GNULIB_FREXP=0;
9426  GNULIB_FREXPL=0;
9427  GNULIB_ISFINITE=0;
9428  GNULIB_ISINF=0;
9429  GNULIB_ISNAN=0;
9430  GNULIB_ISNANF=0;
9431  GNULIB_ISNAND=0;
9432  GNULIB_ISNANL=0;
9433  GNULIB_LDEXPL=0;
9434  GNULIB_MATHL=0;
9435  GNULIB_ROUND=0;
9436  GNULIB_ROUNDF=0;
9437  GNULIB_ROUNDL=0;
9438  GNULIB_SIGNBIT=0;
9439  GNULIB_TRUNC=0;
9440  GNULIB_TRUNCF=0;
9441  GNULIB_TRUNCL=0;
9442    HAVE_ISNANF=1;
9443  HAVE_ISNAND=1;
9444  HAVE_ISNANL=1;
9445  HAVE_DECL_ACOSL=1;
9446  HAVE_DECL_ASINL=1;
9447  HAVE_DECL_ATANL=1;
9448  HAVE_DECL_COSL=1;
9449  HAVE_DECL_EXPL=1;
9450  HAVE_DECL_FREXPL=1;
9451  HAVE_DECL_LDEXPL=1;
9452  HAVE_DECL_LOGL=1;
9453  HAVE_DECL_SINL=1;
9454  HAVE_DECL_SQRTL=1;
9455  HAVE_DECL_TANL=1;
9456  HAVE_DECL_TRUNC=1;
9457  HAVE_DECL_TRUNCF=1;
9458  REPLACE_CEILF=0;
9459  REPLACE_CEILL=0;
9460  REPLACE_FLOORF=0;
9461  REPLACE_FLOORL=0;
9462  REPLACE_FREXP=0;
9463  REPLACE_FREXPL=0;
9464  REPLACE_HUGE_VAL=0;
9465  REPLACE_ISFINITE=0;
9466  REPLACE_ISINF=0;
9467  REPLACE_ISNAN=0;
9468  REPLACE_LDEXPL=0;
9469  REPLACE_NAN=0;
9470  REPLACE_ROUND=0;
9471  REPLACE_ROUNDF=0;
9472  REPLACE_ROUNDL=0;
9473  REPLACE_SIGNBIT=0;
9474  REPLACE_SIGNBIT_USING_GCC=0;
9475  REPLACE_TRUNCL=0;
9476
9477
9478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
9479$as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
9480if test "${gl_cv_var_stdin_large_offset+set}" = set; then :
9481  $as_echo_n "(cached) " >&6
9482else
9483  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9484/* end confdefs.h.  */
9485#include <stdio.h>
9486int
9487main ()
9488{
9489#if defined __SL64 && defined __SCLE /* cygwin */
9490  /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
9491     fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
9492     it is easier to do a version check than building a runtime test.  */
9493# include <cygwin/version.h>
9494# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
9495  choke me
9496# endif
9497#endif
9498  ;
9499  return 0;
9500}
9501_ACEOF
9502if ac_fn_c_try_link "$LINENO"; then :
9503  gl_cv_var_stdin_large_offset=yes
9504else
9505  gl_cv_var_stdin_large_offset=no
9506fi
9507rm -f core conftest.err conftest.$ac_objext \
9508    conftest$ac_exeext conftest.$ac_ext
9509fi
9510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
9511$as_echo "$gl_cv_var_stdin_large_offset" >&6; }
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524  GNULIB_SOCKET=0;
9525  GNULIB_CONNECT=0;
9526  GNULIB_ACCEPT=0;
9527  GNULIB_BIND=0;
9528  GNULIB_GETPEERNAME=0;
9529  GNULIB_GETSOCKNAME=0;
9530  GNULIB_GETSOCKOPT=0;
9531  GNULIB_LISTEN=0;
9532  GNULIB_RECV=0;
9533  GNULIB_SEND=0;
9534  GNULIB_RECVFROM=0;
9535  GNULIB_SENDTO=0;
9536  GNULIB_SETSOCKOPT=0;
9537  GNULIB_SHUTDOWN=0;
9538  GNULIB_ACCEPT4=0;
9539  HAVE_STRUCT_SOCKADDR_STORAGE=1;
9540  HAVE_SA_FAMILY_T=1;
9541  HAVE_ACCEPT4=1;
9542
9543
9544
9545
9546
9547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
9548$as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
9549if test "${gl_cv_header_sys_socket_h_selfcontained+set}" = set; then :
9550  $as_echo_n "(cached) " >&6
9551else
9552
9553      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9554/* end confdefs.h.  */
9555#include <sys/socket.h>
9556int
9557main ()
9558{
9559
9560  ;
9561  return 0;
9562}
9563_ACEOF
9564if ac_fn_c_try_compile "$LINENO"; then :
9565  gl_cv_header_sys_socket_h_selfcontained=yes
9566else
9567  gl_cv_header_sys_socket_h_selfcontained=no
9568fi
9569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9570
9571fi
9572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
9573$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
9574  if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
9575    SYS_SOCKET_H=''
9576            for ac_func in shutdown
9577do :
9578  ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
9579if test "x$ac_cv_func_shutdown" = x""yes; then :
9580  cat >>confdefs.h <<_ACEOF
9581#define HAVE_SHUTDOWN 1
9582_ACEOF
9583
9584fi
9585done
9586
9587    if test $ac_cv_func_shutdown = yes; then
9588      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
9589$as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
9590if test "${gl_cv_header_sys_socket_h_shut+set}" = set; then :
9591  $as_echo_n "(cached) " >&6
9592else
9593
9594          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9595/* end confdefs.h.  */
9596#include <sys/socket.h>
9597int
9598main ()
9599{
9600int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
9601  ;
9602  return 0;
9603}
9604_ACEOF
9605if ac_fn_c_try_compile "$LINENO"; then :
9606  gl_cv_header_sys_socket_h_shut=yes
9607else
9608  gl_cv_header_sys_socket_h_shut=no
9609fi
9610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9611
9612fi
9613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
9614$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
9615      if test $gl_cv_header_sys_socket_h_shut = no; then
9616        SYS_SOCKET_H='sys/socket.h'
9617      fi
9618    fi
9619  else
9620    SYS_SOCKET_H='sys/socket.h'
9621  fi
9622  # We need to check for ws2tcpip.h now.
9623
9624
9625
9626
9627
9628
9629
9630     if test $gl_cv_have_include_next = yes; then
9631       gl_cv_next_sys_socket_h='<'sys/socket.h'>'
9632     else
9633       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
9634$as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
9635if test "${gl_cv_next_sys_socket_h+set}" = set; then :
9636  $as_echo_n "(cached) " >&6
9637else
9638
9639          if test $ac_cv_header_sys_socket_h = yes; then
9640            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9641/* end confdefs.h.  */
9642#include <sys/socket.h>
9643
9644_ACEOF
9645                                                                                                case "$host_os" in
9646              aix*) gl_absname_cpp="$ac_cpp -C" ;;
9647              *)    gl_absname_cpp="$ac_cpp" ;;
9648            esac
9649                                                gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9650               sed -n '\#/sys/socket.h#{
9651                 s#.*"\(.*/sys/socket.h\)".*#\1#
9652                 s#^/[^/]#//&#
9653                 p
9654                 q
9655               }'`'"'
9656          else
9657            gl_cv_next_sys_socket_h='<'sys/socket.h'>'
9658          fi
9659
9660fi
9661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
9662$as_echo "$gl_cv_next_sys_socket_h" >&6; }
9663     fi
9664     NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
9665
9666     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9667       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9668       gl_next_as_first_directive='<'sys/socket.h'>'
9669     else
9670       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9671       gl_next_as_first_directive=$gl_cv_next_sys_socket_h
9672     fi
9673     NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
9674
9675
9676
9677  if test $ac_cv_header_sys_socket_h = yes; then
9678    HAVE_SYS_SOCKET_H=1
9679    HAVE_WS2TCPIP_H=0
9680  else
9681    HAVE_SYS_SOCKET_H=0
9682                    for ac_header in ws2tcpip.h
9683do :
9684  ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
9685if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
9686  cat >>confdefs.h <<_ACEOF
9687#define HAVE_WS2TCPIP_H 1
9688_ACEOF
9689
9690fi
9691
9692done
9693
9694    if test $ac_cv_header_ws2tcpip_h = yes; then
9695      HAVE_WS2TCPIP_H=1
9696    else
9697      HAVE_WS2TCPIP_H=0
9698    fi
9699  fi
9700
9701
9702
9703  ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
9704  /* sys/types.h is not needed according to POSIX, but the
9705     sys/socket.h in i386-unknown-freebsd4.10 and
9706     powerpc-apple-darwin5.5 required it. */
9707#include <sys/types.h>
9708#ifdef HAVE_SYS_SOCKET_H
9709#include <sys/socket.h>
9710#endif
9711#ifdef HAVE_WS2TCPIP_H
9712#include <ws2tcpip.h>
9713#endif
9714
9715"
9716if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then :
9717
9718cat >>confdefs.h <<_ACEOF
9719#define HAVE_STRUCT_SOCKADDR_STORAGE 1
9720_ACEOF
9721
9722
9723fi
9724ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
9725  /* sys/types.h is not needed according to POSIX, but the
9726     sys/socket.h in i386-unknown-freebsd4.10 and
9727     powerpc-apple-darwin5.5 required it. */
9728#include <sys/types.h>
9729#ifdef HAVE_SYS_SOCKET_H
9730#include <sys/socket.h>
9731#endif
9732#ifdef HAVE_WS2TCPIP_H
9733#include <ws2tcpip.h>
9734#endif
9735
9736"
9737if test "x$ac_cv_type_sa_family_t" = x""yes; then :
9738
9739cat >>confdefs.h <<_ACEOF
9740#define HAVE_SA_FAMILY_T 1
9741_ACEOF
9742
9743
9744fi
9745
9746  if test $ac_cv_type_struct_sockaddr_storage = no; then
9747    HAVE_STRUCT_SOCKADDR_STORAGE=0
9748    SYS_SOCKET_H='sys/socket.h'
9749  fi
9750  if test $ac_cv_type_sa_family_t = no; then
9751    HAVE_SA_FAMILY_T=0
9752    SYS_SOCKET_H='sys/socket.h'
9753  fi
9754  if test -n "$SYS_SOCKET_H"; then
9755
9756
9757
9758
9759  if test $ac_cv_header_sys_socket_h != yes; then
9760                    for ac_header in winsock2.h
9761do :
9762  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
9763if test "x$ac_cv_header_winsock2_h" = x""yes; then :
9764  cat >>confdefs.h <<_ACEOF
9765#define HAVE_WINSOCK2_H 1
9766_ACEOF
9767
9768fi
9769
9770done
9771
9772  fi
9773  if test "$ac_cv_header_winsock2_h" = yes; then
9774    HAVE_WINSOCK2_H=1
9775    UNISTD_H_HAVE_WINSOCK2_H=1
9776    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9777  else
9778    HAVE_WINSOCK2_H=0
9779  fi
9780
9781
9782  fi
9783
9784
9785
9786  GNULIB_GETADDRINFO=0;
9787    HAVE_STRUCT_ADDRINFO=1;
9788  HAVE_DECL_FREEADDRINFO=1;
9789  HAVE_DECL_GAI_STRERROR=1;
9790  HAVE_DECL_GETADDRINFO=1;
9791  HAVE_DECL_GETNAMEINFO=1;
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804     if test $gl_cv_have_include_next = yes; then
9805       gl_cv_next_netdb_h='<'netdb.h'>'
9806     else
9807       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
9808$as_echo_n "checking absolute name of <netdb.h>... " >&6; }
9809if test "${gl_cv_next_netdb_h+set}" = set; then :
9810  $as_echo_n "(cached) " >&6
9811else
9812
9813          if test $ac_cv_header_netdb_h = yes; then
9814            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9815/* end confdefs.h.  */
9816#include <netdb.h>
9817
9818_ACEOF
9819                                                                                                case "$host_os" in
9820              aix*) gl_absname_cpp="$ac_cpp -C" ;;
9821              *)    gl_absname_cpp="$ac_cpp" ;;
9822            esac
9823                                                gl_cv_next_netdb_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9824               sed -n '\#/netdb.h#{
9825                 s#.*"\(.*/netdb.h\)".*#\1#
9826                 s#^/[^/]#//&#
9827                 p
9828                 q
9829               }'`'"'
9830          else
9831            gl_cv_next_netdb_h='<'netdb.h'>'
9832          fi
9833
9834fi
9835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
9836$as_echo "$gl_cv_next_netdb_h" >&6; }
9837     fi
9838     NEXT_NETDB_H=$gl_cv_next_netdb_h
9839
9840     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9841       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9842       gl_next_as_first_directive='<'netdb.h'>'
9843     else
9844       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9845       gl_next_as_first_directive=$gl_cv_next_netdb_h
9846     fi
9847     NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
9848
9849
9850
9851  if test $ac_cv_header_netdb_h = yes; then
9852    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9853/* end confdefs.h.  */
9854
9855         #include <netdb.h>
9856         struct addrinfo a;
9857         int b = EAI_OVERFLOW;
9858         int c = AI_NUMERICSERV;
9859
9860int
9861main ()
9862{
9863
9864  ;
9865  return 0;
9866}
9867_ACEOF
9868if ac_fn_c_try_compile "$LINENO"; then :
9869  NETDB_H=''
9870else
9871  NETDB_H='netdb.h'
9872fi
9873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9874    HAVE_NETDB_H=1
9875  else
9876    NETDB_H='netdb.h'
9877    HAVE_NETDB_H=0
9878  fi
9879
9880
9881
9882
9883                  HOSTENT_LIB=
9884  gl_saved_libs="$LIBS"
9885  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9886$as_echo_n "checking for library containing gethostbyname... " >&6; }
9887if test "${ac_cv_search_gethostbyname+set}" = set; then :
9888  $as_echo_n "(cached) " >&6
9889else
9890  ac_func_search_save_LIBS=$LIBS
9891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9892/* end confdefs.h.  */
9893
9894/* Override any GCC internal prototype to avoid an error.
9895   Use char because int might match the return type of a GCC
9896   builtin and then its argument prototype would still apply.  */
9897#ifdef __cplusplus
9898extern "C"
9899#endif
9900char gethostbyname ();
9901int
9902main ()
9903{
9904return gethostbyname ();
9905  ;
9906  return 0;
9907}
9908_ACEOF
9909for ac_lib in '' nsl network net; do
9910  if test -z "$ac_lib"; then
9911    ac_res="none required"
9912  else
9913    ac_res=-l$ac_lib
9914    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9915  fi
9916  if ac_fn_c_try_link "$LINENO"; then :
9917  ac_cv_search_gethostbyname=$ac_res
9918fi
9919rm -f core conftest.err conftest.$ac_objext \
9920    conftest$ac_exeext
9921  if test "${ac_cv_search_gethostbyname+set}" = set; then :
9922  break
9923fi
9924done
9925if test "${ac_cv_search_gethostbyname+set}" = set; then :
9926
9927else
9928  ac_cv_search_gethostbyname=no
9929fi
9930rm conftest.$ac_ext
9931LIBS=$ac_func_search_save_LIBS
9932fi
9933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9934$as_echo "$ac_cv_search_gethostbyname" >&6; }
9935ac_res=$ac_cv_search_gethostbyname
9936if test "$ac_res" != no; then :
9937  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9938  if test "$ac_cv_search_gethostbyname" != "none required"; then
9939       HOSTENT_LIB="$ac_cv_search_gethostbyname"
9940     fi
9941fi
9942
9943  LIBS="$gl_saved_libs"
9944  if test -z "$HOSTENT_LIB"; then
9945    for ac_func in gethostbyname
9946do :
9947  ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
9948if test "x$ac_cv_func_gethostbyname" = x""yes; then :
9949  cat >>confdefs.h <<_ACEOF
9950#define HAVE_GETHOSTBYNAME 1
9951_ACEOF
9952
9953else
9954
9955      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in winsock2.h and -lws2_32" >&5
9956$as_echo_n "checking for gethostbyname in winsock2.h and -lws2_32... " >&6; }
9957if test "${gl_cv_w32_gethostbyname+set}" = set; then :
9958  $as_echo_n "(cached) " >&6
9959else
9960  gl_cv_w32_gethostbyname=no
9961         gl_save_LIBS="$LIBS"
9962         LIBS="$LIBS -lws2_32"
9963         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9964/* end confdefs.h.  */
9965
9966#ifdef HAVE_WINSOCK2_H
9967#include <winsock2.h>
9968#endif
9969#include <stddef.h>
9970
9971int
9972main ()
9973{
9974gethostbyname(NULL);
9975  ;
9976  return 0;
9977}
9978_ACEOF
9979if ac_fn_c_try_link "$LINENO"; then :
9980  gl_cv_w32_gethostbyname=yes
9981fi
9982rm -f core conftest.err conftest.$ac_objext \
9983    conftest$ac_exeext conftest.$ac_ext
9984         LIBS="$gl_save_LIBS"
9985
9986fi
9987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_gethostbyname" >&5
9988$as_echo "$gl_cv_w32_gethostbyname" >&6; }
9989      if test "$gl_cv_w32_gethostbyname" = "yes"; then
9990        HOSTENT_LIB="-lws2_32"
9991      fi
9992
9993fi
9994done
9995
9996  fi
9997
9998
9999
10000                      SERVENT_LIB=
10001  gl_saved_libs="$LIBS"
10002  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getservbyname" >&5
10003$as_echo_n "checking for library containing getservbyname... " >&6; }
10004if test "${ac_cv_search_getservbyname+set}" = set; then :
10005  $as_echo_n "(cached) " >&6
10006else
10007  ac_func_search_save_LIBS=$LIBS
10008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10009/* end confdefs.h.  */
10010
10011/* Override any GCC internal prototype to avoid an error.
10012   Use char because int might match the return type of a GCC
10013   builtin and then its argument prototype would still apply.  */
10014#ifdef __cplusplus
10015extern "C"
10016#endif
10017char getservbyname ();
10018int
10019main ()
10020{
10021return getservbyname ();
10022  ;
10023  return 0;
10024}
10025_ACEOF
10026for ac_lib in '' socket network net; do
10027  if test -z "$ac_lib"; then
10028    ac_res="none required"
10029  else
10030    ac_res=-l$ac_lib
10031    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10032  fi
10033  if ac_fn_c_try_link "$LINENO"; then :
10034  ac_cv_search_getservbyname=$ac_res
10035fi
10036rm -f core conftest.err conftest.$ac_objext \
10037    conftest$ac_exeext
10038  if test "${ac_cv_search_getservbyname+set}" = set; then :
10039  break
10040fi
10041done
10042if test "${ac_cv_search_getservbyname+set}" = set; then :
10043
10044else
10045  ac_cv_search_getservbyname=no
10046fi
10047rm conftest.$ac_ext
10048LIBS=$ac_func_search_save_LIBS
10049fi
10050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getservbyname" >&5
10051$as_echo "$ac_cv_search_getservbyname" >&6; }
10052ac_res=$ac_cv_search_getservbyname
10053if test "$ac_res" != no; then :
10054  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10055  if test "$ac_cv_search_getservbyname" != "none required"; then
10056       SERVENT_LIB="$ac_cv_search_getservbyname"
10057     fi
10058fi
10059
10060  LIBS="$gl_saved_libs"
10061  if test -z "$SERVENT_LIB"; then
10062    for ac_func in getservbyname
10063do :
10064  ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname"
10065if test "x$ac_cv_func_getservbyname" = x""yes; then :
10066  cat >>confdefs.h <<_ACEOF
10067#define HAVE_GETSERVBYNAME 1
10068_ACEOF
10069
10070else
10071
10072      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getservbyname in winsock2.h and -lws2_32" >&5
10073$as_echo_n "checking for getservbyname in winsock2.h and -lws2_32... " >&6; }
10074if test "${gl_cv_w32_getservbyname+set}" = set; then :
10075  $as_echo_n "(cached) " >&6
10076else
10077  gl_cv_w32_getservbyname=no
10078         gl_save_LIBS="$LIBS"
10079         LIBS="$LIBS -lws2_32"
10080         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10081/* end confdefs.h.  */
10082
10083#ifdef HAVE_WINSOCK2_H
10084#include <winsock2.h>
10085#endif
10086#include <stddef.h>
10087
10088int
10089main ()
10090{
10091getservbyname(NULL,NULL);
10092  ;
10093  return 0;
10094}
10095_ACEOF
10096if ac_fn_c_try_link "$LINENO"; then :
10097  gl_cv_w32_getservbyname=yes
10098fi
10099rm -f core conftest.err conftest.$ac_objext \
10100    conftest$ac_exeext conftest.$ac_ext
10101         LIBS="$gl_save_LIBS"
10102
10103fi
10104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_getservbyname" >&5
10105$as_echo "$gl_cv_w32_getservbyname" >&6; }
10106      if test "$gl_cv_w32_getservbyname" = "yes"; then
10107        SERVENT_LIB="-lws2_32"
10108      fi
10109
10110fi
10111done
10112
10113  fi
10114
10115
10116
10117
10118
10119
10120
10121
10122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
10123$as_echo_n "checking for IPv4 sockets... " >&6; }
10124  if test "${gl_cv_socket_ipv4+set}" = set; then :
10125  $as_echo_n "(cached) " >&6
10126else
10127  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10128/* end confdefs.h.  */
10129#include <sys/types.h>
10130#ifdef HAVE_SYS_SOCKET_H
10131#include <sys/socket.h>
10132#endif
10133#ifdef HAVE_NETINET_IN_H
10134#include <netinet/in.h>
10135#endif
10136#ifdef HAVE_WINSOCK2_H
10137#include <winsock2.h>
10138#endif
10139int
10140main ()
10141{
10142int x = AF_INET; struct in_addr y; struct sockaddr_in z;
10143 if (&x && &y && &z) return 0;
10144  ;
10145  return 0;
10146}
10147_ACEOF
10148if ac_fn_c_try_compile "$LINENO"; then :
10149  gl_cv_socket_ipv4=yes
10150else
10151  gl_cv_socket_ipv4=no
10152fi
10153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10154fi
10155
10156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
10157$as_echo "$gl_cv_socket_ipv4" >&6; }
10158  if test $gl_cv_socket_ipv4 = yes; then
10159
10160$as_echo "#define HAVE_IPV4 1" >>confdefs.h
10161
10162  fi
10163
10164  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
10165$as_echo_n "checking for IPv6 sockets... " >&6; }
10166  if test "${gl_cv_socket_ipv6+set}" = set; then :
10167  $as_echo_n "(cached) " >&6
10168else
10169  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10170/* end confdefs.h.  */
10171#include <sys/types.h>
10172#ifdef HAVE_SYS_SOCKET_H
10173#include <sys/socket.h>
10174#endif
10175#ifdef HAVE_NETINET_IN_H
10176#include <netinet/in.h>
10177#endif
10178#ifdef HAVE_WINSOCK2_H
10179#include <winsock2.h>
10180#endif
10181int
10182main ()
10183{
10184int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
10185 if (&x && &y && &z) return 0;
10186  ;
10187  return 0;
10188}
10189_ACEOF
10190if ac_fn_c_try_compile "$LINENO"; then :
10191  gl_cv_socket_ipv6=yes
10192else
10193  gl_cv_socket_ipv6=no
10194fi
10195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10196fi
10197
10198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
10199$as_echo "$gl_cv_socket_ipv6" >&6; }
10200  if test $gl_cv_socket_ipv6 = yes; then
10201
10202$as_echo "#define HAVE_IPV6 1" >>confdefs.h
10203
10204  fi
10205
10206
10207
10208
10209
10210    :
10211
10212
10213      gl_save_LIBS=$LIBS
10214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
10215$as_echo_n "checking for library containing inet_ntop... " >&6; }
10216if test "${ac_cv_search_inet_ntop+set}" = set; then :
10217  $as_echo_n "(cached) " >&6
10218else
10219  ac_func_search_save_LIBS=$LIBS
10220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10221/* end confdefs.h.  */
10222
10223/* Override any GCC internal prototype to avoid an error.
10224   Use char because int might match the return type of a GCC
10225   builtin and then its argument prototype would still apply.  */
10226#ifdef __cplusplus
10227extern "C"
10228#endif
10229char inet_ntop ();
10230int
10231main ()
10232{
10233return inet_ntop ();
10234  ;
10235  return 0;
10236}
10237_ACEOF
10238for ac_lib in '' nsl; do
10239  if test -z "$ac_lib"; then
10240    ac_res="none required"
10241  else
10242    ac_res=-l$ac_lib
10243    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10244  fi
10245  if ac_fn_c_try_link "$LINENO"; then :
10246  ac_cv_search_inet_ntop=$ac_res
10247fi
10248rm -f core conftest.err conftest.$ac_objext \
10249    conftest$ac_exeext
10250  if test "${ac_cv_search_inet_ntop+set}" = set; then :
10251  break
10252fi
10253done
10254if test "${ac_cv_search_inet_ntop+set}" = set; then :
10255
10256else
10257  ac_cv_search_inet_ntop=no
10258fi
10259rm conftest.$ac_ext
10260LIBS=$ac_func_search_save_LIBS
10261fi
10262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
10263$as_echo "$ac_cv_search_inet_ntop" >&6; }
10264ac_res=$ac_cv_search_inet_ntop
10265if test "$ac_res" != no; then :
10266  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10267
10268else
10269
10270
10271
10272
10273
10274
10275
10276
10277  for ac_func in inet_ntop
10278do :
10279  ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
10280if test "x$ac_cv_func_inet_ntop" = x""yes; then :
10281  cat >>confdefs.h <<_ACEOF
10282#define HAVE_INET_NTOP 1
10283_ACEOF
10284
10285else
10286
10287    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
10288
10289fi
10290done
10291
10292
10293fi
10294
10295  LIBS=$gl_save_LIBS
10296  INET_NTOP_LIB=
10297  if test "$ac_cv_search_inet_ntop" != "no" &&
10298     test "$ac_cv_search_inet_ntop" != "none required"; then
10299    INET_NTOP_LIB="$ac_cv_search_inet_ntop"
10300  fi
10301
10302
10303
10304  ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
10305"
10306if test "x$ac_cv_have_decl_inet_ntop" = x""yes; then :
10307  ac_have_decl=1
10308else
10309  ac_have_decl=0
10310fi
10311
10312cat >>confdefs.h <<_ACEOF
10313#define HAVE_DECL_INET_NTOP $ac_have_decl
10314_ACEOF
10315
10316  if test $ac_cv_have_decl_inet_ntop = no; then
10317    HAVE_DECL_INET_NTOP=0
10318  fi
10319
10320
10321
10322
10323
10324   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
10325$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
10326if test "${gl_cv_func_getcwd_null+set}" = set; then :
10327  $as_echo_n "(cached) " >&6
10328else
10329  if test "$cross_compiling" = yes; then :
10330
10331       case "$host_os" in
10332                               # Guess yes on glibc systems.
10333         *-gnu*)               gl_cv_func_getcwd_null="guessing yes";;
10334                               # Guess yes on Cygwin.
10335         cygwin*)              gl_cv_func_getcwd_null="guessing yes";;
10336                               # Guess yes on mingw.
10337         mingw*)               gl_cv_func_getcwd_null="guessing yes";;
10338                               # If we don't know, assume the worst.
10339         *)                    gl_cv_func_getcwd_null="guessing no";;
10340       esac
10341
10342else
10343  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10344/* end confdefs.h.  */
10345
10346#        include <unistd.h>
10347#        ifndef getcwd
10348         char *getcwd ();
10349#        endif
10350
10351int
10352main ()
10353{
10354
10355#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
10356/* mingw cwd does not start with '/', but getcwd does allocate.  */
10357#else
10358           if (chdir ("/") != 0)
10359             return 1;
10360           else
10361             {
10362               char *f = getcwd (NULL, 0);
10363               return ! (f && f[0] == '/' && !f[1]);
10364             }
10365#endif
10366
10367  ;
10368  return 0;
10369}
10370_ACEOF
10371if ac_fn_c_try_run "$LINENO"; then :
10372  gl_cv_func_getcwd_null=yes
10373else
10374  gl_cv_func_getcwd_null=no
10375fi
10376rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10377  conftest.$ac_objext conftest.beam conftest.$ac_ext
10378fi
10379
10380fi
10381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
10382$as_echo "$gl_cv_func_getcwd_null" >&6; }
10383
10384ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
10385if test "x$ac_cv_have_decl_getcwd" = x""yes; then :
10386  ac_have_decl=1
10387else
10388  ac_have_decl=0
10389fi
10390
10391cat >>confdefs.h <<_ACEOF
10392#define HAVE_DECL_GETCWD $ac_have_decl
10393_ACEOF
10394
10395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
10396$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
10397if test "${ac_cv_header_stdbool_h+set}" = set; then :
10398  $as_echo_n "(cached) " >&6
10399else
10400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10401/* end confdefs.h.  */
10402
10403          #include <stdbool.h>
10404          #ifndef bool
10405           "error: bool is not defined"
10406          #endif
10407          #ifndef false
10408           "error: false is not defined"
10409          #endif
10410          #if false
10411           "error: false is not 0"
10412          #endif
10413          #ifndef true
10414           "error: true is not defined"
10415          #endif
10416          #if true != 1
10417           "error: true is not 1"
10418          #endif
10419          #ifndef __bool_true_false_are_defined
10420           "error: __bool_true_false_are_defined is not defined"
10421          #endif
10422
10423          struct s { _Bool s: 1; _Bool t; } s;
10424
10425          char a[true == 1 ? 1 : -1];
10426          char b[false == 0 ? 1 : -1];
10427          char c[__bool_true_false_are_defined == 1 ? 1 : -1];
10428          char d[(bool) 0.5 == true ? 1 : -1];
10429          bool e = &s;
10430          char f[(_Bool) 0.0 == false ? 1 : -1];
10431          char g[true];
10432          char h[sizeof (_Bool)];
10433          char i[sizeof s.t];
10434          enum { j = false, k = true, l = false * true, m = true * 256 };
10435          _Bool n[m];
10436          char o[sizeof n == m * sizeof n[0] ? 1 : -1];
10437          char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
10438          #if defined __xlc__ || defined __GNUC__
10439           /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
10440              reported by James Lemley on 2005-10-05; see
10441              http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
10442              This test is not quite right, since xlc is allowed to
10443              reject this program, as the initializer for xlcbug is
10444              not one of the forms that C requires support for.
10445              However, doing the test right would require a run-time
10446              test, and that would make cross-compilation harder.
10447              Let us hope that IBM fixes the xlc bug, and also adds
10448              support for this kind of constant expression.  In the
10449              meantime, this test will reject xlc, which is OK, since
10450              our stdbool.h substitute should suffice.  We also test
10451              this with GCC, where it should work, to detect more
10452              quickly whether someone messes up the test in the
10453              future.  */
10454           char digs[] = "0123456789";
10455           int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
10456          #endif
10457          /* Catch a bug in an HP-UX C compiler.  See
10458             http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
10459             http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
10460           */
10461          _Bool q = true;
10462          _Bool *pq = &q;
10463
10464int
10465main ()
10466{
10467
10468          *pq |= q;
10469          *pq |= ! q;
10470          /* Refer to every declared value, to avoid compiler optimizations.  */
10471          return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
10472                  + !m + !n + !o + !p + !q + !pq);
10473
10474  ;
10475  return 0;
10476}
10477_ACEOF
10478if ac_fn_c_try_compile "$LINENO"; then :
10479  ac_cv_header_stdbool_h=yes
10480else
10481  ac_cv_header_stdbool_h=no
10482fi
10483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10484fi
10485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
10486$as_echo "$ac_cv_header_stdbool_h" >&6; }
10487   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
10488if test "x$ac_cv_type__Bool" = x""yes; then :
10489
10490cat >>confdefs.h <<_ACEOF
10491#define HAVE__BOOL 1
10492_ACEOF
10493
10494
10495fi
10496
10497   if test $ac_cv_header_stdbool_h = yes; then
10498
10499$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
10500
10501   fi
10502
10503
10504
10505  # Define two additional variables used in the Makefile substitution.
10506
10507  if test "$ac_cv_header_stdbool_h" = yes; then
10508    STDBOOL_H=''
10509  else
10510    STDBOOL_H='stdbool.h'
10511  fi
10512
10513
10514  if test "$ac_cv_type__Bool" = yes; then
10515    HAVE__BOOL=1
10516  else
10517    HAVE__BOOL=0
10518  fi
10519
10520
10521
10522
10523
10524
10525  # getdate.y works with bison only.
10526  : ${YACC='bison -y'}
10527
10528
10529  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5
10530$as_echo_n "checking for compound literals... " >&6; }
10531if test "${gl_cv_compound_literals+set}" = set; then :
10532  $as_echo_n "(cached) " >&6
10533else
10534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10535/* end confdefs.h.  */
10536struct s { int i, j; };
10537int
10538main ()
10539{
10540struct s t = (struct s) { 3, 4 };
10541        if (t.i != 0) return 0;
10542  ;
10543  return 0;
10544}
10545_ACEOF
10546if ac_fn_c_try_compile "$LINENO"; then :
10547  gl_cv_compound_literals=yes
10548else
10549  gl_cv_compound_literals=no
10550fi
10551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10552fi
10553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5
10554$as_echo "$gl_cv_compound_literals" >&6; }
10555  if test $gl_cv_compound_literals = yes; then
10556
10557$as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h
10558
10559  fi
10560
10561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10562$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10563if test "${ac_cv_struct_tm+set}" = set; then :
10564  $as_echo_n "(cached) " >&6
10565else
10566  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10567/* end confdefs.h.  */
10568#include <sys/types.h>
10569#include <time.h>
10570
10571int
10572main ()
10573{
10574struct tm tm;
10575				     int *p = &tm.tm_sec;
10576				     return !p;
10577  ;
10578  return 0;
10579}
10580_ACEOF
10581if ac_fn_c_try_compile "$LINENO"; then :
10582  ac_cv_struct_tm=time.h
10583else
10584  ac_cv_struct_tm=sys/time.h
10585fi
10586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10587fi
10588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10589$as_echo "$ac_cv_struct_tm" >&6; }
10590if test $ac_cv_struct_tm = sys/time.h; then
10591
10592$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
10593
10594fi
10595
10596
10597 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
10598"
10599if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
10600
10601$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
10602
10603fi
10604
10605
10606ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
10607if test "x$ac_cv_have_decl_getdelim" = x""yes; then :
10608  ac_have_decl=1
10609else
10610  ac_have_decl=0
10611fi
10612
10613cat >>confdefs.h <<_ACEOF
10614#define HAVE_DECL_GETDELIM $ac_have_decl
10615_ACEOF
10616
10617
10618
10619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arithmetic hrtime_t" >&5
10620$as_echo_n "checking for arithmetic hrtime_t... " >&6; }
10621if test "${gl_cv_arithmetic_hrtime_t+set}" = set; then :
10622  $as_echo_n "(cached) " >&6
10623else
10624  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10625/* end confdefs.h.  */
10626#include <time.h>
10627int
10628main ()
10629{
10630hrtime_t x = 0; return x/x;
10631  ;
10632  return 0;
10633}
10634_ACEOF
10635if ac_fn_c_try_compile "$LINENO"; then :
10636  gl_cv_arithmetic_hrtime_t=yes
10637else
10638  gl_cv_arithmetic_hrtime_t=no
10639fi
10640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10641fi
10642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_arithmetic_hrtime_t" >&5
10643$as_echo "$gl_cv_arithmetic_hrtime_t" >&6; }
10644  if test $gl_cv_arithmetic_hrtime_t = yes; then
10645
10646$as_echo "#define HAVE_ARITHMETIC_HRTIME_T 1" >>confdefs.h
10647
10648  fi
10649
10650
10651  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10652$as_echo_n "checking for long long int... " >&6; }
10653if test "${ac_cv_type_long_long_int+set}" = set; then :
10654  $as_echo_n "(cached) " >&6
10655else
10656  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10657/* end confdefs.h.  */
10658
10659  /* For now, do not test the preprocessor; as of 2007 there are too many
10660         implementations with broken preprocessors.  Perhaps this can
10661         be revisited in 2012.  In the meantime, code should not expect
10662         #if to work with literals wider than 32 bits.  */
10663      /* Test literals.  */
10664      long long int ll = 9223372036854775807ll;
10665      long long int nll = -9223372036854775807LL;
10666      unsigned long long int ull = 18446744073709551615ULL;
10667      /* Test constant expressions.   */
10668      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10669                     ? 1 : -1)];
10670      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10671                     ? 1 : -1)];
10672      int i = 63;
10673int
10674main ()
10675{
10676/* Test availability of runtime routines for shift and division.  */
10677      long long int llmax = 9223372036854775807ll;
10678      unsigned long long int ullmax = 18446744073709551615ull;
10679      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10680              | (llmax / ll) | (llmax % ll)
10681              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10682              | (ullmax / ull) | (ullmax % ull));
10683  ;
10684  return 0;
10685}
10686
10687_ACEOF
10688if ac_fn_c_try_link "$LINENO"; then :
10689                          if test "$cross_compiling" = yes; then :
10690  ac_cv_type_long_long_int=yes
10691else
10692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10693/* end confdefs.h.  */
10694#include <limits.h>
10695               #ifndef LLONG_MAX
10696               # define HALF \
10697                        (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10698               # define LLONG_MAX (HALF - 1 + HALF)
10699               #endif
10700int
10701main ()
10702{
10703long long int n = 1;
10704               int i;
10705               for (i = 0; ; i++)
10706                 {
10707                   long long int m = n << i;
10708                   if (m >> i != n)
10709                     return 1;
10710                   if (LLONG_MAX / 2 < m)
10711                     break;
10712                 }
10713               return 0;
10714  ;
10715  return 0;
10716}
10717_ACEOF
10718if ac_fn_c_try_run "$LINENO"; then :
10719  ac_cv_type_long_long_int=yes
10720else
10721  ac_cv_type_long_long_int=no
10722fi
10723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10724  conftest.$ac_objext conftest.beam conftest.$ac_ext
10725fi
10726
10727else
10728  ac_cv_type_long_long_int=no
10729fi
10730rm -f core conftest.err conftest.$ac_objext \
10731    conftest$ac_exeext conftest.$ac_ext
10732fi
10733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10734$as_echo "$ac_cv_type_long_long_int" >&6; }
10735  if test $ac_cv_type_long_long_int = yes; then
10736
10737$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
10738
10739  fi
10740
10741
10742
10743
10744  :
10745
10746
10747
10748
10749
10750ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
10751if test "x$ac_cv_have_decl_getline" = x""yes; then :
10752  ac_have_decl=1
10753else
10754  ac_have_decl=0
10755fi
10756
10757cat >>confdefs.h <<_ACEOF
10758#define HAVE_DECL_GETLINE $ac_have_decl
10759_ACEOF
10760
10761
10762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
10763$as_echo_n "checking for ssize_t... " >&6; }
10764if test "${gt_cv_ssize_t+set}" = set; then :
10765  $as_echo_n "(cached) " >&6
10766else
10767  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10768/* end confdefs.h.  */
10769#include <sys/types.h>
10770int
10771main ()
10772{
10773int x = sizeof (ssize_t *) + sizeof (ssize_t);
10774        return !x;
10775  ;
10776  return 0;
10777}
10778_ACEOF
10779if ac_fn_c_try_compile "$LINENO"; then :
10780  gt_cv_ssize_t=yes
10781else
10782  gt_cv_ssize_t=no
10783fi
10784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10785fi
10786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
10787$as_echo "$gt_cv_ssize_t" >&6; }
10788  if test $gt_cv_ssize_t = no; then
10789
10790$as_echo "#define ssize_t int" >>confdefs.h
10791
10792  fi
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810     if test $gl_cv_have_include_next = yes; then
10811       gl_cv_next_getopt_h='<'getopt.h'>'
10812     else
10813       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
10814$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
10815if test "${gl_cv_next_getopt_h+set}" = set; then :
10816  $as_echo_n "(cached) " >&6
10817else
10818
10819          if test $ac_cv_header_getopt_h = yes; then
10820            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10821/* end confdefs.h.  */
10822#include <getopt.h>
10823
10824_ACEOF
10825                                                                                                case "$host_os" in
10826              aix*) gl_absname_cpp="$ac_cpp -C" ;;
10827              *)    gl_absname_cpp="$ac_cpp" ;;
10828            esac
10829                                                gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10830               sed -n '\#/getopt.h#{
10831                 s#.*"\(.*/getopt.h\)".*#\1#
10832                 s#^/[^/]#//&#
10833                 p
10834                 q
10835               }'`'"'
10836          else
10837            gl_cv_next_getopt_h='<'getopt.h'>'
10838          fi
10839
10840fi
10841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
10842$as_echo "$gl_cv_next_getopt_h" >&6; }
10843     fi
10844     NEXT_GETOPT_H=$gl_cv_next_getopt_h
10845
10846     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10847       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10848       gl_next_as_first_directive='<'getopt.h'>'
10849     else
10850       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10851       gl_next_as_first_directive=$gl_cv_next_getopt_h
10852     fi
10853     NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
10854
10855
10856
10857
10858  if test $ac_cv_header_getopt_h = yes; then
10859    HAVE_GETOPT_H=1
10860  else
10861    HAVE_GETOPT_H=0
10862  fi
10863
10864
10865  gl_replace_getopt=
10866
10867    if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10868    for ac_header in getopt.h
10869do :
10870  ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
10871if test "x$ac_cv_header_getopt_h" = x""yes; then :
10872  cat >>confdefs.h <<_ACEOF
10873#define HAVE_GETOPT_H 1
10874_ACEOF
10875
10876else
10877  gl_replace_getopt=yes
10878fi
10879
10880done
10881
10882  fi
10883
10884    if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10885    for ac_func in getopt_long_only
10886do :
10887  ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
10888if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
10889  cat >>confdefs.h <<_ACEOF
10890#define HAVE_GETOPT_LONG_ONLY 1
10891_ACEOF
10892
10893else
10894  gl_replace_getopt=yes
10895fi
10896done
10897
10898  fi
10899
10900          if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
10901    ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
10902"
10903if test "x$ac_cv_have_decl_optreset" = x""yes; then :
10904  ac_have_decl=1
10905else
10906  ac_have_decl=0
10907fi
10908
10909cat >>confdefs.h <<_ACEOF
10910#define HAVE_DECL_OPTRESET $ac_have_decl
10911_ACEOF
10912
10913  fi
10914
10915            if test -z "$gl_replace_getopt"; then
10916    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
10917$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
10918if test "${gl_cv_func_getopt_posix+set}" = set; then :
10919  $as_echo_n "(cached) " >&6
10920else
10921
10922                if test "$cross_compiling" = yes; then :
10923  case "$host_os" in
10924             mingw*) gl_cv_func_getopt_posix="guessing no";;
10925             *)      gl_cv_func_getopt_posix="guessing yes";;
10926           esac
10927
10928else
10929  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10930/* end confdefs.h.  */
10931
10932#include <unistd.h>
10933#include <stdlib.h>
10934#include <string.h>
10935
10936#if !HAVE_DECL_OPTRESET
10937# define OPTIND_MIN 0
10938#else
10939# define OPTIND_MIN 1
10940#endif
10941
10942int
10943main ()
10944{
10945  {
10946    int argc = 0;
10947    char *argv[10];
10948    int c;
10949
10950    argv[argc++] = "program";
10951    argv[argc++] = "-a";
10952    argv[argc++] = "foo";
10953    argv[argc++] = "bar";
10954    argv[argc] = NULL;
10955    optind = OPTIND_MIN;
10956    opterr = 0;
10957
10958    c = getopt (argc, argv, "ab");
10959    if (!(c == 'a'))
10960      return 1;
10961    c = getopt (argc, argv, "ab");
10962    if (!(c == -1))
10963      return 2;
10964    if (!(optind == 2))
10965      return 3;
10966  }
10967  /* Some internal state exists at this point.  */
10968  {
10969    int argc = 0;
10970    char *argv[10];
10971    int c;
10972
10973    argv[argc++] = "program";
10974    argv[argc++] = "donald";
10975    argv[argc++] = "-p";
10976    argv[argc++] = "billy";
10977    argv[argc++] = "duck";
10978    argv[argc++] = "-a";
10979    argv[argc++] = "bar";
10980    argv[argc] = NULL;
10981    optind = OPTIND_MIN;
10982    opterr = 0;
10983
10984    c = getopt (argc, argv, "+abp:q:");
10985    if (!(c == -1))
10986      return 4;
10987    if (!(strcmp (argv[0], "program") == 0))
10988      return 5;
10989    if (!(strcmp (argv[1], "donald") == 0))
10990      return 6;
10991    if (!(strcmp (argv[2], "-p") == 0))
10992      return 7;
10993    if (!(strcmp (argv[3], "billy") == 0))
10994      return 8;
10995    if (!(strcmp (argv[4], "duck") == 0))
10996      return 9;
10997    if (!(strcmp (argv[5], "-a") == 0))
10998      return 10;
10999    if (!(strcmp (argv[6], "bar") == 0))
11000      return 11;
11001    if (!(optind == 1))
11002      return 12;
11003  }
11004
11005  return 0;
11006}
11007
11008_ACEOF
11009if ac_fn_c_try_run "$LINENO"; then :
11010  gl_cv_func_getopt_posix=yes
11011else
11012  gl_cv_func_getopt_posix=no
11013fi
11014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11015  conftest.$ac_objext conftest.beam conftest.$ac_ext
11016fi
11017
11018
11019fi
11020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
11021$as_echo "$gl_cv_func_getopt_posix" >&6; }
11022    case "$gl_cv_func_getopt_posix" in
11023      *no) gl_replace_getopt=yes ;;
11024    esac
11025  fi
11026
11027  if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11028    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11029$as_echo_n "checking for working GNU getopt function... " >&6; }
11030if test "${gl_cv_func_getopt_gnu+set}" = set; then :
11031  $as_echo_n "(cached) " >&6
11032else
11033  # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
11034       # optstring is necessary for programs like m4 that have POSIX-mandated
11035       # semantics for supporting options interspersed with files.
11036       # Also, since getopt_long is a GNU extension, we require optind=0.
11037       gl_had_POSIXLY_CORRECT=${POSIXLY_CORRECT:+yes}
11038       POSIXLY_CORRECT=1
11039       export POSIXLY_CORRECT
11040       if test "$cross_compiling" = yes; then :
11041           case $host_os:$ac_cv_have_decl_optreset in
11042           *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
11043           *:yes)               gl_cv_func_getopt_gnu=no;;
11044           *)                   gl_cv_func_getopt_gnu=yes;;
11045         esac
11046
11047else
11048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11049/* end confdefs.h.  */
11050#include <getopt.h>
11051                           #include <stddef.h>
11052                           #include <string.h>
11053
11054int
11055main ()
11056{
11057
11058             /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
11059                and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
11060                OSF/1 5.1, Solaris 10.  */
11061             {
11062               char *myargv[3];
11063               myargv[0] = "conftest";
11064               myargv[1] = "-+";
11065               myargv[2] = 0;
11066               opterr = 0;
11067               if (getopt (2, myargv, "+a") != '?')
11068                 return 1;
11069             }
11070             /* This code succeeds on glibc 2.8, mingw,
11071                and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
11072                IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x.  */
11073             {
11074               char *argv[] = { "program", "-p", "foo", "bar", NULL };
11075
11076               optind = 1;
11077               if (getopt (4, argv, "p::") != 'p')
11078                 return 2;
11079               if (optarg != NULL)
11080                 return 3;
11081               if (getopt (4, argv, "p::") != -1)
11082                 return 4;
11083               if (optind != 2)
11084                 return 5;
11085             }
11086             /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0.  */
11087             {
11088               char *argv[] = { "program", "foo", "-p", NULL };
11089               optind = 0;
11090               if (getopt (3, argv, "-p") != 1)
11091                 return 6;
11092               if (getopt (3, argv, "-p") != 'p')
11093                 return 7;
11094             }
11095             return 0;
11096
11097  ;
11098  return 0;
11099}
11100_ACEOF
11101if ac_fn_c_try_run "$LINENO"; then :
11102  gl_cv_func_getopt_gnu=yes
11103else
11104  gl_cv_func_getopt_gnu=no
11105fi
11106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11107  conftest.$ac_objext conftest.beam conftest.$ac_ext
11108fi
11109
11110       if test "$gl_had_POSIXLY_CORRECT" != yes; then
11111         { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}
11112       fi
11113
11114fi
11115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
11116$as_echo "$gl_cv_func_getopt_gnu" >&6; }
11117    if test "$gl_cv_func_getopt_gnu" = "no"; then
11118      gl_replace_getopt=yes
11119    fi
11120  fi
11121
11122ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
11123if test "x$ac_cv_have_decl_getenv" = x""yes; then :
11124  ac_have_decl=1
11125else
11126  ac_have_decl=0
11127fi
11128
11129cat >>confdefs.h <<_ACEOF
11130#define HAVE_DECL_GETENV $ac_have_decl
11131_ACEOF
11132
11133
11134
11135
11136
11137
11138  if test -n "$gl_replace_getopt"; then :
11139
11140
11141
11142  GETOPT_H=getopt.h
11143
11144$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
11145
11146
11147
11148    GNULIB_UNISTD_H_GETOPT=1
11149
11150
11151
11152
11153
11154
11155
11156
11157  gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167  gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
11168
11169
11170
11171
11172
11173
11174fi
11175
11176
11177ac_fn_c_check_decl "$LINENO" "getpass" "ac_cv_have_decl_getpass" "$ac_includes_default"
11178if test "x$ac_cv_have_decl_getpass" = x""yes; then :
11179  ac_have_decl=1
11180else
11181  ac_have_decl=0
11182fi
11183
11184cat >>confdefs.h <<_ACEOF
11185#define HAVE_DECL_GETPASS $ac_have_decl
11186_ACEOF
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
11197if test "x$ac_cv_have_decl_fflush_unlocked" = x""yes; then :
11198  ac_have_decl=1
11199else
11200  ac_have_decl=0
11201fi
11202
11203cat >>confdefs.h <<_ACEOF
11204#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
11205_ACEOF
11206
11207ac_fn_c_check_decl "$LINENO" "flockfile" "ac_cv_have_decl_flockfile" "$ac_includes_default"
11208if test "x$ac_cv_have_decl_flockfile" = x""yes; then :
11209  ac_have_decl=1
11210else
11211  ac_have_decl=0
11212fi
11213
11214cat >>confdefs.h <<_ACEOF
11215#define HAVE_DECL_FLOCKFILE $ac_have_decl
11216_ACEOF
11217
11218ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
11219if test "x$ac_cv_have_decl_fputs_unlocked" = x""yes; then :
11220  ac_have_decl=1
11221else
11222  ac_have_decl=0
11223fi
11224
11225cat >>confdefs.h <<_ACEOF
11226#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
11227_ACEOF
11228
11229ac_fn_c_check_decl "$LINENO" "funlockfile" "ac_cv_have_decl_funlockfile" "$ac_includes_default"
11230if test "x$ac_cv_have_decl_funlockfile" = x""yes; then :
11231  ac_have_decl=1
11232else
11233  ac_have_decl=0
11234fi
11235
11236cat >>confdefs.h <<_ACEOF
11237#define HAVE_DECL_FUNLOCKFILE $ac_have_decl
11238_ACEOF
11239
11240ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
11241if test "x$ac_cv_have_decl_putc_unlocked" = x""yes; then :
11242  ac_have_decl=1
11243else
11244  ac_have_decl=0
11245fi
11246
11247cat >>confdefs.h <<_ACEOF
11248#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
11249_ACEOF
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266     if test $gl_cv_have_include_next = yes; then
11267       gl_cv_next_sys_time_h='<'sys/time.h'>'
11268     else
11269       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
11270$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
11271if test "${gl_cv_next_sys_time_h+set}" = set; then :
11272  $as_echo_n "(cached) " >&6
11273else
11274
11275          if test $ac_cv_header_sys_time_h = yes; then
11276            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11277/* end confdefs.h.  */
11278#include <sys/time.h>
11279
11280_ACEOF
11281                                                                                                case "$host_os" in
11282              aix*) gl_absname_cpp="$ac_cpp -C" ;;
11283              *)    gl_absname_cpp="$ac_cpp" ;;
11284            esac
11285                                                gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11286               sed -n '\#/sys/time.h#{
11287                 s#.*"\(.*/sys/time.h\)".*#\1#
11288                 s#^/[^/]#//&#
11289                 p
11290                 q
11291               }'`'"'
11292          else
11293            gl_cv_next_sys_time_h='<'sys/time.h'>'
11294          fi
11295
11296fi
11297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
11298$as_echo "$gl_cv_next_sys_time_h" >&6; }
11299     fi
11300     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
11301
11302     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11303       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11304       gl_next_as_first_directive='<'sys/time.h'>'
11305     else
11306       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11307       gl_next_as_first_directive=$gl_cv_next_sys_time_h
11308     fi
11309     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
11310
11311
11312
11313
11314  if test $ac_cv_header_sys_time_h = yes; then
11315    HAVE_SYS_TIME_H=1
11316  else
11317    HAVE_SYS_TIME_H=0
11318  fi
11319
11320
11321  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
11322$as_echo_n "checking for struct timeval... " >&6; }
11323if test "${gl_cv_sys_struct_timeval+set}" = set; then :
11324  $as_echo_n "(cached) " >&6
11325else
11326  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11327/* end confdefs.h.  */
11328#if HAVE_SYS_TIME_H
11329             #include <sys/time.h>
11330            #endif
11331            #include <time.h>
11332
11333int
11334main ()
11335{
11336static struct timeval x; x.tv_sec = x.tv_usec;
11337  ;
11338  return 0;
11339}
11340_ACEOF
11341if ac_fn_c_try_compile "$LINENO"; then :
11342  gl_cv_sys_struct_timeval=yes
11343else
11344  gl_cv_sys_struct_timeval=no
11345fi
11346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11347fi
11348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
11349$as_echo "$gl_cv_sys_struct_timeval" >&6; }
11350  if test $gl_cv_sys_struct_timeval = yes; then
11351    HAVE_STRUCT_TIMEVAL=1
11352  else
11353    HAVE_STRUCT_TIMEVAL=0
11354  fi
11355
11356
11357    REPLACE_GETTIMEOFDAY=0
11358
11359  if test $HAVE_SYS_TIME_H = 0 || test $HAVE_STRUCT_TIMEVAL = 0; then
11360    SYS_TIME_H=sys/time.h
11361  else
11362    SYS_TIME_H=
11363  fi
11364
11365
11366
11367
11368
11369
11370
11371
11372      if test "X$prefix" = "XNONE"; then
11373    acl_final_prefix="$ac_default_prefix"
11374  else
11375    acl_final_prefix="$prefix"
11376  fi
11377  if test "X$exec_prefix" = "XNONE"; then
11378    acl_final_exec_prefix='${prefix}'
11379  else
11380    acl_final_exec_prefix="$exec_prefix"
11381  fi
11382  acl_save_prefix="$prefix"
11383  prefix="$acl_final_prefix"
11384  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
11385  prefix="$acl_save_prefix"
11386
11387
11388# Check whether --with-gnu-ld was given.
11389if test "${with_gnu_ld+set}" = set; then :
11390  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
11391else
11392  with_gnu_ld=no
11393fi
11394
11395# Prepare PATH_SEPARATOR.
11396# The user is always right.
11397if test "${PATH_SEPARATOR+set}" != set; then
11398  echo "#! /bin/sh" >conf$$.sh
11399  echo  "exit 0"   >>conf$$.sh
11400  chmod +x conf$$.sh
11401  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
11402    PATH_SEPARATOR=';'
11403  else
11404    PATH_SEPARATOR=:
11405  fi
11406  rm -f conf$$.sh
11407fi
11408ac_prog=ld
11409if test "$GCC" = yes; then
11410  # Check if gcc -print-prog-name=ld gives a path.
11411  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
11412$as_echo_n "checking for ld used by GCC... " >&6; }
11413  case $host in
11414  *-*-mingw*)
11415    # gcc leaves a trailing carriage return which upsets mingw
11416    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
11417  *)
11418    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
11419  esac
11420  case $ac_prog in
11421    # Accept absolute paths.
11422    [\\/]* | [A-Za-z]:[\\/]*)
11423      re_direlt='/[^/][^/]*/\.\./'
11424      # Canonicalize the path of ld
11425      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
11426      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
11427        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
11428      done
11429      test -z "$LD" && LD="$ac_prog"
11430      ;;
11431  "")
11432    # If it fails, then pretend we aren't using GCC.
11433    ac_prog=ld
11434    ;;
11435  *)
11436    # If it is relative, then search for the first ld in PATH.
11437    with_gnu_ld=unknown
11438    ;;
11439  esac
11440elif test "$with_gnu_ld" = yes; then
11441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
11442$as_echo_n "checking for GNU ld... " >&6; }
11443else
11444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
11445$as_echo_n "checking for non-GNU ld... " >&6; }
11446fi
11447if test "${acl_cv_path_LD+set}" = set; then :
11448  $as_echo_n "(cached) " >&6
11449else
11450  if test -z "$LD"; then
11451  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
11452  for ac_dir in $PATH; do
11453    test -z "$ac_dir" && ac_dir=.
11454    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11455      acl_cv_path_LD="$ac_dir/$ac_prog"
11456      # Check to see if the program is GNU ld.  I'd rather use --version,
11457      # but apparently some GNU ld's only accept -v.
11458      # Break only if it was the GNU/non-GNU ld that we prefer.
11459      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
11460      *GNU* | *'with BFD'*)
11461        test "$with_gnu_ld" != no && break ;;
11462      *)
11463        test "$with_gnu_ld" != yes && break ;;
11464      esac
11465    fi
11466  done
11467  IFS="$ac_save_ifs"
11468else
11469  acl_cv_path_LD="$LD" # Let the user override the test with a path.
11470fi
11471fi
11472
11473LD="$acl_cv_path_LD"
11474if test -n "$LD"; then
11475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
11476$as_echo "$LD" >&6; }
11477else
11478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11479$as_echo "no" >&6; }
11480fi
11481test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
11482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
11483$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
11484if test "${acl_cv_prog_gnu_ld+set}" = set; then :
11485  $as_echo_n "(cached) " >&6
11486else
11487  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
11488case `$LD -v 2>&1 </dev/null` in
11489*GNU* | *'with BFD'*)
11490  acl_cv_prog_gnu_ld=yes ;;
11491*)
11492  acl_cv_prog_gnu_ld=no ;;
11493esac
11494fi
11495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
11496$as_echo "$acl_cv_prog_gnu_ld" >&6; }
11497with_gnu_ld=$acl_cv_prog_gnu_ld
11498
11499
11500
11501
11502                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
11503$as_echo_n "checking for shared library run path origin... " >&6; }
11504if test "${acl_cv_rpath+set}" = set; then :
11505  $as_echo_n "(cached) " >&6
11506else
11507
11508    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
11509    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
11510    . ./conftest.sh
11511    rm -f ./conftest.sh
11512    acl_cv_rpath=done
11513
11514fi
11515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
11516$as_echo "$acl_cv_rpath" >&6; }
11517  wl="$acl_cv_wl"
11518  acl_libext="$acl_cv_libext"
11519  acl_shlibext="$acl_cv_shlibext"
11520  acl_libname_spec="$acl_cv_libname_spec"
11521  acl_library_names_spec="$acl_cv_library_names_spec"
11522  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
11523  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
11524  acl_hardcode_direct="$acl_cv_hardcode_direct"
11525  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
11526    # Check whether --enable-rpath was given.
11527if test "${enable_rpath+set}" = set; then :
11528  enableval=$enable_rpath; :
11529else
11530  enable_rpath=yes
11531fi
11532
11533
11534
11535
11536  acl_libdirstem=lib
11537  acl_libdirstem2=
11538  case "$host_os" in
11539    solaris*)
11540                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
11541$as_echo_n "checking for 64-bit host... " >&6; }
11542if test "${gl_cv_solaris_64bit+set}" = set; then :
11543  $as_echo_n "(cached) " >&6
11544else
11545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11546/* end confdefs.h.  */
11547
11548#ifdef _LP64
11549sixtyfour bits
11550#endif
11551
11552_ACEOF
11553if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11554  $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
11555  gl_cv_solaris_64bit=yes
11556else
11557  gl_cv_solaris_64bit=no
11558fi
11559rm -f conftest*
11560
11561
11562fi
11563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
11564$as_echo "$gl_cv_solaris_64bit" >&6; }
11565      if test $gl_cv_solaris_64bit = yes; then
11566        acl_libdirstem=lib/64
11567        case "$host_cpu" in
11568          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
11569          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
11570        esac
11571      fi
11572      ;;
11573    *)
11574      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
11575      if test -n "$searchpath"; then
11576        acl_save_IFS="${IFS= 	}"; IFS=":"
11577        for searchdir in $searchpath; do
11578          if test -d "$searchdir"; then
11579            case "$searchdir" in
11580              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
11581              */../ | */.. )
11582                # Better ignore directories of this form. They are misleading.
11583                ;;
11584              *) searchdir=`cd "$searchdir" && pwd`
11585                 case "$searchdir" in
11586                   */lib64 ) acl_libdirstem=lib64 ;;
11587                 esac ;;
11588            esac
11589          fi
11590        done
11591        IFS="$acl_save_IFS"
11592      fi
11593      ;;
11594  esac
11595  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608    use_additional=yes
11609
11610  acl_save_prefix="$prefix"
11611  prefix="$acl_final_prefix"
11612  acl_save_exec_prefix="$exec_prefix"
11613  exec_prefix="$acl_final_exec_prefix"
11614
11615    eval additional_includedir=\"$includedir\"
11616    eval additional_libdir=\"$libdir\"
11617
11618  exec_prefix="$acl_save_exec_prefix"
11619  prefix="$acl_save_prefix"
11620
11621
11622# Check whether --with-libiconv-prefix was given.
11623if test "${with_libiconv_prefix+set}" = set; then :
11624  withval=$with_libiconv_prefix;
11625    if test "X$withval" = "Xno"; then
11626      use_additional=no
11627    else
11628      if test "X$withval" = "X"; then
11629
11630  acl_save_prefix="$prefix"
11631  prefix="$acl_final_prefix"
11632  acl_save_exec_prefix="$exec_prefix"
11633  exec_prefix="$acl_final_exec_prefix"
11634
11635          eval additional_includedir=\"$includedir\"
11636          eval additional_libdir=\"$libdir\"
11637
11638  exec_prefix="$acl_save_exec_prefix"
11639  prefix="$acl_save_prefix"
11640
11641      else
11642        additional_includedir="$withval/include"
11643        additional_libdir="$withval/$acl_libdirstem"
11644        if test "$acl_libdirstem2" != "$acl_libdirstem" \
11645           && ! test -d "$withval/$acl_libdirstem"; then
11646          additional_libdir="$withval/$acl_libdirstem2"
11647        fi
11648      fi
11649    fi
11650
11651fi
11652
11653      LIBICONV=
11654  LTLIBICONV=
11655  INCICONV=
11656  LIBICONV_PREFIX=
11657      HAVE_LIBICONV=
11658  rpathdirs=
11659  ltrpathdirs=
11660  names_already_handled=
11661  names_next_round='iconv '
11662  while test -n "$names_next_round"; do
11663    names_this_round="$names_next_round"
11664    names_next_round=
11665    for name in $names_this_round; do
11666      already_handled=
11667      for n in $names_already_handled; do
11668        if test "$n" = "$name"; then
11669          already_handled=yes
11670          break
11671        fi
11672      done
11673      if test -z "$already_handled"; then
11674        names_already_handled="$names_already_handled $name"
11675                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
11676        eval value=\"\$HAVE_LIB$uppername\"
11677        if test -n "$value"; then
11678          if test "$value" = yes; then
11679            eval value=\"\$LIB$uppername\"
11680            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
11681            eval value=\"\$LTLIB$uppername\"
11682            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
11683          else
11684                                    :
11685          fi
11686        else
11687                              found_dir=
11688          found_la=
11689          found_so=
11690          found_a=
11691          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
11692          if test -n "$acl_shlibext"; then
11693            shrext=".$acl_shlibext"             # typically: shrext=.so
11694          else
11695            shrext=
11696          fi
11697          if test $use_additional = yes; then
11698            dir="$additional_libdir"
11699                                    if test -n "$acl_shlibext"; then
11700              if test -f "$dir/$libname$shrext"; then
11701                found_dir="$dir"
11702                found_so="$dir/$libname$shrext"
11703              else
11704                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11705                  ver=`(cd "$dir" && \
11706                        for f in "$libname$shrext".*; do echo "$f"; done \
11707                        | sed -e "s,^$libname$shrext\\\\.,," \
11708                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
11709                        | sed 1q ) 2>/dev/null`
11710                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
11711                    found_dir="$dir"
11712                    found_so="$dir/$libname$shrext.$ver"
11713                  fi
11714                else
11715                  eval library_names=\"$acl_library_names_spec\"
11716                  for f in $library_names; do
11717                    if test -f "$dir/$f"; then
11718                      found_dir="$dir"
11719                      found_so="$dir/$f"
11720                      break
11721                    fi
11722                  done
11723                fi
11724              fi
11725            fi
11726                        if test "X$found_dir" = "X"; then
11727              if test -f "$dir/$libname.$acl_libext"; then
11728                found_dir="$dir"
11729                found_a="$dir/$libname.$acl_libext"
11730              fi
11731            fi
11732            if test "X$found_dir" != "X"; then
11733              if test -f "$dir/$libname.la"; then
11734                found_la="$dir/$libname.la"
11735              fi
11736            fi
11737          fi
11738          if test "X$found_dir" = "X"; then
11739            for x in $LDFLAGS $LTLIBICONV; do
11740
11741  acl_save_prefix="$prefix"
11742  prefix="$acl_final_prefix"
11743  acl_save_exec_prefix="$exec_prefix"
11744  exec_prefix="$acl_final_exec_prefix"
11745  eval x=\"$x\"
11746  exec_prefix="$acl_save_exec_prefix"
11747  prefix="$acl_save_prefix"
11748
11749              case "$x" in
11750                -L*)
11751                  dir=`echo "X$x" | sed -e 's/^X-L//'`
11752                                    if test -n "$acl_shlibext"; then
11753                    if test -f "$dir/$libname$shrext"; then
11754                      found_dir="$dir"
11755                      found_so="$dir/$libname$shrext"
11756                    else
11757                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11758                        ver=`(cd "$dir" && \
11759                              for f in "$libname$shrext".*; do echo "$f"; done \
11760                              | sed -e "s,^$libname$shrext\\\\.,," \
11761                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
11762                              | sed 1q ) 2>/dev/null`
11763                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
11764                          found_dir="$dir"
11765                          found_so="$dir/$libname$shrext.$ver"
11766                        fi
11767                      else
11768                        eval library_names=\"$acl_library_names_spec\"
11769                        for f in $library_names; do
11770                          if test -f "$dir/$f"; then
11771                            found_dir="$dir"
11772                            found_so="$dir/$f"
11773                            break
11774                          fi
11775                        done
11776                      fi
11777                    fi
11778                  fi
11779                                    if test "X$found_dir" = "X"; then
11780                    if test -f "$dir/$libname.$acl_libext"; then
11781                      found_dir="$dir"
11782                      found_a="$dir/$libname.$acl_libext"
11783                    fi
11784                  fi
11785                  if test "X$found_dir" != "X"; then
11786                    if test -f "$dir/$libname.la"; then
11787                      found_la="$dir/$libname.la"
11788                    fi
11789                  fi
11790                  ;;
11791              esac
11792              if test "X$found_dir" != "X"; then
11793                break
11794              fi
11795            done
11796          fi
11797          if test "X$found_dir" != "X"; then
11798                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
11799            if test "X$found_so" != "X"; then
11800                                                        if test "$enable_rpath" = no \
11801                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
11802                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
11803                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11804              else
11805                                                                                haveit=
11806                for x in $ltrpathdirs; do
11807                  if test "X$x" = "X$found_dir"; then
11808                    haveit=yes
11809                    break
11810                  fi
11811                done
11812                if test -z "$haveit"; then
11813                  ltrpathdirs="$ltrpathdirs $found_dir"
11814                fi
11815                                if test "$acl_hardcode_direct" = yes; then
11816                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11817                else
11818                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
11819                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11820                                                            haveit=
11821                    for x in $rpathdirs; do
11822                      if test "X$x" = "X$found_dir"; then
11823                        haveit=yes
11824                        break
11825                      fi
11826                    done
11827                    if test -z "$haveit"; then
11828                      rpathdirs="$rpathdirs $found_dir"
11829                    fi
11830                  else
11831                                                                                haveit=
11832                    for x in $LDFLAGS $LIBICONV; do
11833
11834  acl_save_prefix="$prefix"
11835  prefix="$acl_final_prefix"
11836  acl_save_exec_prefix="$exec_prefix"
11837  exec_prefix="$acl_final_exec_prefix"
11838  eval x=\"$x\"
11839  exec_prefix="$acl_save_exec_prefix"
11840  prefix="$acl_save_prefix"
11841
11842                      if test "X$x" = "X-L$found_dir"; then
11843                        haveit=yes
11844                        break
11845                      fi
11846                    done
11847                    if test -z "$haveit"; then
11848                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
11849                    fi
11850                    if test "$acl_hardcode_minus_L" != no; then
11851                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
11852                    else
11853                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11854                    fi
11855                  fi
11856                fi
11857              fi
11858            else
11859              if test "X$found_a" != "X"; then
11860                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
11861              else
11862                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
11863              fi
11864            fi
11865                        additional_includedir=
11866            case "$found_dir" in
11867              */$acl_libdirstem | */$acl_libdirstem/)
11868                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
11869                if test "$name" = 'iconv'; then
11870                  LIBICONV_PREFIX="$basedir"
11871                fi
11872                additional_includedir="$basedir/include"
11873                ;;
11874              */$acl_libdirstem2 | */$acl_libdirstem2/)
11875                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
11876                if test "$name" = 'iconv'; then
11877                  LIBICONV_PREFIX="$basedir"
11878                fi
11879                additional_includedir="$basedir/include"
11880                ;;
11881            esac
11882            if test "X$additional_includedir" != "X"; then
11883                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
11884                haveit=
11885                if test "X$additional_includedir" = "X/usr/local/include"; then
11886                  if test -n "$GCC"; then
11887                    case $host_os in
11888                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
11889                    esac
11890                  fi
11891                fi
11892                if test -z "$haveit"; then
11893                  for x in $CPPFLAGS $INCICONV; do
11894
11895  acl_save_prefix="$prefix"
11896  prefix="$acl_final_prefix"
11897  acl_save_exec_prefix="$exec_prefix"
11898  exec_prefix="$acl_final_exec_prefix"
11899  eval x=\"$x\"
11900  exec_prefix="$acl_save_exec_prefix"
11901  prefix="$acl_save_prefix"
11902
11903                    if test "X$x" = "X-I$additional_includedir"; then
11904                      haveit=yes
11905                      break
11906                    fi
11907                  done
11908                  if test -z "$haveit"; then
11909                    if test -d "$additional_includedir"; then
11910                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
11911                    fi
11912                  fi
11913                fi
11914              fi
11915            fi
11916                        if test -n "$found_la"; then
11917                                                        save_libdir="$libdir"
11918              case "$found_la" in
11919                */* | *\\*) . "$found_la" ;;
11920                *) . "./$found_la" ;;
11921              esac
11922              libdir="$save_libdir"
11923                            for dep in $dependency_libs; do
11924                case "$dep" in
11925                  -L*)
11926                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11927                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
11928                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
11929                      haveit=
11930                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
11931                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
11932                        if test -n "$GCC"; then
11933                          case $host_os in
11934                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
11935                          esac
11936                        fi
11937                      fi
11938                      if test -z "$haveit"; then
11939                        haveit=
11940                        for x in $LDFLAGS $LIBICONV; do
11941
11942  acl_save_prefix="$prefix"
11943  prefix="$acl_final_prefix"
11944  acl_save_exec_prefix="$exec_prefix"
11945  exec_prefix="$acl_final_exec_prefix"
11946  eval x=\"$x\"
11947  exec_prefix="$acl_save_exec_prefix"
11948  prefix="$acl_save_prefix"
11949
11950                          if test "X$x" = "X-L$additional_libdir"; then
11951                            haveit=yes
11952                            break
11953                          fi
11954                        done
11955                        if test -z "$haveit"; then
11956                          if test -d "$additional_libdir"; then
11957                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
11958                          fi
11959                        fi
11960                        haveit=
11961                        for x in $LDFLAGS $LTLIBICONV; do
11962
11963  acl_save_prefix="$prefix"
11964  prefix="$acl_final_prefix"
11965  acl_save_exec_prefix="$exec_prefix"
11966  exec_prefix="$acl_final_exec_prefix"
11967  eval x=\"$x\"
11968  exec_prefix="$acl_save_exec_prefix"
11969  prefix="$acl_save_prefix"
11970
11971                          if test "X$x" = "X-L$additional_libdir"; then
11972                            haveit=yes
11973                            break
11974                          fi
11975                        done
11976                        if test -z "$haveit"; then
11977                          if test -d "$additional_libdir"; then
11978                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
11979                          fi
11980                        fi
11981                      fi
11982                    fi
11983                    ;;
11984                  -R*)
11985                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
11986                    if test "$enable_rpath" != no; then
11987                                                                  haveit=
11988                      for x in $rpathdirs; do
11989                        if test "X$x" = "X$dir"; then
11990                          haveit=yes
11991                          break
11992                        fi
11993                      done
11994                      if test -z "$haveit"; then
11995                        rpathdirs="$rpathdirs $dir"
11996                      fi
11997                                                                  haveit=
11998                      for x in $ltrpathdirs; do
11999                        if test "X$x" = "X$dir"; then
12000                          haveit=yes
12001                          break
12002                        fi
12003                      done
12004                      if test -z "$haveit"; then
12005                        ltrpathdirs="$ltrpathdirs $dir"
12006                      fi
12007                    fi
12008                    ;;
12009                  -l*)
12010                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
12011                    ;;
12012                  *.la)
12013                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
12014                    ;;
12015                  *)
12016                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
12017                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
12018                    ;;
12019                esac
12020              done
12021            fi
12022          else
12023                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
12024            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
12025          fi
12026        fi
12027      fi
12028    done
12029  done
12030  if test "X$rpathdirs" != "X"; then
12031    if test -n "$acl_hardcode_libdir_separator"; then
12032                        alldirs=
12033      for found_dir in $rpathdirs; do
12034        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
12035      done
12036            acl_save_libdir="$libdir"
12037      libdir="$alldirs"
12038      eval flag=\"$acl_hardcode_libdir_flag_spec\"
12039      libdir="$acl_save_libdir"
12040      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
12041    else
12042            for found_dir in $rpathdirs; do
12043        acl_save_libdir="$libdir"
12044        libdir="$found_dir"
12045        eval flag=\"$acl_hardcode_libdir_flag_spec\"
12046        libdir="$acl_save_libdir"
12047        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
12048      done
12049    fi
12050  fi
12051  if test "X$ltrpathdirs" != "X"; then
12052            for found_dir in $ltrpathdirs; do
12053      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
12054    done
12055  fi
12056
12057
12058
12059
12060
12061
12062
12063
12064    REPLACE_ICONV=0;
12065  REPLACE_ICONV_OPEN=0;
12066  REPLACE_ICONV_UTF=0;
12067  ICONV_H='';
12068
12069
12070
12071ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
12072if test "x$ac_cv_type_off_t" = x""yes; then :
12073
12074else
12075
12076cat >>confdefs.h <<_ACEOF
12077#define off_t long int
12078_ACEOF
12079
12080fi
12081
12082
12083  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12084$as_echo_n "checking for unsigned long long int... " >&6; }
12085if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
12086  $as_echo_n "(cached) " >&6
12087else
12088  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12089/* end confdefs.h.  */
12090
12091  /* For now, do not test the preprocessor; as of 2007 there are too many
12092         implementations with broken preprocessors.  Perhaps this can
12093         be revisited in 2012.  In the meantime, code should not expect
12094         #if to work with literals wider than 32 bits.  */
12095      /* Test literals.  */
12096      long long int ll = 9223372036854775807ll;
12097      long long int nll = -9223372036854775807LL;
12098      unsigned long long int ull = 18446744073709551615ULL;
12099      /* Test constant expressions.   */
12100      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12101                     ? 1 : -1)];
12102      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12103                     ? 1 : -1)];
12104      int i = 63;
12105int
12106main ()
12107{
12108/* Test availability of runtime routines for shift and division.  */
12109      long long int llmax = 9223372036854775807ll;
12110      unsigned long long int ullmax = 18446744073709551615ull;
12111      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12112              | (llmax / ll) | (llmax % ll)
12113              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12114              | (ullmax / ull) | (ullmax % ull));
12115  ;
12116  return 0;
12117}
12118
12119_ACEOF
12120if ac_fn_c_try_link "$LINENO"; then :
12121  ac_cv_type_unsigned_long_long_int=yes
12122else
12123  ac_cv_type_unsigned_long_long_int=no
12124fi
12125rm -f core conftest.err conftest.$ac_objext \
12126    conftest$ac_exeext conftest.$ac_ext
12127fi
12128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12129$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12130  if test $ac_cv_type_unsigned_long_long_int = yes; then
12131
12132$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12133
12134  fi
12135
12136
12137
12138
12139
12140
12141    gl_cv_c_multiarch=no
12142  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12143/* end confdefs.h.  */
12144#ifndef __APPLE_CC__
12145         not a universal capable compiler
12146        #endif
12147        typedef int dummy;
12148
12149_ACEOF
12150if ac_fn_c_try_compile "$LINENO"; then :
12151
12152               arch=
12153     prev=
12154     for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12155       if test -n "$prev"; then
12156         case $word in
12157           i?86 | x86_64 | ppc | ppc64)
12158             if test -z "$arch" || test "$arch" = "$word"; then
12159               arch="$word"
12160             else
12161               gl_cv_c_multiarch=yes
12162             fi
12163             ;;
12164         esac
12165         prev=
12166       else
12167         if test "x$word" = "x-arch"; then
12168           prev=arch
12169         fi
12170       fi
12171     done
12172
12173fi
12174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12175  if test $gl_cv_c_multiarch = yes; then
12176
12177$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12178
12179    APPLE_UNIVERSAL_BUILD=1
12180  else
12181    APPLE_UNIVERSAL_BUILD=0
12182  fi
12183
12184
12185
12186
12187
12188  if test $ac_cv_type_long_long_int = yes; then
12189    HAVE_LONG_LONG_INT=1
12190  else
12191    HAVE_LONG_LONG_INT=0
12192  fi
12193
12194
12195  if test $ac_cv_type_unsigned_long_long_int = yes; then
12196    HAVE_UNSIGNED_LONG_LONG_INT=1
12197  else
12198    HAVE_UNSIGNED_LONG_LONG_INT=0
12199  fi
12200
12201
12202      if test $ac_cv_header_inttypes_h = yes; then
12203    HAVE_INTTYPES_H=1
12204  else
12205    HAVE_INTTYPES_H=0
12206  fi
12207
12208
12209      if test $ac_cv_header_sys_types_h = yes; then
12210    HAVE_SYS_TYPES_H=1
12211  else
12212    HAVE_SYS_TYPES_H=0
12213  fi
12214
12215
12216
12217
12218
12219
12220
12221
12222     if test $gl_cv_have_include_next = yes; then
12223       gl_cv_next_stdint_h='<'stdint.h'>'
12224     else
12225       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12226$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12227if test "${gl_cv_next_stdint_h+set}" = set; then :
12228  $as_echo_n "(cached) " >&6
12229else
12230
12231          if test $ac_cv_header_stdint_h = yes; then
12232            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12233/* end confdefs.h.  */
12234#include <stdint.h>
12235
12236_ACEOF
12237                                                                                                case "$host_os" in
12238              aix*) gl_absname_cpp="$ac_cpp -C" ;;
12239              *)    gl_absname_cpp="$ac_cpp" ;;
12240            esac
12241                                                gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12242               sed -n '\#/stdint.h#{
12243                 s#.*"\(.*/stdint.h\)".*#\1#
12244                 s#^/[^/]#//&#
12245                 p
12246                 q
12247               }'`'"'
12248          else
12249            gl_cv_next_stdint_h='<'stdint.h'>'
12250          fi
12251
12252fi
12253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12254$as_echo "$gl_cv_next_stdint_h" >&6; }
12255     fi
12256     NEXT_STDINT_H=$gl_cv_next_stdint_h
12257
12258     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12259       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12260       gl_next_as_first_directive='<'stdint.h'>'
12261     else
12262       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12263       gl_next_as_first_directive=$gl_cv_next_stdint_h
12264     fi
12265     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12266
12267
12268
12269  if test $ac_cv_header_stdint_h = yes; then
12270    HAVE_STDINT_H=1
12271  else
12272    HAVE_STDINT_H=0
12273  fi
12274
12275
12276    if test $ac_cv_header_stdint_h = yes; then
12277    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12278$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12279if test "${gl_cv_header_working_stdint_h+set}" = set; then :
12280  $as_echo_n "(cached) " >&6
12281else
12282  gl_cv_header_working_stdint_h=no
12283       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12284/* end confdefs.h.  */
12285
12286
12287#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
12288#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
12289#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12290#include <stdint.h>
12291/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
12292#if !(defined WCHAR_MIN && defined WCHAR_MAX)
12293#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12294#endif
12295
12296
12297  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12298     included before <wchar.h>.  */
12299  #include <stddef.h>
12300  #include <signal.h>
12301  #if HAVE_WCHAR_H
12302  # include <stdio.h>
12303  # include <time.h>
12304  # include <wchar.h>
12305  #endif
12306
12307
12308#ifdef INT8_MAX
12309int8_t a1 = INT8_MAX;
12310int8_t a1min = INT8_MIN;
12311#endif
12312#ifdef INT16_MAX
12313int16_t a2 = INT16_MAX;
12314int16_t a2min = INT16_MIN;
12315#endif
12316#ifdef INT32_MAX
12317int32_t a3 = INT32_MAX;
12318int32_t a3min = INT32_MIN;
12319#endif
12320#ifdef INT64_MAX
12321int64_t a4 = INT64_MAX;
12322int64_t a4min = INT64_MIN;
12323#endif
12324#ifdef UINT8_MAX
12325uint8_t b1 = UINT8_MAX;
12326#else
12327typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12328#endif
12329#ifdef UINT16_MAX
12330uint16_t b2 = UINT16_MAX;
12331#endif
12332#ifdef UINT32_MAX
12333uint32_t b3 = UINT32_MAX;
12334#endif
12335#ifdef UINT64_MAX
12336uint64_t b4 = UINT64_MAX;
12337#endif
12338int_least8_t c1 = INT8_C (0x7f);
12339int_least8_t c1max = INT_LEAST8_MAX;
12340int_least8_t c1min = INT_LEAST8_MIN;
12341int_least16_t c2 = INT16_C (0x7fff);
12342int_least16_t c2max = INT_LEAST16_MAX;
12343int_least16_t c2min = INT_LEAST16_MIN;
12344int_least32_t c3 = INT32_C (0x7fffffff);
12345int_least32_t c3max = INT_LEAST32_MAX;
12346int_least32_t c3min = INT_LEAST32_MIN;
12347int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12348int_least64_t c4max = INT_LEAST64_MAX;
12349int_least64_t c4min = INT_LEAST64_MIN;
12350uint_least8_t d1 = UINT8_C (0xff);
12351uint_least8_t d1max = UINT_LEAST8_MAX;
12352uint_least16_t d2 = UINT16_C (0xffff);
12353uint_least16_t d2max = UINT_LEAST16_MAX;
12354uint_least32_t d3 = UINT32_C (0xffffffff);
12355uint_least32_t d3max = UINT_LEAST32_MAX;
12356uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12357uint_least64_t d4max = UINT_LEAST64_MAX;
12358int_fast8_t e1 = INT_FAST8_MAX;
12359int_fast8_t e1min = INT_FAST8_MIN;
12360int_fast16_t e2 = INT_FAST16_MAX;
12361int_fast16_t e2min = INT_FAST16_MIN;
12362int_fast32_t e3 = INT_FAST32_MAX;
12363int_fast32_t e3min = INT_FAST32_MIN;
12364int_fast64_t e4 = INT_FAST64_MAX;
12365int_fast64_t e4min = INT_FAST64_MIN;
12366uint_fast8_t f1 = UINT_FAST8_MAX;
12367uint_fast16_t f2 = UINT_FAST16_MAX;
12368uint_fast32_t f3 = UINT_FAST32_MAX;
12369uint_fast64_t f4 = UINT_FAST64_MAX;
12370#ifdef INTPTR_MAX
12371intptr_t g = INTPTR_MAX;
12372intptr_t gmin = INTPTR_MIN;
12373#endif
12374#ifdef UINTPTR_MAX
12375uintptr_t h = UINTPTR_MAX;
12376#endif
12377intmax_t i = INTMAX_MAX;
12378uintmax_t j = UINTMAX_MAX;
12379
12380#include <limits.h> /* for CHAR_BIT */
12381#define TYPE_MINIMUM(t) \
12382  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
12383#define TYPE_MAXIMUM(t) \
12384  ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
12385struct s {
12386  int check_PTRDIFF:
12387      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12388      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12389      ? 1 : -1;
12390  /* Detect bug in FreeBSD 6.0 / ia64.  */
12391  int check_SIG_ATOMIC:
12392      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12393      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12394      ? 1 : -1;
12395  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12396  int check_WCHAR:
12397      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12398      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12399      ? 1 : -1;
12400  /* Detect bug in mingw.  */
12401  int check_WINT:
12402      WINT_MIN == TYPE_MINIMUM (wint_t)
12403      && WINT_MAX == TYPE_MAXIMUM (wint_t)
12404      ? 1 : -1;
12405
12406  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
12407  int check_UINT8_C:
12408        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12409  int check_UINT16_C:
12410        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12411
12412  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
12413#ifdef UINT8_MAX
12414  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12415#endif
12416#ifdef UINT16_MAX
12417  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12418#endif
12419#ifdef UINT32_MAX
12420  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12421#endif
12422#ifdef UINT64_MAX
12423  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12424#endif
12425  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12426  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12427  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12428  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12429  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12430  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12431  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12432  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12433  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12434  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12435  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12436};
12437
12438int
12439main ()
12440{
12441
12442  ;
12443  return 0;
12444}
12445_ACEOF
12446if ac_fn_c_try_compile "$LINENO"; then :
12447                                                    if test "$cross_compiling" = yes; then :
12448                 gl_cv_header_working_stdint_h=yes
12449
12450else
12451  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12452/* end confdefs.h.  */
12453
12454
12455#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
12456#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
12457#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12458#include <stdint.h>
12459
12460
12461  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12462     included before <wchar.h>.  */
12463  #include <stddef.h>
12464  #include <signal.h>
12465  #if HAVE_WCHAR_H
12466  # include <stdio.h>
12467  # include <time.h>
12468  # include <wchar.h>
12469  #endif
12470
12471
12472#include <stdio.h>
12473#include <string.h>
12474#define MVAL(macro) MVAL1(macro)
12475#define MVAL1(expression) #expression
12476static const char *macro_values[] =
12477  {
12478#ifdef INT8_MAX
12479    MVAL (INT8_MAX),
12480#endif
12481#ifdef INT16_MAX
12482    MVAL (INT16_MAX),
12483#endif
12484#ifdef INT32_MAX
12485    MVAL (INT32_MAX),
12486#endif
12487#ifdef INT64_MAX
12488    MVAL (INT64_MAX),
12489#endif
12490#ifdef UINT8_MAX
12491    MVAL (UINT8_MAX),
12492#endif
12493#ifdef UINT16_MAX
12494    MVAL (UINT16_MAX),
12495#endif
12496#ifdef UINT32_MAX
12497    MVAL (UINT32_MAX),
12498#endif
12499#ifdef UINT64_MAX
12500    MVAL (UINT64_MAX),
12501#endif
12502    NULL
12503  };
12504
12505int
12506main ()
12507{
12508
12509  const char **mv;
12510  for (mv = macro_values; *mv != NULL; mv++)
12511    {
12512      const char *value = *mv;
12513      /* Test whether it looks like a cast expression.  */
12514      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
12515          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
12516          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
12517          || strncmp (value, "((int)"/*)*/, 6) == 0
12518          || strncmp (value, "((signed short)"/*)*/, 15) == 0
12519          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
12520        return 1;
12521    }
12522  return 0;
12523
12524  ;
12525  return 0;
12526}
12527_ACEOF
12528if ac_fn_c_try_run "$LINENO"; then :
12529  gl_cv_header_working_stdint_h=yes
12530fi
12531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12532  conftest.$ac_objext conftest.beam conftest.$ac_ext
12533fi
12534
12535
12536fi
12537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12538
12539fi
12540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
12541$as_echo "$gl_cv_header_working_stdint_h" >&6; }
12542  fi
12543  if test "$gl_cv_header_working_stdint_h" = yes; then
12544    STDINT_H=
12545  else
12546            for ac_header in sys/inttypes.h sys/bitypes.h
12547do :
12548  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12549ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12550eval as_val=\$$as_ac_Header
12551   if test "x$as_val" = x""yes; then :
12552  cat >>confdefs.h <<_ACEOF
12553#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12554_ACEOF
12555
12556fi
12557
12558done
12559
12560    if test $ac_cv_header_sys_inttypes_h = yes; then
12561      HAVE_SYS_INTTYPES_H=1
12562    else
12563      HAVE_SYS_INTTYPES_H=0
12564    fi
12565
12566    if test $ac_cv_header_sys_bitypes_h = yes; then
12567      HAVE_SYS_BITYPES_H=1
12568    else
12569      HAVE_SYS_BITYPES_H=0
12570    fi
12571
12572
12573
12574
12575
12576
12577  if test $APPLE_UNIVERSAL_BUILD = 0; then
12578
12579
12580  for gltype in ptrdiff_t size_t ; do
12581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12582$as_echo_n "checking for bit size of $gltype... " >&6; }
12583if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
12584  $as_echo_n "(cached) " >&6
12585else
12586  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
12587  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12588     included before <wchar.h>.  */
12589  #include <stddef.h>
12590  #include <signal.h>
12591  #if HAVE_WCHAR_H
12592  # include <stdio.h>
12593  # include <time.h>
12594  # include <wchar.h>
12595  #endif
12596
12597#include <limits.h>"; then :
12598
12599else
12600  result=unknown
12601fi
12602
12603       eval gl_cv_bitsizeof_${gltype}=\$result
12604
12605fi
12606eval ac_res=\$gl_cv_bitsizeof_${gltype}
12607	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12608$as_echo "$ac_res" >&6; }
12609    eval result=\$gl_cv_bitsizeof_${gltype}
12610    if test $result = unknown; then
12611                                                result=0
12612    fi
12613    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12614    cat >>confdefs.h <<_ACEOF
12615#define BITSIZEOF_${GLTYPE} $result
12616_ACEOF
12617
12618    eval BITSIZEOF_${GLTYPE}=\$result
12619  done
12620
12621
12622  fi
12623
12624
12625  for gltype in sig_atomic_t wchar_t wint_t ; do
12626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12627$as_echo_n "checking for bit size of $gltype... " >&6; }
12628if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
12629  $as_echo_n "(cached) " >&6
12630else
12631  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
12632  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12633     included before <wchar.h>.  */
12634  #include <stddef.h>
12635  #include <signal.h>
12636  #if HAVE_WCHAR_H
12637  # include <stdio.h>
12638  # include <time.h>
12639  # include <wchar.h>
12640  #endif
12641
12642#include <limits.h>"; then :
12643
12644else
12645  result=unknown
12646fi
12647
12648       eval gl_cv_bitsizeof_${gltype}=\$result
12649
12650fi
12651eval ac_res=\$gl_cv_bitsizeof_${gltype}
12652	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12653$as_echo "$ac_res" >&6; }
12654    eval result=\$gl_cv_bitsizeof_${gltype}
12655    if test $result = unknown; then
12656                                                result=0
12657    fi
12658    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12659    cat >>confdefs.h <<_ACEOF
12660#define BITSIZEOF_${GLTYPE} $result
12661_ACEOF
12662
12663    eval BITSIZEOF_${GLTYPE}=\$result
12664  done
12665
12666
12667
12668
12669  for gltype in sig_atomic_t wchar_t wint_t ; do
12670    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
12671$as_echo_n "checking whether $gltype is signed... " >&6; }
12672if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
12673  $as_echo_n "(cached) " >&6
12674else
12675  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12676/* end confdefs.h.  */
12677
12678  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12679     included before <wchar.h>.  */
12680  #include <stddef.h>
12681  #include <signal.h>
12682  #if HAVE_WCHAR_H
12683  # include <stdio.h>
12684  # include <time.h>
12685  # include <wchar.h>
12686  #endif
12687
12688            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
12689int
12690main ()
12691{
12692
12693  ;
12694  return 0;
12695}
12696_ACEOF
12697if ac_fn_c_try_compile "$LINENO"; then :
12698  result=yes
12699else
12700  result=no
12701fi
12702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12703       eval gl_cv_type_${gltype}_signed=\$result
12704
12705fi
12706eval ac_res=\$gl_cv_type_${gltype}_signed
12707	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12708$as_echo "$ac_res" >&6; }
12709    eval result=\$gl_cv_type_${gltype}_signed
12710    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12711    if test "$result" = yes; then
12712      cat >>confdefs.h <<_ACEOF
12713#define HAVE_SIGNED_${GLTYPE} 1
12714_ACEOF
12715
12716      eval HAVE_SIGNED_${GLTYPE}=1
12717    else
12718      eval HAVE_SIGNED_${GLTYPE}=0
12719    fi
12720  done
12721
12722
12723  gl_cv_type_ptrdiff_t_signed=yes
12724  gl_cv_type_size_t_signed=no
12725  if test $APPLE_UNIVERSAL_BUILD = 0; then
12726
12727
12728  for gltype in ptrdiff_t size_t ; do
12729    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12730$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
12731if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
12732  $as_echo_n "(cached) " >&6
12733else
12734  eval gl_cv_type_${gltype}_suffix=no
12735       eval result=\$gl_cv_type_${gltype}_signed
12736       if test "$result" = yes; then
12737         glsufu=
12738       else
12739         glsufu=u
12740       fi
12741       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12742         case $glsuf in
12743           '')  gltype1='int';;
12744           l)   gltype1='long int';;
12745           ll)  gltype1='long long int';;
12746           i64) gltype1='__int64';;
12747           u)   gltype1='unsigned int';;
12748           ul)  gltype1='unsigned long int';;
12749           ull) gltype1='unsigned long long int';;
12750           ui64)gltype1='unsigned __int64';;
12751         esac
12752         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12753/* end confdefs.h.  */
12754
12755  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12756     included before <wchar.h>.  */
12757  #include <stddef.h>
12758  #include <signal.h>
12759  #if HAVE_WCHAR_H
12760  # include <stdio.h>
12761  # include <time.h>
12762  # include <wchar.h>
12763  #endif
12764
12765              extern $gltype foo;
12766              extern $gltype1 foo;
12767int
12768main ()
12769{
12770
12771  ;
12772  return 0;
12773}
12774_ACEOF
12775if ac_fn_c_try_compile "$LINENO"; then :
12776  eval gl_cv_type_${gltype}_suffix=\$glsuf
12777fi
12778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12779         eval result=\$gl_cv_type_${gltype}_suffix
12780         test "$result" != no && break
12781       done
12782fi
12783eval ac_res=\$gl_cv_type_${gltype}_suffix
12784	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12785$as_echo "$ac_res" >&6; }
12786    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12787    eval result=\$gl_cv_type_${gltype}_suffix
12788    test "$result" = no && result=
12789    eval ${GLTYPE}_SUFFIX=\$result
12790    cat >>confdefs.h <<_ACEOF
12791#define ${GLTYPE}_SUFFIX $result
12792_ACEOF
12793
12794  done
12795
12796
12797  fi
12798
12799
12800  for gltype in sig_atomic_t wchar_t wint_t ; do
12801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12802$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
12803if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
12804  $as_echo_n "(cached) " >&6
12805else
12806  eval gl_cv_type_${gltype}_suffix=no
12807       eval result=\$gl_cv_type_${gltype}_signed
12808       if test "$result" = yes; then
12809         glsufu=
12810       else
12811         glsufu=u
12812       fi
12813       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12814         case $glsuf in
12815           '')  gltype1='int';;
12816           l)   gltype1='long int';;
12817           ll)  gltype1='long long int';;
12818           i64) gltype1='__int64';;
12819           u)   gltype1='unsigned int';;
12820           ul)  gltype1='unsigned long int';;
12821           ull) gltype1='unsigned long long int';;
12822           ui64)gltype1='unsigned __int64';;
12823         esac
12824         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12825/* end confdefs.h.  */
12826
12827  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12828     included before <wchar.h>.  */
12829  #include <stddef.h>
12830  #include <signal.h>
12831  #if HAVE_WCHAR_H
12832  # include <stdio.h>
12833  # include <time.h>
12834  # include <wchar.h>
12835  #endif
12836
12837              extern $gltype foo;
12838              extern $gltype1 foo;
12839int
12840main ()
12841{
12842
12843  ;
12844  return 0;
12845}
12846_ACEOF
12847if ac_fn_c_try_compile "$LINENO"; then :
12848  eval gl_cv_type_${gltype}_suffix=\$glsuf
12849fi
12850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12851         eval result=\$gl_cv_type_${gltype}_suffix
12852         test "$result" != no && break
12853       done
12854fi
12855eval ac_res=\$gl_cv_type_${gltype}_suffix
12856	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12857$as_echo "$ac_res" >&6; }
12858    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12859    eval result=\$gl_cv_type_${gltype}_suffix
12860    test "$result" = no && result=
12861    eval ${GLTYPE}_SUFFIX=\$result
12862    cat >>confdefs.h <<_ACEOF
12863#define ${GLTYPE}_SUFFIX $result
12864_ACEOF
12865
12866  done
12867
12868
12869
12870    STDINT_H=stdint.h
12871  fi
12872
12873
12874
12875  for ac_header in inttypes.h
12876do :
12877  ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
12878if test "x$ac_cv_header_inttypes_h" = x""yes; then :
12879  cat >>confdefs.h <<_ACEOF
12880#define HAVE_INTTYPES_H 1
12881_ACEOF
12882
12883fi
12884
12885done
12886
12887  if test $ac_cv_header_inttypes_h = yes; then
12888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
12889$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
12890if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
12891  $as_echo_n "(cached) " >&6
12892else
12893
12894        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12895/* end confdefs.h.  */
12896#include <inttypes.h>
12897#ifdef PRId32
12898char *p = PRId32;
12899#endif
12900
12901int
12902main ()
12903{
12904
12905  ;
12906  return 0;
12907}
12908_ACEOF
12909if ac_fn_c_try_compile "$LINENO"; then :
12910  gt_cv_inttypes_pri_broken=no
12911else
12912  gt_cv_inttypes_pri_broken=yes
12913fi
12914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12915
12916fi
12917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
12918$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
12919  fi
12920  if test "$gt_cv_inttypes_pri_broken" = yes; then
12921
12922cat >>confdefs.h <<_ACEOF
12923#define PRI_MACROS_BROKEN 1
12924_ACEOF
12925
12926    PRI_MACROS_BROKEN=1
12927  else
12928    PRI_MACROS_BROKEN=0
12929  fi
12930
12931
12932
12933
12934ac_fn_c_check_decl "$LINENO" "imaxabs" "ac_cv_have_decl_imaxabs" "$ac_includes_default"
12935if test "x$ac_cv_have_decl_imaxabs" = x""yes; then :
12936  ac_have_decl=1
12937else
12938  ac_have_decl=0
12939fi
12940
12941cat >>confdefs.h <<_ACEOF
12942#define HAVE_DECL_IMAXABS $ac_have_decl
12943_ACEOF
12944
12945ac_fn_c_check_decl "$LINENO" "imaxdiv" "ac_cv_have_decl_imaxdiv" "$ac_includes_default"
12946if test "x$ac_cv_have_decl_imaxdiv" = x""yes; then :
12947  ac_have_decl=1
12948else
12949  ac_have_decl=0
12950fi
12951
12952cat >>confdefs.h <<_ACEOF
12953#define HAVE_DECL_IMAXDIV $ac_have_decl
12954_ACEOF
12955
12956ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
12957if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
12958  ac_have_decl=1
12959else
12960  ac_have_decl=0
12961fi
12962
12963cat >>confdefs.h <<_ACEOF
12964#define HAVE_DECL_STRTOIMAX $ac_have_decl
12965_ACEOF
12966
12967ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
12968if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
12969  ac_have_decl=1
12970else
12971  ac_have_decl=0
12972fi
12973
12974cat >>confdefs.h <<_ACEOF
12975#define HAVE_DECL_STRTOUMAX $ac_have_decl
12976_ACEOF
12977
12978
12979  GNULIB_IMAXABS=0;
12980  GNULIB_IMAXDIV=0;
12981  GNULIB_STRTOIMAX=0;
12982  GNULIB_STRTOUMAX=0;
12983    HAVE_DECL_IMAXABS=1;
12984  HAVE_DECL_IMAXDIV=1;
12985  HAVE_DECL_STRTOIMAX=1;
12986  HAVE_DECL_STRTOUMAX=1;
12987
12988
12989  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
12990$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
12991if test "${gl_cv_cc_float_expbit0+set}" = set; then :
12992  $as_echo_n "(cached) " >&6
12993else
12994
12995      if test "$cross_compiling" = yes; then :
12996  gl_cv_cc_float_expbit0="word 0 bit 23"
12997else
12998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12999/* end confdefs.h.  */
13000
13001#include <float.h>
13002#include <stddef.h>
13003#include <stdio.h>
13004#include <string.h>
13005#define NWORDS \
13006  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13007typedef union { float value; unsigned int word[NWORDS]; } memory_float;
13008static unsigned int ored_words[NWORDS];
13009static unsigned int anded_words[NWORDS];
13010static void add_to_ored_words (float x)
13011{
13012  memory_float m;
13013  size_t i;
13014  /* Clear it first, in case
13015     sizeof (float) < sizeof (memory_float).  */
13016  memset (&m, 0, sizeof (memory_float));
13017  m.value = x;
13018  for (i = 0; i < NWORDS; i++)
13019    {
13020      ored_words[i] |= m.word[i];
13021      anded_words[i] &= m.word[i];
13022    }
13023}
13024int main ()
13025{
13026  size_t j;
13027  FILE *fp = fopen ("conftest.out", "w");
13028  if (fp == NULL)
13029    return 1;
13030  for (j = 0; j < NWORDS; j++)
13031    anded_words[j] = ~ (unsigned int) 0;
13032  add_to_ored_words (0.25f);
13033  add_to_ored_words (0.5f);
13034  add_to_ored_words (1.0f);
13035  add_to_ored_words (2.0f);
13036  add_to_ored_words (4.0f);
13037  /* Remove bits that are common (e.g. if representation of the first mantissa
13038     bit is explicit).  */
13039  for (j = 0; j < NWORDS; j++)
13040    ored_words[j] &= ~anded_words[j];
13041  /* Now find the nonzero word.  */
13042  for (j = 0; j < NWORDS; j++)
13043    if (ored_words[j] != 0)
13044      break;
13045  if (j < NWORDS)
13046    {
13047      size_t i;
13048      for (i = j + 1; i < NWORDS; i++)
13049        if (ored_words[i] != 0)
13050          {
13051            fprintf (fp, "unknown");
13052            return (fclose (fp) != 0);
13053          }
13054      for (i = 0; ; i++)
13055        if ((ored_words[j] >> i) & 1)
13056          {
13057            fprintf (fp, "word %d bit %d", (int) j, (int) i);
13058            return (fclose (fp) != 0);
13059          }
13060    }
13061  fprintf (fp, "unknown");
13062  return (fclose (fp) != 0);
13063}
13064
13065_ACEOF
13066if ac_fn_c_try_run "$LINENO"; then :
13067  gl_cv_cc_float_expbit0=`cat conftest.out`
13068else
13069  gl_cv_cc_float_expbit0="unknown"
13070fi
13071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13072  conftest.$ac_objext conftest.beam conftest.$ac_ext
13073fi
13074
13075      rm -f conftest.out
13076
13077fi
13078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
13079$as_echo "$gl_cv_cc_float_expbit0" >&6; }
13080  case "$gl_cv_cc_float_expbit0" in
13081    word*bit*)
13082      word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13083      bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
13084
13085cat >>confdefs.h <<_ACEOF
13086#define FLT_EXPBIT0_WORD $word
13087_ACEOF
13088
13089
13090cat >>confdefs.h <<_ACEOF
13091#define FLT_EXPBIT0_BIT $bit
13092_ACEOF
13093
13094      ;;
13095  esac
13096
13097
13098  GNULIB_NL_LANGINFO=0;
13099    HAVE_NL_LANGINFO=1;
13100  REPLACE_NL_LANGINFO=0;
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
13113if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
13114  ac_have_decl=1
13115else
13116  ac_have_decl=0
13117fi
13118
13119cat >>confdefs.h <<_ACEOF
13120#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
13121_ACEOF
13122
13123
13124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5
13125$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; }
13126if test "${ac_cv_gnu_library_2_1+set}" = set; then :
13127  $as_echo_n "(cached) " >&6
13128else
13129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13130/* end confdefs.h.  */
13131
13132#include <features.h>
13133#ifdef __GNU_LIBRARY__
13134 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
13135  Lucky GNU user
13136 #endif
13137#endif
13138
13139_ACEOF
13140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13141  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
13142  ac_cv_gnu_library_2_1=yes
13143else
13144  ac_cv_gnu_library_2_1=no
13145fi
13146rm -f conftest*
13147
13148
13149
13150fi
13151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
13152$as_echo "$ac_cv_gnu_library_2_1" >&6; }
13153
13154    GLIBC21="$ac_cv_gnu_library_2_1"
13155
13156
13157
13158  GNULIB_DUPLOCALE=0;
13159    REPLACE_DUPLOCALE=0;
13160
13161
13162    REPLACE_NULL=0;
13163  HAVE_WCHAR_T=1;
13164  STDDEF_H='';
13165
13166
13167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13168$as_echo_n "checking for wchar_t... " >&6; }
13169if test "${gt_cv_c_wchar_t+set}" = set; then :
13170  $as_echo_n "(cached) " >&6
13171else
13172  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13173/* end confdefs.h.  */
13174#include <stddef.h>
13175       wchar_t foo = (wchar_t)'\0';
13176int
13177main ()
13178{
13179
13180  ;
13181  return 0;
13182}
13183_ACEOF
13184if ac_fn_c_try_compile "$LINENO"; then :
13185  gt_cv_c_wchar_t=yes
13186else
13187  gt_cv_c_wchar_t=no
13188fi
13189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13190fi
13191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13192$as_echo "$gt_cv_c_wchar_t" >&6; }
13193  if test $gt_cv_c_wchar_t = yes; then
13194
13195$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13196
13197  fi
13198
13199
13200
13201
13202
13203
13204  if test $gt_cv_c_wchar_t = no; then
13205    HAVE_WCHAR_T=0
13206    STDDEF_H=stddef.h
13207  fi
13208  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
13209$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
13210if test "${gl_cv_decl_null_works+set}" = set; then :
13211  $as_echo_n "(cached) " >&6
13212else
13213  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13214/* end confdefs.h.  */
13215#include <stddef.h>
13216      int test[2 * (sizeof NULL == sizeof (void *)) -1];
13217
13218int
13219main ()
13220{
13221
13222  ;
13223  return 0;
13224}
13225_ACEOF
13226if ac_fn_c_try_compile "$LINENO"; then :
13227  gl_cv_decl_null_works=yes
13228else
13229  gl_cv_decl_null_works=no
13230fi
13231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13232fi
13233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
13234$as_echo "$gl_cv_decl_null_works" >&6; }
13235  if test $gl_cv_decl_null_works = no; then
13236    REPLACE_NULL=1
13237    STDDEF_H=stddef.h
13238  fi
13239  if test -n "$STDDEF_H"; then
13240
13241
13242
13243
13244
13245
13246     if test $gl_cv_have_include_next = yes; then
13247       gl_cv_next_stddef_h='<'stddef.h'>'
13248     else
13249       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
13250$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
13251if test "${gl_cv_next_stddef_h+set}" = set; then :
13252  $as_echo_n "(cached) " >&6
13253else
13254
13255          if test $ac_cv_header_stddef_h = yes; then
13256            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13257/* end confdefs.h.  */
13258#include <stddef.h>
13259
13260_ACEOF
13261                                                                                                case "$host_os" in
13262              aix*) gl_absname_cpp="$ac_cpp -C" ;;
13263              *)    gl_absname_cpp="$ac_cpp" ;;
13264            esac
13265                                                gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13266               sed -n '\#/stddef.h#{
13267                 s#.*"\(.*/stddef.h\)".*#\1#
13268                 s#^/[^/]#//&#
13269                 p
13270                 q
13271               }'`'"'
13272          else
13273            gl_cv_next_stddef_h='<'stddef.h'>'
13274          fi
13275
13276fi
13277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
13278$as_echo "$gl_cv_next_stddef_h" >&6; }
13279     fi
13280     NEXT_STDDEF_H=$gl_cv_next_stddef_h
13281
13282     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13283       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13284       gl_next_as_first_directive='<'stddef.h'>'
13285     else
13286       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13287       gl_next_as_first_directive=$gl_cv_next_stddef_h
13288     fi
13289     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
13290
13291
13292
13293  fi
13294
13295
13296
13297
13298
13299
13300
13301  gl_threads_api=none
13302  LIBTHREAD=
13303  LTLIBTHREAD=
13304  LIBMULTITHREAD=
13305  LTLIBMULTITHREAD=
13306  if test "$gl_use_threads" != no; then
13307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
13308$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
13309    gl_have_weak=no
13310    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13311/* end confdefs.h.  */
13312extern void xyzzy ();
13313#pragma weak xyzzy
13314int
13315main ()
13316{
13317xyzzy();
13318  ;
13319  return 0;
13320}
13321_ACEOF
13322if ac_fn_c_try_link "$LINENO"; then :
13323  gl_have_weak=yes
13324fi
13325rm -f core conftest.err conftest.$ac_objext \
13326    conftest$ac_exeext conftest.$ac_ext
13327    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_weak" >&5
13328$as_echo "$gl_have_weak" >&6; }
13329    if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
13330      # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
13331      # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
13332      ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
13333if test "x$ac_cv_header_pthread_h" = x""yes; then :
13334  gl_have_pthread_h=yes
13335else
13336  gl_have_pthread_h=no
13337fi
13338
13339
13340      if test "$gl_have_pthread_h" = yes; then
13341        # Other possible tests:
13342        #   -lpthreads (FSU threads, PCthreads)
13343        #   -lgthreads
13344        gl_have_pthread=
13345        # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
13346        # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
13347        # the second one only in libpthread, and lock.c needs it.
13348        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13349/* end confdefs.h.  */
13350#include <pthread.h>
13351int
13352main ()
13353{
13354pthread_mutex_lock((pthread_mutex_t*)0);
13355           pthread_mutexattr_init((pthread_mutexattr_t*)0);
13356  ;
13357  return 0;
13358}
13359_ACEOF
13360if ac_fn_c_try_link "$LINENO"; then :
13361  gl_have_pthread=yes
13362fi
13363rm -f core conftest.err conftest.$ac_objext \
13364    conftest$ac_exeext conftest.$ac_ext
13365        # Test for libpthread by looking for pthread_kill. (Not pthread_self,
13366        # since it is defined as a macro on OSF/1.)
13367        if test -n "$gl_have_pthread"; then
13368          # The program links fine without libpthread. But it may actually
13369          # need to link with libpthread in order to create multiple threads.
13370          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13371$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
13372if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then :
13373  $as_echo_n "(cached) " >&6
13374else
13375  ac_check_lib_save_LIBS=$LIBS
13376LIBS="-lpthread  $LIBS"
13377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13378/* end confdefs.h.  */
13379
13380/* Override any GCC internal prototype to avoid an error.
13381   Use char because int might match the return type of a GCC
13382   builtin and then its argument prototype would still apply.  */
13383#ifdef __cplusplus
13384extern "C"
13385#endif
13386char pthread_kill ();
13387int
13388main ()
13389{
13390return pthread_kill ();
13391  ;
13392  return 0;
13393}
13394_ACEOF
13395if ac_fn_c_try_link "$LINENO"; then :
13396  ac_cv_lib_pthread_pthread_kill=yes
13397else
13398  ac_cv_lib_pthread_pthread_kill=no
13399fi
13400rm -f core conftest.err conftest.$ac_objext \
13401    conftest$ac_exeext conftest.$ac_ext
13402LIBS=$ac_check_lib_save_LIBS
13403fi
13404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13405$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
13406if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then :
13407  LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
13408             # On Solaris and HP-UX, most pthread functions exist also in libc.
13409             # Therefore pthread_in_use() needs to actually try to create a
13410             # thread: pthread_create from libc will fail, whereas
13411             # pthread_create will actually create a thread.
13412             case "$host_os" in
13413               solaris* | hpux*)
13414
13415$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
13416
13417             esac
13418
13419fi
13420
13421        else
13422          # Some library is needed. Try libpthread and libc_r.
13423          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13424$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
13425if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then :
13426  $as_echo_n "(cached) " >&6
13427else
13428  ac_check_lib_save_LIBS=$LIBS
13429LIBS="-lpthread  $LIBS"
13430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13431/* end confdefs.h.  */
13432
13433/* Override any GCC internal prototype to avoid an error.
13434   Use char because int might match the return type of a GCC
13435   builtin and then its argument prototype would still apply.  */
13436#ifdef __cplusplus
13437extern "C"
13438#endif
13439char pthread_kill ();
13440int
13441main ()
13442{
13443return pthread_kill ();
13444  ;
13445  return 0;
13446}
13447_ACEOF
13448if ac_fn_c_try_link "$LINENO"; then :
13449  ac_cv_lib_pthread_pthread_kill=yes
13450else
13451  ac_cv_lib_pthread_pthread_kill=no
13452fi
13453rm -f core conftest.err conftest.$ac_objext \
13454    conftest$ac_exeext conftest.$ac_ext
13455LIBS=$ac_check_lib_save_LIBS
13456fi
13457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13458$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
13459if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then :
13460  gl_have_pthread=yes
13461             LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
13462             LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
13463fi
13464
13465          if test -z "$gl_have_pthread"; then
13466            # For FreeBSD 4.
13467            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
13468$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
13469if test "${ac_cv_lib_c_r_pthread_kill+set}" = set; then :
13470  $as_echo_n "(cached) " >&6
13471else
13472  ac_check_lib_save_LIBS=$LIBS
13473LIBS="-lc_r  $LIBS"
13474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13475/* end confdefs.h.  */
13476
13477/* Override any GCC internal prototype to avoid an error.
13478   Use char because int might match the return type of a GCC
13479   builtin and then its argument prototype would still apply.  */
13480#ifdef __cplusplus
13481extern "C"
13482#endif
13483char pthread_kill ();
13484int
13485main ()
13486{
13487return pthread_kill ();
13488  ;
13489  return 0;
13490}
13491_ACEOF
13492if ac_fn_c_try_link "$LINENO"; then :
13493  ac_cv_lib_c_r_pthread_kill=yes
13494else
13495  ac_cv_lib_c_r_pthread_kill=no
13496fi
13497rm -f core conftest.err conftest.$ac_objext \
13498    conftest$ac_exeext conftest.$ac_ext
13499LIBS=$ac_check_lib_save_LIBS
13500fi
13501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
13502$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
13503if test "x$ac_cv_lib_c_r_pthread_kill" = x""yes; then :
13504  gl_have_pthread=yes
13505               LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
13506               LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
13507fi
13508
13509          fi
13510        fi
13511        if test -n "$gl_have_pthread"; then
13512          gl_threads_api=posix
13513
13514$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
13515
13516          if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13517            if test $gl_have_weak = yes; then
13518
13519$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
13520
13521              LIBTHREAD=
13522              LTLIBTHREAD=
13523            fi
13524          fi
13525        fi
13526      fi
13527    fi
13528    if test -z "$gl_have_pthread"; then
13529      if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
13530        gl_have_solaristhread=
13531        gl_save_LIBS="$LIBS"
13532        LIBS="$LIBS -lthread"
13533        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13534/* end confdefs.h.  */
13535#include <thread.h>
13536#include <synch.h>
13537int
13538main ()
13539{
13540thr_self();
13541  ;
13542  return 0;
13543}
13544_ACEOF
13545if ac_fn_c_try_link "$LINENO"; then :
13546  gl_have_solaristhread=yes
13547fi
13548rm -f core conftest.err conftest.$ac_objext \
13549    conftest$ac_exeext conftest.$ac_ext
13550        LIBS="$gl_save_LIBS"
13551        if test -n "$gl_have_solaristhread"; then
13552          gl_threads_api=solaris
13553          LIBTHREAD=-lthread
13554          LTLIBTHREAD=-lthread
13555          LIBMULTITHREAD="$LIBTHREAD"
13556          LTLIBMULTITHREAD="$LTLIBTHREAD"
13557
13558$as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
13559
13560          if test $gl_have_weak = yes; then
13561
13562$as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
13563
13564            LIBTHREAD=
13565            LTLIBTHREAD=
13566          fi
13567        fi
13568      fi
13569    fi
13570    if test "$gl_use_threads" = pth; then
13571      gl_save_CPPFLAGS="$CPPFLAGS"
13572
13573
13574
13575
13576
13577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
13578$as_echo_n "checking how to link with libpth... " >&6; }
13579if test "${ac_cv_libpth_libs+set}" = set; then :
13580  $as_echo_n "(cached) " >&6
13581else
13582
13583
13584
13585
13586
13587
13588
13589
13590    use_additional=yes
13591
13592  acl_save_prefix="$prefix"
13593  prefix="$acl_final_prefix"
13594  acl_save_exec_prefix="$exec_prefix"
13595  exec_prefix="$acl_final_exec_prefix"
13596
13597    eval additional_includedir=\"$includedir\"
13598    eval additional_libdir=\"$libdir\"
13599
13600  exec_prefix="$acl_save_exec_prefix"
13601  prefix="$acl_save_prefix"
13602
13603
13604# Check whether --with-libpth-prefix was given.
13605if test "${with_libpth_prefix+set}" = set; then :
13606  withval=$with_libpth_prefix;
13607    if test "X$withval" = "Xno"; then
13608      use_additional=no
13609    else
13610      if test "X$withval" = "X"; then
13611
13612  acl_save_prefix="$prefix"
13613  prefix="$acl_final_prefix"
13614  acl_save_exec_prefix="$exec_prefix"
13615  exec_prefix="$acl_final_exec_prefix"
13616
13617          eval additional_includedir=\"$includedir\"
13618          eval additional_libdir=\"$libdir\"
13619
13620  exec_prefix="$acl_save_exec_prefix"
13621  prefix="$acl_save_prefix"
13622
13623      else
13624        additional_includedir="$withval/include"
13625        additional_libdir="$withval/$acl_libdirstem"
13626        if test "$acl_libdirstem2" != "$acl_libdirstem" \
13627           && ! test -d "$withval/$acl_libdirstem"; then
13628          additional_libdir="$withval/$acl_libdirstem2"
13629        fi
13630      fi
13631    fi
13632
13633fi
13634
13635      LIBPTH=
13636  LTLIBPTH=
13637  INCPTH=
13638  LIBPTH_PREFIX=
13639      HAVE_LIBPTH=
13640  rpathdirs=
13641  ltrpathdirs=
13642  names_already_handled=
13643  names_next_round='pth '
13644  while test -n "$names_next_round"; do
13645    names_this_round="$names_next_round"
13646    names_next_round=
13647    for name in $names_this_round; do
13648      already_handled=
13649      for n in $names_already_handled; do
13650        if test "$n" = "$name"; then
13651          already_handled=yes
13652          break
13653        fi
13654      done
13655      if test -z "$already_handled"; then
13656        names_already_handled="$names_already_handled $name"
13657                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
13658        eval value=\"\$HAVE_LIB$uppername\"
13659        if test -n "$value"; then
13660          if test "$value" = yes; then
13661            eval value=\"\$LIB$uppername\"
13662            test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
13663            eval value=\"\$LTLIB$uppername\"
13664            test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
13665          else
13666                                    :
13667          fi
13668        else
13669                              found_dir=
13670          found_la=
13671          found_so=
13672          found_a=
13673          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
13674          if test -n "$acl_shlibext"; then
13675            shrext=".$acl_shlibext"             # typically: shrext=.so
13676          else
13677            shrext=
13678          fi
13679          if test $use_additional = yes; then
13680            dir="$additional_libdir"
13681                                    if test -n "$acl_shlibext"; then
13682              if test -f "$dir/$libname$shrext"; then
13683                found_dir="$dir"
13684                found_so="$dir/$libname$shrext"
13685              else
13686                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13687                  ver=`(cd "$dir" && \
13688                        for f in "$libname$shrext".*; do echo "$f"; done \
13689                        | sed -e "s,^$libname$shrext\\\\.,," \
13690                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13691                        | sed 1q ) 2>/dev/null`
13692                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13693                    found_dir="$dir"
13694                    found_so="$dir/$libname$shrext.$ver"
13695                  fi
13696                else
13697                  eval library_names=\"$acl_library_names_spec\"
13698                  for f in $library_names; do
13699                    if test -f "$dir/$f"; then
13700                      found_dir="$dir"
13701                      found_so="$dir/$f"
13702                      break
13703                    fi
13704                  done
13705                fi
13706              fi
13707            fi
13708                        if test "X$found_dir" = "X"; then
13709              if test -f "$dir/$libname.$acl_libext"; then
13710                found_dir="$dir"
13711                found_a="$dir/$libname.$acl_libext"
13712              fi
13713            fi
13714            if test "X$found_dir" != "X"; then
13715              if test -f "$dir/$libname.la"; then
13716                found_la="$dir/$libname.la"
13717              fi
13718            fi
13719          fi
13720          if test "X$found_dir" = "X"; then
13721            for x in $LDFLAGS $LTLIBPTH; do
13722
13723  acl_save_prefix="$prefix"
13724  prefix="$acl_final_prefix"
13725  acl_save_exec_prefix="$exec_prefix"
13726  exec_prefix="$acl_final_exec_prefix"
13727  eval x=\"$x\"
13728  exec_prefix="$acl_save_exec_prefix"
13729  prefix="$acl_save_prefix"
13730
13731              case "$x" in
13732                -L*)
13733                  dir=`echo "X$x" | sed -e 's/^X-L//'`
13734                                    if test -n "$acl_shlibext"; then
13735                    if test -f "$dir/$libname$shrext"; then
13736                      found_dir="$dir"
13737                      found_so="$dir/$libname$shrext"
13738                    else
13739                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13740                        ver=`(cd "$dir" && \
13741                              for f in "$libname$shrext".*; do echo "$f"; done \
13742                              | sed -e "s,^$libname$shrext\\\\.,," \
13743                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13744                              | sed 1q ) 2>/dev/null`
13745                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13746                          found_dir="$dir"
13747                          found_so="$dir/$libname$shrext.$ver"
13748                        fi
13749                      else
13750                        eval library_names=\"$acl_library_names_spec\"
13751                        for f in $library_names; do
13752                          if test -f "$dir/$f"; then
13753                            found_dir="$dir"
13754                            found_so="$dir/$f"
13755                            break
13756                          fi
13757                        done
13758                      fi
13759                    fi
13760                  fi
13761                                    if test "X$found_dir" = "X"; then
13762                    if test -f "$dir/$libname.$acl_libext"; then
13763                      found_dir="$dir"
13764                      found_a="$dir/$libname.$acl_libext"
13765                    fi
13766                  fi
13767                  if test "X$found_dir" != "X"; then
13768                    if test -f "$dir/$libname.la"; then
13769                      found_la="$dir/$libname.la"
13770                    fi
13771                  fi
13772                  ;;
13773              esac
13774              if test "X$found_dir" != "X"; then
13775                break
13776              fi
13777            done
13778          fi
13779          if test "X$found_dir" != "X"; then
13780                        LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
13781            if test "X$found_so" != "X"; then
13782                                                        if test "$enable_rpath" = no \
13783                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
13784                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
13785                                LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13786              else
13787                                                                                haveit=
13788                for x in $ltrpathdirs; do
13789                  if test "X$x" = "X$found_dir"; then
13790                    haveit=yes
13791                    break
13792                  fi
13793                done
13794                if test -z "$haveit"; then
13795                  ltrpathdirs="$ltrpathdirs $found_dir"
13796                fi
13797                                if test "$acl_hardcode_direct" = yes; then
13798                                                      LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13799                else
13800                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
13801                                                            LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13802                                                            haveit=
13803                    for x in $rpathdirs; do
13804                      if test "X$x" = "X$found_dir"; then
13805                        haveit=yes
13806                        break
13807                      fi
13808                    done
13809                    if test -z "$haveit"; then
13810                      rpathdirs="$rpathdirs $found_dir"
13811                    fi
13812                  else
13813                                                                                haveit=
13814                    for x in $LDFLAGS $LIBPTH; do
13815
13816  acl_save_prefix="$prefix"
13817  prefix="$acl_final_prefix"
13818  acl_save_exec_prefix="$exec_prefix"
13819  exec_prefix="$acl_final_exec_prefix"
13820  eval x=\"$x\"
13821  exec_prefix="$acl_save_exec_prefix"
13822  prefix="$acl_save_prefix"
13823
13824                      if test "X$x" = "X-L$found_dir"; then
13825                        haveit=yes
13826                        break
13827                      fi
13828                    done
13829                    if test -z "$haveit"; then
13830                      LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
13831                    fi
13832                    if test "$acl_hardcode_minus_L" != no; then
13833                                                                                        LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13834                    else
13835                                                                                                                                                                                LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
13836                    fi
13837                  fi
13838                fi
13839              fi
13840            else
13841              if test "X$found_a" != "X"; then
13842                                LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
13843              else
13844                                                LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
13845              fi
13846            fi
13847                        additional_includedir=
13848            case "$found_dir" in
13849              */$acl_libdirstem | */$acl_libdirstem/)
13850                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
13851                if test "$name" = 'pth'; then
13852                  LIBPTH_PREFIX="$basedir"
13853                fi
13854                additional_includedir="$basedir/include"
13855                ;;
13856              */$acl_libdirstem2 | */$acl_libdirstem2/)
13857                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
13858                if test "$name" = 'pth'; then
13859                  LIBPTH_PREFIX="$basedir"
13860                fi
13861                additional_includedir="$basedir/include"
13862                ;;
13863            esac
13864            if test "X$additional_includedir" != "X"; then
13865                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
13866                haveit=
13867                if test "X$additional_includedir" = "X/usr/local/include"; then
13868                  if test -n "$GCC"; then
13869                    case $host_os in
13870                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13871                    esac
13872                  fi
13873                fi
13874                if test -z "$haveit"; then
13875                  for x in $CPPFLAGS $INCPTH; do
13876
13877  acl_save_prefix="$prefix"
13878  prefix="$acl_final_prefix"
13879  acl_save_exec_prefix="$exec_prefix"
13880  exec_prefix="$acl_final_exec_prefix"
13881  eval x=\"$x\"
13882  exec_prefix="$acl_save_exec_prefix"
13883  prefix="$acl_save_prefix"
13884
13885                    if test "X$x" = "X-I$additional_includedir"; then
13886                      haveit=yes
13887                      break
13888                    fi
13889                  done
13890                  if test -z "$haveit"; then
13891                    if test -d "$additional_includedir"; then
13892                                            INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
13893                    fi
13894                  fi
13895                fi
13896              fi
13897            fi
13898                        if test -n "$found_la"; then
13899                                                        save_libdir="$libdir"
13900              case "$found_la" in
13901                */* | *\\*) . "$found_la" ;;
13902                *) . "./$found_la" ;;
13903              esac
13904              libdir="$save_libdir"
13905                            for dep in $dependency_libs; do
13906                case "$dep" in
13907                  -L*)
13908                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13909                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
13910                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
13911                      haveit=
13912                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
13913                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
13914                        if test -n "$GCC"; then
13915                          case $host_os in
13916                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13917                          esac
13918                        fi
13919                      fi
13920                      if test -z "$haveit"; then
13921                        haveit=
13922                        for x in $LDFLAGS $LIBPTH; do
13923
13924  acl_save_prefix="$prefix"
13925  prefix="$acl_final_prefix"
13926  acl_save_exec_prefix="$exec_prefix"
13927  exec_prefix="$acl_final_exec_prefix"
13928  eval x=\"$x\"
13929  exec_prefix="$acl_save_exec_prefix"
13930  prefix="$acl_save_prefix"
13931
13932                          if test "X$x" = "X-L$additional_libdir"; then
13933                            haveit=yes
13934                            break
13935                          fi
13936                        done
13937                        if test -z "$haveit"; then
13938                          if test -d "$additional_libdir"; then
13939                                                        LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
13940                          fi
13941                        fi
13942                        haveit=
13943                        for x in $LDFLAGS $LTLIBPTH; do
13944
13945  acl_save_prefix="$prefix"
13946  prefix="$acl_final_prefix"
13947  acl_save_exec_prefix="$exec_prefix"
13948  exec_prefix="$acl_final_exec_prefix"
13949  eval x=\"$x\"
13950  exec_prefix="$acl_save_exec_prefix"
13951  prefix="$acl_save_prefix"
13952
13953                          if test "X$x" = "X-L$additional_libdir"; then
13954                            haveit=yes
13955                            break
13956                          fi
13957                        done
13958                        if test -z "$haveit"; then
13959                          if test -d "$additional_libdir"; then
13960                                                        LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
13961                          fi
13962                        fi
13963                      fi
13964                    fi
13965                    ;;
13966                  -R*)
13967                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
13968                    if test "$enable_rpath" != no; then
13969                                                                  haveit=
13970                      for x in $rpathdirs; do
13971                        if test "X$x" = "X$dir"; then
13972                          haveit=yes
13973                          break
13974                        fi
13975                      done
13976                      if test -z "$haveit"; then
13977                        rpathdirs="$rpathdirs $dir"
13978                      fi
13979                                                                  haveit=
13980                      for x in $ltrpathdirs; do
13981                        if test "X$x" = "X$dir"; then
13982                          haveit=yes
13983                          break
13984                        fi
13985                      done
13986                      if test -z "$haveit"; then
13987                        ltrpathdirs="$ltrpathdirs $dir"
13988                      fi
13989                    fi
13990                    ;;
13991                  -l*)
13992                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13993                    ;;
13994                  *.la)
13995                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13996                    ;;
13997                  *)
13998                                        LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
13999                    LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
14000                    ;;
14001                esac
14002              done
14003            fi
14004          else
14005                                                            LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
14006            LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
14007          fi
14008        fi
14009      fi
14010    done
14011  done
14012  if test "X$rpathdirs" != "X"; then
14013    if test -n "$acl_hardcode_libdir_separator"; then
14014                        alldirs=
14015      for found_dir in $rpathdirs; do
14016        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
14017      done
14018            acl_save_libdir="$libdir"
14019      libdir="$alldirs"
14020      eval flag=\"$acl_hardcode_libdir_flag_spec\"
14021      libdir="$acl_save_libdir"
14022      LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14023    else
14024            for found_dir in $rpathdirs; do
14025        acl_save_libdir="$libdir"
14026        libdir="$found_dir"
14027        eval flag=\"$acl_hardcode_libdir_flag_spec\"
14028        libdir="$acl_save_libdir"
14029        LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
14030      done
14031    fi
14032  fi
14033  if test "X$ltrpathdirs" != "X"; then
14034            for found_dir in $ltrpathdirs; do
14035      LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
14036    done
14037  fi
14038
14039
14040
14041
14042
14043
14044    ac_cv_libpth_libs="$LIBPTH"
14045    ac_cv_libpth_ltlibs="$LTLIBPTH"
14046    ac_cv_libpth_cppflags="$INCPTH"
14047    ac_cv_libpth_prefix="$LIBPTH_PREFIX"
14048
14049fi
14050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
14051$as_echo "$ac_cv_libpth_libs" >&6; }
14052  LIBPTH="$ac_cv_libpth_libs"
14053  LTLIBPTH="$ac_cv_libpth_ltlibs"
14054  INCPTH="$ac_cv_libpth_cppflags"
14055  LIBPTH_PREFIX="$ac_cv_libpth_prefix"
14056
14057  for element in $INCPTH; do
14058    haveit=
14059    for x in $CPPFLAGS; do
14060
14061  acl_save_prefix="$prefix"
14062  prefix="$acl_final_prefix"
14063  acl_save_exec_prefix="$exec_prefix"
14064  exec_prefix="$acl_final_exec_prefix"
14065  eval x=\"$x\"
14066  exec_prefix="$acl_save_exec_prefix"
14067  prefix="$acl_save_prefix"
14068
14069      if test "X$x" = "X$element"; then
14070        haveit=yes
14071        break
14072      fi
14073    done
14074    if test -z "$haveit"; then
14075      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14076    fi
14077  done
14078
14079
14080
14081
14082      HAVE_LIBPTH=yes
14083
14084
14085
14086      gl_have_pth=
14087      gl_save_LIBS="$LIBS"
14088      LIBS="$LIBS -lpth"
14089      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14090/* end confdefs.h.  */
14091#include <pth.h>
14092int
14093main ()
14094{
14095pth_self();
14096  ;
14097  return 0;
14098}
14099_ACEOF
14100if ac_fn_c_try_link "$LINENO"; then :
14101  gl_have_pth=yes
14102fi
14103rm -f core conftest.err conftest.$ac_objext \
14104    conftest$ac_exeext conftest.$ac_ext
14105      LIBS="$gl_save_LIBS"
14106      if test -n "$gl_have_pth"; then
14107        gl_threads_api=pth
14108        LIBTHREAD="$LIBPTH"
14109        LTLIBTHREAD="$LTLIBPTH"
14110        LIBMULTITHREAD="$LIBTHREAD"
14111        LTLIBMULTITHREAD="$LTLIBTHREAD"
14112
14113$as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
14114
14115        if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14116          if test $gl_have_weak = yes; then
14117
14118$as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
14119
14120            LIBTHREAD=
14121            LTLIBTHREAD=
14122          fi
14123        fi
14124      else
14125        CPPFLAGS="$gl_save_CPPFLAGS"
14126      fi
14127    fi
14128    if test -z "$gl_have_pthread"; then
14129      if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
14130        if { case "$host_os" in
14131               mingw*) true;;
14132               *) false;;
14133             esac
14134           }; then
14135          gl_threads_api=win32
14136
14137$as_echo "#define USE_WIN32_THREADS 1" >>confdefs.h
14138
14139        fi
14140      fi
14141    fi
14142  fi
14143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
14144$as_echo_n "checking for multithread API to use... " >&6; }
14145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
14146$as_echo "$gl_threads_api" >&6; }
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159  for ac_header in stdlib.h
14160do :
14161  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
14162if test "x$ac_cv_header_stdlib_h" = x""yes; then :
14163  cat >>confdefs.h <<_ACEOF
14164#define HAVE_STDLIB_H 1
14165_ACEOF
14166
14167fi
14168
14169done
14170
14171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
14172$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
14173if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
14174  $as_echo_n "(cached) " >&6
14175else
14176  if test "$cross_compiling" = yes; then :
14177  ac_cv_func_malloc_0_nonnull=no
14178else
14179  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14180/* end confdefs.h.  */
14181#if defined STDC_HEADERS || defined HAVE_STDLIB_H
14182# include <stdlib.h>
14183#else
14184char *malloc ();
14185#endif
14186
14187int
14188main ()
14189{
14190return ! malloc (0);
14191  ;
14192  return 0;
14193}
14194_ACEOF
14195if ac_fn_c_try_run "$LINENO"; then :
14196  ac_cv_func_malloc_0_nonnull=yes
14197else
14198  ac_cv_func_malloc_0_nonnull=no
14199fi
14200rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14201  conftest.$ac_objext conftest.beam conftest.$ac_ext
14202fi
14203
14204fi
14205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
14206$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
14207if test $ac_cv_func_malloc_0_nonnull = yes; then :
14208  gl_cv_func_malloc_0_nonnull=1
14209else
14210  gl_cv_func_malloc_0_nonnull=0
14211fi
14212
14213
14214cat >>confdefs.h <<_ACEOF
14215#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
14216_ACEOF
14217
14218
14219
14220
14221
14222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5
14223$as_echo_n "checking whether mbrtowc and mbstate_t are properly declared... " >&6; }
14224if test "${ac_cv_func_mbrtowc+set}" = set; then :
14225  $as_echo_n "(cached) " >&6
14226else
14227  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14228/* end confdefs.h.  */
14229#include <wchar.h>
14230int
14231main ()
14232{
14233wchar_t wc;
14234	      char const s[] = "";
14235	      size_t n = 1;
14236	      mbstate_t state;
14237	      return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));
14238  ;
14239  return 0;
14240}
14241_ACEOF
14242if ac_fn_c_try_link "$LINENO"; then :
14243  ac_cv_func_mbrtowc=yes
14244else
14245  ac_cv_func_mbrtowc=no
14246fi
14247rm -f core conftest.err conftest.$ac_objext \
14248    conftest$ac_exeext conftest.$ac_ext
14249fi
14250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5
14251$as_echo "$ac_cv_func_mbrtowc" >&6; }
14252  if test $ac_cv_func_mbrtowc = yes; then
14253
14254$as_echo "#define HAVE_MBRTOWC 1" >>confdefs.h
14255
14256  fi
14257
14258
14259
14260
14261
14262
14263
14264
14265  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
14266$as_echo_n "checking for a traditional japanese locale... " >&6; }
14267if test "${gt_cv_locale_ja+set}" = set; then :
14268  $as_echo_n "(cached) " >&6
14269else
14270
14271    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14272/* end confdefs.h.  */
14273
14274#include <locale.h>
14275#include <time.h>
14276#if HAVE_LANGINFO_CODESET
14277# include <langinfo.h>
14278#endif
14279#include <stdlib.h>
14280#include <string.h>
14281struct tm t;
14282char buf[16];
14283int main ()
14284{
14285  const char *p;
14286  /* Check whether the given locale name is recognized by the system.  */
14287  if (setlocale (LC_ALL, "") == NULL) return 1;
14288  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14289     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14290     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14291     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14292     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14293     some unit tests fail.  */
14294#if HAVE_LANGINFO_CODESET
14295  {
14296    const char *cs = nl_langinfo (CODESET);
14297    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14298      return 1;
14299  }
14300#endif
14301#ifdef __CYGWIN__
14302  /* On Cygwin, avoid locale names without encoding suffix, because the
14303     locale_charset() function relies on the encoding suffix.  Note that
14304     LC_ALL is set on the command line.  */
14305  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14306#endif
14307  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
14308     on Cygwin 1.5.x.  */
14309  if (MB_CUR_MAX == 1)
14310    return 1;
14311  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14312     This excludes the UTF-8 encoding.  */
14313  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14314  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14315  for (p = buf; *p != '\0'; p++)
14316    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14317      return 1;
14318  return 0;
14319}
14320
14321_ACEOF
14322    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14323  (eval $ac_link) 2>&5
14324  ac_status=$?
14325  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14326  test $ac_status = 0; } && test -s conftest$ac_exeext; then
14327      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14328      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
14329      # configure script would override the LC_ALL setting. Likewise for
14330      # LC_CTYPE, which is also set at the beginning of the configure script.
14331      # Test for the AIX locale name.
14332      if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14333        gt_cv_locale_ja=ja_JP
14334      else
14335        # Test for the locale name with explicit encoding suffix.
14336        if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14337          gt_cv_locale_ja=ja_JP.EUC-JP
14338        else
14339          # Test for the HP-UX, OSF/1, NetBSD locale name.
14340          if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14341            gt_cv_locale_ja=ja_JP.eucJP
14342          else
14343            # Test for the IRIX, FreeBSD locale name.
14344            if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14345              gt_cv_locale_ja=ja_JP.EUC
14346            else
14347              # Test for the Solaris 7 locale name.
14348              if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14349                gt_cv_locale_ja=ja
14350              else
14351                # Special test for NetBSD 1.6.
14352                if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14353                  gt_cv_locale_ja=ja_JP.eucJP
14354                else
14355                  # None found.
14356                  gt_cv_locale_ja=none
14357                fi
14358              fi
14359            fi
14360          fi
14361        fi
14362      fi
14363    fi
14364    rm -fr conftest*
14365
14366fi
14367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14368$as_echo "$gt_cv_locale_ja" >&6; }
14369  LOCALE_JA=$gt_cv_locale_ja
14370
14371
14372
14373
14374
14375  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14376$as_echo_n "checking for a transitional chinese locale... " >&6; }
14377if test "${gt_cv_locale_zh_CN+set}" = set; then :
14378  $as_echo_n "(cached) " >&6
14379else
14380
14381    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14382/* end confdefs.h.  */
14383
14384#include <locale.h>
14385#include <stdlib.h>
14386#include <time.h>
14387#if HAVE_LANGINFO_CODESET
14388# include <langinfo.h>
14389#endif
14390#include <stdlib.h>
14391#include <string.h>
14392struct tm t;
14393char buf[16];
14394int main ()
14395{
14396  const char *p;
14397  /* Check whether the given locale name is recognized by the system.  */
14398  if (setlocale (LC_ALL, "") == NULL) return 1;
14399  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14400     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14401     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14402     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14403     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14404     some unit tests fail.  */
14405#if HAVE_LANGINFO_CODESET
14406  {
14407    const char *cs = nl_langinfo (CODESET);
14408    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14409      return 1;
14410  }
14411#endif
14412#ifdef __CYGWIN__
14413  /* On Cygwin, avoid locale names without encoding suffix, because the
14414     locale_charset() function relies on the encoding suffix.  Note that
14415     LC_ALL is set on the command line.  */
14416  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14417#endif
14418  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14419     This excludes the UTF-8 encoding.  */
14420  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14421  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14422  for (p = buf; *p != '\0'; p++)
14423    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14424      return 1;
14425  /* Check whether a typical GB18030 multibyte sequence is recognized as a
14426     single wide character.  This excludes the GB2312 and GBK encodings.  */
14427  if (mblen ("\203\062\332\066", 5) != 4)
14428    return 1;
14429  return 0;
14430}
14431
14432_ACEOF
14433    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14434  (eval $ac_link) 2>&5
14435  ac_status=$?
14436  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14437  test $ac_status = 0; } && test -s conftest$ac_exeext; then
14438      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14439      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
14440      # configure script would override the LC_ALL setting. Likewise for
14441      # LC_CTYPE, which is also set at the beginning of the configure script.
14442      # Test for the locale name without encoding suffix.
14443      if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14444        gt_cv_locale_zh_CN=zh_CN
14445      else
14446        # Test for the locale name with explicit encoding suffix.
14447        if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14448          gt_cv_locale_zh_CN=zh_CN.GB18030
14449        else
14450          # None found.
14451          gt_cv_locale_zh_CN=none
14452        fi
14453      fi
14454    else
14455      # If there was a link error, due to mblen(), the system is so old that
14456      # it certainly doesn't have a chinese locale.
14457      gt_cv_locale_zh_CN=none
14458    fi
14459    rm -fr conftest*
14460
14461fi
14462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
14463$as_echo "$gt_cv_locale_zh_CN" >&6; }
14464  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
14465
14466
14467
14468
14469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14470$as_echo_n "checking for a french Unicode locale... " >&6; }
14471if test "${gt_cv_locale_fr_utf8+set}" = set; then :
14472  $as_echo_n "(cached) " >&6
14473else
14474
14475    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14476/* end confdefs.h.  */
14477
14478#include <locale.h>
14479#include <time.h>
14480#if HAVE_LANGINFO_CODESET
14481# include <langinfo.h>
14482#endif
14483#include <stdlib.h>
14484#include <string.h>
14485struct tm t;
14486char buf[16];
14487int main () {
14488  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
14489     imitates locale dependent behaviour by looking at the environment
14490     variables, and all locales use the UTF-8 encoding.  */
14491#if !(defined __BEOS__ || defined __HAIKU__)
14492  /* Check whether the given locale name is recognized by the system.  */
14493  if (setlocale (LC_ALL, "") == NULL) return 1;
14494  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14495     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14496     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14497     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14498     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14499     some unit tests fail.  */
14500# if HAVE_LANGINFO_CODESET
14501  {
14502    const char *cs = nl_langinfo (CODESET);
14503    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14504      return 1;
14505  }
14506# endif
14507# ifdef __CYGWIN__
14508  /* On Cygwin, avoid locale names without encoding suffix, because the
14509     locale_charset() function relies on the encoding suffix.  Note that
14510     LC_ALL is set on the command line.  */
14511  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14512# endif
14513  /* Check whether in the abbreviation of the second month, the second
14514     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14515     two bytes long, with UTF-8 encoding.  */
14516  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14517  if (strftime (buf, sizeof (buf), "%b", &t) < 4
14518      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14519    return 1;
14520#endif
14521  /* Check whether the decimal separator is a comma.
14522     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14523     are nl_langinfo(RADIXCHAR) are both ".".  */
14524  if (localeconv () ->decimal_point[0] != ',') return 1;
14525  return 0;
14526}
14527
14528_ACEOF
14529    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14530  (eval $ac_link) 2>&5
14531  ac_status=$?
14532  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14533  test $ac_status = 0; } && test -s conftest$ac_exeext; then
14534      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14535      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
14536      # configure script would override the LC_ALL setting. Likewise for
14537      # LC_CTYPE, which is also set at the beginning of the configure script.
14538      # Test for the usual locale name.
14539      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14540        gt_cv_locale_fr_utf8=fr_FR
14541      else
14542        # Test for the locale name with explicit encoding suffix.
14543        if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14544          gt_cv_locale_fr_utf8=fr_FR.UTF-8
14545        else
14546          # Test for the Solaris 7 locale name.
14547          if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14548            gt_cv_locale_fr_utf8=fr.UTF-8
14549          else
14550            # None found.
14551            gt_cv_locale_fr_utf8=none
14552          fi
14553        fi
14554      fi
14555    fi
14556    rm -fr conftest*
14557
14558fi
14559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
14560$as_echo "$gt_cv_locale_fr_utf8" >&6; }
14561  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
14575
14576
14577
14578     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
14579$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
14580if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
14581  $as_echo_n "(cached) " >&6
14582else
14583
14584                  case "$host_os" in
14585              # Guess no on AIX and OSF/1.
14586        osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
14587              # Guess yes otherwise.
14588        *)    gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
14589      esac
14590      if test $LOCALE_JA != none; then
14591        if test "$cross_compiling" = yes; then :
14592  :
14593else
14594  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14595/* end confdefs.h.  */
14596
14597#include <locale.h>
14598#include <string.h>
14599#include <wchar.h>
14600int main ()
14601{
14602  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
14603    {
14604      const char input[] = "B\217\253\344\217\251\316er"; /* "B����er" */
14605      mbstate_t state;
14606      wchar_t wc;
14607
14608      memset (&state, '\0', sizeof (mbstate_t));
14609      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
14610        if (mbsinit (&state))
14611          return 1;
14612    }
14613  return 0;
14614}
14615_ACEOF
14616if ac_fn_c_try_run "$LINENO"; then :
14617  gl_cv_func_mbrtowc_incomplete_state=yes
14618else
14619  gl_cv_func_mbrtowc_incomplete_state=no
14620fi
14621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14622  conftest.$ac_objext conftest.beam conftest.$ac_ext
14623fi
14624
14625      fi
14626
14627fi
14628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
14629$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
14630
14631
14632
14633
14634     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
14635$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
14636if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
14637  $as_echo_n "(cached) " >&6
14638else
14639
14640                  case "$host_os" in
14641                    # Guess no on Solaris 8.
14642        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
14643                    # Guess yes otherwise.
14644        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
14645      esac
14646      if test $LOCALE_ZH_CN != none; then
14647        if test "$cross_compiling" = yes; then :
14648  :
14649else
14650  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14651/* end confdefs.h.  */
14652
14653#include <locale.h>
14654#include <stdlib.h>
14655#include <string.h>
14656#include <wchar.h>
14657int main ()
14658{
14659  /* This fails on Solaris 8:
14660     mbrtowc returns 2, and sets wc to 0x00F0.
14661     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
14662  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
14663    {
14664      char input[] = "B\250\271\201\060\211\070er"; /* "B����er" */
14665      mbstate_t state;
14666      wchar_t wc;
14667
14668      memset (&state, '\0', sizeof (mbstate_t));
14669      if (mbrtowc (&wc, input + 3, 6, &state) != 4
14670          && mbtowc (&wc, input + 3, 6) == 4)
14671        return 1;
14672    }
14673  return 0;
14674}
14675_ACEOF
14676if ac_fn_c_try_run "$LINENO"; then :
14677  gl_cv_func_mbrtowc_sanitycheck=yes
14678else
14679  gl_cv_func_mbrtowc_sanitycheck=no
14680fi
14681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14682  conftest.$ac_objext conftest.beam conftest.$ac_ext
14683fi
14684
14685      fi
14686
14687fi
14688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
14689$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
14690
14691    REPLACE_MBSTATE_T=0
14692    case "$gl_cv_func_mbrtowc_incomplete_state" in
14693      *yes) ;;
14694      *) REPLACE_MBSTATE_T=1 ;;
14695    esac
14696    case "$gl_cv_func_mbrtowc_sanitycheck" in
14697      *yes) ;;
14698      *) REPLACE_MBSTATE_T=1 ;;
14699    esac
14700  else
14701    REPLACE_MBSTATE_T=1
14702  fi
14703  if test $REPLACE_MBSTATE_T = 1; then
14704
14705    :
14706
14707  fi
14708
14709  if test $REPLACE_MBSTATE_T = 1; then
14710    REPLACE_MBRTOWC=1
14711  fi
14712
14713  if test $ac_cv_func_mbrtowc = no; then
14714    HAVE_MBRTOWC=0
14715  fi
14716  if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then
14717
14718
14719
14720     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
14721$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
14722if test "${gl_cv_func_mbrtowc_null_arg+set}" = set; then :
14723  $as_echo_n "(cached) " >&6
14724else
14725
14726                  case "$host_os" in
14727              # Guess no on OSF/1.
14728        osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;;
14729              # Guess yes otherwise.
14730        *)    gl_cv_func_mbrtowc_null_arg="guessing yes" ;;
14731      esac
14732      if test $LOCALE_FR_UTF8 != none; then
14733        if test "$cross_compiling" = yes; then :
14734  :
14735else
14736  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14737/* end confdefs.h.  */
14738
14739#include <locale.h>
14740#include <string.h>
14741#include <wchar.h>
14742int main ()
14743{
14744  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
14745    {
14746      mbstate_t state;
14747      wchar_t wc;
14748      int ret;
14749
14750      memset (&state, '\0', sizeof (mbstate_t));
14751      wc = (wchar_t) 0xBADFACE;
14752      mbrtowc (&wc, NULL, 5, &state);
14753      /* Check that wc was not modified.  */
14754      if (wc != (wchar_t) 0xBADFACE)
14755        return 1;
14756    }
14757  return 0;
14758}
14759_ACEOF
14760if ac_fn_c_try_run "$LINENO"; then :
14761  gl_cv_func_mbrtowc_null_arg=yes
14762else
14763  gl_cv_func_mbrtowc_null_arg=no
14764fi
14765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14766  conftest.$ac_objext conftest.beam conftest.$ac_ext
14767fi
14768
14769      fi
14770
14771fi
14772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg" >&5
14773$as_echo "$gl_cv_func_mbrtowc_null_arg" >&6; }
14774
14775
14776
14777
14778
14779     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
14780$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
14781if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
14782  $as_echo_n "(cached) " >&6
14783else
14784
14785                  case "$host_os" in
14786                          # Guess no on HP-UX and Solaris.
14787        hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;;
14788                          # Guess yes otherwise.
14789        *)                gl_cv_func_mbrtowc_retval="guessing yes" ;;
14790      esac
14791      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
14792        if test "$cross_compiling" = yes; then :
14793  :
14794else
14795  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14796/* end confdefs.h.  */
14797
14798#include <locale.h>
14799#include <string.h>
14800#include <wchar.h>
14801int main ()
14802{
14803  /* This fails on Solaris.  */
14804  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
14805    {
14806      char input[] = "B\303\274\303\237er"; /* "B����er" */
14807      mbstate_t state;
14808      wchar_t wc;
14809
14810      memset (&state, '\0', sizeof (mbstate_t));
14811      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
14812        {
14813          input[1] = '\0';
14814          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
14815            return 1;
14816        }
14817    }
14818  /* This fails on HP-UX 11.11.  */
14819  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
14820    {
14821      char input[] = "B\217\253\344\217\251\316er"; /* "B����er" */
14822      mbstate_t state;
14823      wchar_t wc;
14824
14825      memset (&state, '\0', sizeof (mbstate_t));
14826      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
14827        {
14828          input[1] = '\0';
14829          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
14830            return 1;
14831        }
14832    }
14833  return 0;
14834}
14835_ACEOF
14836if ac_fn_c_try_run "$LINENO"; then :
14837  gl_cv_func_mbrtowc_retval=yes
14838else
14839  gl_cv_func_mbrtowc_retval=no
14840fi
14841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14842  conftest.$ac_objext conftest.beam conftest.$ac_ext
14843fi
14844
14845      fi
14846
14847fi
14848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
14849$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
14850
14851
14852
14853
14854     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
14855$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
14856if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
14857  $as_echo_n "(cached) " >&6
14858else
14859
14860                  case "$host_os" in
14861                       # Guess no on Solaris 8 and 9.
14862        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
14863                       # Guess yes otherwise.
14864        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
14865      esac
14866      if test $LOCALE_ZH_CN != none; then
14867        if test "$cross_compiling" = yes; then :
14868  :
14869else
14870  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14871/* end confdefs.h.  */
14872
14873#include <locale.h>
14874#include <string.h>
14875#include <wchar.h>
14876int main ()
14877{
14878  /* This fails on Solaris 8 and 9.  */
14879  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
14880    {
14881      mbstate_t state;
14882      wchar_t wc;
14883
14884      memset (&state, '\0', sizeof (mbstate_t));
14885      if (mbrtowc (&wc, "", 1, &state) != 0)
14886        return 1;
14887    }
14888  return 0;
14889}
14890_ACEOF
14891if ac_fn_c_try_run "$LINENO"; then :
14892  gl_cv_func_mbrtowc_nul_retval=yes
14893else
14894  gl_cv_func_mbrtowc_nul_retval=no
14895fi
14896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14897  conftest.$ac_objext conftest.beam conftest.$ac_ext
14898fi
14899
14900      fi
14901
14902fi
14903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
14904$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
14905
14906    case "$gl_cv_func_mbrtowc_null_arg" in
14907      *yes) ;;
14908      *)
14909$as_echo "#define MBRTOWC_NULL_ARG_BUG 1" >>confdefs.h
14910
14911         REPLACE_MBRTOWC=1
14912         ;;
14913    esac
14914    case "$gl_cv_func_mbrtowc_retval" in
14915      *yes) ;;
14916      *)
14917$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
14918
14919         REPLACE_MBRTOWC=1
14920         ;;
14921    esac
14922    case "$gl_cv_func_mbrtowc_nul_retval" in
14923      *yes) ;;
14924      *)
14925$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
14926
14927         REPLACE_MBRTOWC=1
14928         ;;
14929    esac
14930  fi
14931  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
14932
14933    :
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943  gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
14944
14945
14946  :
14947
14948  fi
14949
14950
14951
14952
14953  GNULIB_MEMCHR=0;
14954  GNULIB_MEMMEM=0;
14955  GNULIB_MEMPCPY=0;
14956  GNULIB_MEMRCHR=0;
14957  GNULIB_RAWMEMCHR=0;
14958  GNULIB_STPCPY=0;
14959  GNULIB_STPNCPY=0;
14960  GNULIB_STRCHRNUL=0;
14961  GNULIB_STRDUP=0;
14962  GNULIB_STRNDUP=0;
14963  GNULIB_STRNLEN=0;
14964  GNULIB_STRPBRK=0;
14965  GNULIB_STRSEP=0;
14966  GNULIB_STRSTR=0;
14967  GNULIB_STRCASESTR=0;
14968  GNULIB_STRTOK_R=0;
14969  GNULIB_MBSLEN=0;
14970  GNULIB_MBSNLEN=0;
14971  GNULIB_MBSCHR=0;
14972  GNULIB_MBSRCHR=0;
14973  GNULIB_MBSSTR=0;
14974  GNULIB_MBSCASECMP=0;
14975  GNULIB_MBSNCASECMP=0;
14976  GNULIB_MBSPCASECMP=0;
14977  GNULIB_MBSCASESTR=0;
14978  GNULIB_MBSCSPN=0;
14979  GNULIB_MBSPBRK=0;
14980  GNULIB_MBSSPN=0;
14981  GNULIB_MBSSEP=0;
14982  GNULIB_MBSTOK_R=0;
14983  GNULIB_STRERROR=0;
14984  GNULIB_STRSIGNAL=0;
14985  GNULIB_STRVERSCMP=0;
14986  HAVE_MBSLEN=0;
14987    HAVE_DECL_MEMMEM=1;
14988  HAVE_MEMPCPY=1;
14989  HAVE_DECL_MEMRCHR=1;
14990  HAVE_RAWMEMCHR=1;
14991  HAVE_STPCPY=1;
14992  HAVE_STPNCPY=1;
14993  HAVE_STRCHRNUL=1;
14994  HAVE_DECL_STRDUP=1;
14995  HAVE_DECL_STRNDUP=1;
14996  HAVE_DECL_STRNLEN=1;
14997  HAVE_STRPBRK=1;
14998  HAVE_STRSEP=1;
14999  HAVE_STRCASESTR=1;
15000  HAVE_DECL_STRTOK_R=1;
15001  HAVE_DECL_STRERROR=1;
15002  HAVE_DECL_STRSIGNAL=1;
15003  HAVE_STRVERSCMP=1;
15004  REPLACE_MEMCHR=0;
15005  REPLACE_MEMMEM=0;
15006  REPLACE_STRDUP=0;
15007  REPLACE_STRSTR=0;
15008  REPLACE_STRCASESTR=0;
15009  REPLACE_STRERROR=0;
15010  REPLACE_STRNDUP=0;
15011  REPLACE_STRSIGNAL=0;
15012  REPLACE_STRTOK_R=0;
15013  UNDEFINE_STRTOK_R=0;
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
15031  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
15032  # irrelevant for anonymous mappings.
15033  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
15034if test "x$ac_cv_func_mmap" = x""yes; then :
15035  gl_have_mmap=yes
15036else
15037  gl_have_mmap=no
15038fi
15039
15040
15041  # Try to allow MAP_ANONYMOUS.
15042  gl_have_mmap_anonymous=no
15043  if test $gl_have_mmap = yes; then
15044    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
15045$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
15046    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15047/* end confdefs.h.  */
15048
15049#include <sys/mman.h>
15050#ifdef MAP_ANONYMOUS
15051    I cant identify this map.
15052#endif
15053
15054_ACEOF
15055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15056  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
15057  gl_have_mmap_anonymous=yes
15058fi
15059rm -f conftest*
15060
15061    if test $gl_have_mmap_anonymous != yes; then
15062      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15063/* end confdefs.h.  */
15064
15065#include <sys/mman.h>
15066#ifdef MAP_ANON
15067    I cant identify this map.
15068#endif
15069
15070_ACEOF
15071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15072  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
15073
15074$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
15075
15076         gl_have_mmap_anonymous=yes
15077fi
15078rm -f conftest*
15079
15080    fi
15081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
15082$as_echo "$gl_have_mmap_anonymous" >&6; }
15083    if test $gl_have_mmap_anonymous = yes; then
15084
15085$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
15086
15087    fi
15088  fi
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102  for ac_func in memchr
15103do :
15104  ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr"
15105if test "x$ac_cv_func_memchr" = x""yes; then :
15106  cat >>confdefs.h <<_ACEOF
15107#define HAVE_MEMCHR 1
15108_ACEOF
15109
15110else
15111
15112    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
15113
15114fi
15115done
15116
15117
15118  if test $ac_cv_func_memchr = no; then
15119
15120  for ac_header in bp-sym.h
15121do :
15122  ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
15123if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
15124  cat >>confdefs.h <<_ACEOF
15125#define HAVE_BP_SYM_H 1
15126_ACEOF
15127
15128fi
15129
15130done
15131
15132
15133    REPLACE_MEMCHR=1
15134  fi
15135
15136  if test $ac_cv_func_memchr = yes; then
15137    # Detect platform-specific bugs in some versions of glibc:
15138    # memchr should not dereference anything with length 0
15139    #   http://bugzilla.redhat.com/499689
15140    # memchr should not dereference overestimated length after a match
15141    #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
15142    #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
15143    # Assume that memchr works on platforms that lack mprotect.
15144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
15145$as_echo_n "checking whether memchr works... " >&6; }
15146if test "${gl_cv_func_memchr_works+set}" = set; then :
15147  $as_echo_n "(cached) " >&6
15148else
15149  if test "$cross_compiling" = yes; then :
15150         gl_cv_func_memchr_works="guessing no"
15151else
15152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15153/* end confdefs.h.  */
15154
15155#include <string.h>
15156#if HAVE_SYS_MMAN_H
15157# include <fcntl.h>
15158# include <unistd.h>
15159# include <sys/types.h>
15160# include <sys/mman.h>
15161# ifndef MAP_FILE
15162#  define MAP_FILE 0
15163# endif
15164#endif
15165
15166int
15167main ()
15168{
15169
15170  char *fence = NULL;
15171#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
15172# if HAVE_MAP_ANONYMOUS
15173  const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
15174  const int fd = -1;
15175# else /* !HAVE_MAP_ANONYMOUS */
15176  const int flags = MAP_FILE | MAP_PRIVATE;
15177  int fd = open ("/dev/zero", O_RDONLY, 0666);
15178  if (fd >= 0)
15179# endif
15180    {
15181      int pagesize = getpagesize ();
15182      char *two_pages =
15183        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
15184                       flags, fd, 0);
15185      if (two_pages != (char *)(-1)
15186          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
15187        fence = two_pages + pagesize;
15188    }
15189#endif
15190  if (fence)
15191    {
15192      if (memchr (fence, 0, 0))
15193        return 1;
15194      strcpy (fence - 9, "12345678");
15195      if (memchr (fence - 9, 0, 79) != fence - 1)
15196        return 2;
15197    }
15198  return 0;
15199
15200  ;
15201  return 0;
15202}
15203_ACEOF
15204if ac_fn_c_try_run "$LINENO"; then :
15205  gl_cv_func_memchr_works=yes
15206else
15207  gl_cv_func_memchr_works=no
15208fi
15209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15210  conftest.$ac_objext conftest.beam conftest.$ac_ext
15211fi
15212
15213fi
15214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
15215$as_echo "$gl_cv_func_memchr_works" >&6; }
15216    if test "$gl_cv_func_memchr_works" != yes; then
15217
15218  for ac_header in bp-sym.h
15219do :
15220  ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
15221if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
15222  cat >>confdefs.h <<_ACEOF
15223#define HAVE_BP_SYM_H 1
15224_ACEOF
15225
15226fi
15227
15228done
15229
15230
15231      REPLACE_MEMCHR=1
15232
15233
15234
15235
15236
15237
15238
15239
15240  gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
15241
15242    fi
15243  fi
15244
15245ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
15246if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
15247  ac_have_decl=1
15248else
15249  ac_have_decl=0
15250fi
15251
15252cat >>confdefs.h <<_ACEOF
15253#define HAVE_DECL_MEMRCHR $ac_have_decl
15254_ACEOF
15255
15256
15257
15258
15259
15260
15261
15262# Check whether --enable-largefile was given.
15263if test "${enable_largefile+set}" = set; then :
15264  enableval=$enable_largefile;
15265fi
15266
15267if test "$enable_largefile" != no; then
15268
15269  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15270$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15271if test "${ac_cv_sys_largefile_CC+set}" = set; then :
15272  $as_echo_n "(cached) " >&6
15273else
15274  ac_cv_sys_largefile_CC=no
15275     if test "$GCC" != yes; then
15276       ac_save_CC=$CC
15277       while :; do
15278	 # IRIX 6.2 and later do not support large files by default,
15279	 # so use the C compiler's -n32 option if that helps.
15280	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15281/* end confdefs.h.  */
15282#include <sys/types.h>
15283 /* Check that off_t can represent 2**63 - 1 correctly.
15284    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15285    since some C++ compilers masquerading as C compilers
15286    incorrectly reject 9223372036854775807.  */
15287#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15288  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15289		       && LARGE_OFF_T % 2147483647 == 1)
15290		      ? 1 : -1];
15291int
15292main ()
15293{
15294
15295  ;
15296  return 0;
15297}
15298_ACEOF
15299	 if ac_fn_c_try_compile "$LINENO"; then :
15300  break
15301fi
15302rm -f core conftest.err conftest.$ac_objext
15303	 CC="$CC -n32"
15304	 if ac_fn_c_try_compile "$LINENO"; then :
15305  ac_cv_sys_largefile_CC=' -n32'; break
15306fi
15307rm -f core conftest.err conftest.$ac_objext
15308	 break
15309       done
15310       CC=$ac_save_CC
15311       rm -f conftest.$ac_ext
15312    fi
15313fi
15314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15315$as_echo "$ac_cv_sys_largefile_CC" >&6; }
15316  if test "$ac_cv_sys_largefile_CC" != no; then
15317    CC=$CC$ac_cv_sys_largefile_CC
15318  fi
15319
15320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15321$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15322if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
15323  $as_echo_n "(cached) " >&6
15324else
15325  while :; do
15326  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15327/* end confdefs.h.  */
15328#include <sys/types.h>
15329 /* Check that off_t can represent 2**63 - 1 correctly.
15330    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15331    since some C++ compilers masquerading as C compilers
15332    incorrectly reject 9223372036854775807.  */
15333#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15334  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15335		       && LARGE_OFF_T % 2147483647 == 1)
15336		      ? 1 : -1];
15337int
15338main ()
15339{
15340
15341  ;
15342  return 0;
15343}
15344_ACEOF
15345if ac_fn_c_try_compile "$LINENO"; then :
15346  ac_cv_sys_file_offset_bits=no; break
15347fi
15348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15349  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15350/* end confdefs.h.  */
15351#define _FILE_OFFSET_BITS 64
15352#include <sys/types.h>
15353 /* Check that off_t can represent 2**63 - 1 correctly.
15354    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15355    since some C++ compilers masquerading as C compilers
15356    incorrectly reject 9223372036854775807.  */
15357#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15358  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15359		       && LARGE_OFF_T % 2147483647 == 1)
15360		      ? 1 : -1];
15361int
15362main ()
15363{
15364
15365  ;
15366  return 0;
15367}
15368_ACEOF
15369if ac_fn_c_try_compile "$LINENO"; then :
15370  ac_cv_sys_file_offset_bits=64; break
15371fi
15372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15373  ac_cv_sys_file_offset_bits=unknown
15374  break
15375done
15376fi
15377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15378$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15379case $ac_cv_sys_file_offset_bits in #(
15380  no | unknown) ;;
15381  *)
15382cat >>confdefs.h <<_ACEOF
15383#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15384_ACEOF
15385;;
15386esac
15387rm -rf conftest*
15388  if test $ac_cv_sys_file_offset_bits = unknown; then
15389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15390$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15391if test "${ac_cv_sys_large_files+set}" = set; then :
15392  $as_echo_n "(cached) " >&6
15393else
15394  while :; do
15395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15396/* end confdefs.h.  */
15397#include <sys/types.h>
15398 /* Check that off_t can represent 2**63 - 1 correctly.
15399    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15400    since some C++ compilers masquerading as C compilers
15401    incorrectly reject 9223372036854775807.  */
15402#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15403  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15404		       && LARGE_OFF_T % 2147483647 == 1)
15405		      ? 1 : -1];
15406int
15407main ()
15408{
15409
15410  ;
15411  return 0;
15412}
15413_ACEOF
15414if ac_fn_c_try_compile "$LINENO"; then :
15415  ac_cv_sys_large_files=no; break
15416fi
15417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15418  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15419/* end confdefs.h.  */
15420#define _LARGE_FILES 1
15421#include <sys/types.h>
15422 /* Check that off_t can represent 2**63 - 1 correctly.
15423    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15424    since some C++ compilers masquerading as C compilers
15425    incorrectly reject 9223372036854775807.  */
15426#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15427  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15428		       && LARGE_OFF_T % 2147483647 == 1)
15429		      ? 1 : -1];
15430int
15431main ()
15432{
15433
15434  ;
15435  return 0;
15436}
15437_ACEOF
15438if ac_fn_c_try_compile "$LINENO"; then :
15439  ac_cv_sys_large_files=1; break
15440fi
15441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15442  ac_cv_sys_large_files=unknown
15443  break
15444done
15445fi
15446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15447$as_echo "$ac_cv_sys_large_files" >&6; }
15448case $ac_cv_sys_large_files in #(
15449  no | unknown) ;;
15450  *)
15451cat >>confdefs.h <<_ACEOF
15452#define _LARGE_FILES $ac_cv_sys_large_files
15453_ACEOF
15454;;
15455esac
15456rm -rf conftest*
15457  fi
15458fi
15459
15460
15461        REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
15462  REPLACE_MKTIME=GNULIB_PORTCHECK;
15463  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
15464  REPLACE_STRPTIME=GNULIB_PORTCHECK;
15465  REPLACE_TIMEGM=GNULIB_PORTCHECK;
15466
15467
15468
15469
15470
15471
15472  GNULIB_SELECT=0;
15473    REPLACE_SELECT=0;
15474
15475
15476
15477
15478
15479
15480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
15481$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
15482if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
15483  $as_echo_n "(cached) " >&6
15484else
15485
15486                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15487/* end confdefs.h.  */
15488#include <sys/select.h>
15489int
15490main ()
15491{
15492struct timeval b;
15493  ;
15494  return 0;
15495}
15496_ACEOF
15497if ac_fn_c_try_compile "$LINENO"; then :
15498  gl_cv_header_sys_select_h_selfcontained=yes
15499else
15500  gl_cv_header_sys_select_h_selfcontained=no
15501fi
15502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15503                        if test $gl_cv_header_sys_select_h_selfcontained = yes; then
15504        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15505/* end confdefs.h.  */
15506#include <sys/select.h>
15507int
15508main ()
15509{
15510int memset; int bzero;
15511  ;
15512  return 0;
15513}
15514
15515_ACEOF
15516if ac_fn_c_try_compile "$LINENO"; then :
15517  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15518/* end confdefs.h.  */
15519#include <sys/select.h>
15520int
15521main ()
15522{
15523
15524                  #undef memset
15525                  #define memset nonexistent_memset
15526                  extern void *memset (void *, int, unsigned long);
15527                  #undef bzero
15528                  #define bzero nonexistent_bzero
15529                  extern void bzero (void *, unsigned long);
15530                  fd_set fds;
15531                  FD_ZERO (&fds);
15532
15533  ;
15534  return 0;
15535}
15536
15537_ACEOF
15538if ac_fn_c_try_link "$LINENO"; then :
15539
15540else
15541  gl_cv_header_sys_select_h_selfcontained=no
15542fi
15543rm -f core conftest.err conftest.$ac_objext \
15544    conftest$ac_exeext conftest.$ac_ext
15545
15546fi
15547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15548      fi
15549
15550fi
15551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
15552$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
15553
15554
15555
15556
15557
15558
15559
15560     if test $gl_cv_have_include_next = yes; then
15561       gl_cv_next_sys_select_h='<'sys/select.h'>'
15562     else
15563       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
15564$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
15565if test "${gl_cv_next_sys_select_h+set}" = set; then :
15566  $as_echo_n "(cached) " >&6
15567else
15568
15569          if test $ac_cv_header_sys_select_h = yes; then
15570            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15571/* end confdefs.h.  */
15572#include <sys/select.h>
15573
15574_ACEOF
15575                                                                                                case "$host_os" in
15576              aix*) gl_absname_cpp="$ac_cpp -C" ;;
15577              *)    gl_absname_cpp="$ac_cpp" ;;
15578            esac
15579                                                gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15580               sed -n '\#/sys/select.h#{
15581                 s#.*"\(.*/sys/select.h\)".*#\1#
15582                 s#^/[^/]#//&#
15583                 p
15584                 q
15585               }'`'"'
15586          else
15587            gl_cv_next_sys_select_h='<'sys/select.h'>'
15588          fi
15589
15590fi
15591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
15592$as_echo "$gl_cv_next_sys_select_h" >&6; }
15593     fi
15594     NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
15595
15596     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15597       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15598       gl_next_as_first_directive='<'sys/select.h'>'
15599     else
15600       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15601       gl_next_as_first_directive=$gl_cv_next_sys_select_h
15602     fi
15603     NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
15604
15605
15606
15607  if test $ac_cv_header_sys_select_h = yes; then
15608    HAVE_SYS_SELECT_H=1
15609  else
15610    HAVE_SYS_SELECT_H=0
15611  fi
15612
15613  if test $gl_cv_header_sys_select_h_selfcontained != yes; then
15614
15615
15616
15617
15618  if test $ac_cv_header_sys_socket_h != yes; then
15619                    for ac_header in winsock2.h
15620do :
15621  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
15622if test "x$ac_cv_header_winsock2_h" = x""yes; then :
15623  cat >>confdefs.h <<_ACEOF
15624#define HAVE_WINSOCK2_H 1
15625_ACEOF
15626
15627fi
15628
15629done
15630
15631  fi
15632  if test "$ac_cv_header_winsock2_h" = yes; then
15633    HAVE_WINSOCK2_H=1
15634    UNISTD_H_HAVE_WINSOCK2_H=1
15635    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
15636  else
15637    HAVE_WINSOCK2_H=0
15638  fi
15639
15640
15641  fi
15642
15643
15644
15645
15646
15647
15648
15649
15650  if test $ac_cv_header_sys_socket_h != yes; then
15651                    for ac_header in winsock2.h
15652do :
15653  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
15654if test "x$ac_cv_header_winsock2_h" = x""yes; then :
15655  cat >>confdefs.h <<_ACEOF
15656#define HAVE_WINSOCK2_H 1
15657_ACEOF
15658
15659fi
15660
15661done
15662
15663  fi
15664  if test "$ac_cv_header_winsock2_h" = yes; then
15665    HAVE_WINSOCK2_H=1
15666    UNISTD_H_HAVE_WINSOCK2_H=1
15667    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
15668  else
15669    HAVE_WINSOCK2_H=0
15670  fi
15671
15672   LIBSOCKET=
15673  if test $HAVE_WINSOCK2_H = 1; then
15674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5
15675$as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; }
15676if test "${gl_cv_func_wsastartup+set}" = set; then :
15677  $as_echo_n "(cached) " >&6
15678else
15679
15680      gl_save_LIBS="$LIBS"
15681      LIBS="$LIBS -lws2_32"
15682      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15683/* end confdefs.h.  */
15684
15685#ifdef HAVE_WINSOCK2_H
15686# include <winsock2.h>
15687#endif
15688int
15689main ()
15690{
15691
15692          WORD wVersionRequested = MAKEWORD(1, 1);
15693          WSADATA wsaData;
15694          int err = WSAStartup(wVersionRequested, &wsaData);
15695          WSACleanup ();
15696  ;
15697  return 0;
15698}
15699_ACEOF
15700if ac_fn_c_try_link "$LINENO"; then :
15701  gl_cv_func_wsastartup=yes
15702else
15703  gl_cv_func_wsastartup=no
15704fi
15705rm -f core conftest.err conftest.$ac_objext \
15706    conftest$ac_exeext conftest.$ac_ext
15707      LIBS="$gl_save_LIBS"
15708
15709fi
15710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
15711$as_echo "$gl_cv_func_wsastartup" >&6; }
15712    if test "$gl_cv_func_wsastartup" = "yes"; then
15713
15714$as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
15715
15716      LIBSOCKET='-lws2_32'
15717    fi
15718  else
15719                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
15720$as_echo_n "checking for library containing setsockopt... " >&6; }
15721if test "${gl_cv_lib_socket+set}" = set; then :
15722  $as_echo_n "(cached) " >&6
15723else
15724
15725      gl_cv_lib_socket=
15726      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15727/* end confdefs.h.  */
15728extern
15729#ifdef __cplusplus
15730"C"
15731#endif
15732char setsockopt();
15733int
15734main ()
15735{
15736setsockopt();
15737  ;
15738  return 0;
15739}
15740_ACEOF
15741if ac_fn_c_try_link "$LINENO"; then :
15742
15743else
15744  gl_save_LIBS="$LIBS"
15745         LIBS="$gl_save_LIBS -lsocket"
15746         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15747/* end confdefs.h.  */
15748extern
15749#ifdef __cplusplus
15750"C"
15751#endif
15752char setsockopt();
15753int
15754main ()
15755{
15756setsockopt();
15757  ;
15758  return 0;
15759}
15760_ACEOF
15761if ac_fn_c_try_link "$LINENO"; then :
15762  gl_cv_lib_socket="-lsocket"
15763fi
15764rm -f core conftest.err conftest.$ac_objext \
15765    conftest$ac_exeext conftest.$ac_ext
15766         if test -z "$gl_cv_lib_socket"; then
15767           LIBS="$gl_save_LIBS -lnetwork"
15768           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15769/* end confdefs.h.  */
15770extern
15771#ifdef __cplusplus
15772"C"
15773#endif
15774char setsockopt();
15775int
15776main ()
15777{
15778setsockopt();
15779  ;
15780  return 0;
15781}
15782_ACEOF
15783if ac_fn_c_try_link "$LINENO"; then :
15784  gl_cv_lib_socket="-lnetwork"
15785fi
15786rm -f core conftest.err conftest.$ac_objext \
15787    conftest$ac_exeext conftest.$ac_ext
15788           if test -z "$gl_cv_lib_socket"; then
15789             LIBS="$gl_save_LIBS -lnet"
15790             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15791/* end confdefs.h.  */
15792extern
15793#ifdef __cplusplus
15794"C"
15795#endif
15796char setsockopt();
15797int
15798main ()
15799{
15800setsockopt();
15801  ;
15802  return 0;
15803}
15804_ACEOF
15805if ac_fn_c_try_link "$LINENO"; then :
15806  gl_cv_lib_socket="-lnet"
15807fi
15808rm -f core conftest.err conftest.$ac_objext \
15809    conftest$ac_exeext conftest.$ac_ext
15810           fi
15811         fi
15812         LIBS="$gl_save_LIBS"
15813
15814fi
15815rm -f core conftest.err conftest.$ac_objext \
15816    conftest$ac_exeext conftest.$ac_ext
15817      if test -z "$gl_cv_lib_socket"; then
15818        gl_cv_lib_socket="none needed"
15819      fi
15820
15821fi
15822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
15823$as_echo "$gl_cv_lib_socket" >&6; }
15824    if test "$gl_cv_lib_socket" != "none needed"; then
15825      LIBSOCKET="$gl_cv_lib_socket"
15826    fi
15827  fi
15828
15829
15830  :
15831
15832
15833
15834
15835
15836  if test "$ac_cv_header_winsock2_h" = yes; then
15837
15838
15839
15840
15841
15842
15843
15844
15845  gl_LIBOBJS="$gl_LIBOBJS select.$ac_objext"
15846
15847  else
15848
15849    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
15850$as_echo_n "checking whether select supports a 0 argument... " >&6; }
15851if test "${gl_cv_func_select_supports0+set}" = set; then :
15852  $as_echo_n "(cached) " >&6
15853else
15854
15855        if test "$cross_compiling" = yes; then :
15856
15857           case "$host_os" in
15858                       # Guess no on Interix.
15859             interix*) gl_cv_func_select_supports0="guessing no";;
15860                       # Guess yes otherwise.
15861             *)        gl_cv_func_select_supports0="guessing yes";;
15862           esac
15863
15864else
15865  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15866/* end confdefs.h.  */
15867
15868#include <sys/types.h>
15869#include <sys/time.h>
15870#if HAVE_SYS_SELECT_H
15871#include <sys/select.h>
15872#endif
15873int main ()
15874{
15875  struct timeval timeout;
15876  timeout.tv_sec = 0;
15877  timeout.tv_usec = 5;
15878  return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
15879}
15880_ACEOF
15881if ac_fn_c_try_run "$LINENO"; then :
15882  gl_cv_func_select_supports0=yes
15883else
15884  gl_cv_func_select_supports0=no
15885fi
15886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15887  conftest.$ac_objext conftest.beam conftest.$ac_ext
15888fi
15889
15890
15891fi
15892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
15893$as_echo "$gl_cv_func_select_supports0" >&6; }
15894    case "$gl_cv_func_select_supports0" in
15895      *yes) ;;
15896      *)
15897        REPLACE_SELECT=1
15898
15899
15900
15901
15902
15903
15904
15905
15906  gl_LIBOBJS="$gl_LIBOBJS select.$ac_objext"
15907
15908        ;;
15909    esac
15910  fi
15911
15912
15913
15914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for external symbol _system_configuration" >&5
15915$as_echo_n "checking for external symbol _system_configuration... " >&6; }
15916if test "${gl_cv_var__system_configuration+set}" = set; then :
15917  $as_echo_n "(cached) " >&6
15918else
15919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15920/* end confdefs.h.  */
15921#include <sys/systemcfg.h>
15922
15923int
15924main ()
15925{
15926double x = _system_configuration.physmem;
15927                        if (x > 0.0) return 0;
15928  ;
15929  return 0;
15930}
15931_ACEOF
15932if ac_fn_c_try_link "$LINENO"; then :
15933  gl_cv_var__system_configuration=yes
15934else
15935  gl_cv_var__system_configuration=no
15936fi
15937rm -f core conftest.err conftest.$ac_objext \
15938    conftest$ac_exeext conftest.$ac_ext
15939fi
15940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var__system_configuration" >&5
15941$as_echo "$gl_cv_var__system_configuration" >&6; }
15942
15943    if test $gl_cv_var__system_configuration = yes; then
15944
15945$as_echo "#define HAVE__SYSTEM_CONFIGURATION 1" >>confdefs.h
15946
15947    fi
15948
15949
15950
15951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for desired default level of POSIX conformance" >&5
15952$as_echo_n "checking for desired default level of POSIX conformance... " >&6; }
15953  gl_default_posix2_version=none-specified
15954  if test -n "$ac_cv_env_DEFAULT_POSIX2_VERSION_set"; then
15955    gl_default_posix2_version=$ac_cv_env_DEFAULT_POSIX2_VERSION_value
15956
15957cat >>confdefs.h <<_ACEOF
15958#define DEFAULT_POSIX2_VERSION $gl_default_posix2_version
15959_ACEOF
15960
15961  fi
15962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_default_posix2_version" >&5
15963$as_echo "$gl_default_posix2_version" >&6; }
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987  for ac_func in rmdir
15988do :
15989  ac_fn_c_check_func "$LINENO" "rmdir" "ac_cv_func_rmdir"
15990if test "x$ac_cv_func_rmdir" = x""yes; then :
15991  cat >>confdefs.h <<_ACEOF
15992#define HAVE_RMDIR 1
15993_ACEOF
15994
15995else
15996
15997    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
15998
15999fi
16000done
16001
16002
16003  if test $ac_cv_func_rmdir = no; then
16004    REPLACE_RMDIR=1
16005    # If someone lacks rmdir, make configure fail, and request
16006    # a bug report to inform us about it.
16007    if test x"$SKIP_RMDIR_CHECK" != xyes; then
16008      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16010as_fn_error "Your system lacks the rmdir function.
16011              Please report this, along with the output of \"uname -a\", to the
16012              bug-coreutils@gnu.org mailing list.  To continue past this point,
16013              rerun configure with SKIP_RMDIR_CHECK=yes.
16014              E.g., ./configure SKIP_RMDIR_CHECK=yes
16015See \`config.log' for more details." "$LINENO" 5; }
16016    fi
16017  else
16018        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
16019$as_echo_n "checking whether rmdir works... " >&6; }
16020if test "${gl_cv_func_rmdir_works+set}" = set; then :
16021  $as_echo_n "(cached) " >&6
16022else
16023  mkdir conftest.dir
16024       touch conftest.file
16025       if test "$cross_compiling" = yes; then :
16026  gl_cv_func_rmdir_works="guessing no"
16027else
16028  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16029/* end confdefs.h.  */
16030#include <stdio.h>
16031             #include <errno.h>
16032             #include <unistd.h>
16033
16034int
16035main ()
16036{
16037return !rmdir ("conftest.file/") || errno != ENOTDIR
16038       || !rmdir ("conftest.dir/./");
16039  ;
16040  return 0;
16041}
16042_ACEOF
16043if ac_fn_c_try_run "$LINENO"; then :
16044  gl_cv_func_rmdir_works=yes
16045else
16046  gl_cv_func_rmdir_works=no
16047fi
16048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16049  conftest.$ac_objext conftest.beam conftest.$ac_ext
16050fi
16051
16052       rm -rf conftest.dir conftest.file
16053fi
16054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
16055$as_echo "$gl_cv_func_rmdir_works" >&6; }
16056    if test x"$gl_cv_func_rmdir_works" != xyes; then
16057      REPLACE_RMDIR=1
16058
16059
16060
16061
16062
16063
16064
16065
16066  gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
16067
16068    fi
16069  fi
16070
16071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat accepts an empty string" >&5
16072$as_echo_n "checking whether lstat accepts an empty string... " >&6; }
16073if test "${ac_cv_func_lstat_empty_string_bug+set}" = set; then :
16074  $as_echo_n "(cached) " >&6
16075else
16076  if test "$cross_compiling" = yes; then :
16077  ac_cv_func_lstat_empty_string_bug=yes
16078else
16079  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16080/* end confdefs.h.  */
16081$ac_includes_default
16082int
16083main ()
16084{
16085struct stat sbuf;
16086  return lstat ("", &sbuf) == 0;
16087  ;
16088  return 0;
16089}
16090_ACEOF
16091if ac_fn_c_try_run "$LINENO"; then :
16092  ac_cv_func_lstat_empty_string_bug=no
16093else
16094  ac_cv_func_lstat_empty_string_bug=yes
16095fi
16096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16097  conftest.$ac_objext conftest.beam conftest.$ac_ext
16098fi
16099
16100fi
16101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_empty_string_bug" >&5
16102$as_echo "$ac_cv_func_lstat_empty_string_bug" >&6; }
16103if test $ac_cv_func_lstat_empty_string_bug = yes; then
16104
16105
16106
16107
16108
16109
16110
16111
16112  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
16113
16114
16115cat >>confdefs.h <<_ACEOF
16116#define HAVE_LSTAT_EMPTY_STRING_BUG 1
16117_ACEOF
16118
16119fi
16120
16121
16122
16123
16124  LIB_SELINUX=
16125  gl_save_LIBS=$LIBS
16126  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5
16127$as_echo_n "checking for library containing setfilecon... " >&6; }
16128if test "${ac_cv_search_setfilecon+set}" = set; then :
16129  $as_echo_n "(cached) " >&6
16130else
16131  ac_func_search_save_LIBS=$LIBS
16132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16133/* end confdefs.h.  */
16134
16135/* Override any GCC internal prototype to avoid an error.
16136   Use char because int might match the return type of a GCC
16137   builtin and then its argument prototype would still apply.  */
16138#ifdef __cplusplus
16139extern "C"
16140#endif
16141char setfilecon ();
16142int
16143main ()
16144{
16145return setfilecon ();
16146  ;
16147  return 0;
16148}
16149_ACEOF
16150for ac_lib in '' selinux; do
16151  if test -z "$ac_lib"; then
16152    ac_res="none required"
16153  else
16154    ac_res=-l$ac_lib
16155    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16156  fi
16157  if ac_fn_c_try_link "$LINENO"; then :
16158  ac_cv_search_setfilecon=$ac_res
16159fi
16160rm -f core conftest.err conftest.$ac_objext \
16161    conftest$ac_exeext
16162  if test "${ac_cv_search_setfilecon+set}" = set; then :
16163  break
16164fi
16165done
16166if test "${ac_cv_search_setfilecon+set}" = set; then :
16167
16168else
16169  ac_cv_search_setfilecon=no
16170fi
16171rm conftest.$ac_ext
16172LIBS=$ac_func_search_save_LIBS
16173fi
16174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5
16175$as_echo "$ac_cv_search_setfilecon" >&6; }
16176ac_res=$ac_cv_search_setfilecon
16177if test "$ac_res" != no; then :
16178  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16179  test "$ac_cv_search_setfilecon" = "none required" ||
16180                  LIB_SELINUX=$ac_cv_search_setfilecon
16181fi
16182
16183
16184  LIBS=$gl_save_LIBS
16185
16186  # Warn if SELinux is found but libselinux is absent;
16187  if test "$ac_cv_search_setfilecon" = no &&
16188     test "$host" = "$build" && test -d /selinux; then
16189    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5
16190$as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;}
16191    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU coreutils will be compiled without SELinux support." >&5
16192$as_echo "$as_me: WARNING: GNU coreutils will be compiled without SELinux support." >&2;}
16193  fi
16194
16195
16196
16197
16198
16199
16200
16201
16202  if test $ac_cv_func_setenv = no; then
16203    HAVE_SETENV=0
16204  else
16205    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
16206$as_echo_n "checking whether setenv validates arguments... " >&6; }
16207if test "${gl_cv_func_setenv_works+set}" = set; then :
16208  $as_echo_n "(cached) " >&6
16209else
16210  if test "$cross_compiling" = yes; then :
16211  gl_cv_func_setenv_works="guessing no"
16212else
16213  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16214/* end confdefs.h.  */
16215
16216       #include <stdlib.h>
16217       #include <errno.h>
16218
16219int
16220main ()
16221{
16222
16223       if (setenv ("", "", 0) != -1) return 1;
16224       if (errno != EINVAL) return 2;
16225       if (setenv ("a", "=", 1) != 0) return 3;
16226       if (strcmp (getenv ("a"), "=") != 0) return 4;
16227
16228  ;
16229  return 0;
16230}
16231_ACEOF
16232if ac_fn_c_try_run "$LINENO"; then :
16233  gl_cv_func_setenv_works=yes
16234else
16235  gl_cv_func_setenv_works=no
16236fi
16237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16238  conftest.$ac_objext conftest.beam conftest.$ac_ext
16239fi
16240
16241fi
16242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
16243$as_echo "$gl_cv_func_setenv_works" >&6; }
16244    if test "$gl_cv_func_setenv_works" != yes; then
16245      REPLACE_SETENV=1
16246
16247
16248
16249
16250
16251
16252
16253
16254  gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
16255
16256    fi
16257  fi
16258
16259
16260
16261
16262  for ac_header in search.h
16263do :
16264  ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
16265if test "x$ac_cv_header_search_h" = x""yes; then :
16266  cat >>confdefs.h <<_ACEOF
16267#define HAVE_SEARCH_H 1
16268_ACEOF
16269
16270fi
16271
16272done
16273
16274  for ac_func in tsearch
16275do :
16276  ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
16277if test "x$ac_cv_func_tsearch" = x""yes; then :
16278  cat >>confdefs.h <<_ACEOF
16279#define HAVE_TSEARCH 1
16280_ACEOF
16281
16282fi
16283done
16284
16285
16286
16287
16288
16289
16290
16291
16292  GNULIB_SIGNAL_H_SIGPIPE=0;
16293  GNULIB_SIGPROCMASK=0;
16294  GNULIB_SIGACTION=0;
16295    HAVE_POSIX_SIGNALBLOCKING=1;
16296  HAVE_SIGSET_T=1;
16297  HAVE_SIGINFO_T=1;
16298  HAVE_SIGACTION=1;
16299  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
16300
16301  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
16313if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
16314  ac_have_decl=1
16315else
16316  ac_have_decl=0
16317fi
16318
16319cat >>confdefs.h <<_ACEOF
16320#define HAVE_DECL_SNPRINTF $ac_have_decl
16321_ACEOF
16322
16323
16324
16325
16326
16327
16328
16329ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
16330if test "x$ac_cv_have_decl_strdup" = x""yes; then :
16331  ac_have_decl=1
16332else
16333  ac_have_decl=0
16334fi
16335
16336cat >>confdefs.h <<_ACEOF
16337#define HAVE_DECL_STRDUP $ac_have_decl
16338_ACEOF
16339
16340
16341
16342
16343  if test -z "$ERRNO_H"; then
16344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
16345$as_echo_n "checking for working strerror function... " >&6; }
16346if test "${gl_cv_func_working_strerror+set}" = set; then :
16347  $as_echo_n "(cached) " >&6
16348else
16349  if test "$cross_compiling" = yes; then :
16350           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16351/* end confdefs.h.  */
16352#include <string.h>
16353
16354int
16355main ()
16356{
16357return !*strerror (-2);
16358  ;
16359  return 0;
16360}
16361_ACEOF
16362if ac_fn_c_try_compile "$LINENO"; then :
16363  gl_cv_func_working_strerror=yes
16364else
16365  gl_cv_func_working_strerror=no
16366fi
16367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16368
16369else
16370  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16371/* end confdefs.h.  */
16372#include <string.h>
16373
16374int
16375main ()
16376{
16377return !*strerror (-2);
16378  ;
16379  return 0;
16380}
16381_ACEOF
16382if ac_fn_c_try_run "$LINENO"; then :
16383  gl_cv_func_working_strerror=yes
16384else
16385  gl_cv_func_working_strerror=no
16386fi
16387rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16388  conftest.$ac_objext conftest.beam conftest.$ac_ext
16389fi
16390
16391
16392fi
16393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
16394$as_echo "$gl_cv_func_working_strerror" >&6; }
16395    if test $gl_cv_func_working_strerror = no; then
16396                  REPLACE_STRERROR=1
16397    fi
16398  else
16399            REPLACE_STRERROR=1
16400  fi
16401  if test $REPLACE_STRERROR = 1; then
16402
16403  ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
16404if test "x$ac_cv_have_decl_strerror" = x""yes; then :
16405  ac_have_decl=1
16406else
16407  ac_have_decl=0
16408fi
16409
16410cat >>confdefs.h <<_ACEOF
16411#define HAVE_DECL_STRERROR $ac_have_decl
16412_ACEOF
16413
16414
16415  if test $ac_cv_header_sys_socket_h != yes; then
16416                    for ac_header in winsock2.h
16417do :
16418  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
16419if test "x$ac_cv_header_winsock2_h" = x""yes; then :
16420  cat >>confdefs.h <<_ACEOF
16421#define HAVE_WINSOCK2_H 1
16422_ACEOF
16423
16424fi
16425
16426done
16427
16428  fi
16429
16430  fi
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445     if test $gl_cv_have_include_next = yes; then
16446       gl_cv_next_string_h='<'string.h'>'
16447     else
16448       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
16449$as_echo_n "checking absolute name of <string.h>... " >&6; }
16450if test "${gl_cv_next_string_h+set}" = set; then :
16451  $as_echo_n "(cached) " >&6
16452else
16453
16454          if test $ac_cv_header_string_h = yes; then
16455            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16456/* end confdefs.h.  */
16457#include <string.h>
16458
16459_ACEOF
16460                                                                                                case "$host_os" in
16461              aix*) gl_absname_cpp="$ac_cpp -C" ;;
16462              *)    gl_absname_cpp="$ac_cpp" ;;
16463            esac
16464                                                gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16465               sed -n '\#/string.h#{
16466                 s#.*"\(.*/string.h\)".*#\1#
16467                 s#^/[^/]#//&#
16468                 p
16469                 q
16470               }'`'"'
16471          else
16472            gl_cv_next_string_h='<'string.h'>'
16473          fi
16474
16475fi
16476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
16477$as_echo "$gl_cv_next_string_h" >&6; }
16478     fi
16479     NEXT_STRING_H=$gl_cv_next_string_h
16480
16481     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16482       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16483       gl_next_as_first_directive='<'string.h'>'
16484     else
16485       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16486       gl_next_as_first_directive=$gl_cv_next_string_h
16487     fi
16488     NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
16489
16490
16491
16492
16493ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
16494if test "x$ac_cv_have_decl_strndup" = x""yes; then :
16495  ac_have_decl=1
16496else
16497  ac_have_decl=0
16498fi
16499
16500cat >>confdefs.h <<_ACEOF
16501#define HAVE_DECL_STRNDUP $ac_have_decl
16502_ACEOF
16503
16504
16505
16506ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16507if test "x$ac_cv_have_decl_strnlen" = x""yes; then :
16508  ac_have_decl=1
16509else
16510  ac_have_decl=0
16511fi
16512
16513cat >>confdefs.h <<_ACEOF
16514#define HAVE_DECL_STRNLEN $ac_have_decl
16515_ACEOF
16516
16517ac_fn_c_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default"
16518if test "x$ac_cv_have_decl_strsignal" = x""yes; then :
16519  ac_have_decl=1
16520else
16521  ac_have_decl=0
16522fi
16523
16524cat >>confdefs.h <<_ACEOF
16525#define HAVE_DECL_STRSIGNAL $ac_have_decl
16526_ACEOF
16527
16528ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
16529/* NetBSD declares sys_siglist in unistd.h.  */
16530#ifdef HAVE_UNISTD_H
16531# include <unistd.h>
16532#endif
16533
16534"
16535if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
16536  ac_have_decl=1
16537else
16538  ac_have_decl=0
16539fi
16540
16541cat >>confdefs.h <<_ACEOF
16542#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
16543_ACEOF
16544
16545
16546
16547
16548
16549
16550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
16551$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
16552if test "${ac_cv_header_stat_broken+set}" = set; then :
16553  $as_echo_n "(cached) " >&6
16554else
16555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16556/* end confdefs.h.  */
16557#include <sys/types.h>
16558#include <sys/stat.h>
16559
16560#if defined S_ISBLK && defined S_IFDIR
16561extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
16562#endif
16563
16564#if defined S_ISBLK && defined S_IFCHR
16565extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
16566#endif
16567
16568#if defined S_ISLNK && defined S_IFREG
16569extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
16570#endif
16571
16572#if defined S_ISSOCK && defined S_IFREG
16573extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
16574#endif
16575
16576_ACEOF
16577if ac_fn_c_try_compile "$LINENO"; then :
16578  ac_cv_header_stat_broken=no
16579else
16580  ac_cv_header_stat_broken=yes
16581fi
16582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16583fi
16584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
16585$as_echo "$ac_cv_header_stat_broken" >&6; }
16586if test $ac_cv_header_stat_broken = yes; then
16587
16588$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
16589
16590fi
16591
16592
16593
16594
16595  GNULIB_UNAME=0;
16596    HAVE_UNAME=1;
16597  HAVE_STRUCT_UTSNAME=1;
16598
16599
16600
16601
16602
16603
16604
16605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
16606$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
16607if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
16608  $as_echo_n "(cached) " >&6
16609else
16610  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16611/* end confdefs.h.  */
16612#include <time.h>
16613
16614int
16615main ()
16616{
16617static struct timespec x; x.tv_sec = x.tv_nsec;
16618  ;
16619  return 0;
16620}
16621_ACEOF
16622if ac_fn_c_try_compile "$LINENO"; then :
16623  gl_cv_sys_struct_timespec_in_time_h=yes
16624else
16625  gl_cv_sys_struct_timespec_in_time_h=no
16626fi
16627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16628fi
16629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
16630$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
16631
16632  TIME_H_DEFINES_STRUCT_TIMESPEC=0
16633  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
16634  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
16635    TIME_H_DEFINES_STRUCT_TIMESPEC=1
16636  else
16637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
16638$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
16639if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
16640  $as_echo_n "(cached) " >&6
16641else
16642  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16643/* end confdefs.h.  */
16644#include <sys/time.h>
16645
16646int
16647main ()
16648{
16649static struct timespec x; x.tv_sec = x.tv_nsec;
16650  ;
16651  return 0;
16652}
16653_ACEOF
16654if ac_fn_c_try_compile "$LINENO"; then :
16655  gl_cv_sys_struct_timespec_in_sys_time_h=yes
16656else
16657  gl_cv_sys_struct_timespec_in_sys_time_h=no
16658fi
16659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16660fi
16661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
16662$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
16663    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
16664      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
16665    fi
16666  fi
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679     if test $gl_cv_have_include_next = yes; then
16680       gl_cv_next_time_h='<'time.h'>'
16681     else
16682       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
16683$as_echo_n "checking absolute name of <time.h>... " >&6; }
16684if test "${gl_cv_next_time_h+set}" = set; then :
16685  $as_echo_n "(cached) " >&6
16686else
16687
16688          if test $ac_cv_header_time_h = yes; then
16689            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16690/* end confdefs.h.  */
16691#include <time.h>
16692
16693_ACEOF
16694                                                                                                case "$host_os" in
16695              aix*) gl_absname_cpp="$ac_cpp -C" ;;
16696              *)    gl_absname_cpp="$ac_cpp" ;;
16697            esac
16698                                                gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16699               sed -n '\#/time.h#{
16700                 s#.*"\(.*/time.h\)".*#\1#
16701                 s#^/[^/]#//&#
16702                 p
16703                 q
16704               }'`'"'
16705          else
16706            gl_cv_next_time_h='<'time.h'>'
16707          fi
16708
16709fi
16710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
16711$as_echo "$gl_cv_next_time_h" >&6; }
16712     fi
16713     NEXT_TIME_H=$gl_cv_next_time_h
16714
16715     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16716       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16717       gl_next_as_first_directive='<'time.h'>'
16718     else
16719       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16720       gl_next_as_first_directive=$gl_cv_next_time_h
16721     fi
16722     NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
16723
16724
16725
16726
16727
16728
16729
16730ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
16731if test "x$ac_cv_have_decl_clearerr_unlocked" = x""yes; then :
16732  ac_have_decl=1
16733else
16734  ac_have_decl=0
16735fi
16736
16737cat >>confdefs.h <<_ACEOF
16738#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
16739_ACEOF
16740
16741ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
16742if test "x$ac_cv_have_decl_feof_unlocked" = x""yes; then :
16743  ac_have_decl=1
16744else
16745  ac_have_decl=0
16746fi
16747
16748cat >>confdefs.h <<_ACEOF
16749#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
16750_ACEOF
16751
16752ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
16753if test "x$ac_cv_have_decl_ferror_unlocked" = x""yes; then :
16754  ac_have_decl=1
16755else
16756  ac_have_decl=0
16757fi
16758
16759cat >>confdefs.h <<_ACEOF
16760#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
16761_ACEOF
16762
16763ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
16764if test "x$ac_cv_have_decl_fgets_unlocked" = x""yes; then :
16765  ac_have_decl=1
16766else
16767  ac_have_decl=0
16768fi
16769
16770cat >>confdefs.h <<_ACEOF
16771#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
16772_ACEOF
16773
16774ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
16775if test "x$ac_cv_have_decl_fputc_unlocked" = x""yes; then :
16776  ac_have_decl=1
16777else
16778  ac_have_decl=0
16779fi
16780
16781cat >>confdefs.h <<_ACEOF
16782#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
16783_ACEOF
16784
16785ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
16786if test "x$ac_cv_have_decl_fread_unlocked" = x""yes; then :
16787  ac_have_decl=1
16788else
16789  ac_have_decl=0
16790fi
16791
16792cat >>confdefs.h <<_ACEOF
16793#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
16794_ACEOF
16795
16796ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
16797if test "x$ac_cv_have_decl_fwrite_unlocked" = x""yes; then :
16798  ac_have_decl=1
16799else
16800  ac_have_decl=0
16801fi
16802
16803cat >>confdefs.h <<_ACEOF
16804#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
16805_ACEOF
16806
16807ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
16808if test "x$ac_cv_have_decl_getchar_unlocked" = x""yes; then :
16809  ac_have_decl=1
16810else
16811  ac_have_decl=0
16812fi
16813
16814cat >>confdefs.h <<_ACEOF
16815#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
16816_ACEOF
16817
16818ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
16819if test "x$ac_cv_have_decl_putchar_unlocked" = x""yes; then :
16820  ac_have_decl=1
16821else
16822  ac_have_decl=0
16823fi
16824
16825cat >>confdefs.h <<_ACEOF
16826#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
16827_ACEOF
16828
16829
16830  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
16831$as_echo_n "checking whether the utimes function works... " >&6; }
16832if test "${gl_cv_func_working_utimes+set}" = set; then :
16833  $as_echo_n "(cached) " >&6
16834else
16835
16836  if test "$cross_compiling" = yes; then :
16837  gl_cv_func_working_utimes=no
16838else
16839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16840/* end confdefs.h.  */
16841
16842#include <sys/types.h>
16843#include <sys/stat.h>
16844#include <fcntl.h>
16845#include <sys/time.h>
16846#include <time.h>
16847#include <unistd.h>
16848#include <stdlib.h>
16849#include <stdio.h>
16850#include <utime.h>
16851
16852int
16853main ()
16854{
16855  static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
16856  struct stat sbuf;
16857  char const *file = "conftest.utimes";
16858  FILE *f;
16859  time_t now;
16860  int fd;
16861
16862  int ok = ((f = fopen (file, "w"))
16863            && fclose (f) == 0
16864            && utimes (file, timeval) == 0
16865            && lstat (file, &sbuf) == 0
16866            && sbuf.st_atime == timeval[0].tv_sec
16867            && sbuf.st_mtime == timeval[1].tv_sec);
16868  unlink (file);
16869  if (!ok)
16870    exit (1);
16871
16872  ok =
16873    ((f = fopen (file, "w"))
16874     && fclose (f) == 0
16875     && time (&now) != (time_t)-1
16876     && utimes (file, NULL) == 0
16877     && lstat (file, &sbuf) == 0
16878     && now - sbuf.st_atime <= 2
16879     && now - sbuf.st_mtime <= 2);
16880  unlink (file);
16881  if (!ok)
16882    exit (1);
16883
16884  ok = (0 <= (fd = open (file, O_WRONLY|O_CREAT, 0444))
16885              && close (fd) == 0
16886              && utimes (file, NULL) == 0);
16887  unlink (file);
16888
16889  exit (!ok);
16890}
16891
16892_ACEOF
16893if ac_fn_c_try_run "$LINENO"; then :
16894  gl_cv_func_working_utimes=yes
16895else
16896  gl_cv_func_working_utimes=no
16897fi
16898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16899  conftest.$ac_objext conftest.beam conftest.$ac_ext
16900fi
16901
16902fi
16903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
16904$as_echo "$gl_cv_func_working_utimes" >&6; }
16905
16906  if test $gl_cv_func_working_utimes = yes; then
16907
16908$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
16909
16910  fi
16911
16912
16913
16914
16915
16916  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
16917$as_echo_n "checking for struct utimbuf... " >&6; }
16918if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
16919  $as_echo_n "(cached) " >&6
16920else
16921  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16922/* end confdefs.h.  */
16923#if HAVE_SYS_TIME_H
16924             #include <sys/time.h>
16925            #endif
16926            #include <time.h>
16927            #ifdef HAVE_UTIME_H
16928             #include <utime.h>
16929            #endif
16930
16931int
16932main ()
16933{
16934static struct utimbuf x; x.actime = x.modtime;
16935  ;
16936  return 0;
16937}
16938_ACEOF
16939if ac_fn_c_try_compile "$LINENO"; then :
16940  gl_cv_sys_struct_utimbuf=yes
16941else
16942  gl_cv_sys_struct_utimbuf=no
16943fi
16944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16945fi
16946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
16947$as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
16948
16949  if test $gl_cv_sys_struct_utimbuf = yes; then
16950
16951$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
16952
16953  fi
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
16969$as_echo_n "checking for wint_t... " >&6; }
16970if test "${gt_cv_c_wint_t+set}" = set; then :
16971  $as_echo_n "(cached) " >&6
16972else
16973  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16974/* end confdefs.h.  */
16975
16976/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16977   <wchar.h>.
16978   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
16979   before <wchar.h>.  */
16980#include <stddef.h>
16981#include <stdio.h>
16982#include <time.h>
16983#include <wchar.h>
16984       wint_t foo = (wchar_t)'\0';
16985int
16986main ()
16987{
16988
16989  ;
16990  return 0;
16991}
16992_ACEOF
16993if ac_fn_c_try_compile "$LINENO"; then :
16994  gt_cv_c_wint_t=yes
16995else
16996  gt_cv_c_wint_t=no
16997fi
16998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16999fi
17000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
17001$as_echo "$gt_cv_c_wint_t" >&6; }
17002  if test $gt_cv_c_wint_t = yes; then
17003
17004$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
17005
17006  fi
17007
17008
17009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
17010$as_echo_n "checking for inttypes.h... " >&6; }
17011if test "${gl_cv_header_inttypes_h+set}" = set; then :
17012  $as_echo_n "(cached) " >&6
17013else
17014  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17015/* end confdefs.h.  */
17016#include <sys/types.h>
17017#include <inttypes.h>
17018int
17019main ()
17020{
17021uintmax_t i = (uintmax_t) -1; return !i;
17022  ;
17023  return 0;
17024}
17025_ACEOF
17026if ac_fn_c_try_compile "$LINENO"; then :
17027  gl_cv_header_inttypes_h=yes
17028else
17029  gl_cv_header_inttypes_h=no
17030fi
17031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17032fi
17033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
17034$as_echo "$gl_cv_header_inttypes_h" >&6; }
17035  if test $gl_cv_header_inttypes_h = yes; then
17036
17037cat >>confdefs.h <<_ACEOF
17038#define HAVE_INTTYPES_H_WITH_UINTMAX 1
17039_ACEOF
17040
17041  fi
17042
17043
17044  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
17045$as_echo_n "checking for stdint.h... " >&6; }
17046if test "${gl_cv_header_stdint_h+set}" = set; then :
17047  $as_echo_n "(cached) " >&6
17048else
17049  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17050/* end confdefs.h.  */
17051#include <sys/types.h>
17052#include <stdint.h>
17053int
17054main ()
17055{
17056uintmax_t i = (uintmax_t) -1; return !i;
17057  ;
17058  return 0;
17059}
17060_ACEOF
17061if ac_fn_c_try_compile "$LINENO"; then :
17062  gl_cv_header_stdint_h=yes
17063else
17064  gl_cv_header_stdint_h=no
17065fi
17066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17067fi
17068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
17069$as_echo "$gl_cv_header_stdint_h" >&6; }
17070  if test $gl_cv_header_stdint_h = yes; then
17071
17072cat >>confdefs.h <<_ACEOF
17073#define HAVE_STDINT_H_WITH_UINTMAX 1
17074_ACEOF
17075
17076  fi
17077
17078
17079
17080
17081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
17082$as_echo_n "checking for intmax_t... " >&6; }
17083if test "${gt_cv_c_intmax_t+set}" = set; then :
17084  $as_echo_n "(cached) " >&6
17085else
17086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17087/* end confdefs.h.  */
17088
17089#include <stddef.h>
17090#include <stdlib.h>
17091#if HAVE_STDINT_H_WITH_UINTMAX
17092#include <stdint.h>
17093#endif
17094#if HAVE_INTTYPES_H_WITH_UINTMAX
17095#include <inttypes.h>
17096#endif
17097
17098int
17099main ()
17100{
17101intmax_t x = -1; return !x;
17102  ;
17103  return 0;
17104}
17105_ACEOF
17106if ac_fn_c_try_compile "$LINENO"; then :
17107  gt_cv_c_intmax_t=yes
17108else
17109  gt_cv_c_intmax_t=no
17110fi
17111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17112fi
17113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
17114$as_echo "$gt_cv_c_intmax_t" >&6; }
17115  if test $gt_cv_c_intmax_t = yes; then
17116
17117$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
17118
17119  else
17120
17121    test $ac_cv_type_long_long_int = yes \
17122      && ac_type='long long' \
17123      || ac_type='long'
17124
17125cat >>confdefs.h <<_ACEOF
17126#define intmax_t $ac_type
17127_ACEOF
17128
17129  fi
17130
17131
17132
17133
17134
17135
17136  for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
17137do :
17138  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17139ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17140eval as_val=\$$as_ac_var
17141   if test "x$as_val" = x""yes; then :
17142  cat >>confdefs.h <<_ACEOF
17143#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17144_ACEOF
17145
17146fi
17147done
17148
17149      ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
17150"
17151if test "x$ac_cv_have_decl__snprintf" = x""yes; then :
17152  ac_have_decl=1
17153else
17154  ac_have_decl=0
17155fi
17156
17157cat >>confdefs.h <<_ACEOF
17158#define HAVE_DECL__SNPRINTF $ac_have_decl
17159_ACEOF
17160
17161
17162
17163
17164
17165
17166     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
17167$as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; }
17168if test "${gl_cv_func_printf_sizes_c99+set}" = set; then :
17169  $as_echo_n "(cached) " >&6
17170else
17171
17172      if test "$cross_compiling" = yes; then :
17173
17174       case "$host_os" in
17175                               # Guess yes on glibc systems.
17176         *-gnu*)               gl_cv_func_printf_sizes_c99="guessing yes";;
17177                               # Guess yes on FreeBSD >= 5.
17178         freebsd[1-4]*)        gl_cv_func_printf_sizes_c99="guessing no";;
17179         freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
17180                               # Guess yes on MacOS X >= 10.3.
17181         darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
17182         darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
17183                               # Guess yes on OpenBSD >= 3.9.
17184         openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
17185                               gl_cv_func_printf_sizes_c99="guessing no";;
17186         openbsd*)             gl_cv_func_printf_sizes_c99="guessing yes";;
17187                               # Guess yes on Solaris >= 2.10.
17188         solaris2.[0-9]*)      gl_cv_func_printf_sizes_c99="guessing no";;
17189         solaris*)             gl_cv_func_printf_sizes_c99="guessing yes";;
17190                               # Guess yes on NetBSD >= 3.
17191         netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
17192                               gl_cv_func_printf_sizes_c99="guessing no";;
17193         netbsd*)              gl_cv_func_printf_sizes_c99="guessing yes";;
17194                               # If we don't know, assume the worst.
17195         *)                    gl_cv_func_printf_sizes_c99="guessing no";;
17196       esac
17197
17198else
17199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17200/* end confdefs.h.  */
17201
17202#include <stddef.h>
17203#include <stdio.h>
17204#include <string.h>
17205#include <sys/types.h>
17206#if HAVE_STDINT_H_WITH_UINTMAX
17207# include <stdint.h>
17208#endif
17209#if HAVE_INTTYPES_H_WITH_UINTMAX
17210# include <inttypes.h>
17211#endif
17212static char buf[100];
17213int main ()
17214{
17215#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
17216  buf[0] = '\0';
17217  if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
17218      || strcmp (buf, "12345671 33") != 0)
17219    return 1;
17220#endif
17221  buf[0] = '\0';
17222  if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
17223      || strcmp (buf, "12345672 33") != 0)
17224    return 1;
17225  buf[0] = '\0';
17226  if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
17227      || strcmp (buf, "12345673 33") != 0)
17228    return 1;
17229  buf[0] = '\0';
17230  if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
17231      || strcmp (buf, "1.5 33") != 0)
17232    return 1;
17233  return 0;
17234}
17235_ACEOF
17236if ac_fn_c_try_run "$LINENO"; then :
17237  gl_cv_func_printf_sizes_c99=yes
17238else
17239  gl_cv_func_printf_sizes_c99=no
17240fi
17241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17242  conftest.$ac_objext conftest.beam conftest.$ac_ext
17243fi
17244
17245
17246fi
17247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
17248$as_echo "$gl_cv_func_printf_sizes_c99" >&6; }
17249
17250
17251
17252     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
17253$as_echo_n "checking whether printf supports 'long double' arguments... " >&6; }
17254if test "${gl_cv_func_printf_long_double+set}" = set; then :
17255  $as_echo_n "(cached) " >&6
17256else
17257
17258      if test "$cross_compiling" = yes; then :
17259
17260       case "$host_os" in
17261         beos*)        gl_cv_func_printf_long_double="guessing no";;
17262         mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
17263         *)            gl_cv_func_printf_long_double="guessing yes";;
17264       esac
17265
17266else
17267  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17268/* end confdefs.h.  */
17269
17270#include <stdio.h>
17271#include <string.h>
17272static char buf[10000];
17273int main ()
17274{
17275  buf[0] = '\0';
17276  if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
17277      || strcmp (buf, "1.750000 33") != 0)
17278    return 1;
17279  buf[0] = '\0';
17280  if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
17281      || strcmp (buf, "1.750000e+00 33") != 0)
17282    return 1;
17283  buf[0] = '\0';
17284  if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
17285      || strcmp (buf, "1.75 33") != 0)
17286    return 1;
17287  return 0;
17288}
17289_ACEOF
17290if ac_fn_c_try_run "$LINENO"; then :
17291  gl_cv_func_printf_long_double=yes
17292else
17293  gl_cv_func_printf_long_double=no
17294fi
17295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17296  conftest.$ac_objext conftest.beam conftest.$ac_ext
17297fi
17298
17299
17300fi
17301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
17302$as_echo "$gl_cv_func_printf_long_double" >&6; }
17303
17304
17305
17306     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
17307$as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; }
17308if test "${gl_cv_func_printf_infinite+set}" = set; then :
17309  $as_echo_n "(cached) " >&6
17310else
17311
17312      if test "$cross_compiling" = yes; then :
17313
17314       case "$host_os" in
17315                               # Guess yes on glibc systems.
17316         *-gnu*)               gl_cv_func_printf_infinite="guessing yes";;
17317                               # Guess yes on FreeBSD >= 6.
17318         freebsd[1-5]*)        gl_cv_func_printf_infinite="guessing no";;
17319         freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
17320                               # Guess yes on MacOS X >= 10.3.
17321         darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
17322         darwin*)              gl_cv_func_printf_infinite="guessing yes";;
17323                               # Guess yes on HP-UX >= 11.
17324         hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
17325         hpux*)                gl_cv_func_printf_infinite="guessing yes";;
17326                               # Guess yes on NetBSD >= 3.
17327         netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
17328                               gl_cv_func_printf_infinite="guessing no";;
17329         netbsd*)              gl_cv_func_printf_infinite="guessing yes";;
17330                               # Guess yes on BeOS.
17331         beos*)                gl_cv_func_printf_infinite="guessing yes";;
17332                               # If we don't know, assume the worst.
17333         *)                    gl_cv_func_printf_infinite="guessing no";;
17334       esac
17335
17336else
17337  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17338/* end confdefs.h.  */
17339
17340#include <stdio.h>
17341#include <string.h>
17342static int
17343strisnan (const char *string, size_t start_index, size_t end_index)
17344{
17345  if (start_index < end_index)
17346    {
17347      if (string[start_index] == '-')
17348        start_index++;
17349      if (start_index + 3 <= end_index
17350          && memcmp (string + start_index, "nan", 3) == 0)
17351        {
17352          start_index += 3;
17353          if (start_index == end_index
17354              || (string[start_index] == '(' && string[end_index - 1] == ')'))
17355            return 1;
17356        }
17357    }
17358  return 0;
17359}
17360static int
17361have_minus_zero ()
17362{
17363  static double plus_zero = 0.0;
17364  double minus_zero = - plus_zero;
17365  return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
17366}
17367static char buf[10000];
17368static double zero = 0.0;
17369int main ()
17370{
17371  if (sprintf (buf, "%f", 1.0 / 0.0) < 0
17372      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
17373    return 1;
17374  if (sprintf (buf, "%f", -1.0 / 0.0) < 0
17375      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
17376    return 1;
17377  if (sprintf (buf, "%f", zero / zero) < 0
17378      || !strisnan (buf, 0, strlen (buf)))
17379    return 1;
17380  if (sprintf (buf, "%e", 1.0 / 0.0) < 0
17381      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
17382    return 1;
17383  if (sprintf (buf, "%e", -1.0 / 0.0) < 0
17384      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
17385    return 1;
17386  if (sprintf (buf, "%e", zero / zero) < 0
17387      || !strisnan (buf, 0, strlen (buf)))
17388    return 1;
17389  if (sprintf (buf, "%g", 1.0 / 0.0) < 0
17390      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
17391    return 1;
17392  if (sprintf (buf, "%g", -1.0 / 0.0) < 0
17393      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
17394    return 1;
17395  if (sprintf (buf, "%g", zero / zero) < 0
17396      || !strisnan (buf, 0, strlen (buf)))
17397    return 1;
17398  /* This test fails on HP-UX 10.20.  */
17399  if (have_minus_zero ())
17400    if (sprintf (buf, "%g", - zero) < 0
17401        || strcmp (buf, "-0") != 0)
17402    return 1;
17403  return 0;
17404}
17405_ACEOF
17406if ac_fn_c_try_run "$LINENO"; then :
17407  gl_cv_func_printf_infinite=yes
17408else
17409  gl_cv_func_printf_infinite=no
17410fi
17411rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17412  conftest.$ac_objext conftest.beam conftest.$ac_ext
17413fi
17414
17415
17416fi
17417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
17418$as_echo "$gl_cv_func_printf_infinite" >&6; }
17419
17420
17421
17422
17423
17424         if test -n "$gl_printf_safe"; then
17425
17426$as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
17427
17428  fi
17429  case "$gl_cv_func_printf_long_double" in
17430    *yes)
17431      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
17432$as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; }
17433if test "${gl_cv_func_printf_infinite_long_double+set}" = set; then :
17434  $as_echo_n "(cached) " >&6
17435else
17436
17437          if test "$cross_compiling" = yes; then :
17438
17439           case "$host_cpu" in
17440                                   # Guess no on ia64, x86_64, i386.
17441             ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
17442             *)
17443               case "$host_os" in
17444                                       # Guess yes on glibc systems.
17445                 *-gnu*)               gl_cv_func_printf_infinite_long_double="guessing yes";;
17446                                       # Guess yes on FreeBSD >= 6.
17447                 freebsd[1-5]*)        gl_cv_func_printf_infinite_long_double="guessing no";;
17448                 freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
17449                                       # Guess yes on MacOS X >= 10.3.
17450                 darwin[1-6].*)        gl_cv_func_printf_infinite_long_double="guessing no";;
17451                 darwin*)              gl_cv_func_printf_infinite_long_double="guessing yes";;
17452                                       # Guess yes on HP-UX >= 11.
17453                 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
17454                 hpux*)                gl_cv_func_printf_infinite_long_double="guessing yes";;
17455                                       # Guess yes on NetBSD >= 3.
17456                 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
17457                                       gl_cv_func_printf_infinite_long_double="guessing no";;
17458                 netbsd*)              gl_cv_func_printf_infinite_long_double="guessing yes";;
17459                                       # If we don't know, assume the worst.
17460                 *)                    gl_cv_func_printf_infinite_long_double="guessing no";;
17461               esac
17462               ;;
17463           esac
17464
17465else
17466  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17467/* end confdefs.h.  */
17468
17469
17470#include <stdlib.h>
17471#if defined __MACH__ && defined __APPLE__
17472/* Avoid a crash on MacOS X.  */
17473#include <mach/mach.h>
17474#include <mach/mach_error.h>
17475#include <mach/thread_status.h>
17476#include <mach/exception.h>
17477#include <mach/task.h>
17478#include <pthread.h>
17479/* The exception port on which our thread listens.  */
17480static mach_port_t our_exception_port;
17481/* The main function of the thread listening for exceptions of type
17482   EXC_BAD_ACCESS.  */
17483static void *
17484mach_exception_thread (void *arg)
17485{
17486  /* Buffer for a message to be received.  */
17487  struct {
17488    mach_msg_header_t head;
17489    mach_msg_body_t msgh_body;
17490    char data[1024];
17491  } msg;
17492  mach_msg_return_t retval;
17493  /* Wait for a message on the exception port.  */
17494  retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
17495                     our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
17496  if (retval != MACH_MSG_SUCCESS)
17497    abort ();
17498  exit (1);
17499}
17500static void
17501nocrash_init (void)
17502{
17503  mach_port_t self = mach_task_self ();
17504  /* Allocate a port on which the thread shall listen for exceptions.  */
17505  if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
17506      == KERN_SUCCESS) {
17507    /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
17508    if (mach_port_insert_right (self, our_exception_port, our_exception_port,
17509                                MACH_MSG_TYPE_MAKE_SEND)
17510        == KERN_SUCCESS) {
17511      /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
17512         for us.  */
17513      exception_mask_t mask = EXC_MASK_BAD_ACCESS;
17514      /* Create the thread listening on the exception port.  */
17515      pthread_attr_t attr;
17516      pthread_t thread;
17517      if (pthread_attr_init (&attr) == 0
17518          && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
17519          && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
17520        pthread_attr_destroy (&attr);
17521        /* Replace the exception port info for these exceptions with our own.
17522           Note that we replace the exception port for the entire task, not only
17523           for a particular thread.  This has the effect that when our exception
17524           port gets the message, the thread specific exception port has already
17525           been asked, and we don't need to bother about it.
17526           See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
17527        task_set_exception_ports (self, mask, our_exception_port,
17528                                  EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
17529      }
17530    }
17531  }
17532}
17533#else
17534/* Avoid a crash on POSIX systems.  */
17535#include <signal.h>
17536/* A POSIX signal handler.  */
17537static void
17538exception_handler (int sig)
17539{
17540  exit (1);
17541}
17542static void
17543nocrash_init (void)
17544{
17545#ifdef SIGSEGV
17546  signal (SIGSEGV, exception_handler);
17547#endif
17548#ifdef SIGBUS
17549  signal (SIGBUS, exception_handler);
17550#endif
17551}
17552#endif
17553
17554#include <float.h>
17555#include <stdio.h>
17556#include <string.h>
17557static int
17558strisnan (const char *string, size_t start_index, size_t end_index)
17559{
17560  if (start_index < end_index)
17561    {
17562      if (string[start_index] == '-')
17563        start_index++;
17564      if (start_index + 3 <= end_index
17565          && memcmp (string + start_index, "nan", 3) == 0)
17566        {
17567          start_index += 3;
17568          if (start_index == end_index
17569              || (string[start_index] == '(' && string[end_index - 1] == ')'))
17570            return 1;
17571        }
17572    }
17573  return 0;
17574}
17575static char buf[10000];
17576static long double zeroL = 0.0L;
17577int main ()
17578{
17579  nocrash_init();
17580  if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0
17581      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
17582    return 1;
17583  if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0
17584      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
17585    return 1;
17586  if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
17587      || !strisnan (buf, 0, strlen (buf)))
17588    return 1;
17589  if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0
17590      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
17591    return 1;
17592  if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0
17593      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
17594    return 1;
17595  if (sprintf (buf, "%Le", zeroL / zeroL) < 0
17596      || !strisnan (buf, 0, strlen (buf)))
17597    return 1;
17598  if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0
17599      || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
17600    return 1;
17601  if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0
17602      || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
17603    return 1;
17604  if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
17605      || !strisnan (buf, 0, strlen (buf)))
17606    return 1;
17607#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
17608/* Representation of an 80-bit 'long double' as an initializer for a sequence
17609   of 'unsigned int' words.  */
17610# ifdef WORDS_BIGENDIAN
17611#  define LDBL80_WORDS(exponent,manthi,mantlo) \
17612     { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
17613       ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
17614       (unsigned int) (mantlo) << 16                                        \
17615     }
17616# else
17617#  define LDBL80_WORDS(exponent,manthi,mantlo) \
17618     { mantlo, manthi, exponent }
17619# endif
17620  { /* Quiet NaN.  */
17621    static union { unsigned int word[4]; long double value; } x =
17622      { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
17623    if (sprintf (buf, "%Lf", x.value) < 0
17624        || !strisnan (buf, 0, strlen (buf)))
17625      return 1;
17626    if (sprintf (buf, "%Le", x.value) < 0
17627        || !strisnan (buf, 0, strlen (buf)))
17628      return 1;
17629    if (sprintf (buf, "%Lg", x.value) < 0
17630        || !strisnan (buf, 0, strlen (buf)))
17631      return 1;
17632  }
17633  {
17634    /* Signalling NaN.  */
17635    static union { unsigned int word[4]; long double value; } x =
17636      { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
17637    if (sprintf (buf, "%Lf", x.value) < 0
17638        || !strisnan (buf, 0, strlen (buf)))
17639      return 1;
17640    if (sprintf (buf, "%Le", x.value) < 0
17641        || !strisnan (buf, 0, strlen (buf)))
17642      return 1;
17643    if (sprintf (buf, "%Lg", x.value) < 0
17644        || !strisnan (buf, 0, strlen (buf)))
17645      return 1;
17646  }
17647  { /* Pseudo-NaN.  */
17648    static union { unsigned int word[4]; long double value; } x =
17649      { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
17650    if (sprintf (buf, "%Lf", x.value) < 0
17651        || !strisnan (buf, 0, strlen (buf)))
17652      return 1;
17653    if (sprintf (buf, "%Le", x.value) < 0
17654        || !strisnan (buf, 0, strlen (buf)))
17655      return 1;
17656    if (sprintf (buf, "%Lg", x.value) < 0
17657        || !strisnan (buf, 0, strlen (buf)))
17658      return 1;
17659  }
17660  { /* Pseudo-Infinity.  */
17661    static union { unsigned int word[4]; long double value; } x =
17662      { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
17663    if (sprintf (buf, "%Lf", x.value) < 0
17664        || !strisnan (buf, 0, strlen (buf)))
17665      return 1;
17666    if (sprintf (buf, "%Le", x.value) < 0
17667        || !strisnan (buf, 0, strlen (buf)))
17668      return 1;
17669    if (sprintf (buf, "%Lg", x.value) < 0
17670        || !strisnan (buf, 0, strlen (buf)))
17671      return 1;
17672  }
17673  { /* Pseudo-Zero.  */
17674    static union { unsigned int word[4]; long double value; } x =
17675      { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
17676    if (sprintf (buf, "%Lf", x.value) < 0
17677        || !strisnan (buf, 0, strlen (buf)))
17678      return 1;
17679    if (sprintf (buf, "%Le", x.value) < 0
17680        || !strisnan (buf, 0, strlen (buf)))
17681      return 1;
17682    if (sprintf (buf, "%Lg", x.value) < 0
17683        || !strisnan (buf, 0, strlen (buf)))
17684      return 1;
17685  }
17686  { /* Unnormalized number.  */
17687    static union { unsigned int word[4]; long double value; } x =
17688      { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
17689    if (sprintf (buf, "%Lf", x.value) < 0
17690        || !strisnan (buf, 0, strlen (buf)))
17691      return 1;
17692    if (sprintf (buf, "%Le", x.value) < 0
17693        || !strisnan (buf, 0, strlen (buf)))
17694      return 1;
17695    if (sprintf (buf, "%Lg", x.value) < 0
17696        || !strisnan (buf, 0, strlen (buf)))
17697      return 1;
17698  }
17699  { /* Pseudo-Denormal.  */
17700    static union { unsigned int word[4]; long double value; } x =
17701      { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
17702    if (sprintf (buf, "%Lf", x.value) < 0
17703        || !strisnan (buf, 0, strlen (buf)))
17704      return 1;
17705    if (sprintf (buf, "%Le", x.value) < 0
17706        || !strisnan (buf, 0, strlen (buf)))
17707      return 1;
17708    if (sprintf (buf, "%Lg", x.value) < 0
17709        || !strisnan (buf, 0, strlen (buf)))
17710      return 1;
17711  }
17712#endif
17713  return 0;
17714}
17715_ACEOF
17716if ac_fn_c_try_run "$LINENO"; then :
17717  gl_cv_func_printf_infinite_long_double=yes
17718else
17719  gl_cv_func_printf_infinite_long_double=no
17720fi
17721rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17722  conftest.$ac_objext conftest.beam conftest.$ac_ext
17723fi
17724
17725
17726fi
17727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
17728$as_echo "$gl_cv_func_printf_infinite_long_double" >&6; }
17729      ;;
17730    *)
17731      gl_cv_func_printf_infinite_long_double="irrelevant"
17732      ;;
17733  esac
17734
17735
17736
17737     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
17738$as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; }
17739if test "${gl_cv_func_printf_directive_a+set}" = set; then :
17740  $as_echo_n "(cached) " >&6
17741else
17742
17743      if test "$cross_compiling" = yes; then :
17744
17745       case "$host_os" in
17746                               # Guess yes on glibc >= 2.5 systems.
17747         *-gnu*)
17748           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17749/* end confdefs.h.  */
17750
17751             #include <features.h>
17752             #ifdef __GNU_LIBRARY__
17753              #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)
17754               BZ2908
17755              #endif
17756             #endif
17757
17758_ACEOF
17759if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17760  $EGREP "BZ2908" >/dev/null 2>&1; then :
17761  gl_cv_func_printf_directive_a="guessing yes"
17762else
17763  gl_cv_func_printf_directive_a="guessing no"
17764fi
17765rm -f conftest*
17766
17767           ;;
17768                               # If we don't know, assume the worst.
17769         *)                    gl_cv_func_printf_directive_a="guessing no";;
17770       esac
17771
17772else
17773  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17774/* end confdefs.h.  */
17775
17776#include <stdio.h>
17777#include <string.h>
17778static char buf[100];
17779int main ()
17780{
17781  if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
17782      || (strcmp (buf, "0x1.922p+1 33") != 0
17783          && strcmp (buf, "0x3.244p+0 33") != 0
17784          && strcmp (buf, "0x6.488p-1 33") != 0
17785          && strcmp (buf, "0xc.91p-2 33") != 0))
17786    return 1;
17787  if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
17788      || (strcmp (buf, "-0X1.922P+1 33") != 0
17789          && strcmp (buf, "-0X3.244P+0 33") != 0
17790          && strcmp (buf, "-0X6.488P-1 33") != 0
17791          && strcmp (buf, "-0XC.91P-2 33") != 0))
17792    return 1;
17793  /* This catches a FreeBSD 6.1 bug: it doesn't round.  */
17794  if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
17795      || (strcmp (buf, "0x1.83p+0 33") != 0
17796          && strcmp (buf, "0x3.05p-1 33") != 0
17797          && strcmp (buf, "0x6.0ap-2 33") != 0
17798          && strcmp (buf, "0xc.14p-3 33") != 0))
17799    return 1;
17800  /* This catches a FreeBSD 6.1 bug.  See
17801     <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
17802  if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
17803      || buf[0] == '0')
17804    return 1;
17805  /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug.  */
17806  if (sprintf (buf, "%.1a", 1.999) < 0
17807      || (strcmp (buf, "0x1.0p+1") != 0
17808          && strcmp (buf, "0x2.0p+0") != 0
17809          && strcmp (buf, "0x4.0p-1") != 0
17810          && strcmp (buf, "0x8.0p-2") != 0))
17811    return 1;
17812  /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
17813     glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>.  */
17814  if (sprintf (buf, "%.1La", 1.999L) < 0
17815      || (strcmp (buf, "0x1.0p+1") != 0
17816          && strcmp (buf, "0x2.0p+0") != 0
17817          && strcmp (buf, "0x4.0p-1") != 0
17818          && strcmp (buf, "0x8.0p-2") != 0))
17819    return 1;
17820  return 0;
17821}
17822_ACEOF
17823if ac_fn_c_try_run "$LINENO"; then :
17824  gl_cv_func_printf_directive_a=yes
17825else
17826  gl_cv_func_printf_directive_a=no
17827fi
17828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17829  conftest.$ac_objext conftest.beam conftest.$ac_ext
17830fi
17831
17832
17833fi
17834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
17835$as_echo "$gl_cv_func_printf_directive_a" >&6; }
17836
17837
17838
17839     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
17840$as_echo_n "checking whether printf supports the 'F' directive... " >&6; }
17841if test "${gl_cv_func_printf_directive_f+set}" = set; then :
17842  $as_echo_n "(cached) " >&6
17843else
17844
17845      if test "$cross_compiling" = yes; then :
17846
17847       case "$host_os" in
17848                               # Guess yes on glibc systems.
17849         *-gnu*)               gl_cv_func_printf_directive_f="guessing yes";;
17850                               # Guess yes on FreeBSD >= 6.
17851         freebsd[1-5]*)        gl_cv_func_printf_directive_f="guessing no";;
17852         freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
17853                               # Guess yes on MacOS X >= 10.3.
17854         darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
17855         darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
17856                               # Guess yes on Solaris >= 2.10.
17857         solaris2.[0-9]*)      gl_cv_func_printf_directive_f="guessing no";;
17858         solaris*)             gl_cv_func_printf_directive_f="guessing yes";;
17859                               # If we don't know, assume the worst.
17860         *)                    gl_cv_func_printf_directive_f="guessing no";;
17861       esac
17862
17863else
17864  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17865/* end confdefs.h.  */
17866
17867#include <stdio.h>
17868#include <string.h>
17869static char buf[100];
17870int main ()
17871{
17872  if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
17873      || strcmp (buf, "1234567.000000 33") != 0)
17874    return 1;
17875  if (sprintf (buf, "%F", 1.0 / 0.0) < 0
17876      || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
17877    return 1;
17878  /* This catches a Cygwin 1.5.x bug.  */
17879  if (sprintf (buf, "%.F", 1234.0) < 0
17880      || strcmp (buf, "1234") != 0)
17881    return 1;
17882  return 0;
17883}
17884_ACEOF
17885if ac_fn_c_try_run "$LINENO"; then :
17886  gl_cv_func_printf_directive_f=yes
17887else
17888  gl_cv_func_printf_directive_f=no
17889fi
17890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17891  conftest.$ac_objext conftest.beam conftest.$ac_ext
17892fi
17893
17894
17895fi
17896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
17897$as_echo "$gl_cv_func_printf_directive_f" >&6; }
17898
17899
17900
17901     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
17902$as_echo_n "checking whether printf supports the 'n' directive... " >&6; }
17903if test "${gl_cv_func_printf_directive_n+set}" = set; then :
17904  $as_echo_n "(cached) " >&6
17905else
17906
17907      if test "$cross_compiling" = yes; then :
17908
17909       case "$host_os" in
17910         *)     gl_cv_func_printf_directive_n="guessing yes";;
17911       esac
17912
17913else
17914  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17915/* end confdefs.h.  */
17916
17917#include <stdio.h>
17918#include <string.h>
17919static char fmtstring[10];
17920static char buf[100];
17921int main ()
17922{
17923  int count = -1;
17924  /* Copy the format string.  Some systems (glibc with _FORTIFY_SOURCE=2)
17925     support %n in format strings in read-only memory but not in writable
17926     memory.  */
17927  strcpy (fmtstring, "%d %n");
17928  if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
17929      || strcmp (buf, "123 ") != 0
17930      || count != 4)
17931    return 1;
17932  return 0;
17933}
17934_ACEOF
17935if ac_fn_c_try_run "$LINENO"; then :
17936  gl_cv_func_printf_directive_n=yes
17937else
17938  gl_cv_func_printf_directive_n=no
17939fi
17940rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17941  conftest.$ac_objext conftest.beam conftest.$ac_ext
17942fi
17943
17944
17945fi
17946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
17947$as_echo "$gl_cv_func_printf_directive_n" >&6; }
17948
17949
17950
17951     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
17952$as_echo_n "checking whether printf supports the 'ls' directive... " >&6; }
17953if test "${gl_cv_func_printf_directive_ls+set}" = set; then :
17954  $as_echo_n "(cached) " >&6
17955else
17956
17957      if test "$cross_compiling" = yes; then :
17958
17959       case "$host_os" in
17960         openbsd*)        gl_cv_func_printf_directive_ls="guessing no";;
17961         irix*)           gl_cv_func_printf_directive_ls="guessing no";;
17962         solaris*)        gl_cv_func_printf_directive_ls="guessing no";;
17963         cygwin*)         gl_cv_func_printf_directive_ls="guessing no";;
17964         beos* | haiku*)  gl_cv_func_printf_directive_ls="guessing no";;
17965         *)               gl_cv_func_printf_directive_ls="guessing yes";;
17966       esac
17967
17968else
17969  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17970/* end confdefs.h.  */
17971
17972/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17973   <wchar.h>.
17974   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17975   included before <wchar.h>.  */
17976#include <stddef.h>
17977#include <stdio.h>
17978#include <time.h>
17979#include <wchar.h>
17980#include <string.h>
17981int main ()
17982{
17983  char buf[100];
17984  /* Test whether %ls works at all.
17985     This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
17986     Cygwin 1.5.  */
17987  {
17988    static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
17989    buf[0] = '\0';
17990    if (sprintf (buf, "%ls", wstring) < 0
17991        || strcmp (buf, "abc") != 0)
17992      return 1;
17993  }
17994  /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
17995     assertion failure inside libc), but not on OpenBSD 4.0.  */
17996  {
17997    static const wchar_t wstring[] = { 'a', 0 };
17998    buf[0] = '\0';
17999    if (sprintf (buf, "%ls", wstring) < 0
18000        || strcmp (buf, "a") != 0)
18001      return 1;
18002  }
18003  /* Test whether precisions in %ls are supported as specified in ISO C 99
18004     section 7.19.6.1:
18005       "If a precision is specified, no more than that many bytes are written
18006        (including shift sequences, if any), and the array shall contain a
18007        null wide character if, to equal the multibyte character sequence
18008        length given by the precision, the function would need to access a
18009        wide character one past the end of the array."
18010     This test fails on Solaris 10.  */
18011  {
18012    static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
18013    buf[0] = '\0';
18014    if (sprintf (buf, "%.2ls", wstring) < 0
18015        || strcmp (buf, "ab") != 0)
18016      return 1;
18017  }
18018  return 0;
18019}
18020_ACEOF
18021if ac_fn_c_try_run "$LINENO"; then :
18022  gl_cv_func_printf_directive_ls=yes
18023else
18024  gl_cv_func_printf_directive_ls=no
18025fi
18026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18027  conftest.$ac_objext conftest.beam conftest.$ac_ext
18028fi
18029
18030
18031fi
18032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
18033$as_echo "$gl_cv_func_printf_directive_ls" >&6; }
18034
18035
18036
18037     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
18038$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
18039if test "${gl_cv_func_printf_positions+set}" = set; then :
18040  $as_echo_n "(cached) " >&6
18041else
18042
18043      if test "$cross_compiling" = yes; then :
18044
18045       case "$host_os" in
18046         netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
18047                       gl_cv_func_printf_positions="guessing no";;
18048         beos*)        gl_cv_func_printf_positions="guessing no";;
18049         mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
18050         *)            gl_cv_func_printf_positions="guessing yes";;
18051       esac
18052
18053else
18054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18055/* end confdefs.h.  */
18056
18057#include <stdio.h>
18058#include <string.h>
18059/* The string "%2$d %1$d", with dollar characters protected from the shell's
18060   dollar expansion (possibly an autoconf bug).  */
18061static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
18062static char buf[100];
18063int main ()
18064{
18065  sprintf (buf, format, 33, 55);
18066  return (strcmp (buf, "55 33") != 0);
18067}
18068_ACEOF
18069if ac_fn_c_try_run "$LINENO"; then :
18070  gl_cv_func_printf_positions=yes
18071else
18072  gl_cv_func_printf_positions=no
18073fi
18074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18075  conftest.$ac_objext conftest.beam conftest.$ac_ext
18076fi
18077
18078
18079fi
18080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
18081$as_echo "$gl_cv_func_printf_positions" >&6; }
18082
18083
18084
18085     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
18086$as_echo_n "checking whether printf supports the grouping flag... " >&6; }
18087if test "${gl_cv_func_printf_flag_grouping+set}" = set; then :
18088  $as_echo_n "(cached) " >&6
18089else
18090
18091      if test "$cross_compiling" = yes; then :
18092
18093       case "$host_os" in
18094         cygwin*)      gl_cv_func_printf_flag_grouping="guessing no";;
18095         netbsd*)      gl_cv_func_printf_flag_grouping="guessing no";;
18096         mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
18097         *)            gl_cv_func_printf_flag_grouping="guessing yes";;
18098       esac
18099
18100else
18101  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18102/* end confdefs.h.  */
18103
18104#include <stdio.h>
18105#include <string.h>
18106static char buf[100];
18107int main ()
18108{
18109  if (sprintf (buf, "%'d %d", 1234567, 99) < 0
18110      || buf[strlen (buf) - 1] != '9')
18111    return 1;
18112  return 0;
18113}
18114_ACEOF
18115if ac_fn_c_try_run "$LINENO"; then :
18116  gl_cv_func_printf_flag_grouping=yes
18117else
18118  gl_cv_func_printf_flag_grouping=no
18119fi
18120rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18121  conftest.$ac_objext conftest.beam conftest.$ac_ext
18122fi
18123
18124
18125fi
18126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
18127$as_echo "$gl_cv_func_printf_flag_grouping" >&6; }
18128
18129
18130
18131     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
18132$as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; }
18133if test "${gl_cv_func_printf_flag_leftadjust+set}" = set; then :
18134  $as_echo_n "(cached) " >&6
18135else
18136
18137      if test "$cross_compiling" = yes; then :
18138
18139         case "$host_os" in
18140                    # Guess yes on HP-UX 11.
18141           hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
18142                    # Guess no on HP-UX 10 and older.
18143           hpux*)   gl_cv_func_printf_flag_leftadjust="guessing no";;
18144                    # Guess yes otherwise.
18145           *)       gl_cv_func_printf_flag_leftadjust="guessing yes";;
18146         esac
18147
18148else
18149  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18150/* end confdefs.h.  */
18151
18152#include <stdio.h>
18153#include <string.h>
18154static char buf[100];
18155int main ()
18156{
18157  /* Check that a '-' flag is not annihilated by a negative width.  */
18158  if (sprintf (buf, "a%-*sc", -3, "b") < 0
18159      || strcmp (buf, "ab  c") != 0)
18160    return 1;
18161  return 0;
18162}
18163_ACEOF
18164if ac_fn_c_try_run "$LINENO"; then :
18165  gl_cv_func_printf_flag_leftadjust=yes
18166else
18167  gl_cv_func_printf_flag_leftadjust=no
18168fi
18169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18170  conftest.$ac_objext conftest.beam conftest.$ac_ext
18171fi
18172
18173
18174fi
18175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
18176$as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; }
18177
18178
18179
18180     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
18181$as_echo_n "checking whether printf supports the zero flag correctly... " >&6; }
18182if test "${gl_cv_func_printf_flag_zero+set}" = set; then :
18183  $as_echo_n "(cached) " >&6
18184else
18185
18186      if test "$cross_compiling" = yes; then :
18187
18188       case "$host_os" in
18189                 # Guess yes on glibc systems.
18190         *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
18191                 # Guess yes on BeOS.
18192         beos*)  gl_cv_func_printf_flag_zero="guessing yes";;
18193                 # If we don't know, assume the worst.
18194         *)      gl_cv_func_printf_flag_zero="guessing no";;
18195       esac
18196
18197else
18198  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18199/* end confdefs.h.  */
18200
18201#include <stdio.h>
18202#include <string.h>
18203static char buf[100];
18204int main ()
18205{
18206  if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0
18207      || (strcmp (buf, "       inf") != 0
18208          && strcmp (buf, "  infinity") != 0))
18209    return 1;
18210  return 0;
18211}
18212_ACEOF
18213if ac_fn_c_try_run "$LINENO"; then :
18214  gl_cv_func_printf_flag_zero=yes
18215else
18216  gl_cv_func_printf_flag_zero=no
18217fi
18218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18219  conftest.$ac_objext conftest.beam conftest.$ac_ext
18220fi
18221
18222
18223fi
18224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
18225$as_echo "$gl_cv_func_printf_flag_zero" >&6; }
18226
18227
18228
18229     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
18230$as_echo_n "checking whether printf supports large precisions... " >&6; }
18231if test "${gl_cv_func_printf_precision+set}" = set; then :
18232  $as_echo_n "(cached) " >&6
18233else
18234
18235      if test "$cross_compiling" = yes; then :
18236
18237       case "$host_os" in
18238         # Guess no only on native Win32 and BeOS systems.
18239         mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
18240         beos*)        gl_cv_func_printf_precision="guessing no" ;;
18241         *)            gl_cv_func_printf_precision="guessing yes" ;;
18242       esac
18243
18244else
18245  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18246/* end confdefs.h.  */
18247
18248#include <stdio.h>
18249#include <string.h>
18250static char buf[5000];
18251int main ()
18252{
18253#ifdef __BEOS__
18254  /* On BeOS, this would crash and show a dialog box.  Avoid the crash.  */
18255  return 1;
18256#endif
18257  if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
18258    return 1;
18259  return 0;
18260}
18261_ACEOF
18262if ac_fn_c_try_run "$LINENO"; then :
18263  gl_cv_func_printf_precision=yes
18264else
18265  gl_cv_func_printf_precision=no
18266fi
18267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18268  conftest.$ac_objext conftest.beam conftest.$ac_ext
18269fi
18270
18271
18272fi
18273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
18274$as_echo "$gl_cv_func_printf_precision" >&6; }
18275
18276
18277
18278
18279     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
18280$as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; }
18281if test "${gl_cv_func_printf_enomem+set}" = set; then :
18282  $as_echo_n "(cached) " >&6
18283else
18284
18285      gl_cv_func_printf_enomem="guessing no"
18286      if test "$cross_compiling" = no; then
18287        if test $APPLE_UNIVERSAL_BUILD = 0; then
18288          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18289/* end confdefs.h.  */
18290
18291
18292#include <stdlib.h>
18293#if defined __MACH__ && defined __APPLE__
18294/* Avoid a crash on MacOS X.  */
18295#include <mach/mach.h>
18296#include <mach/mach_error.h>
18297#include <mach/thread_status.h>
18298#include <mach/exception.h>
18299#include <mach/task.h>
18300#include <pthread.h>
18301/* The exception port on which our thread listens.  */
18302static mach_port_t our_exception_port;
18303/* The main function of the thread listening for exceptions of type
18304   EXC_BAD_ACCESS.  */
18305static void *
18306mach_exception_thread (void *arg)
18307{
18308  /* Buffer for a message to be received.  */
18309  struct {
18310    mach_msg_header_t head;
18311    mach_msg_body_t msgh_body;
18312    char data1024;
18313  } msg;
18314  mach_msg_return_t retval;
18315  /* Wait for a message on the exception port.  */
18316  retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
18317                     our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
18318  if (retval != MACH_MSG_SUCCESS)
18319    abort ();
18320  exit (1);
18321}
18322static void
18323nocrash_init (void)
18324{
18325  mach_port_t self = mach_task_self ();
18326  /* Allocate a port on which the thread shall listen for exceptions.  */
18327  if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
18328      == KERN_SUCCESS) {
18329    /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
18330    if (mach_port_insert_right (self, our_exception_port, our_exception_port,
18331                                MACH_MSG_TYPE_MAKE_SEND)
18332        == KERN_SUCCESS) {
18333      /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
18334         for us.  */
18335      exception_mask_t mask = EXC_MASK_BAD_ACCESS;
18336      /* Create the thread listening on the exception port.  */
18337      pthread_attr_t attr;
18338      pthread_t thread;
18339      if (pthread_attr_init (&attr) == 0
18340          && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
18341          && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
18342        pthread_attr_destroy (&attr);
18343        /* Replace the exception port info for these exceptions with our own.
18344           Note that we replace the exception port for the entire task, not only
18345           for a particular thread.  This has the effect that when our exception
18346           port gets the message, the thread specific exception port has already
18347           been asked, and we don't need to bother about it.
18348           See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
18349        task_set_exception_ports (self, mask, our_exception_port,
18350                                  EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
18351      }
18352    }
18353  }
18354}
18355#else
18356/* Avoid a crash on POSIX systems.  */
18357#include <signal.h>
18358/* A POSIX signal handler.  */
18359static void
18360exception_handler (int sig)
18361{
18362  exit (1);
18363}
18364static void
18365nocrash_init (void)
18366{
18367#ifdef SIGSEGV
18368  signal (SIGSEGV, exception_handler);
18369#endif
18370#ifdef SIGBUS
18371  signal (SIGBUS, exception_handler);
18372#endif
18373}
18374#endif
18375
18376#include <stdio.h>
18377#include <sys/types.h>
18378#include <sys/time.h>
18379#include <sys/resource.h>
18380#include <errno.h>
18381int main()
18382{
18383  struct rlimit limit;
18384  int ret;
18385  nocrash_init ();
18386  /* Some printf implementations allocate temporary space with malloc.  */
18387  /* On BSD systems, malloc() is limited by RLIMIT_DATA.  */
18388#ifdef RLIMIT_DATA
18389  if (getrlimit (RLIMIT_DATA, &limit) < 0)
18390    return 77;
18391  if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
18392    limit.rlim_max = 5000000;
18393  limit.rlim_cur = limit.rlim_max;
18394  if (setrlimit (RLIMIT_DATA, &limit) < 0)
18395    return 77;
18396#endif
18397  /* On Linux systems, malloc() is limited by RLIMIT_AS.  */
18398#ifdef RLIMIT_AS
18399  if (getrlimit (RLIMIT_AS, &limit) < 0)
18400    return 77;
18401  if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
18402    limit.rlim_max = 5000000;
18403  limit.rlim_cur = limit.rlim_max;
18404  if (setrlimit (RLIMIT_AS, &limit) < 0)
18405    return 77;
18406#endif
18407  /* Some printf implementations allocate temporary space on the stack.  */
18408#ifdef RLIMIT_STACK
18409  if (getrlimit (RLIMIT_STACK, &limit) < 0)
18410    return 77;
18411  if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
18412    limit.rlim_max = 5000000;
18413  limit.rlim_cur = limit.rlim_max;
18414  if (setrlimit (RLIMIT_STACK, &limit) < 0)
18415    return 77;
18416#endif
18417  ret = printf ("%.5000000f", 1.0);
18418  return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
18419}
18420
18421_ACEOF
18422          if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
18423  (eval $ac_link) 2>&5
18424  ac_status=$?
18425  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18426  test $ac_status = 0; } && test -s conftest$ac_exeext; then
18427            (./conftest
18428             result=$?
18429             if test $result != 0 && test $result != 77; then result=1; fi
18430             exit $result
18431            ) >/dev/null 2>/dev/null
18432            case $? in
18433              0) gl_cv_func_printf_enomem="yes" ;;
18434              77) gl_cv_func_printf_enomem="guessing no" ;;
18435              *) gl_cv_func_printf_enomem="no" ;;
18436            esac
18437          else
18438            gl_cv_func_printf_enomem="guessing no"
18439          fi
18440          rm -fr conftest*
18441        else
18442                                        gl_cv_func_printf_enomem="guessing no"
18443        fi
18444      fi
18445      if test "$gl_cv_func_printf_enomem" = "guessing no"; then
18446        case "$host_os" in
18447                    # Guess yes on glibc systems.
18448          *-gnu*)   gl_cv_func_printf_enomem="guessing yes";;
18449                    # Guess yes on Solaris.
18450          solaris*) gl_cv_func_printf_enomem="guessing yes";;
18451                    # Guess yes on AIX.
18452          aix*)     gl_cv_func_printf_enomem="guessing yes";;
18453                    # Guess yes on HP-UX/hppa.
18454          hpux*)    case "$host_cpu" in
18455                      hppa*) gl_cv_func_printf_enomem="guessing yes";;
18456                      *)     gl_cv_func_printf_enomem="guessing no";;
18457                    esac
18458                    ;;
18459                    # Guess yes on IRIX.
18460          irix*)    gl_cv_func_printf_enomem="guessing yes";;
18461                    # Guess yes on OSF/1.
18462          osf*)     gl_cv_func_printf_enomem="guessing yes";;
18463                    # Guess yes on BeOS.
18464          beos*)    gl_cv_func_printf_enomem="guessing yes";;
18465                    # Guess yes on Haiku.
18466          haiku*)   gl_cv_func_printf_enomem="guessing yes";;
18467                    # If we don't know, assume the worst.
18468          *)        gl_cv_func_printf_enomem="guessing no";;
18469        esac
18470      fi
18471
18472fi
18473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
18474$as_echo "$gl_cv_func_printf_enomem" >&6; }
18475
18476
18477
18478  case "$gl_cv_func_printf_long_double" in
18479    *yes)
18480      ;;
18481    *)
18482
18483$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
18484
18485      ;;
18486  esac
18487
18488
18489
18490
18491
18492
18493
18494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX termios" >&5
18495$as_echo_n "checking POSIX termios... " >&6; }
18496if test "${ac_cv_sys_posix_termios+set}" = set; then :
18497  $as_echo_n "(cached) " >&6
18498else
18499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18500/* end confdefs.h.  */
18501#include <sys/types.h>
18502#include <unistd.h>
18503#include <termios.h>
18504
18505int
18506main ()
18507{
18508/* SunOS 4.0.3 has termios.h but not the library calls.  */
18509   tcgetattr(0, 0);
18510  ;
18511  return 0;
18512}
18513_ACEOF
18514if ac_fn_c_try_link "$LINENO"; then :
18515  ac_cv_sys_posix_termios=yes
18516else
18517  ac_cv_sys_posix_termios=no
18518fi
18519rm -f core conftest.err conftest.$ac_objext \
18520    conftest$ac_exeext conftest.$ac_ext
18521fi
18522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_posix_termios" >&5
18523$as_echo "$ac_cv_sys_posix_termios" >&6; }
18524
18525
18526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether use of TIOCGWINSZ requires termios.h" >&5
18527$as_echo_n "checking whether use of TIOCGWINSZ requires termios.h... " >&6; }
18528if test "${gl_cv_sys_tiocgwinsz_needs_termios_h+set}" = set; then :
18529  $as_echo_n "(cached) " >&6
18530else
18531  gl_cv_sys_tiocgwinsz_needs_termios_h=no
18532
18533   if test $ac_cv_sys_posix_termios = yes; then
18534     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18535/* end confdefs.h.  */
18536#include <sys/types.h>
18537#      include <termios.h>
18538#      ifdef TIOCGWINSZ
18539         yes
18540#      endif
18541
18542_ACEOF
18543if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18544  $EGREP "yes" >/dev/null 2>&1; then :
18545  gl_cv_sys_tiocgwinsz_needs_termios_h=yes
18546fi
18547rm -f conftest*
18548
18549   fi
18550
18551fi
18552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_tiocgwinsz_needs_termios_h" >&5
18553$as_echo "$gl_cv_sys_tiocgwinsz_needs_termios_h" >&6; }
18554
18555
18556
18557ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
18558if test "x$ac_cv_have_decl_alarm" = x""yes; then :
18559  ac_have_decl=1
18560else
18561  ac_have_decl=0
18562fi
18563
18564cat >>confdefs.h <<_ACEOF
18565#define HAVE_DECL_ALARM $ac_have_decl
18566_ACEOF
18567
18568
18569
18570
18571
18572
18573  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
18574$as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; }
18575if test "${gl_cv_func_ungetc_works+set}" = set; then :
18576  $as_echo_n "(cached) " >&6
18577else
18578  if test "$cross_compiling" = yes; then :
18579  gl_cv_func_ungetc_works='guessing no'
18580else
18581  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18582/* end confdefs.h.  */
18583
18584#include <stdio.h>
18585
18586int
18587main ()
18588{
18589FILE *f;
18590           if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
18591           if (fputs ("abc", f) < 0) return 2;
18592           rewind (f);
18593           if (fgetc (f) != 'a') return 3;
18594           if (fgetc (f) != 'b') return 4;
18595           if (ungetc ('d', f) != 'd') return 5;
18596           if (ftell (f) != 1) return 6;
18597           if (fgetc (f) != 'd') return 7;
18598           if (ftell (f) != 2) return 8;
18599           if (fseek (f, 0, SEEK_CUR) != 0) return 9;
18600           if (ftell (f) != 2) return 10;
18601           if (fgetc (f) != 'c') return 11;
18602           fclose (f); remove ("conftest.tmp");
18603  ;
18604  return 0;
18605}
18606_ACEOF
18607if ac_fn_c_try_run "$LINENO"; then :
18608  gl_cv_func_ungetc_works=yes
18609else
18610  gl_cv_func_ungetc_works=no
18611fi
18612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18613  conftest.$ac_objext conftest.beam conftest.$ac_ext
18614fi
18615
18616
18617fi
18618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
18619$as_echo "$gl_cv_func_ungetc_works" >&6; }
18620  if test "$gl_cv_func_ungetc_works" != yes; then
18621
18622$as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
18623
18624  fi
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643   if false; then
18644  GL_COND_LIBTOOL_TRUE=
18645  GL_COND_LIBTOOL_FALSE='#'
18646else
18647  GL_COND_LIBTOOL_TRUE='#'
18648  GL_COND_LIBTOOL_FALSE=
18649fi
18650
18651  gl_cond_libtool=false
18652  gl_libdeps=
18653  gl_ltlibdeps=
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663  gl_source_base='lib'
18664
18665  # Check whether --enable-acl was given.
18666if test "${enable_acl+set}" = set; then :
18667  enableval=$enable_acl;
18668else
18669  enable_acl=auto
18670fi
18671
18672
18673  LIB_ACL=
18674  use_acl=0
18675
18676  if test "x$enable_acl" != "xno"; then
18677        for ac_header in sys/acl.h
18678do :
18679  ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
18680if test "x$ac_cv_header_sys_acl_h" = x""yes; then :
18681  cat >>confdefs.h <<_ACEOF
18682#define HAVE_SYS_ACL_H 1
18683_ACEOF
18684
18685fi
18686
18687done
18688
18689    if test $ac_cv_header_sys_acl_h = yes; then
18690      ac_save_LIBS=$LIBS
18691
18692                  if test $use_acl = 0; then
18693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
18694$as_echo_n "checking for library containing acl_get_file... " >&6; }
18695if test "${ac_cv_search_acl_get_file+set}" = set; then :
18696  $as_echo_n "(cached) " >&6
18697else
18698  ac_func_search_save_LIBS=$LIBS
18699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18700/* end confdefs.h.  */
18701
18702/* Override any GCC internal prototype to avoid an error.
18703   Use char because int might match the return type of a GCC
18704   builtin and then its argument prototype would still apply.  */
18705#ifdef __cplusplus
18706extern "C"
18707#endif
18708char acl_get_file ();
18709int
18710main ()
18711{
18712return acl_get_file ();
18713  ;
18714  return 0;
18715}
18716_ACEOF
18717for ac_lib in '' acl pacl; do
18718  if test -z "$ac_lib"; then
18719    ac_res="none required"
18720  else
18721    ac_res=-l$ac_lib
18722    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18723  fi
18724  if ac_fn_c_try_link "$LINENO"; then :
18725  ac_cv_search_acl_get_file=$ac_res
18726fi
18727rm -f core conftest.err conftest.$ac_objext \
18728    conftest$ac_exeext
18729  if test "${ac_cv_search_acl_get_file+set}" = set; then :
18730  break
18731fi
18732done
18733if test "${ac_cv_search_acl_get_file+set}" = set; then :
18734
18735else
18736  ac_cv_search_acl_get_file=no
18737fi
18738rm conftest.$ac_ext
18739LIBS=$ac_func_search_save_LIBS
18740fi
18741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
18742$as_echo "$ac_cv_search_acl_get_file" >&6; }
18743ac_res=$ac_cv_search_acl_get_file
18744if test "$ac_res" != no; then :
18745  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18746  if test "$ac_cv_search_acl_get_file" != "none required"; then
18747             LIB_ACL=$ac_cv_search_acl_get_file
18748           fi
18749           for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
18750              acl_free acl_from_mode acl_from_text \
18751              acl_delete_def_file acl_extended_file \
18752              acl_delete_fd_np acl_delete_file_np \
18753              acl_copy_ext_native acl_create_entry_np \
18754              acl_to_short_text acl_free_text
18755do :
18756  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18757ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18758eval as_val=\$$as_ac_var
18759   if test "x$as_val" = x""yes; then :
18760  cat >>confdefs.h <<_ACEOF
18761#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18762_ACEOF
18763
18764fi
18765done
18766
18767           # If the acl_get_file bug is detected, don't enable the ACL support.
18768
18769  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
18770$as_echo_n "checking for working acl_get_file... " >&6; }
18771if test "${gl_cv_func_working_acl_get_file+set}" = set; then :
18772  $as_echo_n "(cached) " >&6
18773else
18774  if test "$cross_compiling" = yes; then :
18775  gl_cv_func_working_acl_get_file=cross-compiling
18776else
18777  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18778/* end confdefs.h.  */
18779#include <sys/types.h>
18780           #include <sys/acl.h>
18781           #include <errno.h>
18782
18783int
18784main ()
18785{
18786return !! (!acl_get_file (".", ACL_TYPE_ACCESS)
18787                       && errno == ENOENT);
18788  ;
18789  return 0;
18790}
18791_ACEOF
18792if ac_fn_c_try_run "$LINENO"; then :
18793  gl_cv_func_working_acl_get_file=yes
18794else
18795  gl_cv_func_working_acl_get_file=no
18796fi
18797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18798  conftest.$ac_objext conftest.beam conftest.$ac_ext
18799fi
18800
18801fi
18802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
18803$as_echo "$gl_cv_func_working_acl_get_file" >&6; }
18804
18805  if test $gl_cv_func_working_acl_get_file = yes; then :
18806  use_acl=1
18807fi
18808
18809           if test $use_acl = 1; then
18810                          for ac_header in acl/libacl.h
18811do :
18812  ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
18813if test "x$ac_cv_header_acl_libacl_h" = x""yes; then :
18814  cat >>confdefs.h <<_ACEOF
18815#define HAVE_ACL_LIBACL_H 1
18816_ACEOF
18817
18818fi
18819
18820done
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830  for ac_func in acl_entries
18831do :
18832  ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
18833if test "x$ac_cv_func_acl_entries" = x""yes; then :
18834  cat >>confdefs.h <<_ACEOF
18835#define HAVE_ACL_ENTRIES 1
18836_ACEOF
18837
18838else
18839
18840    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
18841
18842fi
18843done
18844
18845
18846             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
18847$as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
18848if test "${gl_cv_acl_ACL_FIRST_ENTRY+set}" = set; then :
18849  $as_echo_n "(cached) " >&6
18850else
18851  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18852/* end confdefs.h.  */
18853#include <sys/types.h>
18854#include <sys/acl.h>
18855int type = ACL_FIRST_ENTRY;
18856_ACEOF
18857if ac_fn_c_try_compile "$LINENO"; then :
18858  gl_cv_acl_ACL_FIRST_ENTRY=yes
18859else
18860  gl_cv_acl_ACL_FIRST_ENTRY=no
18861fi
18862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18863fi
18864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
18865$as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
18866             if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
18867
18868$as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
18869
18870             fi
18871                          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
18872$as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
18873if test "${gl_cv_acl_ACL_TYPE_EXTENDED+set}" = set; then :
18874  $as_echo_n "(cached) " >&6
18875else
18876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18877/* end confdefs.h.  */
18878#include <sys/types.h>
18879#include <sys/acl.h>
18880int type = ACL_TYPE_EXTENDED;
18881_ACEOF
18882if ac_fn_c_try_compile "$LINENO"; then :
18883  gl_cv_acl_ACL_TYPE_EXTENDED=yes
18884else
18885  gl_cv_acl_ACL_TYPE_EXTENDED=no
18886fi
18887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18888fi
18889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
18890$as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
18891             if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
18892
18893$as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
18894
18895             fi
18896           else
18897             LIB_ACL=
18898           fi
18899
18900fi
18901
18902      fi
18903
18904            if test $use_acl = 0; then
18905        for ac_func in acl
18906do :
18907  ac_fn_c_check_func "$LINENO" "acl" "ac_cv_func_acl"
18908if test "x$ac_cv_func_acl" = x""yes; then :
18909  cat >>confdefs.h <<_ACEOF
18910#define HAVE_ACL 1
18911_ACEOF
18912
18913fi
18914done
18915
18916        if test $ac_cv_func_acl = yes; then
18917          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
18918$as_echo_n "checking for library containing acl_trivial... " >&6; }
18919if test "${ac_cv_search_acl_trivial+set}" = set; then :
18920  $as_echo_n "(cached) " >&6
18921else
18922  ac_func_search_save_LIBS=$LIBS
18923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18924/* end confdefs.h.  */
18925
18926/* Override any GCC internal prototype to avoid an error.
18927   Use char because int might match the return type of a GCC
18928   builtin and then its argument prototype would still apply.  */
18929#ifdef __cplusplus
18930extern "C"
18931#endif
18932char acl_trivial ();
18933int
18934main ()
18935{
18936return acl_trivial ();
18937  ;
18938  return 0;
18939}
18940_ACEOF
18941for ac_lib in '' sec; do
18942  if test -z "$ac_lib"; then
18943    ac_res="none required"
18944  else
18945    ac_res=-l$ac_lib
18946    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18947  fi
18948  if ac_fn_c_try_link "$LINENO"; then :
18949  ac_cv_search_acl_trivial=$ac_res
18950fi
18951rm -f core conftest.err conftest.$ac_objext \
18952    conftest$ac_exeext
18953  if test "${ac_cv_search_acl_trivial+set}" = set; then :
18954  break
18955fi
18956done
18957if test "${ac_cv_search_acl_trivial+set}" = set; then :
18958
18959else
18960  ac_cv_search_acl_trivial=no
18961fi
18962rm conftest.$ac_ext
18963LIBS=$ac_func_search_save_LIBS
18964fi
18965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
18966$as_echo "$ac_cv_search_acl_trivial" >&6; }
18967ac_res=$ac_cv_search_acl_trivial
18968if test "$ac_res" != no; then :
18969  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18970  if test "$ac_cv_search_acl_trivial" != "none required"; then
18971               LIB_ACL=$ac_cv_search_acl_trivial
18972             fi
18973
18974fi
18975
18976          for ac_func in acl_trivial
18977do :
18978  ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
18979if test "x$ac_cv_func_acl_trivial" = x""yes; then :
18980  cat >>confdefs.h <<_ACEOF
18981#define HAVE_ACL_TRIVIAL 1
18982_ACEOF
18983
18984fi
18985done
18986
18987          use_acl=1
18988        fi
18989      fi
18990
18991            if test $use_acl = 0 || test "$ac_cv_func_acl" = yes; then
18992        for ac_func in getacl
18993do :
18994  ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
18995if test "x$ac_cv_func_getacl" = x""yes; then :
18996  cat >>confdefs.h <<_ACEOF
18997#define HAVE_GETACL 1
18998_ACEOF
18999
19000fi
19001done
19002
19003        if test $ac_cv_func_getacl = yes; then
19004          use_acl=1
19005        fi
19006      fi
19007
19008            if test $use_acl = 0; then
19009        for ac_func in aclx_get
19010do :
19011  ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
19012if test "x$ac_cv_func_aclx_get" = x""yes; then :
19013  cat >>confdefs.h <<_ACEOF
19014#define HAVE_ACLX_GET 1
19015_ACEOF
19016
19017fi
19018done
19019
19020        if test $ac_cv_func_aclx_get = yes; then
19021          use_acl=1
19022        fi
19023      fi
19024
19025            if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
19026        for ac_func in statacl
19027do :
19028  ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
19029if test "x$ac_cv_func_statacl" = x""yes; then :
19030  cat >>confdefs.h <<_ACEOF
19031#define HAVE_STATACL 1
19032_ACEOF
19033
19034fi
19035done
19036
19037        if test $ac_cv_func_statacl = yes; then
19038          use_acl=1
19039        fi
19040      fi
19041
19042      LIBS=$ac_save_LIBS
19043    fi
19044    if test "x$enable_acl$use_acl" = "xyes0"; then
19045      as_fn_error "ACLs enabled but support not detected" "$LINENO" 5
19046    elif test "x$enable_acl$use_acl" = "xauto0"; then
19047      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
19048$as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
19049      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU coreutils will be built without ACL support." >&5
19050$as_echo "$as_me: WARNING: GNU coreutils will be built without ACL support." >&2;}
19051    fi
19052  fi
19053
19054
19055cat >>confdefs.h <<_ACEOF
19056#define USE_ACL $use_acl
19057_ACEOF
19058
19059  USE_ACL=$use_acl
19060
19061
19062
19063
19064
19065
19066
19067  if test $ac_cv_func_alloca_works = no; then
19068    :
19069  fi
19070
19071  # Define an additional variable used in the Makefile substitution.
19072  if test $ac_cv_working_alloca_h = yes; then
19073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
19074$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
19075if test "${gl_cv_rpl_alloca+set}" = set; then :
19076  $as_echo_n "(cached) " >&6
19077else
19078
19079      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19080/* end confdefs.h.  */
19081
19082#if defined __GNUC__ || defined _AIX || defined _MSC_VER
19083        Need own alloca
19084#endif
19085
19086_ACEOF
19087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19088  $EGREP "Need own alloca" >/dev/null 2>&1; then :
19089  gl_cv_rpl_alloca=yes
19090else
19091  gl_cv_rpl_alloca=no
19092fi
19093rm -f conftest*
19094
19095
19096fi
19097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
19098$as_echo "$gl_cv_rpl_alloca" >&6; }
19099    if test $gl_cv_rpl_alloca = yes; then
19100
19101$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
19102
19103      ALLOCA_H=alloca.h
19104    else
19105                  ALLOCA_H=
19106    fi
19107  else
19108    ALLOCA_H=alloca.h
19109  fi
19110
19111
19112
19113
19114$as_echo "#define GNULIB_AREADLINKAT 1" >>confdefs.h
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126  gl_LIBOBJS="$gl_LIBOBJS argmatch.$ac_objext"
19127
19128
19129
19130
19131
19132
19133  if test $ac_cv_header_arpa_inet_h = yes; then
19134    HAVE_ARPA_INET_H=1
19135  else
19136    HAVE_ARPA_INET_H=0
19137  fi
19138
19139
19140
19141
19142
19143
19144
19145     if test $gl_cv_have_include_next = yes; then
19146       gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
19147     else
19148       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
19149$as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
19150if test "${gl_cv_next_arpa_inet_h+set}" = set; then :
19151  $as_echo_n "(cached) " >&6
19152else
19153
19154          if test $ac_cv_header_arpa_inet_h = yes; then
19155            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19156/* end confdefs.h.  */
19157#include <arpa/inet.h>
19158
19159_ACEOF
19160                                                                                                case "$host_os" in
19161              aix*) gl_absname_cpp="$ac_cpp -C" ;;
19162              *)    gl_absname_cpp="$ac_cpp" ;;
19163            esac
19164                                                gl_cv_next_arpa_inet_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19165               sed -n '\#/arpa/inet.h#{
19166                 s#.*"\(.*/arpa/inet.h\)".*#\1#
19167                 s#^/[^/]#//&#
19168                 p
19169                 q
19170               }'`'"'
19171          else
19172            gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
19173          fi
19174
19175fi
19176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
19177$as_echo "$gl_cv_next_arpa_inet_h" >&6; }
19178     fi
19179     NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
19180
19181     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19182       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19183       gl_next_as_first_directive='<'arpa/inet.h'>'
19184     else
19185       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19186       gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
19187     fi
19188     NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
19189
19190
19191
19192
19193
19194
19195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
19196$as_echo_n "checking whether to enable assertions... " >&6; }
19197  # Check whether --enable-assert was given.
19198if test "${enable_assert+set}" = set; then :
19199  enableval=$enable_assert; if test "x$enableval" = xno; then :
19200
19201$as_echo "#define NDEBUG 1" >>confdefs.h
19202
19203elif test "x$enableval" != xyes; then :
19204  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
19205$as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
19206      enable_assert=yes
19207fi
19208else
19209  enable_assert=yes
19210fi
19211
19212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
19213$as_echo "$enable_assert" >&6; }
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224  for ac_func in atexit
19225do :
19226  ac_fn_c_check_func "$LINENO" "atexit" "ac_cv_func_atexit"
19227if test "x$ac_cv_func_atexit" = x""yes; then :
19228  cat >>confdefs.h <<_ACEOF
19229#define HAVE_ATEXIT 1
19230_ACEOF
19231
19232else
19233
19234    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
19235
19236fi
19237done
19238
19239
19240  if test $ac_cv_func_atexit = no; then
19241
19242  :
19243
19244  fi
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255  gl_LIBOBJS="$gl_LIBOBJS backupfile.$ac_objext"
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276  if test $ac_cv_func_btowc = no; then
19277    HAVE_BTOWC=0
19278  else
19279
19280
19281
19282         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
19283$as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
19284if test "${gl_cv_func_btowc_eof+set}" = set; then :
19285  $as_echo_n "(cached) " >&6
19286else
19287
19288                        case "$host_os" in
19289                 # Guess no on IRIX.
19290          irix*) gl_cv_func_btowc_eof="guessing no" ;;
19291                 # Guess yes otherwise.
19292          *)     gl_cv_func_btowc_eof="guessing yes" ;;
19293        esac
19294        if test $LOCALE_FR != none; then
19295          if test "$cross_compiling" = yes; then :
19296  :
19297else
19298  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19299/* end confdefs.h.  */
19300
19301#include <locale.h>
19302#include <stdio.h>
19303#include <string.h>
19304#include <wchar.h>
19305int main ()
19306{
19307  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
19308    {
19309      if (btowc (EOF) != WEOF)
19310        return 1;
19311    }
19312  return 0;
19313}
19314_ACEOF
19315if ac_fn_c_try_run "$LINENO"; then :
19316  gl_cv_func_btowc_eof=yes
19317else
19318  gl_cv_func_btowc_eof=no
19319fi
19320rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19321  conftest.$ac_objext conftest.beam conftest.$ac_ext
19322fi
19323
19324        fi
19325
19326fi
19327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
19328$as_echo "$gl_cv_func_btowc_eof" >&6; }
19329    case "$gl_cv_func_btowc_eof" in
19330      *yes) ;;
19331      *) REPLACE_BTOWC=1 ;;
19332    esac
19333  fi
19334  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
19335
19336    :
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346  gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
19347
19348
19349  :
19350
19351  fi
19352
19353
19354
19355  GNULIB_BTOWC=1
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366  gl_LIBOBJS="$gl_LIBOBJS c-strtod.$ac_objext"
19367
19368
19369
19370
19371
19372  :
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383  gl_LIBOBJS="$gl_LIBOBJS c-strtold.$ac_objext"
19384
19385
19386
19387
19388
19389
19390  :
19391
19392  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible calloc" >&5
19393$as_echo_n "checking for GNU libc compatible calloc... " >&6; }
19394if test "${ac_cv_func_calloc_0_nonnull+set}" = set; then :
19395  $as_echo_n "(cached) " >&6
19396else
19397  if test "$cross_compiling" = yes; then :
19398  ac_cv_func_calloc_0_nonnull=no
19399else
19400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19401/* end confdefs.h.  */
19402$ac_includes_default
19403int
19404main ()
19405{
19406exit (!calloc (0, 0) || calloc ((size_t) -1 / 8 + 1, 8));
19407  ;
19408  return 0;
19409}
19410_ACEOF
19411if ac_fn_c_try_run "$LINENO"; then :
19412  ac_cv_func_calloc_0_nonnull=yes
19413else
19414  ac_cv_func_calloc_0_nonnull=no
19415fi
19416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19417  conftest.$ac_objext conftest.beam conftest.$ac_ext
19418fi
19419
19420fi
19421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
19422$as_echo "$ac_cv_func_calloc_0_nonnull" >&6; }
19423if test $ac_cv_func_calloc_0_nonnull = yes; then :
19424
19425$as_echo "#define HAVE_CALLOC 1" >>confdefs.h
19426
19427else
19428  $as_echo "#define HAVE_CALLOC 0" >>confdefs.h
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438  gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
19439
19440
19441$as_echo "#define calloc rpl_calloc" >>confdefs.h
19442
19443fi
19444
19445
19446
19447
19448  if test $gl_cv_func_malloc_posix = yes; then
19449    HAVE_CALLOC_POSIX=1
19450
19451$as_echo "#define HAVE_CALLOC_POSIX 1" >>confdefs.h
19452
19453  else
19454
19455
19456
19457
19458
19459
19460
19461
19462  gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
19463
19464    HAVE_CALLOC_POSIX=0
19465  fi
19466
19467
19468
19469
19470  GNULIB_CALLOC_POSIX=1
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481  gl_LIBOBJS="$gl_LIBOBJS canon-host.$ac_objext"
19482
19483
19484  :
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496  gl_LIBOBJS="$gl_LIBOBJS canonicalize.$ac_objext"
19497
19498
19499
19500
19501
19502
19503  if test $ac_cv_func_canonicalize_file_name = no; then
19504    HAVE_CANONICALIZE_FILE_NAME=0
19505  elif test "$gl_cv_func_realpath_works" != yes; then
19506    REPLACE_CANONICALIZE_FILE_NAME=1
19507  fi
19508
19509
19510
19511$as_echo "#define GNULIB_CANONICALIZE 1" >>confdefs.h
19512
19513
19514
19515
19516  GNULIB_CANONICALIZE_FILE_NAME=1
19517
19518
19519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
19520$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
19521if test "${gl_cv_have_arbitrary_file_name_length_limit+set}" = set; then :
19522  $as_echo_n "(cached) " >&6
19523else
19524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19525/* end confdefs.h.  */
19526#include <unistd.h>
19527#include <limits.h>
19528#if defined PATH_MAX || defined MAXPATHLEN
19529have_arbitrary_file_name_length_limit
19530#endif
19531_ACEOF
19532if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19533  $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
19534  gl_cv_have_arbitrary_file_name_length_limit=yes
19535else
19536  gl_cv_have_arbitrary_file_name_length_limit=no
19537fi
19538rm -f conftest*
19539
19540fi
19541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
19542$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
19543
19544  if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
19545
19546
19547
19548
19549
19550
19551
19552
19553  gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
19554
19555
19556
19557  :
19558
19559  fi
19560
19561
19562
19563
19564  GNULIB_CHOWN=1
19565
19566
19567
19568
19569  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
19570  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
19571
19572  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
19573  # programs in the package would end up linked with that potentially-shared
19574  # library, inducing unnecessary run-time overhead.
19575  LIB_CLOCK_GETTIME=
19576
19577  gl_saved_libs=$LIBS
19578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19579$as_echo_n "checking for library containing clock_gettime... " >&6; }
19580if test "${ac_cv_search_clock_gettime+set}" = set; then :
19581  $as_echo_n "(cached) " >&6
19582else
19583  ac_func_search_save_LIBS=$LIBS
19584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19585/* end confdefs.h.  */
19586
19587/* Override any GCC internal prototype to avoid an error.
19588   Use char because int might match the return type of a GCC
19589   builtin and then its argument prototype would still apply.  */
19590#ifdef __cplusplus
19591extern "C"
19592#endif
19593char clock_gettime ();
19594int
19595main ()
19596{
19597return clock_gettime ();
19598  ;
19599  return 0;
19600}
19601_ACEOF
19602for ac_lib in '' rt posix4; do
19603  if test -z "$ac_lib"; then
19604    ac_res="none required"
19605  else
19606    ac_res=-l$ac_lib
19607    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19608  fi
19609  if ac_fn_c_try_link "$LINENO"; then :
19610  ac_cv_search_clock_gettime=$ac_res
19611fi
19612rm -f core conftest.err conftest.$ac_objext \
19613    conftest$ac_exeext
19614  if test "${ac_cv_search_clock_gettime+set}" = set; then :
19615  break
19616fi
19617done
19618if test "${ac_cv_search_clock_gettime+set}" = set; then :
19619
19620else
19621  ac_cv_search_clock_gettime=no
19622fi
19623rm conftest.$ac_ext
19624LIBS=$ac_func_search_save_LIBS
19625fi
19626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19627$as_echo "$ac_cv_search_clock_gettime" >&6; }
19628ac_res=$ac_cv_search_clock_gettime
19629if test "$ac_res" != no; then :
19630  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19631  test "$ac_cv_search_clock_gettime" = "none required" ||
19632                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
19633fi
19634
19635    for ac_func in clock_gettime clock_settime
19636do :
19637  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19638ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19639eval as_val=\$$as_ac_var
19640   if test "x$as_val" = x""yes; then :
19641  cat >>confdefs.h <<_ACEOF
19642#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19643_ACEOF
19644
19645fi
19646done
19647
19648  LIBS=$gl_saved_libs
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659  gl_LIBOBJS="$gl_LIBOBJS cloexec.$ac_objext"
19660
19661
19662
19663
19664$as_echo "#define GNULIB_CLOEXEC 1" >>confdefs.h
19665
19666
19667
19668
19669
19670
19671
19672
19673  if test $ac_cv_header_sys_socket_h != yes; then
19674                    for ac_header in winsock2.h
19675do :
19676  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19677if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19678  cat >>confdefs.h <<_ACEOF
19679#define HAVE_WINSOCK2_H 1
19680_ACEOF
19681
19682fi
19683
19684done
19685
19686  fi
19687  if test "$ac_cv_header_winsock2_h" = yes; then
19688    HAVE_WINSOCK2_H=1
19689    UNISTD_H_HAVE_WINSOCK2_H=1
19690    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19691  else
19692    HAVE_WINSOCK2_H=0
19693  fi
19694
19695
19696    if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
19697
19698
19699  REPLACE_CLOSE=1
19700
19701
19702
19703
19704
19705
19706
19707
19708  gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
19709
19710
19711
19712  REPLACE_FCLOSE=1
19713
19714
19715
19716
19717
19718
19719
19720
19721  gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
19722
19723
19724
19725    fi
19726
19727
19728
19729
19730  GNULIB_CLOSE=1
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741  gl_LIBOBJS="$gl_LIBOBJS close-stream.$ac_objext"
19742
19743
19744    :
19745
19746
19747
19748$as_echo "#define GNULIB_CLOSE_STREAM 1" >>confdefs.h
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760  gl_LIBOBJS="$gl_LIBOBJS closein.$ac_objext"
19761
19762
19763    :
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774  gl_LIBOBJS="$gl_LIBOBJS closeout.$ac_objext"
19775
19776
19777    :
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789  gl_LIBOBJS="$gl_LIBOBJS md5.$ac_objext"
19790
19791
19792
19793
19794  :
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805  gl_LIBOBJS="$gl_LIBOBJS sha1.$ac_objext"
19806
19807
19808
19809
19810  :
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821  gl_LIBOBJS="$gl_LIBOBJS sha256.$ac_objext"
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836  gl_LIBOBJS="$gl_LIBOBJS sha512.$ac_objext"
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850     if test $gl_cv_have_include_next = yes; then
19851       gl_cv_next_ctype_h='<'ctype.h'>'
19852     else
19853       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
19854$as_echo_n "checking absolute name of <ctype.h>... " >&6; }
19855if test "${gl_cv_next_ctype_h+set}" = set; then :
19856  $as_echo_n "(cached) " >&6
19857else
19858
19859          if test $ac_cv_header_ctype_h = yes; then
19860            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19861/* end confdefs.h.  */
19862#include <ctype.h>
19863
19864_ACEOF
19865                                                                                                case "$host_os" in
19866              aix*) gl_absname_cpp="$ac_cpp -C" ;;
19867              *)    gl_absname_cpp="$ac_cpp" ;;
19868            esac
19869                                                gl_cv_next_ctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19870               sed -n '\#/ctype.h#{
19871                 s#.*"\(.*/ctype.h\)".*#\1#
19872                 s#^/[^/]#//&#
19873                 p
19874                 q
19875               }'`'"'
19876          else
19877            gl_cv_next_ctype_h='<'ctype.h'>'
19878          fi
19879
19880fi
19881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
19882$as_echo "$gl_cv_next_ctype_h" >&6; }
19883     fi
19884     NEXT_CTYPE_H=$gl_cv_next_ctype_h
19885
19886     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19887       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19888       gl_next_as_first_directive='<'ctype.h'>'
19889     else
19890       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19891       gl_next_as_first_directive=$gl_cv_next_ctype_h
19892     fi
19893     NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908  gl_LIBOBJS="$gl_LIBOBJS cycle-check.$ac_objext"
19909
19910
19911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
19912$as_echo_n "checking for d_ino member in directory struct... " >&6; }
19913if test "${gl_cv_struct_dirent_d_ino+set}" = set; then :
19914  $as_echo_n "(cached) " >&6
19915else
19916  if test "$cross_compiling" = yes; then :
19917  gl_cv_struct_dirent_d_ino=no
19918else
19919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19920/* end confdefs.h.  */
19921#include <sys/types.h>
19922             #include <sys/stat.h>
19923             #include <dirent.h>
19924
19925int
19926main ()
19927{
19928DIR *dp = opendir (".");
19929             struct dirent *e;
19930             struct stat st;
19931             if (! dp)
19932               return 1;
19933             e = readdir (dp);
19934             return ! (e
19935                       && stat (e->d_name, &st) == 0
19936                       && e->d_ino == st.st_ino);
19937  ;
19938  return 0;
19939}
19940_ACEOF
19941if ac_fn_c_try_run "$LINENO"; then :
19942  gl_cv_struct_dirent_d_ino=yes
19943else
19944  gl_cv_struct_dirent_d_ino=no
19945fi
19946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19947  conftest.$ac_objext conftest.beam conftest.$ac_ext
19948fi
19949
19950fi
19951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
19952$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
19953   if test $gl_cv_struct_dirent_d_ino = yes; then
19954
19955$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
19956
19957   fi
19958
19959
19960  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
19961$as_echo_n "checking for d_type member in directory struct... " >&6; }
19962if test "${gl_cv_struct_dirent_d_type+set}" = set; then :
19963  $as_echo_n "(cached) " >&6
19964else
19965  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19966/* end confdefs.h.  */
19967
19968#include <sys/types.h>
19969#include <dirent.h>
19970
19971int
19972main ()
19973{
19974struct dirent dp; dp.d_type = 0;
19975  ;
19976  return 0;
19977}
19978_ACEOF
19979if ac_fn_c_try_link "$LINENO"; then :
19980  gl_cv_struct_dirent_d_type=yes
19981else
19982  gl_cv_struct_dirent_d_type=no
19983fi
19984rm -f core conftest.err conftest.$ac_objext \
19985    conftest$ac_exeext conftest.$ac_ext
19986
19987
19988fi
19989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
19990$as_echo "$gl_cv_struct_dirent_d_type" >&6; }
19991   if test $gl_cv_struct_dirent_d_type = yes; then
19992
19993$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
19994
19995   fi
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007     if test $gl_cv_have_include_next = yes; then
20008       gl_cv_next_dirent_h='<'dirent.h'>'
20009     else
20010       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
20011$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
20012if test "${gl_cv_next_dirent_h+set}" = set; then :
20013  $as_echo_n "(cached) " >&6
20014else
20015
20016          if test $ac_cv_header_dirent_h = yes; then
20017            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20018/* end confdefs.h.  */
20019#include <dirent.h>
20020
20021_ACEOF
20022                                                                                                case "$host_os" in
20023              aix*) gl_absname_cpp="$ac_cpp -C" ;;
20024              *)    gl_absname_cpp="$ac_cpp" ;;
20025            esac
20026                                                gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20027               sed -n '\#/dirent.h#{
20028                 s#.*"\(.*/dirent.h\)".*#\1#
20029                 s#^/[^/]#//&#
20030                 p
20031                 q
20032               }'`'"'
20033          else
20034            gl_cv_next_dirent_h='<'dirent.h'>'
20035          fi
20036
20037fi
20038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
20039$as_echo "$gl_cv_next_dirent_h" >&6; }
20040     fi
20041     NEXT_DIRENT_H=$gl_cv_next_dirent_h
20042
20043     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20044       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20045       gl_next_as_first_directive='<'dirent.h'>'
20046     else
20047       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20048       gl_next_as_first_directive=$gl_cv_next_dirent_h
20049     fi
20050     NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065  gl_LIBOBJS="$gl_LIBOBJS opendir-safer.$ac_objext"
20066
20067
20068
20069
20070$as_echo "#define GNULIB_DIRENT_SAFER 1" >>confdefs.h
20071
20072
20073
20074
20075
20076    :
20077
20078
20079
20080
20081
20082
20083
20084  for ac_func in dirfd
20085do :
20086  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
20087if test "x$ac_cv_func_dirfd" = x""yes; then :
20088  cat >>confdefs.h <<_ACEOF
20089#define HAVE_DIRFD 1
20090_ACEOF
20091
20092fi
20093done
20094
20095  ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
20096     #include <dirent.h>
20097"
20098if test "x$ac_cv_have_decl_dirfd" = x""yes; then :
20099  ac_have_decl=1
20100else
20101  ac_have_decl=0
20102fi
20103
20104cat >>confdefs.h <<_ACEOF
20105#define HAVE_DECL_DIRFD $ac_have_decl
20106_ACEOF
20107
20108  if test $ac_cv_have_decl_dirfd = no; then
20109    HAVE_DECL_DIRFD=0
20110  fi
20111
20112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
20113$as_echo_n "checking whether dirfd is a macro... " >&6; }
20114if test "${gl_cv_func_dirfd_macro+set}" = set; then :
20115  $as_echo_n "(cached) " >&6
20116else
20117  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20118/* end confdefs.h.  */
20119
20120#include <sys/types.h>
20121#include <dirent.h>
20122#ifdef dirfd
20123 dirent_header_defines_dirfd
20124#endif
20125_ACEOF
20126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20127  $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
20128  gl_cv_func_dirfd_macro=yes
20129else
20130  gl_cv_func_dirfd_macro=no
20131fi
20132rm -f conftest*
20133
20134fi
20135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
20136$as_echo "$gl_cv_func_dirfd_macro" >&6; }
20137
20138  # Use the replacement only if we have no function, macro,
20139  # or declaration with that name.
20140  if test $ac_cv_func_dirfd,$ac_cv_have_decl_dirfd,$gl_cv_func_dirfd_macro \
20141      = no,no,no; then
20142
20143
20144
20145
20146
20147
20148
20149
20150  for ac_func in dirfd
20151do :
20152  ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
20153if test "x$ac_cv_func_dirfd" = x""yes; then :
20154  cat >>confdefs.h <<_ACEOF
20155#define HAVE_DIRFD 1
20156_ACEOF
20157
20158else
20159
20160    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
20161
20162fi
20163done
20164
20165
20166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
20167$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
20168if test "${gl_cv_sys_dir_fd_member_name+set}" = set; then :
20169  $as_echo_n "(cached) " >&6
20170else
20171
20172        dirfd_save_CFLAGS=$CFLAGS
20173        for ac_expr in d_fd dd_fd; do
20174
20175          CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
20176          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20177/* end confdefs.h.  */
20178
20179             #include <sys/types.h>
20180             #include <dirent.h>
20181int
20182main ()
20183{
20184DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
20185  ;
20186  return 0;
20187}
20188_ACEOF
20189if ac_fn_c_try_compile "$LINENO"; then :
20190  dir_fd_found=yes
20191
20192fi
20193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20194          CFLAGS=$dirfd_save_CFLAGS
20195          test "$dir_fd_found" = yes && break
20196        done
20197        test "$dir_fd_found" = yes || ac_expr=no_such_member
20198
20199        gl_cv_sys_dir_fd_member_name=$ac_expr
20200
20201
20202fi
20203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
20204$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
20205    if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
20206
20207cat >>confdefs.h <<_ACEOF
20208#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
20209_ACEOF
20210
20211    fi
20212
20213  fi
20214
20215
20216
20217  GNULIB_DIRFD=1
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229  gl_LIBOBJS="$gl_LIBOBJS basename.$ac_objext"
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239  gl_LIBOBJS="$gl_LIBOBJS dirname.$ac_objext"
20240
20241
20242
20243
20244$as_echo "#define GNULIB_DIRNAME 1" >>confdefs.h
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256  gl_LIBOBJS="$gl_LIBOBJS basename-lgpl.$ac_objext"
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266  gl_LIBOBJS="$gl_LIBOBJS dirname-lgpl.$ac_objext"
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276  gl_LIBOBJS="$gl_LIBOBJS stripslash.$ac_objext"
20277
20278
20279
20280
20281
20282
20283
20284
20285  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
20286$as_echo_n "checking whether // is distinct from /... " >&6; }
20287if test "${gl_cv_double_slash_root+set}" = set; then :
20288  $as_echo_n "(cached) " >&6
20289else
20290   if test x"$cross_compiling" = xyes ; then
20291        # When cross-compiling, there is no way to tell whether // is special
20292        # short of a list of hosts.  However, the only known hosts to date
20293        # that have a distinct // are Apollo DomainOS (too old to port to),
20294        # Cygwin, and z/OS.  If anyone knows of another system for which // has
20295        # special semantics and is distinct from /, please report it to
20296        # <bug-gnulib@gnu.org>.
20297        case $host in
20298          *-cygwin | i370-ibm-openedition)
20299            gl_cv_double_slash_root=yes ;;
20300          *)
20301            # Be optimistic and assume that / and // are the same when we
20302            # don't know.
20303            gl_cv_double_slash_root='unknown, assuming no' ;;
20304        esac
20305      else
20306        set x `ls -di / // 2>/dev/null`
20307        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
20308          gl_cv_double_slash_root=no
20309        else
20310          gl_cv_double_slash_root=yes
20311        fi
20312      fi
20313fi
20314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
20315$as_echo "$gl_cv_double_slash_root" >&6; }
20316  if test "$gl_cv_double_slash_root" = yes; then
20317
20318$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
20319
20320  fi
20321
20322
20323
20324
20325
20326  if test $ac_cv_func_dup2 = no; then
20327    HAVE_DUP2=0
20328
20329
20330
20331
20332
20333
20334
20335
20336  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
20337
20338  else
20339    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
20340$as_echo_n "checking whether dup2 works... " >&6; }
20341if test "${gl_cv_func_dup2_works+set}" = set; then :
20342  $as_echo_n "(cached) " >&6
20343else
20344  if test "$cross_compiling" = yes; then :
20345  case "$host_os" in
20346           mingw*) # on this platform, dup2 always returns 0 for success
20347             gl_cv_func_dup2_works=no;;
20348           cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
20349             gl_cv_func_dup2_works=no;;
20350           linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
20351                   # closed fd may yield -EBADF instead of -1 / errno=EBADF.
20352             gl_cv_func_dup2_works=no;;
20353           freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
20354             gl_cv_func_dup2_works=no;;
20355           *) gl_cv_func_dup2_works=yes;;
20356         esac
20357else
20358  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20359/* end confdefs.h.  */
20360
20361         #include <unistd.h>
20362#include <errno.h>
20363int
20364main ()
20365{
20366if (dup2 (1, 1) == 0)
20367              return 1;
20368            close (0);
20369            if (dup2 (0, 0) != -1)
20370              return 2;
20371            /* Many gnulib modules require POSIX conformance of EBADF.  */
20372            if (dup2 (1, 1000000) == -1 && errno != EBADF)
20373              return 3;
20374            return 0;
20375
20376  ;
20377  return 0;
20378}
20379
20380_ACEOF
20381if ac_fn_c_try_run "$LINENO"; then :
20382  gl_cv_func_dup2_works=yes
20383else
20384  gl_cv_func_dup2_works=no
20385fi
20386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20387  conftest.$ac_objext conftest.beam conftest.$ac_ext
20388fi
20389
20390
20391fi
20392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
20393$as_echo "$gl_cv_func_dup2_works" >&6; }
20394    if test "$gl_cv_func_dup2_works" = no; then
20395
20396
20397  if test $ac_cv_func_dup2 = yes; then
20398    REPLACE_DUP2=1
20399  fi
20400
20401
20402
20403
20404
20405
20406
20407
20408  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
20409
20410
20411    fi
20412  fi
20413
20414
20415
20416  GNULIB_DUP2=1
20417
20418
20419
20420
20421  GNULIB_ENVIRON=1
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
20438$as_echo_n "checking for error_at_line... " >&6; }
20439if test "${ac_cv_lib_error_at_line+set}" = set; then :
20440  $as_echo_n "(cached) " >&6
20441else
20442  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20443/* end confdefs.h.  */
20444#include <error.h>
20445int
20446main ()
20447{
20448error_at_line (0, 0, "", 0, "an error occurred");
20449  ;
20450  return 0;
20451}
20452_ACEOF
20453if ac_fn_c_try_link "$LINENO"; then :
20454  ac_cv_lib_error_at_line=yes
20455else
20456  ac_cv_lib_error_at_line=no
20457fi
20458rm -f core conftest.err conftest.$ac_objext \
20459    conftest$ac_exeext conftest.$ac_ext
20460fi
20461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
20462$as_echo "$ac_cv_lib_error_at_line" >&6; }
20463if test $ac_cv_lib_error_at_line = no; then
20464
20465
20466
20467
20468
20469
20470
20471
20472  gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
20473
20474fi
20475
20476
20477
20478
20479  :
20480
20481
20482
20483
20484  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
20485
20486
20487
20488  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503  for ac_func in euidaccess
20504do :
20505  ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
20506if test "x$ac_cv_func_euidaccess" = x""yes; then :
20507  cat >>confdefs.h <<_ACEOF
20508#define HAVE_EUIDACCESS 1
20509_ACEOF
20510
20511else
20512
20513    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
20514
20515fi
20516done
20517
20518
20519  if test $ac_cv_func_euidaccess = no; then
20520    HAVE_EUIDACCESS=0
20521
20522
20523
20524
20525
20526
20527  # Solaris 9 needs -lgen to get the eaccess function.
20528  # Save and restore LIBS so -lgen isn't added to it.  Otherwise, *all*
20529  # programs in the package would end up linked with that potentially-shared
20530  # library, inducing unnecessary run-time overhead.
20531  LIB_EACCESS=
20532
20533  gl_saved_libs=$LIBS
20534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
20535$as_echo_n "checking for library containing eaccess... " >&6; }
20536if test "${ac_cv_search_eaccess+set}" = set; then :
20537  $as_echo_n "(cached) " >&6
20538else
20539  ac_func_search_save_LIBS=$LIBS
20540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20541/* end confdefs.h.  */
20542
20543/* Override any GCC internal prototype to avoid an error.
20544   Use char because int might match the return type of a GCC
20545   builtin and then its argument prototype would still apply.  */
20546#ifdef __cplusplus
20547extern "C"
20548#endif
20549char eaccess ();
20550int
20551main ()
20552{
20553return eaccess ();
20554  ;
20555  return 0;
20556}
20557_ACEOF
20558for ac_lib in '' gen; do
20559  if test -z "$ac_lib"; then
20560    ac_res="none required"
20561  else
20562    ac_res=-l$ac_lib
20563    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
20564  fi
20565  if ac_fn_c_try_link "$LINENO"; then :
20566  ac_cv_search_eaccess=$ac_res
20567fi
20568rm -f core conftest.err conftest.$ac_objext \
20569    conftest$ac_exeext
20570  if test "${ac_cv_search_eaccess+set}" = set; then :
20571  break
20572fi
20573done
20574if test "${ac_cv_search_eaccess+set}" = set; then :
20575
20576else
20577  ac_cv_search_eaccess=no
20578fi
20579rm conftest.$ac_ext
20580LIBS=$ac_func_search_save_LIBS
20581fi
20582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
20583$as_echo "$ac_cv_search_eaccess" >&6; }
20584ac_res=$ac_cv_search_eaccess
20585if test "$ac_res" != no; then :
20586  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20587  test "$ac_cv_search_eaccess" = "none required" ||
20588                    LIB_EACCESS=$ac_cv_search_eaccess
20589fi
20590
20591    for ac_func in eaccess
20592do :
20593  ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
20594if test "x$ac_cv_func_eaccess" = x""yes; then :
20595  cat >>confdefs.h <<_ACEOF
20596#define HAVE_EACCESS 1
20597_ACEOF
20598
20599fi
20600done
20601
20602  LIBS=$gl_saved_libs
20603
20604  fi
20605
20606
20607
20608  GNULIB_EUIDACCESS=1
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619  gl_LIBOBJS="$gl_LIBOBJS exclude.$ac_objext"
20620
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631  gl_LIBOBJS="$gl_LIBOBJS exitfail.$ac_objext"
20632
20633
20634    :
20635
20636
20637
20638
20639
20640
20641
20642
20643  if test $ac_cv_func_faccessat = no; then
20644    HAVE_FACCESSAT=0
20645
20646
20647
20648
20649
20650
20651
20652
20653  gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
20654
20655  fi
20656
20657
20658
20659$as_echo "#define GNULIB_FACCESSAT 1" >>confdefs.h
20660
20661
20662
20663
20664  GNULIB_FACCESSAT=1
20665
20666
20667
20668
20669
20670
20671  if test $ac_cv_func_fchdir = no; then
20672    REPLACE_FCHDIR=1
20673
20674
20675
20676
20677
20678
20679
20680
20681  gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
20682
20683    :
20684
20685$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
20686
20687                REPLACE_OPENDIR=1
20688    REPLACE_CLOSEDIR=1
20689    REPLACE_DUP=1
20690
20691
20692  REPLACE_OPEN=1
20693
20694
20695
20696
20697
20698
20699
20700
20701  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
20702
20703
20704
20705
20706  :
20707
20708
20709
20710
20711  REPLACE_CLOSE=1
20712
20713
20714
20715
20716
20717
20718
20719
20720  gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
20721
20722
20723
20724  REPLACE_FCLOSE=1
20725
20726
20727
20728
20729
20730
20731
20732
20733  gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
20734
20735
20736
20737
20738
20739  if test $ac_cv_func_dup2 = yes; then
20740    REPLACE_DUP2=1
20741  fi
20742
20743
20744
20745
20746
20747
20748
20749
20750  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
20751
20752
20753
20754
20755
20756  if test $ac_cv_func_fcntl = no; then
20757    HAVE_FCNTL=0
20758  else
20759    REPLACE_FCNTL=1
20760  fi
20761
20762
20763
20764
20765
20766
20767
20768
20769  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
20770
20771
20772
20773    :
20774
20775    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
20776$as_echo_n "checking whether open can visit directories... " >&6; }
20777if test "${gl_cv_func_open_directory_works+set}" = set; then :
20778  $as_echo_n "(cached) " >&6
20779else
20780  if test "$cross_compiling" = yes; then :
20781  gl_cv_func_open_directory_works="guessing no"
20782else
20783  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20784/* end confdefs.h.  */
20785#include <fcntl.h>
20786
20787int
20788main ()
20789{
20790return open(".", O_RDONLY) < 0;
20791  ;
20792  return 0;
20793}
20794_ACEOF
20795if ac_fn_c_try_run "$LINENO"; then :
20796  gl_cv_func_open_directory_works=yes
20797else
20798  gl_cv_func_open_directory_works=no
20799fi
20800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20801  conftest.$ac_objext conftest.beam conftest.$ac_ext
20802fi
20803
20804fi
20805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
20806$as_echo "$gl_cv_func_open_directory_works" >&6; }
20807    if test "$gl_cv_func_open_directory_works" != yes; then
20808
20809$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
20810
20811      REPLACE_FSTAT=1
20812    fi
20813  fi
20814
20815
20816
20817  GNULIB_FCHDIR=1
20818
20819
20820
20821
20822
20823  GNULIB_FCLOSE=1
20824
20825
20826
20827
20828
20829
20830  if test $ac_cv_func_fcntl = no; then
20831
20832
20833
20834  if test $ac_cv_func_fcntl = no; then
20835    HAVE_FCNTL=0
20836  else
20837    REPLACE_FCNTL=1
20838  fi
20839
20840
20841
20842
20843
20844
20845
20846
20847  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
20848
20849
20850  else
20851        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
20852$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
20853if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
20854  $as_echo_n "(cached) " >&6
20855else
20856  if test "$cross_compiling" = yes; then :
20857  # Guess that it works on glibc systems
20858          case $host_os in #((
20859            *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
20860            *)      gl_cv_func_fcntl_f_dupfd_works="guessing no";;
20861          esac
20862else
20863  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20864/* end confdefs.h.  */
20865
20866#include <fcntl.h>
20867
20868int
20869main ()
20870{
20871return fcntl (0, F_DUPFD, -1) != -1;
20872
20873  ;
20874  return 0;
20875}
20876_ACEOF
20877if ac_fn_c_try_run "$LINENO"; then :
20878  gl_cv_func_fcntl_f_dupfd_works=yes
20879else
20880  gl_cv_func_fcntl_f_dupfd_works=no
20881fi
20882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20883  conftest.$ac_objext conftest.beam conftest.$ac_ext
20884fi
20885
20886fi
20887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
20888$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
20889    case $gl_cv_func_fcntl_f_dupfd_works in
20890      *yes) ;;
20891      *)
20892
20893
20894  if test $ac_cv_func_fcntl = no; then
20895    HAVE_FCNTL=0
20896  else
20897    REPLACE_FCNTL=1
20898  fi
20899
20900
20901
20902
20903
20904
20905
20906
20907  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
20908
20909
20910
20911$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
20912 ;;
20913    esac
20914
20915        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
20916$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
20917if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
20918  $as_echo_n "(cached) " >&6
20919else
20920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20921/* end confdefs.h.  */
20922
20923#include <fcntl.h>
20924#ifndef F_DUPFD_CLOEXEC
20925choke me
20926#endif
20927
20928int
20929main ()
20930{
20931
20932  ;
20933  return 0;
20934}
20935_ACEOF
20936if ac_fn_c_try_compile "$LINENO"; then :
20937  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20938/* end confdefs.h.  */
20939
20940#ifdef __linux__
20941/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
20942   it to support the semantics on older kernels that failed with EINVAL.  */
20943choke me
20944#endif
20945
20946int
20947main ()
20948{
20949
20950  ;
20951  return 0;
20952}
20953_ACEOF
20954if ac_fn_c_try_compile "$LINENO"; then :
20955  gl_cv_func_fcntl_f_dupfd_cloexec=yes
20956else
20957  gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
20958fi
20959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20960else
20961  gl_cv_func_fcntl_f_dupfd_cloexec=no
20962fi
20963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20964fi
20965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
20966$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
20967    if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
20968
20969
20970
20971  if test $ac_cv_func_fcntl = no; then
20972    HAVE_FCNTL=0
20973  else
20974    REPLACE_FCNTL=1
20975  fi
20976
20977
20978
20979
20980
20981
20982
20983
20984  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
20985
20986
20987          fi
20988  fi
20989
20990
20991
20992  GNULIB_FCNTL=1
20993
20994
20995
20996
20997
20998
20999
21000
21001
21002
21003     if test $gl_cv_have_include_next = yes; then
21004       gl_cv_next_fcntl_h='<'fcntl.h'>'
21005     else
21006       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
21007$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
21008if test "${gl_cv_next_fcntl_h+set}" = set; then :
21009  $as_echo_n "(cached) " >&6
21010else
21011
21012          if test $ac_cv_header_fcntl_h = yes; then
21013            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21014/* end confdefs.h.  */
21015#include <fcntl.h>
21016
21017_ACEOF
21018                                                                                                case "$host_os" in
21019              aix*) gl_absname_cpp="$ac_cpp -C" ;;
21020              *)    gl_absname_cpp="$ac_cpp" ;;
21021            esac
21022                                                gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21023               sed -n '\#/fcntl.h#{
21024                 s#.*"\(.*/fcntl.h\)".*#\1#
21025                 s#^/[^/]#//&#
21026                 p
21027                 q
21028               }'`'"'
21029          else
21030            gl_cv_next_fcntl_h='<'fcntl.h'>'
21031          fi
21032
21033fi
21034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
21035$as_echo "$gl_cv_next_fcntl_h" >&6; }
21036     fi
21037     NEXT_FCNTL_H=$gl_cv_next_fcntl_h
21038
21039     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21040       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21041       gl_next_as_first_directive='<'fcntl.h'>'
21042     else
21043       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21044       gl_next_as_first_directive=$gl_cv_next_fcntl_h
21045     fi
21046     NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060  gl_LIBOBJS="$gl_LIBOBJS open-safer.$ac_objext"
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070  gl_LIBOBJS="$gl_LIBOBJS creat-safer.$ac_objext"
21071
21072  # Prerequisites of lib/open-safer.c.
21073
21074
21075
21076
21077$as_echo "#define GNULIB_FCNTL_SAFER 1" >>confdefs.h
21078
21079
21080
21081
21082$as_echo "#define GNULIB_FD_SAFER_FLAG 1" >>confdefs.h
21083
21084
21085
21086
21087
21088  if test $ac_cv_func_fdopendir = no; then
21089
21090
21091
21092
21093
21094
21095
21096
21097  gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107  gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
21108
21109
21110    :
21111
21112    HAVE_FDOPENDIR=0
21113  else
21114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
21115$as_echo_n "checking whether fdopendir works... " >&6; }
21116if test "${gl_cv_func_fdopendir_works+set}" = set; then :
21117  $as_echo_n "(cached) " >&6
21118else
21119  if test "$cross_compiling" = yes; then :
21120  gl_cv_func_fdopendir_works="guessing no"
21121else
21122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21123/* end confdefs.h.  */
21124
21125#include <dirent.h>
21126#include <fcntl.h>
21127
21128int
21129main ()
21130{
21131int fd = open ("conftest.c", O_RDONLY);
21132     if (fd < 0) return 2;
21133     return !!fdopendir (fd);
21134  ;
21135  return 0;
21136}
21137_ACEOF
21138if ac_fn_c_try_run "$LINENO"; then :
21139  gl_cv_func_fdopendir_works=yes
21140else
21141  gl_cv_func_fdopendir_works=no
21142fi
21143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21144  conftest.$ac_objext conftest.beam conftest.$ac_ext
21145fi
21146
21147fi
21148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
21149$as_echo "$gl_cv_func_fdopendir_works" >&6; }
21150    if test "$gl_cv_func_fdopendir_works" != yes; then
21151      REPLACE_FDOPENDIR=1
21152
21153    :
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163  gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
21164
21165    fi
21166  fi
21167
21168
21169
21170  GNULIB_FDOPENDIR=1
21171
21172
21173  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
21174$as_echo_n "checking whether fflush works on input streams... " >&6; }
21175if test "${gl_cv_func_fflush_stdin+set}" = set; then :
21176  $as_echo_n "(cached) " >&6
21177else
21178  echo hello world > conftest.txt
21179     if test "$cross_compiling" = yes; then :
21180        gl_cv_func_fflush_stdin=no
21181else
21182  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21183/* end confdefs.h.  */
21184
21185#include <stdio.h>
21186#include <unistd.h>
21187
21188int
21189main ()
21190{
21191FILE *f = fopen ("conftest.txt", "r");
21192         char buffer[10];
21193         int fd;
21194         int c;
21195         if (f == NULL)
21196           return 1;
21197         fd = fileno (f);
21198         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
21199           return 2;
21200         /* For deterministic results, ensure f read a bigger buffer.  */
21201         if (lseek (fd, 0, SEEK_CUR) == 5)
21202           return 3;
21203         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
21204            on BSD systems and on mingw.  */
21205         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
21206           return 4;
21207         if (lseek (fd, 0, SEEK_CUR) != 5)
21208           return 5;
21209         /* Verify behaviour of fflush after ungetc. See
21210            <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
21211         /* Verify behaviour of fflush after a backup ungetc.  This fails on
21212            mingw.  */
21213         c = fgetc (f);
21214         ungetc (c, f);
21215         fflush (f);
21216         if (fgetc (f) != c)
21217           return 6;
21218         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
21219            on glibc 2.8 and on BSD systems.  */
21220         c = fgetc (f);
21221         ungetc ('@', f);
21222         fflush (f);
21223         if (fgetc (f) != c)
21224           return 7;
21225         return 0;
21226
21227  ;
21228  return 0;
21229}
21230_ACEOF
21231if ac_fn_c_try_run "$LINENO"; then :
21232  gl_cv_func_fflush_stdin=yes
21233else
21234  gl_cv_func_fflush_stdin=no
21235fi
21236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21237  conftest.$ac_objext conftest.beam conftest.$ac_ext
21238fi
21239
21240     rm conftest.txt
21241
21242fi
21243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
21244$as_echo "$gl_cv_func_fflush_stdin" >&6; }
21245  if test $gl_cv_func_fflush_stdin = no; then
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255  gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265  gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
21266
21267
21268  REPLACE_FFLUSH=1
21269  REPLACE_FSEEKO=1
21270
21271
21272  :
21273
21274
21275  fi
21276
21277
21278
21279  GNULIB_FFLUSH=1
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290  gl_LIBOBJS="$gl_LIBOBJS file-type.$ac_objext"
21291
21292
21293
21294  ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
21295if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
21296
21297cat >>confdefs.h <<_ACEOF
21298#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21299_ACEOF
21300
21301
21302$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
21303
21304else
21305
21306
21307
21308
21309
21310
21311
21312
21313  gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext"
21314
21315fi
21316
21317
21318    if test $ac_cv_member_struct_stat_st_blocks = no; then
21319
21320
21321  :
21322
21323  fi
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335  gl_LIBOBJS="$gl_LIBOBJS filemode.$ac_objext"
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349  gl_LIBOBJS="$gl_LIBOBJS filenamecat.$ac_objext"
21350
21351
21352
21353
21354$as_echo "#define GNULIB_FILENAMECAT 1" >>confdefs.h
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366  gl_LIBOBJS="$gl_LIBOBJS filenamecat-lgpl.$ac_objext"
21367
21368
21369
21370
21371
21372
21373  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
21374$as_echo_n "checking for flexible array member... " >&6; }
21375if test "${ac_cv_c_flexmember+set}" = set; then :
21376  $as_echo_n "(cached) " >&6
21377else
21378  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21379/* end confdefs.h.  */
21380#include <stdlib.h>
21381            #include <stdio.h>
21382            #include <stddef.h>
21383            struct s { int n; double d[]; };
21384int
21385main ()
21386{
21387int m = getchar ();
21388            struct s *p = malloc (offsetof (struct s, d)
21389                                  + m * sizeof (double));
21390            p->d[0] = 0.0;
21391            return p->d != (double *) NULL;
21392  ;
21393  return 0;
21394}
21395_ACEOF
21396if ac_fn_c_try_compile "$LINENO"; then :
21397  ac_cv_c_flexmember=yes
21398else
21399  ac_cv_c_flexmember=no
21400fi
21401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21402fi
21403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
21404$as_echo "$ac_cv_c_flexmember" >&6; }
21405  if test $ac_cv_c_flexmember = yes; then
21406
21407$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
21408
21409  else
21410    $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
21411
21412  fi
21413
21414
21415
21416
21417  FLOAT_H=
21418  case "$host_os" in
21419    beos* | openbsd*)
21420      FLOAT_H=float.h
21421
21422
21423
21424
21425
21426
21427     if test $gl_cv_have_include_next = yes; then
21428       gl_cv_next_float_h='<'float.h'>'
21429     else
21430       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
21431$as_echo_n "checking absolute name of <float.h>... " >&6; }
21432if test "${gl_cv_next_float_h+set}" = set; then :
21433  $as_echo_n "(cached) " >&6
21434else
21435
21436          if test $ac_cv_header_float_h = yes; then
21437            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21438/* end confdefs.h.  */
21439#include <float.h>
21440
21441_ACEOF
21442                                                                                                case "$host_os" in
21443              aix*) gl_absname_cpp="$ac_cpp -C" ;;
21444              *)    gl_absname_cpp="$ac_cpp" ;;
21445            esac
21446                                                gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21447               sed -n '\#/float.h#{
21448                 s#.*"\(.*/float.h\)".*#\1#
21449                 s#^/[^/]#//&#
21450                 p
21451                 q
21452               }'`'"'
21453          else
21454            gl_cv_next_float_h='<'float.h'>'
21455          fi
21456
21457fi
21458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
21459$as_echo "$gl_cv_next_float_h" >&6; }
21460     fi
21461     NEXT_FLOAT_H=$gl_cv_next_float_h
21462
21463     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21464       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21465       gl_next_as_first_directive='<'float.h'>'
21466     else
21467       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21468       gl_next_as_first_directive=$gl_cv_next_float_h
21469     fi
21470     NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
21471
21472
21473
21474      ;;
21475  esac
21476
21477
21478
21479
21480
21481
21482
21483  FNMATCH_H=
21484  gl_fnmatch_required_lowercase=`echo $gl_fnmatch_required | tr 'A-Z' 'a-z'`
21485  gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
21486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
21487$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
21488if { as_var=$gl_fnmatch_cache_var; eval "test \"\${$as_var+set}\" = set"; }; then :
21489  $as_echo_n "(cached) " >&6
21490else
21491                           if test $gl_fnmatch_required = GNU; then
21492       gl_fnmatch_gnu_start=
21493       gl_fnmatch_gnu_end=
21494     else
21495       gl_fnmatch_gnu_start='#if 0'
21496       gl_fnmatch_gnu_end='#endif'
21497     fi
21498     if test "$cross_compiling" = yes; then :
21499  eval "$gl_fnmatch_cache_var=\"guessing no\""
21500else
21501  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21502/* end confdefs.h.  */
21503#include <fnmatch.h>
21504            static int
21505            y (char const *pattern, char const *string, int flags)
21506            {
21507              return fnmatch (pattern, string, flags) == 0;
21508            }
21509            static int
21510            n (char const *pattern, char const *string, int flags)
21511            {
21512              return fnmatch (pattern, string, flags) == FNM_NOMATCH;
21513            }
21514
21515int
21516main ()
21517{
21518char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
21519            char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
21520            static char const A_1[] = { 'A' - 1, 0 };
21521            static char const A01[] = { 'A' + 1, 0 };
21522            static char const a_1[] = { 'a' - 1, 0 };
21523            static char const a01[] = { 'a' + 1, 0 };
21524            static char const bs_1[] = { '\\\\' - 1, 0 };
21525            static char const bs01[] = { '\\\\' + 1, 0 };
21526            return
21527             !(n ("a*", "", 0)
21528               && y ("a*", "abc", 0)
21529               && n ("d*/*1", "d/s/1", FNM_PATHNAME)
21530               && y ("a\\\\bc", "abc", 0)
21531               && n ("a\\\\bc", "abc", FNM_NOESCAPE)
21532               && y ("*x", ".x", 0)
21533               && n ("*x", ".x", FNM_PERIOD)
21534               && y (Apat, "\\\\", 0) && y (Apat, "A", 0)
21535               && y (apat, "\\\\", 0) && y (apat, "a", 0)
21536               && n (Apat, A_1, 0) == ('A' < '\\\\')
21537               && n (apat, a_1, 0) == ('a' < '\\\\')
21538               && y (Apat, A01, 0) == ('A' < '\\\\')
21539               && y (apat, a01, 0) == ('a' < '\\\\')
21540               && y (Apat, bs_1, 0) == ('A' < '\\\\')
21541               && y (apat, bs_1, 0) == ('a' < '\\\\')
21542               && n (Apat, bs01, 0) == ('A' < '\\\\')
21543               && n (apat, bs01, 0) == ('a' < '\\\\')
21544               $gl_fnmatch_gnu_start
21545               && y ("xxXX", "xXxX", FNM_CASEFOLD)
21546               && y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)
21547               && n ("d*/*1", "d/s/1", FNM_FILE_NAME)
21548               && y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)
21549               && y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)
21550               && y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)
21551               $gl_fnmatch_gnu_end
21552              );
21553
21554  ;
21555  return 0;
21556}
21557_ACEOF
21558if ac_fn_c_try_run "$LINENO"; then :
21559  eval "$gl_fnmatch_cache_var=yes"
21560else
21561  eval "$gl_fnmatch_cache_var=no"
21562fi
21563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21564  conftest.$ac_objext conftest.beam conftest.$ac_ext
21565fi
21566
21567
21568fi
21569eval ac_res=\$$gl_fnmatch_cache_var
21570	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21571$as_echo "$ac_res" >&6; }
21572  eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
21573  if test "$gl_fnmatch_result" = yes; then
21574            rm -f "$gl_source_base/fnmatch.h"
21575  else
21576    FNMATCH_H=fnmatch.h
21577
21578
21579
21580
21581
21582
21583
21584
21585  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
21586
21587
21588cat >>confdefs.h <<_ACEOF
21589#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
21590_ACEOF
21591
21592
21593    ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
21594"
21595if test "x$ac_cv_have_decl_isblank" = x""yes; then :
21596  ac_have_decl=1
21597else
21598  ac_have_decl=0
21599fi
21600
21601cat >>confdefs.h <<_ACEOF
21602#define HAVE_DECL_ISBLANK $ac_have_decl
21603_ACEOF
21604
21605
21606
21607  fi
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618  case "$host_os" in
21619    mingw* | pw*)
21620            REPLACE_FOPEN=1
21621            gl_cv_func_fopen_slash="guessing no"
21622      ;;
21623    *)
21624                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
21625$as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
21626if test "${gl_cv_func_fopen_slash+set}" = set; then :
21627  $as_echo_n "(cached) " >&6
21628else
21629
21630          if test "$cross_compiling" = yes; then :
21631
21632             case "$host_os" in
21633               solaris2.[0-9]*) gl_cv_func_fopen_slash="guessing no" ;;
21634               hpux*)           gl_cv_func_fopen_slash="guessing no" ;;
21635               *)               gl_cv_func_fopen_slash="guessing yes" ;;
21636             esac
21637
21638else
21639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21640/* end confdefs.h.  */
21641
21642#include <stddef.h>
21643#include <stdio.h>
21644int main ()
21645{
21646  return fopen ("conftest.sl/", "w") != NULL;
21647}
21648_ACEOF
21649if ac_fn_c_try_run "$LINENO"; then :
21650  gl_cv_func_fopen_slash=yes
21651else
21652  gl_cv_func_fopen_slash=no
21653fi
21654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21655  conftest.$ac_objext conftest.beam conftest.$ac_ext
21656fi
21657
21658          rm -f conftest.sl
21659
21660fi
21661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
21662$as_echo "$gl_cv_func_fopen_slash" >&6; }
21663      ;;
21664  esac
21665  case "$gl_cv_func_fopen_slash" in
21666    *no)
21667
21668$as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
21669
21670      REPLACE_FOPEN=1
21671      ;;
21672  esac
21673  if test $REPLACE_FOPEN = 1; then
21674
21675
21676
21677
21678
21679
21680
21681
21682  gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
21683
21684
21685
21686
21687  fi
21688
21689
21690
21691  GNULIB_FOPEN=1
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702  gl_LIBOBJS="$gl_LIBOBJS fopen-safer.$ac_objext"
21703
21704
21705
21706
21707$as_echo "#define GNULIB_FOPEN_SAFER 1" >>confdefs.h
21708
21709
21710
21711
21712
21713  fp_headers='
21714#     include <stdio.h>
21715#     if HAVE_STDIO_EXT_H
21716#      include <stdio_ext.h>
21717#     endif
21718'
21719  ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
21720"
21721if test "x$ac_cv_have_decl___fpending" = x""yes; then :
21722  ac_have_decl=1
21723else
21724  ac_have_decl=0
21725fi
21726
21727cat >>confdefs.h <<_ACEOF
21728#define HAVE_DECL___FPENDING $ac_have_decl
21729_ACEOF
21730
21731  if test $ac_cv_func___fpending = no; then
21732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
21733$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
21734if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
21735  $as_echo_n "(cached) " >&6
21736else
21737
21738        for ac_expr in                                                    \
21739                                                                          \
21740            '# glibc2'                                                    \
21741            'fp->_IO_write_ptr - fp->_IO_write_base'                      \
21742                                                                          \
21743            '# traditional Unix'                                          \
21744            'fp->_ptr - fp->_base'                                        \
21745                                                                          \
21746            '# BSD'                                                       \
21747            'fp->_p - fp->_bf._base'                                      \
21748                                                                          \
21749            '# SCO, Unixware'                                             \
21750            '(fp->__ptr ? fp->__ptr - fp->__base : 0)'                    \
21751                                                                          \
21752            '# QNX'                                                       \
21753            '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
21754                                                                          \
21755            '# old glibc?'                                                \
21756            'fp->__bufp - fp->__buffer'                                   \
21757                                                                          \
21758            '# old glibc iostream?'                                       \
21759            'fp->_pptr - fp->_pbase'                                      \
21760                                                                          \
21761            '# emx+gcc'                                                   \
21762            'fp->_ptr - fp->_buffer'                                      \
21763                                                                          \
21764            '# VMS'                                                       \
21765            '(*fp)->_ptr - (*fp)->_base'                                  \
21766                                                                          \
21767            '# e.g., DGUX R4.11; the info is not available'               \
21768            1                                                             \
21769            ; do
21770
21771          # Skip each embedded comment.
21772          case "$ac_expr" in '#'*) continue;; esac
21773
21774          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21775/* end confdefs.h.  */
21776#include <stdio.h>
21777int
21778main ()
21779{
21780FILE *fp = stdin; (void) ($ac_expr);
21781  ;
21782  return 0;
21783}
21784_ACEOF
21785if ac_fn_c_try_compile "$LINENO"; then :
21786  fp_done=yes
21787
21788fi
21789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21790          test "$fp_done" = yes && break
21791        done
21792
21793        ac_cv_sys_pending_output_n_bytes=$ac_expr
21794
21795
21796fi
21797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
21798$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
21799
21800cat >>confdefs.h <<_ACEOF
21801#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
21802_ACEOF
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812  gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
21813
21814  fi
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825  gl_LIBOBJS="$gl_LIBOBJS fprintftime.$ac_objext"
21826
21827
21828
21829
21830
21831
21832  ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
21833"
21834if test "x$ac_cv_have_decl_fpurge" = x""yes; then :
21835  ac_have_decl=1
21836else
21837  ac_have_decl=0
21838fi
21839
21840cat >>confdefs.h <<_ACEOF
21841#define HAVE_DECL_FPURGE $ac_have_decl
21842_ACEOF
21843
21844  if test "x$ac_cv_func_fpurge" = xyes; then
21845    # Detect BSD bug.  Only cygwin 1.7 is known to be immune.
21846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
21847$as_echo_n "checking whether fpurge works... " >&6; }
21848if test "${gl_cv_func_fpurge_works+set}" = set; then :
21849  $as_echo_n "(cached) " >&6
21850else
21851  if test "$cross_compiling" = yes; then :
21852  gl_cv_func_fpurge_works='guessing no'
21853else
21854  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21855/* end confdefs.h.  */
21856#include <stdio.h>
21857
21858int
21859main ()
21860{
21861FILE *f = fopen ("conftest.txt", "w+");
21862        if (!f) return 1;
21863        if (fputc ('a', f) != 'a') return 2;
21864        rewind (f);
21865        if (fgetc (f) != 'a') return 3;
21866        if (fgetc (f) != EOF) return 4;
21867        if (fpurge (f) != 0) return 5;
21868        if (putc ('b', f) != 'b') return 6;
21869        if (fclose (f) != 0) return 7;
21870        if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
21871        if (fgetc (f) != 'a') return 9;
21872        if (fgetc (f) != 'b') return 10;
21873        if (fgetc (f) != EOF) return 11;
21874        if (fclose (f) != 0) return 12;
21875        if (remove ("conftest.txt") != 0) return 13;
21876        return 0;
21877  ;
21878  return 0;
21879}
21880_ACEOF
21881if ac_fn_c_try_run "$LINENO"; then :
21882  gl_cv_func_fpurge_works=yes
21883else
21884  gl_cv_func_fpurge_works=no
21885fi
21886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21887  conftest.$ac_objext conftest.beam conftest.$ac_ext
21888fi
21889
21890fi
21891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
21892$as_echo "$gl_cv_func_fpurge_works" >&6; }
21893    if test "x$gl_cv_func_fpurge_works" != xyes; then
21894      REPLACE_FPURGE=1
21895
21896
21897
21898
21899
21900
21901
21902
21903  gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
21904
21905    fi
21906  else
21907
21908
21909
21910
21911
21912
21913
21914
21915  gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
21916
21917  fi
21918  if test "x$ac_cv_have_decl_fpurge" = xno; then
21919    HAVE_DECL_FPURGE=0
21920  fi
21921
21922
21923
21924  GNULIB_FPURGE=1
21925
21926
21927
21928
21929
21930
21931
21932
21933  case "$host_os" in
21934    mingw* | pw*)
21935      REPLACE_FREOPEN=1
21936
21937
21938
21939
21940
21941
21942
21943
21944  gl_LIBOBJS="$gl_LIBOBJS freopen.$ac_objext"
21945
21946
21947
21948
21949      ;;
21950  esac
21951
21952
21953
21954  GNULIB_FREOPEN=1
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965  gl_LIBOBJS="$gl_LIBOBJS freopen-safer.$ac_objext"
21966
21967
21968
21969
21970$as_echo "#define GNULIB_FREOPEN_SAFER 1" >>confdefs.h
21971
21972
21973
21974
21975  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
21976$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
21977if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
21978  $as_echo_n "(cached) " >&6
21979else
21980
21981      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21982/* end confdefs.h.  */
21983#include <math.h>
21984                   double x;
21985int
21986main ()
21987{
21988int e; return frexp (x, &e) > 0;
21989  ;
21990  return 0;
21991}
21992_ACEOF
21993if ac_fn_c_try_link "$LINENO"; then :
21994  gl_cv_func_frexp_no_libm=yes
21995else
21996  gl_cv_func_frexp_no_libm=no
21997fi
21998rm -f core conftest.err conftest.$ac_objext \
21999    conftest$ac_exeext conftest.$ac_ext
22000
22001fi
22002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
22003$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
22004  if test $gl_cv_func_frexp_no_libm = yes; then
22005
22006
22007     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
22008$as_echo_n "checking whether frexp works... " >&6; }
22009if test "${gl_cv_func_frexp_works+set}" = set; then :
22010  $as_echo_n "(cached) " >&6
22011else
22012
22013      if test "$cross_compiling" = yes; then :
22014  case "$host_os" in
22015         netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
22016         *)                        gl_cv_func_frexp_works="guessing yes";;
22017       esac
22018
22019else
22020  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22021/* end confdefs.h.  */
22022
22023#include <float.h>
22024#include <math.h>
22025#include <string.h>
22026int main()
22027{
22028  int i;
22029  volatile double x;
22030/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
22031   So we use -zero instead.  */
22032  double zero = 0.0;
22033  /* Test on denormalized numbers.  */
22034  for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
22035    ;
22036  if (x > 0.0)
22037    {
22038      int exp;
22039      double y = frexp (x, &exp);
22040      /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
22041         On NetBSD: y = 0.75. Correct: y = 0.5.  */
22042      if (y != 0.5)
22043        return 1;
22044    }
22045  /* Test on infinite numbers.  */
22046  x = 1.0 / 0.0;
22047  {
22048    int exp;
22049    double y = frexp (x, &exp);
22050    if (y != x)
22051      return 1;
22052  }
22053  /* Test on negative zero.  */
22054  x = -zero;
22055  {
22056    int exp;
22057    double y = frexp (x, &exp);
22058    if (memcmp (&y, &x, sizeof x))
22059      return 1;
22060  }
22061  return 0;
22062}
22063_ACEOF
22064if ac_fn_c_try_run "$LINENO"; then :
22065  gl_cv_func_frexp_works=yes
22066else
22067  gl_cv_func_frexp_works=no
22068fi
22069rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22070  conftest.$ac_objext conftest.beam conftest.$ac_ext
22071fi
22072
22073
22074fi
22075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
22076$as_echo "$gl_cv_func_frexp_works" >&6; }
22077
22078    case "$gl_cv_func_frexp_works" in
22079      *yes) gl_func_frexp_no_libm=yes ;;
22080      *)    gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
22081    esac
22082  else
22083    gl_func_frexp_no_libm=no
22084        REPLACE_FREXP=1
22085  fi
22086  if test $gl_func_frexp_no_libm = yes; then
22087
22088$as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
22089
22090  else
22091
22092
22093
22094
22095
22096
22097
22098
22099  gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
22100
22101  fi
22102
22103
22104
22105  GNULIB_FREXP=1
22106
22107
22108
22109  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
22110$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
22111if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
22112  $as_echo_n "(cached) " >&6
22113else
22114
22115      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22116/* end confdefs.h.  */
22117#include <math.h>
22118                   long double x;
22119int
22120main ()
22121{
22122int e; return frexpl (x, &e) > 0;
22123  ;
22124  return 0;
22125}
22126_ACEOF
22127if ac_fn_c_try_link "$LINENO"; then :
22128  gl_cv_func_frexpl_no_libm=yes
22129else
22130  gl_cv_func_frexpl_no_libm=no
22131fi
22132rm -f core conftest.err conftest.$ac_objext \
22133    conftest$ac_exeext conftest.$ac_ext
22134
22135fi
22136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
22137$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
22138  if test $gl_cv_func_frexpl_no_libm = yes; then
22139
22140
22141     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
22142$as_echo_n "checking whether frexpl works... " >&6; }
22143if test "${gl_cv_func_frexpl_works+set}" = set; then :
22144  $as_echo_n "(cached) " >&6
22145else
22146
22147      if test "$cross_compiling" = yes; then :
22148  case "$host_os" in
22149         aix* | beos* | darwin* | irix* | mingw* | pw*)
22150            gl_cv_func_frexpl_works="guessing no";;
22151         *) gl_cv_func_frexpl_works="guessing yes";;
22152       esac
22153
22154else
22155  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22156/* end confdefs.h.  */
22157
22158#include <float.h>
22159#include <math.h>
22160/* Override the values of <float.h>, like done in float.in.h.  */
22161#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
22162# undef LDBL_MIN_EXP
22163# define LDBL_MIN_EXP    (-16381)
22164#endif
22165extern long double frexpl (long double, int *);
22166int main()
22167{
22168  volatile long double x;
22169  /* Test on finite numbers that fails on AIX 5.1.  */
22170  x = 16.0L;
22171  {
22172    int exp = -9999;
22173    frexpl (x, &exp);
22174    if (exp != 5)
22175      return 1;
22176  }
22177  /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
22178     function returns an invalid (incorrectly normalized) value: it returns
22179               y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
22180     but the correct result is
22181          0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
22182  x = 1.01L;
22183  {
22184    int exp = -9999;
22185    long double y = frexpl (x, &exp);
22186    if (!(exp == 1 && y == 0.505L))
22187      return 1;
22188  }
22189  /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
22190     LDBL_MAX_EXP = 16384.
22191     In the loop end test, we test x against Infinity, rather than comparing
22192     i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
22193  {
22194    int i;
22195    for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
22196      {
22197        int exp = -9999;
22198        frexpl (x, &exp);
22199        if (exp != i)
22200          return 1;
22201      }
22202  }
22203  /* Test on denormalized numbers.  */
22204  {
22205    int i;
22206    for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
22207      ;
22208    if (x > 0.0L)
22209      {
22210        int exp;
22211        long double y = frexpl (x, &exp);
22212        /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
22213           exp = -16382, y = 0.5.  On MacOS X 10.5: exp = -16384, y = 0.5.  */
22214        if (exp != LDBL_MIN_EXP - 1)
22215          return 1;
22216      }
22217  }
22218  /* Test on infinite numbers.  */
22219  x = 1.0L / 0.0L;
22220  {
22221    int exp;
22222    long double y = frexpl (x, &exp);
22223    if (y != x)
22224      return 1;
22225  }
22226  return 0;
22227}
22228_ACEOF
22229if ac_fn_c_try_run "$LINENO"; then :
22230  gl_cv_func_frexpl_works=yes
22231else
22232  gl_cv_func_frexpl_works=no
22233fi
22234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22235  conftest.$ac_objext conftest.beam conftest.$ac_ext
22236fi
22237
22238
22239fi
22240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
22241$as_echo "$gl_cv_func_frexpl_works" >&6; }
22242
22243    case "$gl_cv_func_frexpl_works" in
22244      *yes) gl_func_frexpl_no_libm=yes ;;
22245      *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
22246    esac
22247  else
22248    gl_func_frexpl_no_libm=no
22249        REPLACE_FREXPL=1
22250  fi
22251  if test $gl_func_frexpl_no_libm = yes; then
22252
22253$as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
22254
22255            ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
22256"
22257if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
22258
22259else
22260  HAVE_DECL_FREXPL=0
22261fi
22262
22263  else
22264    HAVE_DECL_FREXPL=0
22265
22266
22267
22268
22269
22270
22271
22272
22273  gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
22274
22275  fi
22276
22277
22278
22279  GNULIB_FREXPL=1
22280
22281
22282
22283
22284
22285
22286
22287
22288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
22289$as_echo_n "checking for fseeko... " >&6; }
22290if test "${gl_cv_func_fseeko+set}" = set; then :
22291  $as_echo_n "(cached) " >&6
22292else
22293
22294      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22295/* end confdefs.h.  */
22296#include <stdio.h>
22297
22298int
22299main ()
22300{
22301fseeko (stdin, 0, 0);
22302  ;
22303  return 0;
22304}
22305_ACEOF
22306if ac_fn_c_try_link "$LINENO"; then :
22307  gl_cv_func_fseeko=yes
22308else
22309  gl_cv_func_fseeko=no
22310fi
22311rm -f core conftest.err conftest.$ac_objext \
22312    conftest$ac_exeext conftest.$ac_ext
22313
22314fi
22315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
22316$as_echo "$gl_cv_func_fseeko" >&6; }
22317  if test $gl_cv_func_fseeko = no \
22318      || test $gl_cv_var_stdin_large_offset = no; then
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328  gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
22329
22330
22331  REPLACE_FSEEKO=1
22332
22333
22334  fi
22335
22336
22337
22338  GNULIB_FSEEKO=1
22339
22340
22341
22342
22343  for ac_header in sys/mount.h
22344do :
22345  ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default
22346     #if HAVE_SYS_PARAM_H
22347       #include <sys/param.h>
22348      #endif
22349"
22350if test "x$ac_cv_header_sys_mount_h" = x""yes; then :
22351  cat >>confdefs.h <<_ACEOF
22352#define HAVE_SYS_MOUNT_H 1
22353_ACEOF
22354
22355fi
22356
22357done
22358
22359
22360
22361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get file system space usage" >&5
22362$as_echo "$as_me: checking how to get file system space usage" >&6;}
22363ac_fsusage_space=no
22364
22365# Perform only the link test since it seems there are no variants of the
22366# statvfs function.  This check is more than just AC_CHECK_FUNCS([statvfs])
22367# because that got a false positive on SCO OSR5.  Adding the declaration
22368# of a `struct statvfs' causes this test to fail (as it should) on such
22369# systems.  That system is reported to work fine with STAT_STATFS4 which
22370# is what it gets when this test fails.
22371if test $ac_fsusage_space = no; then
22372  # SVR4
22373  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for statvfs function (SVR4)" >&5
22374$as_echo_n "checking for statvfs function (SVR4)... " >&6; }
22375if test "${fu_cv_sys_stat_statvfs+set}" = set; then :
22376  $as_echo_n "(cached) " >&6
22377else
22378  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22379/* end confdefs.h.  */
22380#include <sys/types.h>
22381#if defined __GLIBC__ && defined __linux__ && !(defined(__BEOS__) || defined(__HAIKU__))
22382Do not use statvfs on systems with GNU libc on Linux, because that function
22383stats all preceding entries in /proc/mounts, and that makes df hang if even
22384one of the corresponding file systems is hard-mounted, but not available.
22385statvfs in GNU libc on Hurd, BeOS, Haiku operates differently: it only makes
22386a system call.
22387#endif
22388
22389#ifdef __osf__
22390"Do not use Tru64's statvfs implementation"
22391#endif
22392
22393#include <sys/statvfs.h>
22394int
22395main ()
22396{
22397struct statvfs fsd; statvfs (0, &fsd);
22398  ;
22399  return 0;
22400}
22401_ACEOF
22402if ac_fn_c_try_link "$LINENO"; then :
22403  fu_cv_sys_stat_statvfs=yes
22404else
22405  fu_cv_sys_stat_statvfs=no
22406fi
22407rm -f core conftest.err conftest.$ac_objext \
22408    conftest$ac_exeext conftest.$ac_ext
22409fi
22410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statvfs" >&5
22411$as_echo "$fu_cv_sys_stat_statvfs" >&6; }
22412  if test $fu_cv_sys_stat_statvfs = yes; then
22413    ac_fsusage_space=yes
22414
22415$as_echo "#define STAT_STATVFS 1" >>confdefs.h
22416
22417  fi
22418fi
22419
22420if test $ac_fsusage_space = no; then
22421  # DEC Alpha running OSF/1
22422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 3-argument statfs function (DEC OSF/1)" >&5
22423$as_echo_n "checking for 3-argument statfs function (DEC OSF/1)... " >&6; }
22424  if test "${fu_cv_sys_stat_statfs3_osf1+set}" = set; then :
22425  $as_echo_n "(cached) " >&6
22426else
22427  if test "$cross_compiling" = yes; then :
22428  fu_cv_sys_stat_statfs3_osf1=no
22429else
22430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22431/* end confdefs.h.  */
22432
22433#include <sys/param.h>
22434#include <sys/types.h>
22435#include <sys/mount.h>
22436  int
22437  main ()
22438  {
22439    struct statfs fsd;
22440    fsd.f_fsize = 0;
22441    return statfs (".", &fsd, sizeof (struct statfs)) != 0;
22442  }
22443_ACEOF
22444if ac_fn_c_try_run "$LINENO"; then :
22445  fu_cv_sys_stat_statfs3_osf1=yes
22446else
22447  fu_cv_sys_stat_statfs3_osf1=no
22448fi
22449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22450  conftest.$ac_objext conftest.beam conftest.$ac_ext
22451fi
22452
22453fi
22454
22455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statfs3_osf1" >&5
22456$as_echo "$fu_cv_sys_stat_statfs3_osf1" >&6; }
22457  if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
22458    ac_fsusage_space=yes
22459
22460$as_echo "#define STAT_STATFS3_OSF1 1" >>confdefs.h
22461
22462  fi
22463fi
22464
22465if test $ac_fsusage_space = no; then
22466# AIX
22467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
22468$as_echo_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)... " >&6; }
22469  if test "${fu_cv_sys_stat_statfs2_bsize+set}" = set; then :
22470  $as_echo_n "(cached) " >&6
22471else
22472  if test "$cross_compiling" = yes; then :
22473  fu_cv_sys_stat_statfs2_bsize=no
22474else
22475  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22476/* end confdefs.h.  */
22477
22478#ifdef HAVE_SYS_PARAM_H
22479#include <sys/param.h>
22480#endif
22481#ifdef HAVE_SYS_MOUNT_H
22482#include <sys/mount.h>
22483#endif
22484#ifdef HAVE_SYS_VFS_H
22485#include <sys/vfs.h>
22486#endif
22487  int
22488  main ()
22489  {
22490  struct statfs fsd;
22491  fsd.f_bsize = 0;
22492  return statfs (".", &fsd) != 0;
22493  }
22494_ACEOF
22495if ac_fn_c_try_run "$LINENO"; then :
22496  fu_cv_sys_stat_statfs2_bsize=yes
22497else
22498  fu_cv_sys_stat_statfs2_bsize=no
22499fi
22500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22501  conftest.$ac_objext conftest.beam conftest.$ac_ext
22502fi
22503
22504fi
22505
22506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statfs2_bsize" >&5
22507$as_echo "$fu_cv_sys_stat_statfs2_bsize" >&6; }
22508  if test $fu_cv_sys_stat_statfs2_bsize = yes; then
22509    ac_fsusage_space=yes
22510
22511$as_echo "#define STAT_STATFS2_BSIZE 1" >>confdefs.h
22512
22513  fi
22514fi
22515
22516if test $ac_fsusage_space = no; then
22517# SVR3
22518  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
22519$as_echo_n "checking for four-argument statfs (AIX-3.2.5, SVR3)... " >&6; }
22520  if test "${fu_cv_sys_stat_statfs4+set}" = set; then :
22521  $as_echo_n "(cached) " >&6
22522else
22523  if test "$cross_compiling" = yes; then :
22524  fu_cv_sys_stat_statfs4=no
22525else
22526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22527/* end confdefs.h.  */
22528
22529#include <sys/types.h>
22530#include <sys/statfs.h>
22531  int
22532  main ()
22533  {
22534  struct statfs fsd;
22535  return statfs (".", &fsd, sizeof fsd, 0) != 0;
22536  }
22537_ACEOF
22538if ac_fn_c_try_run "$LINENO"; then :
22539  fu_cv_sys_stat_statfs4=yes
22540else
22541  fu_cv_sys_stat_statfs4=no
22542fi
22543rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22544  conftest.$ac_objext conftest.beam conftest.$ac_ext
22545fi
22546
22547fi
22548
22549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statfs4" >&5
22550$as_echo "$fu_cv_sys_stat_statfs4" >&6; }
22551  if test $fu_cv_sys_stat_statfs4 = yes; then
22552    ac_fsusage_space=yes
22553
22554$as_echo "#define STAT_STATFS4 1" >>confdefs.h
22555
22556  fi
22557fi
22558
22559if test $ac_fsusage_space = no; then
22560# 4.4BSD and NetBSD
22561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
22562$as_echo_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)... " >&6; }
22563  if test "${fu_cv_sys_stat_statfs2_fsize+set}" = set; then :
22564  $as_echo_n "(cached) " >&6
22565else
22566  if test "$cross_compiling" = yes; then :
22567  fu_cv_sys_stat_statfs2_fsize=no
22568else
22569  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22570/* end confdefs.h.  */
22571
22572#include <sys/types.h>
22573#ifdef HAVE_SYS_PARAM_H
22574#include <sys/param.h>
22575#endif
22576#ifdef HAVE_SYS_MOUNT_H
22577#include <sys/mount.h>
22578#endif
22579  int
22580  main ()
22581  {
22582  struct statfs fsd;
22583  fsd.f_fsize = 0;
22584  return statfs (".", &fsd) != 0;
22585  }
22586_ACEOF
22587if ac_fn_c_try_run "$LINENO"; then :
22588  fu_cv_sys_stat_statfs2_fsize=yes
22589else
22590  fu_cv_sys_stat_statfs2_fsize=no
22591fi
22592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22593  conftest.$ac_objext conftest.beam conftest.$ac_ext
22594fi
22595
22596fi
22597
22598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_statfs2_fsize" >&5
22599$as_echo "$fu_cv_sys_stat_statfs2_fsize" >&6; }
22600  if test $fu_cv_sys_stat_statfs2_fsize = yes; then
22601    ac_fsusage_space=yes
22602
22603$as_echo "#define STAT_STATFS2_FSIZE 1" >>confdefs.h
22604
22605  fi
22606fi
22607
22608if test $ac_fsusage_space = no; then
22609  # Ultrix
22610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
22611$as_echo_n "checking for two-argument statfs with struct fs_data (Ultrix)... " >&6; }
22612  if test "${fu_cv_sys_stat_fs_data+set}" = set; then :
22613  $as_echo_n "(cached) " >&6
22614else
22615  if test "$cross_compiling" = yes; then :
22616  fu_cv_sys_stat_fs_data=no
22617else
22618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22619/* end confdefs.h.  */
22620
22621#include <sys/types.h>
22622#ifdef HAVE_SYS_PARAM_H
22623#include <sys/param.h>
22624#endif
22625#ifdef HAVE_SYS_MOUNT_H
22626#include <sys/mount.h>
22627#endif
22628#ifdef HAVE_SYS_FS_TYPES_H
22629#include <sys/fs_types.h>
22630#endif
22631  int
22632  main ()
22633  {
22634  struct fs_data fsd;
22635  /* Ultrix's statfs returns 1 for success,
22636     0 for not mounted, -1 for failure.  */
22637  return statfs (".", &fsd) != 1;
22638  }
22639_ACEOF
22640if ac_fn_c_try_run "$LINENO"; then :
22641  fu_cv_sys_stat_fs_data=yes
22642else
22643  fu_cv_sys_stat_fs_data=no
22644fi
22645rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22646  conftest.$ac_objext conftest.beam conftest.$ac_ext
22647fi
22648
22649fi
22650
22651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_stat_fs_data" >&5
22652$as_echo "$fu_cv_sys_stat_fs_data" >&6; }
22653  if test $fu_cv_sys_stat_fs_data = yes; then
22654    ac_fsusage_space=yes
22655
22656$as_echo "#define STAT_STATFS2_FS_DATA 1" >>confdefs.h
22657
22658  fi
22659fi
22660
22661if test $ac_fsusage_space = no; then
22662  # SVR2
22663  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22664/* end confdefs.h.  */
22665#include <sys/filsys.h>
22666
22667_ACEOF
22668if ac_fn_c_try_cpp "$LINENO"; then :
22669
22670$as_echo "#define STAT_READ_FILSYS 1" >>confdefs.h
22671
22672     ac_fsusage_space=yes
22673fi
22674rm -f conftest.err conftest.$ac_ext
22675fi
22676
22677if test $ac_fsusage_space = yes; then :
22678  gl_cv_fs_space=yes
22679else
22680  gl_cv_fs_space=no
22681fi
22682
22683
22684  if test $gl_cv_fs_space = yes; then
22685
22686
22687
22688
22689
22690
22691
22692
22693  gl_LIBOBJS="$gl_LIBOBJS fsusage.$ac_objext"
22694
22695
22696  for ac_header in dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h
22697do :
22698  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22699ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22700eval as_val=\$$as_ac_Header
22701   if test "x$as_val" = x""yes; then :
22702  cat >>confdefs.h <<_ACEOF
22703#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22704_ACEOF
22705
22706fi
22707
22708done
22709
22710
22711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for statfs that truncates block counts" >&5
22712$as_echo_n "checking for statfs that truncates block counts... " >&6; }
22713  if test "${fu_cv_sys_truncating_statfs+set}" = set; then :
22714  $as_echo_n "(cached) " >&6
22715else
22716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22717/* end confdefs.h.  */
22718
22719#if !defined(sun) && !defined(__sun)
22720choke -- this is a workaround for a Sun-specific problem
22721#endif
22722#include <sys/types.h>
22723#include <sys/vfs.h>
22724int
22725main ()
22726{
22727struct statfs t; long c = *(t.f_spare);
22728        if (c) return 0;
22729  ;
22730  return 0;
22731}
22732_ACEOF
22733if ac_fn_c_try_compile "$LINENO"; then :
22734  fu_cv_sys_truncating_statfs=yes
22735else
22736  fu_cv_sys_truncating_statfs=no
22737fi
22738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22739fi
22740
22741  if test $fu_cv_sys_truncating_statfs = yes; then
22742
22743$as_echo "#define STATFS_TRUNCATES_BLOCK_COUNTS 1" >>confdefs.h
22744
22745  fi
22746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_truncating_statfs" >&5
22747$as_echo "$fu_cv_sys_truncating_statfs" >&6; }
22748
22749
22750  fi
22751
22752
22753
22754
22755  if test $ac_cv_func_fsync = no; then
22756    HAVE_FSYNC=0
22757
22758
22759
22760
22761
22762
22763
22764
22765  gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
22766
22767    :
22768  fi
22769
22770
22771
22772  GNULIB_FSYNC=1
22773
22774
22775
22776
22777
22778
22779
22780
22781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
22782$as_echo_n "checking for ftello... " >&6; }
22783if test "${gl_cv_func_ftello+set}" = set; then :
22784  $as_echo_n "(cached) " >&6
22785else
22786
22787      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22788/* end confdefs.h.  */
22789#include <stdio.h>
22790int
22791main ()
22792{
22793ftello (stdin);
22794  ;
22795  return 0;
22796}
22797_ACEOF
22798if ac_fn_c_try_link "$LINENO"; then :
22799  gl_cv_func_ftello=yes
22800else
22801  gl_cv_func_ftello=no
22802fi
22803rm -f core conftest.err conftest.$ac_objext \
22804    conftest$ac_exeext conftest.$ac_ext
22805
22806fi
22807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
22808$as_echo "$gl_cv_func_ftello" >&6; }
22809  if test $gl_cv_func_ftello = no \
22810      || test $gl_cv_var_stdin_large_offset = no; then
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820  gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
22821
22822
22823  REPLACE_FTELLO=1
22824
22825  fi
22826
22827
22828
22829  GNULIB_FTELLO=1
22830
22831
22832
22833
22834
22835  if test $ac_cv_func_ftruncate = no; then
22836    HAVE_FTRUNCATE=0
22837
22838
22839
22840
22841
22842
22843
22844
22845  gl_LIBOBJS="$gl_LIBOBJS ftruncate.$ac_objext"
22846
22847
22848  for ac_func in chsize
22849do :
22850  ac_fn_c_check_func "$LINENO" "chsize" "ac_cv_func_chsize"
22851if test "x$ac_cv_func_chsize" = x""yes; then :
22852  cat >>confdefs.h <<_ACEOF
22853#define HAVE_CHSIZE 1
22854_ACEOF
22855
22856fi
22857done
22858
22859
22860    case "$host_os" in
22861      mingw*)
22862        # Yes, we know mingw lacks ftruncate.
22863        ;;
22864      *)
22865        # If someone lacks ftruncate, make configure fail, and request
22866        # a bug report to inform us about it.
22867        if test x"$SKIP_FTRUNCATE_CHECK" != xyes; then
22868          { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22870as_fn_error "Your system lacks the ftruncate function.
22871              Please report this, along with the output of \"uname -a\", to the
22872              bug-coreutils@gnu.org mailing list.  To continue past this point,
22873              rerun configure with SKIP_FTRUNCATE_CHECK=yes.
22874              E.g., ./configure SKIP_FTRUNCATE_CHECK=yes
22875See \`config.log' for more details." "$LINENO" 5; }
22876        fi
22877    esac
22878  fi
22879
22880
22881
22882  GNULIB_FTRUNCATE=1
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894  gl_LIBOBJS="$gl_LIBOBJS fts.$ac_objext"
22895
22896
22897
22898
22899
22900  GNULIB_OPENAT=1
22901
22902
22903  GNULIB_FCHMODAT=1
22904  GNULIB_FSTATAT=1
22905  GNULIB_MKDIRAT=1
22906
22907
22908  GNULIB_FCHOWNAT=1
22909  GNULIB_UNLINKAT=1
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919  gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959  for ac_func in fchmodat fstatat mkdirat openat unlinkat
22960do :
22961  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22962ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22963eval as_val=\$$as_ac_var
22964   if test "x$as_val" = x""yes; then :
22965  cat >>confdefs.h <<_ACEOF
22966#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22967_ACEOF
22968
22969else
22970
22971    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
22972
22973fi
22974done
22975
22976
22977
22978
22979  case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in
22980  yes+yes)
22981    # GNU/Hurd has unlinkat, but it has the same bug as unlink.
22982    if test $REPLACE_UNLINK = 1; then
22983
22984
22985
22986
22987
22988
22989
22990
22991  gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
22992
22993      REPLACE_UNLINKAT=1
22994    fi ;;
22995  yes+*)
22996    # Solaris 9 has *at functions, but uniformly mishandles trailing
22997    # slash in all of them.
22998
22999
23000
23001
23002
23003
23004
23005
23006  gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
23007
23008    REPLACE_OPENAT=1
23009
23010
23011
23012
23013
23014
23015
23016
23017  gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
23018
23019    REPLACE_FSTATAT=1
23020
23021
23022
23023
23024
23025
23026
23027
23028  gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
23029
23030    REPLACE_UNLINKAT=1
23031    ;;
23032  *)
23033    HAVE_OPENAT=0
23034    HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
23035    HAVE_FSTATAT=0 # No known system with fstatat but not openat
23036
23037
23038
23039  :
23040;;
23041  esac
23042  if test $ac_cv_func_fchmodat != yes; then
23043    HAVE_FCHMODAT=0
23044  fi
23045  if test $ac_cv_func_mkdirat != yes; then
23046    HAVE_MKDIRAT=0
23047  fi
23048
23049
23050  ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
23051if test "x$ac_cv_func_fchownat" = x""yes; then :
23052
23053  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
23054$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
23055if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then :
23056  $as_echo_n "(cached) " >&6
23057else
23058
23059     gl_dangle=conftest.dangle
23060     # Remove any remnants of a previous test.
23061     rm -f $gl_dangle
23062     # Arrange for deletion of the temporary file this test creates.
23063     ac_clean_files="$ac_clean_files $gl_dangle"
23064     ln -s conftest.no-such $gl_dangle
23065     if test "$cross_compiling" = yes; then :
23066  gl_cv_func_fchownat_nofollow_works=no
23067else
23068  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23069/* end confdefs.h.  */
23070
23071#include <fcntl.h>
23072#include <unistd.h>
23073#include <stdlib.h>
23074#include <errno.h>
23075#include <sys/types.h>
23076int
23077main ()
23078{
23079  return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
23080                    AT_SYMLINK_NOFOLLOW) != 0
23081          && errno == ENOENT);
23082}
23083
23084_ACEOF
23085if ac_fn_c_try_run "$LINENO"; then :
23086  gl_cv_func_fchownat_nofollow_works=yes
23087else
23088  gl_cv_func_fchownat_nofollow_works=no
23089fi
23090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23091  conftest.$ac_objext conftest.beam conftest.$ac_ext
23092fi
23093
23094
23095fi
23096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
23097$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
23098  if test $gl_cv_func_fchownat_nofollow_works = no; then :
23099  REPLACE_FCHOWNAT=1
23100
23101$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
23102
23103fi
23104
23105else
23106  HAVE_FCHOWNAT=0
23107fi
23108
23109  if test $REPLACE_CHOWN = 1; then
23110    REPLACE_FCHOWNAT=1
23111  fi
23112  if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
23113
23114
23115
23116
23117
23118
23119
23120
23121  gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
23122
23123  fi
23124
23125
23126
23127
23128    ac_fn_c_check_member "$LINENO" "struct statfs" "f_type" "ac_cv_member_struct_statfs_f_type" "$ac_includes_default
23129     #include <sys/vfs.h>
23130"
23131if test "x$ac_cv_member_struct_statfs_f_type" = x""yes; then :
23132
23133cat >>confdefs.h <<_ACEOF
23134#define HAVE_STRUCT_STATFS_F_TYPE 1
23135_ACEOF
23136
23137
23138fi
23139
23140
23141
23142
23143
23144$as_echo "#define GNULIB_FTS 1" >>confdefs.h
23145
23146
23147
23148      { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&5
23149$as_echo "$as_me: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&6;}
23150  GETADDRINFO_LIB=
23151  gai_saved_LIBS="$LIBS"
23152
23153              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5
23154$as_echo_n "checking for library containing getaddrinfo... " >&6; }
23155if test "${ac_cv_search_getaddrinfo+set}" = set; then :
23156  $as_echo_n "(cached) " >&6
23157else
23158  ac_func_search_save_LIBS=$LIBS
23159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23160/* end confdefs.h.  */
23161
23162/* Override any GCC internal prototype to avoid an error.
23163   Use char because int might match the return type of a GCC
23164   builtin and then its argument prototype would still apply.  */
23165#ifdef __cplusplus
23166extern "C"
23167#endif
23168char getaddrinfo ();
23169int
23170main ()
23171{
23172return getaddrinfo ();
23173  ;
23174  return 0;
23175}
23176_ACEOF
23177for ac_lib in '' socket network net; do
23178  if test -z "$ac_lib"; then
23179    ac_res="none required"
23180  else
23181    ac_res=-l$ac_lib
23182    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23183  fi
23184  if ac_fn_c_try_link "$LINENO"; then :
23185  ac_cv_search_getaddrinfo=$ac_res
23186fi
23187rm -f core conftest.err conftest.$ac_objext \
23188    conftest$ac_exeext
23189  if test "${ac_cv_search_getaddrinfo+set}" = set; then :
23190  break
23191fi
23192done
23193if test "${ac_cv_search_getaddrinfo+set}" = set; then :
23194
23195else
23196  ac_cv_search_getaddrinfo=no
23197fi
23198rm conftest.$ac_ext
23199LIBS=$ac_func_search_save_LIBS
23200fi
23201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5
23202$as_echo "$ac_cv_search_getaddrinfo" >&6; }
23203ac_res=$ac_cv_search_getaddrinfo
23204if test "$ac_res" != no; then :
23205  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23206  if test "$ac_cv_search_getaddrinfo" != "none required"; then
23207       GETADDRINFO_LIB="$ac_cv_search_getaddrinfo"
23208     fi
23209fi
23210
23211  LIBS="$gai_saved_LIBS $GETADDRINFO_LIB"
23212
23213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
23214$as_echo_n "checking for getaddrinfo... " >&6; }
23215if test "${gl_cv_func_getaddrinfo+set}" = set; then :
23216  $as_echo_n "(cached) " >&6
23217else
23218
23219    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23220/* end confdefs.h.  */
23221
23222#include <sys/types.h>
23223#ifdef HAVE_SYS_SOCKET_H
23224#include <sys/socket.h>
23225#endif
23226#ifdef HAVE_NETDB_H
23227#include <netdb.h>
23228#endif
23229#include <stddef.h>
23230
23231int
23232main ()
23233{
23234getaddrinfo("", "", NULL, NULL);
23235  ;
23236  return 0;
23237}
23238_ACEOF
23239if ac_fn_c_try_link "$LINENO"; then :
23240  gl_cv_func_getaddrinfo=yes
23241else
23242  gl_cv_func_getaddrinfo=no
23243fi
23244rm -f core conftest.err conftest.$ac_objext \
23245    conftest$ac_exeext conftest.$ac_ext
23246fi
23247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getaddrinfo" >&5
23248$as_echo "$gl_cv_func_getaddrinfo" >&6; }
23249  if test $gl_cv_func_getaddrinfo = no; then
23250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in ws2tcpip.h and -lws2_32" >&5
23251$as_echo_n "checking for getaddrinfo in ws2tcpip.h and -lws2_32... " >&6; }
23252if test "${gl_cv_w32_getaddrinfo+set}" = set; then :
23253  $as_echo_n "(cached) " >&6
23254else
23255
23256      gl_cv_w32_getaddrinfo=no
23257      am_save_LIBS="$LIBS"
23258      LIBS="$LIBS -lws2_32"
23259      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23260/* end confdefs.h.  */
23261
23262#ifdef HAVE_WS2TCPIP_H
23263#include <ws2tcpip.h>
23264#endif
23265#include <stddef.h>
23266
23267int
23268main ()
23269{
23270getaddrinfo(NULL, NULL, NULL, NULL);
23271  ;
23272  return 0;
23273}
23274_ACEOF
23275if ac_fn_c_try_link "$LINENO"; then :
23276  gl_cv_w32_getaddrinfo=yes
23277fi
23278rm -f core conftest.err conftest.$ac_objext \
23279    conftest$ac_exeext conftest.$ac_ext
23280      LIBS="$am_save_LIBS"
23281
23282fi
23283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_getaddrinfo" >&5
23284$as_echo "$gl_cv_w32_getaddrinfo" >&6; }
23285    if test "$gl_cv_w32_getaddrinfo" = "yes"; then
23286      GETADDRINFO_LIB="-lws2_32"
23287      LIBS="$gai_saved_LIBS $GETADDRINFO_LIB"
23288    else
23289
23290
23291
23292
23293
23294
23295
23296
23297  gl_LIBOBJS="$gl_LIBOBJS getaddrinfo.$ac_objext"
23298
23299    fi
23300  fi
23301
23302  # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an
23303  # inline function declared in ws2tcpip.h, so we need to get that
23304  # header included somehow.
23305  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gai_strerror (possibly via ws2tcpip.h)" >&5
23306$as_echo_n "checking for gai_strerror (possibly via ws2tcpip.h)... " >&6; }
23307if test "${gl_cv_func_gai_strerror+set}" = set; then :
23308  $as_echo_n "(cached) " >&6
23309else
23310
23311      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23312/* end confdefs.h.  */
23313
23314#include <sys/types.h>
23315#ifdef HAVE_SYS_SOCKET_H
23316#include <sys/socket.h>
23317#endif
23318#ifdef HAVE_NETDB_H
23319#include <netdb.h>
23320#endif
23321#ifdef HAVE_WS2TCPIP_H
23322#include <ws2tcpip.h>
23323#endif
23324#include <stddef.h>
23325
23326int
23327main ()
23328{
23329gai_strerror (NULL);
23330  ;
23331  return 0;
23332}
23333_ACEOF
23334if ac_fn_c_try_link "$LINENO"; then :
23335  gl_cv_func_gai_strerror=yes
23336else
23337  gl_cv_func_gai_strerror=no
23338fi
23339rm -f core conftest.err conftest.$ac_objext \
23340    conftest$ac_exeext conftest.$ac_ext
23341fi
23342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gai_strerror" >&5
23343$as_echo "$gl_cv_func_gai_strerror" >&6; }
23344  if test $gl_cv_func_gai_strerror = no; then
23345
23346
23347
23348
23349
23350
23351
23352
23353  gl_LIBOBJS="$gl_LIBOBJS gai_strerror.$ac_objext"
23354
23355  fi
23356
23357  LIBS="$gai_saved_LIBS"
23358
23359
23360
23361
23362
23363
23364
23365
23366
23367      ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
23368"
23369if test "x$ac_cv_member_struct_sockaddr_sa_len" = x""yes; then :
23370
23371cat >>confdefs.h <<_ACEOF
23372#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
23373_ACEOF
23374
23375
23376fi
23377
23378
23379
23380
23381  ac_fn_c_check_decl "$LINENO" "getaddrinfo" "ac_cv_have_decl_getaddrinfo" "
23382  /* sys/types.h is not needed according to POSIX, but the
23383     sys/socket.h in i386-unknown-freebsd4.10 and
23384     powerpc-apple-darwin5.5 required it. */
23385#include <sys/types.h>
23386#ifdef HAVE_SYS_SOCKET_H
23387#include <sys/socket.h>
23388#endif
23389#ifdef HAVE_NETDB_H
23390#include <netdb.h>
23391#endif
23392#ifdef HAVE_WS2TCPIP_H
23393#include <ws2tcpip.h>
23394#endif
23395
23396"
23397if test "x$ac_cv_have_decl_getaddrinfo" = x""yes; then :
23398  ac_have_decl=1
23399else
23400  ac_have_decl=0
23401fi
23402
23403cat >>confdefs.h <<_ACEOF
23404#define HAVE_DECL_GETADDRINFO $ac_have_decl
23405_ACEOF
23406ac_fn_c_check_decl "$LINENO" "freeaddrinfo" "ac_cv_have_decl_freeaddrinfo" "
23407  /* sys/types.h is not needed according to POSIX, but the
23408     sys/socket.h in i386-unknown-freebsd4.10 and
23409     powerpc-apple-darwin5.5 required it. */
23410#include <sys/types.h>
23411#ifdef HAVE_SYS_SOCKET_H
23412#include <sys/socket.h>
23413#endif
23414#ifdef HAVE_NETDB_H
23415#include <netdb.h>
23416#endif
23417#ifdef HAVE_WS2TCPIP_H
23418#include <ws2tcpip.h>
23419#endif
23420
23421"
23422if test "x$ac_cv_have_decl_freeaddrinfo" = x""yes; then :
23423  ac_have_decl=1
23424else
23425  ac_have_decl=0
23426fi
23427
23428cat >>confdefs.h <<_ACEOF
23429#define HAVE_DECL_FREEADDRINFO $ac_have_decl
23430_ACEOF
23431ac_fn_c_check_decl "$LINENO" "gai_strerror" "ac_cv_have_decl_gai_strerror" "
23432  /* sys/types.h is not needed according to POSIX, but the
23433     sys/socket.h in i386-unknown-freebsd4.10 and
23434     powerpc-apple-darwin5.5 required it. */
23435#include <sys/types.h>
23436#ifdef HAVE_SYS_SOCKET_H
23437#include <sys/socket.h>
23438#endif
23439#ifdef HAVE_NETDB_H
23440#include <netdb.h>
23441#endif
23442#ifdef HAVE_WS2TCPIP_H
23443#include <ws2tcpip.h>
23444#endif
23445
23446"
23447if test "x$ac_cv_have_decl_gai_strerror" = x""yes; then :
23448  ac_have_decl=1
23449else
23450  ac_have_decl=0
23451fi
23452
23453cat >>confdefs.h <<_ACEOF
23454#define HAVE_DECL_GAI_STRERROR $ac_have_decl
23455_ACEOF
23456ac_fn_c_check_decl "$LINENO" "getnameinfo" "ac_cv_have_decl_getnameinfo" "
23457  /* sys/types.h is not needed according to POSIX, but the
23458     sys/socket.h in i386-unknown-freebsd4.10 and
23459     powerpc-apple-darwin5.5 required it. */
23460#include <sys/types.h>
23461#ifdef HAVE_SYS_SOCKET_H
23462#include <sys/socket.h>
23463#endif
23464#ifdef HAVE_NETDB_H
23465#include <netdb.h>
23466#endif
23467#ifdef HAVE_WS2TCPIP_H
23468#include <ws2tcpip.h>
23469#endif
23470
23471"
23472if test "x$ac_cv_have_decl_getnameinfo" = x""yes; then :
23473  ac_have_decl=1
23474else
23475  ac_have_decl=0
23476fi
23477
23478cat >>confdefs.h <<_ACEOF
23479#define HAVE_DECL_GETNAMEINFO $ac_have_decl
23480_ACEOF
23481
23482  if test $ac_cv_have_decl_getaddrinfo = no; then
23483    HAVE_DECL_GETADDRINFO=0
23484  fi
23485  if test $ac_cv_have_decl_freeaddrinfo = no; then
23486    HAVE_DECL_FREEADDRINFO=0
23487  fi
23488  if test $ac_cv_have_decl_gai_strerror = no; then
23489    HAVE_DECL_GAI_STRERROR=0
23490  fi
23491  if test $ac_cv_have_decl_getnameinfo = no; then
23492    HAVE_DECL_GETNAMEINFO=0
23493  fi
23494
23495  ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "
23496#include <sys/types.h>
23497#ifdef HAVE_SYS_SOCKET_H
23498#include <sys/socket.h>
23499#endif
23500#ifdef HAVE_NETDB_H
23501#include <netdb.h>
23502#endif
23503#ifdef HAVE_WS2TCPIP_H
23504#include <ws2tcpip.h>
23505#endif
23506
23507"
23508if test "x$ac_cv_type_struct_addrinfo" = x""yes; then :
23509
23510cat >>confdefs.h <<_ACEOF
23511#define HAVE_STRUCT_ADDRINFO 1
23512_ACEOF
23513
23514
23515fi
23516
23517  if test $ac_cv_type_struct_addrinfo = no; then
23518    HAVE_STRUCT_ADDRINFO=0
23519  fi
23520
23521    case " $GETADDRINFO_LIB " in
23522    *" $HOSTENT_LIB "*) ;;
23523    *) GETADDRINFO_LIB="$GETADDRINFO_LIB $HOSTENT_LIB" ;;
23524  esac
23525
23526    case " $GETADDRINFO_LIB " in
23527    *" $SERVENT_LIB "*) ;;
23528    *) GETADDRINFO_LIB="$GETADDRINFO_LIB $SERVENT_LIB" ;;
23529  esac
23530
23531    case " $GETADDRINFO_LIB " in
23532    *" $INET_NTOP_LIB "*) ;;
23533    *) GETADDRINFO_LIB="$GETADDRINFO_LIB $INET_NTOP_LIB" ;;
23534  esac
23535
23536
23537
23538
23539
23540
23541  GNULIB_GETADDRINFO=1
23542
23543
23544
23545
23546
23547  gl_abort_bug=no
23548  case $gl_cv_func_getcwd_null,$host_os in
23549  *,mingw*)
23550    gl_cv_func_getcwd_path_max=yes;;
23551  yes,*)
23552
23553
23554
23555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
23556$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
23557if test "${gl_cv_func_getcwd_path_max+set}" = set; then :
23558  $as_echo_n "(cached) " >&6
23559else
23560  # Arrange for deletion of the temporary directory this test creates.
23561     ac_clean_files="$ac_clean_files confdir3"
23562     if test "$cross_compiling" = yes; then :
23563  gl_cv_func_getcwd_path_max=no
23564else
23565  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23566/* end confdefs.h.  */
23567
23568#include <errno.h>
23569#include <stdlib.h>
23570#include <unistd.h>
23571#include <string.h>
23572#include <limits.h>
23573#include <sys/stat.h>
23574#include <sys/types.h>
23575#include <fcntl.h>
23576
23577#ifndef AT_FDCWD
23578# define AT_FDCWD 0
23579#endif
23580#ifdef ENAMETOOLONG
23581# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
23582#else
23583# define is_ENAMETOOLONG(x) 0
23584#endif
23585
23586/* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
23587#undef mkdir
23588
23589#ifndef S_IRWXU
23590# define S_IRWXU 0700
23591#endif
23592
23593/* The length of this name must be 8.  */
23594#define DIR_NAME "confdir3"
23595#define DIR_NAME_LEN 8
23596#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
23597
23598/* The length of "../".  */
23599#define DOTDOTSLASH_LEN 3
23600
23601/* Leftover bytes in the buffer, to work around library or OS bugs.  */
23602#define BUF_SLOP 20
23603
23604int
23605main ()
23606{
23607#ifndef PATH_MAX
23608  /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
23609     at least not on a local file system.  And if we were to start worrying
23610     about remote file systems, we'd have to enable the wrapper function
23611     all of the time, just to be safe.  That's not worth the cost.  */
23612  exit (0);
23613#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
23614        - DIR_NAME_SIZE - BUF_SLOP) \
23615       <= PATH_MAX)
23616  /* FIXME: Assuming there's a system for which this is true,
23617     this should be done in a compile test.  */
23618  exit (0);
23619#else
23620  char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
23621           + DIR_NAME_SIZE + BUF_SLOP];
23622  char *cwd = getcwd (buf, PATH_MAX);
23623  size_t initial_cwd_len;
23624  size_t cwd_len;
23625  int fail = 0;
23626  size_t n_chdirs = 0;
23627
23628  if (cwd == NULL)
23629    exit (1);
23630
23631  cwd_len = initial_cwd_len = strlen (cwd);
23632
23633  while (1)
23634    {
23635      size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
23636      char *c = NULL;
23637
23638      cwd_len += DIR_NAME_SIZE;
23639      /* If mkdir or chdir fails, it could be that this system cannot create
23640         any file with an absolute name longer than PATH_MAX, such as cygwin.
23641         If so, leave fail as 0, because the current working directory can't
23642         be too long for getcwd if it can't even be created.  For other
23643         errors, be pessimistic and consider that as a failure, too.  */
23644      if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
23645        {
23646          if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
23647            fail = 2;
23648          break;
23649        }
23650
23651      if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
23652        {
23653          c = getcwd (buf, PATH_MAX);
23654          if (!c && errno == ENOENT)
23655            {
23656              fail = 1;
23657              break;
23658            }
23659          if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno)))
23660            {
23661              fail = 2;
23662              break;
23663            }
23664        }
23665
23666      if (dotdot_max <= cwd_len - initial_cwd_len)
23667        {
23668          if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
23669            break;
23670          c = getcwd (buf, cwd_len + 1);
23671          if (!c)
23672            {
23673              if (! (errno == ERANGE || errno == ENOENT
23674                     || is_ENAMETOOLONG (errno)))
23675                {
23676                  fail = 2;
23677                  break;
23678                }
23679              if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
23680                {
23681                  fail = 1;
23682                  break;
23683                }
23684            }
23685        }
23686
23687      if (c && strlen (c) != cwd_len)
23688        {
23689          fail = 2;
23690          break;
23691        }
23692      ++n_chdirs;
23693    }
23694
23695  /* Leaving behind such a deep directory is not polite.
23696     So clean up here, right away, even though the driving
23697     shell script would also clean up.  */
23698  {
23699    size_t i;
23700
23701    /* Try rmdir first, in case the chdir failed.  */
23702    rmdir (DIR_NAME);
23703    for (i = 0; i <= n_chdirs; i++)
23704      {
23705        if (chdir ("..") < 0)
23706          break;
23707        if (rmdir (DIR_NAME) != 0)
23708          break;
23709      }
23710  }
23711
23712  exit (fail);
23713#endif
23714}
23715
23716_ACEOF
23717if ac_fn_c_try_run "$LINENO"; then :
23718  gl_cv_func_getcwd_path_max=yes
23719else
23720  case $? in
23721     1) gl_cv_func_getcwd_path_max='no, but it is partly working';;
23722     *) gl_cv_func_getcwd_path_max=no;;
23723     esac
23724fi
23725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23726  conftest.$ac_objext conftest.beam conftest.$ac_ext
23727fi
23728
23729
23730fi
23731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
23732$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
23733  case $gl_cv_func_getcwd_path_max in
23734  no,*)
23735
23736$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
23737;;
23738  esac
23739
23740
23741
23742  for ac_func in getpagesize
23743do :
23744  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
23745if test "x$ac_cv_func_getpagesize" = x""yes; then :
23746  cat >>confdefs.h <<_ACEOF
23747#define HAVE_GETPAGESIZE 1
23748_ACEOF
23749
23750fi
23751done
23752
23753  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
23754$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
23755if test "${gl_cv_func_getcwd_abort_bug+set}" = set; then :
23756  $as_echo_n "(cached) " >&6
23757else
23758  # Remove any remnants of a previous test.
23759     rm -rf confdir-14B---
23760     # Arrange for deletion of the temporary directory this test creates.
23761     ac_clean_files="$ac_clean_files confdir-14B---"
23762     if test "$cross_compiling" = yes; then :
23763  gl_cv_func_getcwd_abort_bug=yes
23764else
23765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23766/* end confdefs.h.  */
23767
23768#include <stdlib.h>
23769#include <unistd.h>
23770#include <limits.h>
23771#include <string.h>
23772#include <sys/stat.h>
23773
23774/* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
23775#undef mkdir
23776
23777#ifndef S_IRWXU
23778# define S_IRWXU 0700
23779#endif
23780
23781/* FIXME: skip the run-test altogether on systems without getpagesize.  */
23782#if ! HAVE_GETPAGESIZE
23783# define getpagesize() 0
23784#endif
23785
23786/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
23787   the 16kB pagesize on ia64 linux.  Those conditions make the code below
23788   trigger a bug in glibc's getcwd implementation before 2.4.90-10.  */
23789#define TARGET_LEN (5 * 1024)
23790
23791int
23792main ()
23793{
23794  char const *dir_name = "confdir-14B---";
23795  char *cwd;
23796  size_t initial_cwd_len;
23797  int fail = 0;
23798  size_t desired_depth;
23799  size_t d;
23800
23801  /* The bug is triggered when PATH_MAX < getpagesize (), so skip
23802     this relative expensive and invasive test if that's not true.  */
23803  if (getpagesize () <= PATH_MAX)
23804    return 0;
23805
23806  cwd = getcwd (NULL, 0);
23807  if (cwd == NULL)
23808    return 0;
23809
23810  initial_cwd_len = strlen (cwd);
23811  free (cwd);
23812  desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
23813                   / (1 + strlen (dir_name)));
23814  for (d = 0; d < desired_depth; d++)
23815    {
23816      if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
23817        {
23818          fail = 3; /* Unable to construct deep hierarchy.  */
23819          break;
23820        }
23821    }
23822
23823  /* If libc has the bug in question, this invocation of getcwd
23824     results in a failed assertion.  */
23825  cwd = getcwd (NULL, 0);
23826  if (cwd == NULL)
23827    fail = 4; /* getcwd failed.  This is ok, and expected.  */
23828  free (cwd);
23829
23830  /* Call rmdir first, in case the above chdir failed.  */
23831  rmdir (dir_name);
23832  while (0 < d--)
23833    {
23834      if (chdir ("..") < 0)
23835        break;
23836      rmdir (dir_name);
23837    }
23838
23839  return 0;
23840}
23841
23842_ACEOF
23843if ac_fn_c_try_run "$LINENO"; then :
23844  gl_cv_func_getcwd_abort_bug=no
23845else
23846  gl_cv_func_getcwd_abort_bug=yes
23847fi
23848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23849  conftest.$ac_objext conftest.beam conftest.$ac_ext
23850fi
23851
23852
23853fi
23854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
23855$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
23856  if test $gl_cv_func_getcwd_abort_bug = yes; then :
23857  gl_abort_bug=yes
23858fi
23859;;
23860  esac
23861
23862  case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in
23863  *yes,yes,no) ;;
23864  *)
23865    REPLACE_GETCWD=1
23866
23867
23868
23869
23870
23871
23872
23873
23874  gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
23875
23876
23877
23878
23879  :
23880;;
23881  esac
23882
23883
23884
23885  GNULIB_GETCWD=1
23886
23887
23888
23889
23890
23891
23892
23893  ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
23894#include <$ac_cv_struct_tm>
23895
23896"
23897if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
23898
23899cat >>confdefs.h <<_ACEOF
23900#define HAVE_STRUCT_TM_TM_ZONE 1
23901_ACEOF
23902
23903
23904fi
23905
23906if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23907
23908$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
23909
23910else
23911  ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
23912"
23913if test "x$ac_cv_have_decl_tzname" = x""yes; then :
23914  ac_have_decl=1
23915else
23916  ac_have_decl=0
23917fi
23918
23919cat >>confdefs.h <<_ACEOF
23920#define HAVE_DECL_TZNAME $ac_have_decl
23921_ACEOF
23922
23923  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
23924$as_echo_n "checking for tzname... " >&6; }
23925if test "${ac_cv_var_tzname+set}" = set; then :
23926  $as_echo_n "(cached) " >&6
23927else
23928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23929/* end confdefs.h.  */
23930#include <time.h>
23931#if !HAVE_DECL_TZNAME
23932extern char *tzname[];
23933#endif
23934
23935int
23936main ()
23937{
23938return tzname[0][0];
23939  ;
23940  return 0;
23941}
23942_ACEOF
23943if ac_fn_c_try_link "$LINENO"; then :
23944  ac_cv_var_tzname=yes
23945else
23946  ac_cv_var_tzname=no
23947fi
23948rm -f core conftest.err conftest.$ac_objext \
23949    conftest$ac_exeext conftest.$ac_ext
23950fi
23951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
23952$as_echo "$ac_cv_var_tzname" >&6; }
23953  if test $ac_cv_var_tzname = yes; then
23954
23955$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
23956
23957  fi
23958fi
23959
23960
23961
23962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23963/* end confdefs.h.  */
23964
23965#include <time.h> /* for time_t */
23966#include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */
23967#define TYPE_MINIMUM(t) \
23968  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
23969#define TYPE_MAXIMUM(t) \
23970  ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
23971typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1];
23972typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1];
23973
23974_ACEOF
23975if ac_fn_c_try_compile "$LINENO"; then :
23976
23977$as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h
23978
23979
23980fi
23981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23982
23983
23984
23985
23986
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996  for ac_func in getdelim
23997do :
23998  ac_fn_c_check_func "$LINENO" "getdelim" "ac_cv_func_getdelim"
23999if test "x$ac_cv_func_getdelim" = x""yes; then :
24000  cat >>confdefs.h <<_ACEOF
24001#define HAVE_GETDELIM 1
24002_ACEOF
24003
24004else
24005
24006    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
24007
24008fi
24009done
24010
24011
24012
24013
24014  if test $ac_cv_func_getdelim = no; then
24015
24016  for ac_func in flockfile funlockfile
24017do :
24018  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24019ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24020eval as_val=\$$as_ac_var
24021   if test "x$as_val" = x""yes; then :
24022  cat >>confdefs.h <<_ACEOF
24023#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24024_ACEOF
24025
24026fi
24027done
24028
24029  ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
24030if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
24031  ac_have_decl=1
24032else
24033  ac_have_decl=0
24034fi
24035
24036cat >>confdefs.h <<_ACEOF
24037#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
24038_ACEOF
24039
24040
24041  fi
24042
24043  if test $ac_cv_have_decl_getdelim = no; then
24044    HAVE_DECL_GETDELIM=0
24045  fi
24046
24047
24048
24049  GNULIB_GETDELIM=1
24050
24051
24052
24053
24054
24055  if test "$ac_cv_func_getgroups" != yes; then
24056
24057
24058
24059
24060
24061
24062
24063
24064  gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
24065
24066    HAVE_GETGROUPS=0
24067  elif test "$ac_cv_func_getgroups_works.$ac_cv_type_getgroups" != yes.gid_t
24068  then
24069
24070
24071
24072
24073
24074
24075
24076
24077  gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
24078
24079    REPLACE_GETGROUPS=1
24080
24081$as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
24082
24083  else
24084        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
24085$as_echo_n "checking whether getgroups handles negative values... " >&6; }
24086if test "${gl_cv_func_getgroups_works+set}" = set; then :
24087  $as_echo_n "(cached) " >&6
24088else
24089  if test "$cross_compiling" = yes; then :
24090  gl_cv_func_getgroups_works="guessing no"
24091else
24092  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24093/* end confdefs.h.  */
24094$ac_includes_default
24095int
24096main ()
24097{
24098int size = getgroups (0, 0);
24099          gid_t *list = malloc (size * sizeof *list);
24100          return getgroups (-1, list) != -1;
24101  ;
24102  return 0;
24103}
24104_ACEOF
24105if ac_fn_c_try_run "$LINENO"; then :
24106  gl_cv_func_getgroups_works=yes
24107else
24108  gl_cv_func_getgroups_works=no
24109fi
24110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24111  conftest.$ac_objext conftest.beam conftest.$ac_ext
24112fi
24113
24114fi
24115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
24116$as_echo "$gl_cv_func_getgroups_works" >&6; }
24117    if test "$gl_cv_func_getgroups_works" != yes; then
24118
24119
24120
24121
24122
24123
24124
24125
24126  gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
24127
24128      REPLACE_GETGROUPS=1
24129    fi
24130  fi
24131  test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
24132
24133
24134
24135  GNULIB_GETGROUPS=1
24136
24137
24138
24139
24140
24141
24142
24143  if test $ac_cv_header_sys_socket_h != yes; then
24144                    for ac_header in winsock2.h
24145do :
24146  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
24147if test "x$ac_cv_header_winsock2_h" = x""yes; then :
24148  cat >>confdefs.h <<_ACEOF
24149#define HAVE_WINSOCK2_H 1
24150_ACEOF
24151
24152fi
24153
24154done
24155
24156  fi
24157  if test "$ac_cv_header_winsock2_h" = yes; then
24158    HAVE_WINSOCK2_H=1
24159    UNISTD_H_HAVE_WINSOCK2_H=1
24160    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
24161  else
24162    HAVE_WINSOCK2_H=0
24163  fi
24164
24165
24166
24167        GETHOSTNAME_LIB=
24168  for ac_func in gethostname
24169do :
24170  ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname"
24171if test "x$ac_cv_func_gethostname" = x""yes; then :
24172  cat >>confdefs.h <<_ACEOF
24173#define HAVE_GETHOSTNAME 1
24174_ACEOF
24175
24176else
24177
24178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostname in winsock2.h and -lws2_32" >&5
24179$as_echo_n "checking for gethostname in winsock2.h and -lws2_32... " >&6; }
24180if test "${gl_cv_w32_gethostname+set}" = set; then :
24181  $as_echo_n "(cached) " >&6
24182else
24183  gl_cv_w32_gethostname=no
24184       gl_save_LIBS="$LIBS"
24185       LIBS="$LIBS -lws2_32"
24186       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24187/* end confdefs.h.  */
24188
24189#ifdef HAVE_WINSOCK2_H
24190#include <winsock2.h>
24191#endif
24192#include <stddef.h>
24193
24194int
24195main ()
24196{
24197gethostname(NULL, 0);
24198  ;
24199  return 0;
24200}
24201_ACEOF
24202if ac_fn_c_try_link "$LINENO"; then :
24203  gl_cv_w32_gethostname=yes
24204fi
24205rm -f core conftest.err conftest.$ac_objext \
24206    conftest$ac_exeext conftest.$ac_ext
24207       LIBS="$gl_save_LIBS"
24208
24209fi
24210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_gethostname" >&5
24211$as_echo "$gl_cv_w32_gethostname" >&6; }
24212    if test "$gl_cv_w32_gethostname" = "yes"; then
24213      GETHOSTNAME_LIB="-lws2_32"
24214    fi
24215
24216fi
24217done
24218
24219
24220
24221  if test "$ac_cv_func_gethostname" = no; then
24222
24223
24224
24225
24226
24227
24228
24229
24230  gl_LIBOBJS="$gl_LIBOBJS gethostname.$ac_objext"
24231
24232    HAVE_GETHOSTNAME=0
24233
24234  if test "$gl_cv_w32_gethostname" != "yes"; then
24235    for ac_func in uname
24236do :
24237  ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
24238if test "x$ac_cv_func_uname" = x""yes; then :
24239  cat >>confdefs.h <<_ACEOF
24240#define HAVE_UNAME 1
24241_ACEOF
24242
24243fi
24244done
24245
24246  fi
24247
24248  fi
24249
24250
24251
24252
24253  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HOST_NAME_MAX" >&5
24254$as_echo_n "checking for HOST_NAME_MAX... " >&6; }
24255if test "${gl_cv_decl_HOST_NAME_MAX+set}" = set; then :
24256  $as_echo_n "(cached) " >&6
24257else
24258
24259    gl_cv_decl_HOST_NAME_MAX=
24260    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24261/* end confdefs.h.  */
24262
24263#include <limits.h>
24264#ifdef HOST_NAME_MAX
24265lucky
24266#endif
24267
24268_ACEOF
24269if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24270  $EGREP "lucky" >/dev/null 2>&1; then :
24271  gl_cv_decl_HOST_NAME_MAX=yes
24272fi
24273rm -f conftest*
24274
24275    if test -z "$gl_cv_decl_HOST_NAME_MAX"; then
24276            if test "$gl_cv_w32_gethostname" = yes; then
24277                gl_cv_decl_HOST_NAME_MAX=256
24278      else
24279        if ac_fn_c_compute_int "$LINENO" "MAXHOSTNAMELEN" "gl_cv_decl_HOST_NAME_MAX"        "
24280#include <sys/types.h>
24281#if HAVE_SYS_PARAM_H
24282# include <sys/param.h>
24283#endif
24284#if HAVE_SYS_SOCKET_H
24285# include <sys/socket.h>
24286#endif
24287#if HAVE_NETDB_H
24288# include <netdb.h>
24289#endif
24290"; then :
24291
24292fi
24293
24294
24295      fi
24296    fi
24297
24298fi
24299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_HOST_NAME_MAX" >&5
24300$as_echo "$gl_cv_decl_HOST_NAME_MAX" >&6; }
24301  if test "$gl_cv_decl_HOST_NAME_MAX" != yes; then
24302
24303cat >>confdefs.h <<_ACEOF
24304#define HOST_NAME_MAX $gl_cv_decl_HOST_NAME_MAX
24305_ACEOF
24306
24307  fi
24308
24309
24310
24311  GNULIB_GETHOSTNAME=1
24312
24313
24314
24315
24316
24317  ac_fn_c_check_decl "$LINENO" "gethrtime" "ac_cv_have_decl_gethrtime" "#include <time.h>
24318"
24319if test "x$ac_cv_have_decl_gethrtime" = x""yes; then :
24320  ac_have_decl=1
24321else
24322  ac_have_decl=0
24323fi
24324
24325cat >>confdefs.h <<_ACEOF
24326#define HAVE_DECL_GETHRTIME $ac_have_decl
24327_ACEOF
24328
24329  LIB_GETHRXTIME=
24330  case $ac_cv_have_decl_gethrtime,$gl_cv_arithmetic_hrtime_t in
24331  yes,yes) ;;
24332  *)
24333
24334
24335
24336
24337
24338
24339
24340
24341  gl_LIBOBJS="$gl_LIBOBJS gethrxtime.$ac_objext"
24342
24343
24344
24345
24346
24347
24348  if test $ac_cv_func_nanouptime != yes; then
24349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CLOCK_MONOTONIC or CLOCK_REALTIME is defined" >&5
24350$as_echo_n "checking whether CLOCK_MONOTONIC or CLOCK_REALTIME is defined... " >&6; }
24351if test "${gl_cv_have_clock_gettime_macro+set}" = set; then :
24352  $as_echo_n "(cached) " >&6
24353else
24354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24355/* end confdefs.h.  */
24356
24357#        include <time.h>
24358#        if defined CLOCK_MONOTONIC || defined CLOCK_REALTIME
24359          have_clock_gettime_macro
24360#        endif
24361
24362_ACEOF
24363if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24364  $EGREP "have_clock_gettime_macro" >/dev/null 2>&1; then :
24365  gl_cv_have_clock_gettime_macro=yes
24366else
24367  gl_cv_have_clock_gettime_macro=no
24368fi
24369rm -f conftest*
24370
24371fi
24372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_clock_gettime_macro" >&5
24373$as_echo "$gl_cv_have_clock_gettime_macro" >&6; }
24374    if test $gl_cv_have_clock_gettime_macro = yes; then
24375      LIB_GETHRXTIME=$LIB_CLOCK_GETTIME
24376    fi
24377  fi
24378;;
24379  esac
24380
24381
24382
24383
24384
24385
24386
24387
24388
24389  gl_getline_needs_run_time_check=no
24390  ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
24391if test "x$ac_cv_func_getline" = x""yes; then :
24392                  gl_getline_needs_run_time_check=yes
24393else
24394  am_cv_func_working_getline=no
24395fi
24396
24397  if test $gl_getline_needs_run_time_check = yes; then
24398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
24399$as_echo_n "checking for working getline function... " >&6; }
24400if test "${am_cv_func_working_getline+set}" = set; then :
24401  $as_echo_n "(cached) " >&6
24402else
24403  echo fooN |tr -d '\012'|tr N '\012' > conftest.data
24404    if test "$cross_compiling" = yes; then :
24405        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24406/* end confdefs.h.  */
24407
24408#include <features.h>
24409#ifdef __GNU_LIBRARY__
24410 #if (__GLIBC__ >= 2)
24411  Lucky GNU user
24412 #endif
24413#endif
24414
24415_ACEOF
24416if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24417  $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
24418  am_cv_func_working_getline=yes
24419else
24420  am_cv_func_working_getline=no
24421fi
24422rm -f conftest*
24423
24424
24425else
24426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24427/* end confdefs.h.  */
24428
24429#    include <stdio.h>
24430#    include <stdlib.h>
24431#    include <string.h>
24432    int main ()
24433    { /* Based on a test program from Karl Heuer.  */
24434      char *line = NULL;
24435      size_t siz = 0;
24436      int len;
24437      FILE *in = fopen ("./conftest.data", "r");
24438      if (!in)
24439        return 1;
24440      len = getline (&line, &siz, in);
24441      exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
24442    }
24443
24444_ACEOF
24445if ac_fn_c_try_run "$LINENO"; then :
24446  am_cv_func_working_getline=yes
24447else
24448  am_cv_func_working_getline=no
24449fi
24450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24451  conftest.$ac_objext conftest.beam conftest.$ac_ext
24452fi
24453
24454fi
24455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
24456$as_echo "$am_cv_func_working_getline" >&6; }
24457  fi
24458
24459  if test $ac_cv_have_decl_getline = no; then
24460    HAVE_DECL_GETLINE=0
24461  fi
24462
24463  if test $am_cv_func_working_getline = no; then
24464    REPLACE_GETLINE=1
24465
24466
24467
24468
24469
24470
24471
24472
24473  gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
24474
24475
24476
24477
24478
24479
24480
24481
24482
24483
24484
24485
24486
24487
24488
24489
24490  for ac_func in getdelim
24491do :
24492  ac_fn_c_check_func "$LINENO" "getdelim" "ac_cv_func_getdelim"
24493if test "x$ac_cv_func_getdelim" = x""yes; then :
24494  cat >>confdefs.h <<_ACEOF
24495#define HAVE_GETDELIM 1
24496_ACEOF
24497
24498else
24499
24500    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
24501
24502fi
24503done
24504
24505
24506
24507
24508  if test $ac_cv_func_getdelim = no; then
24509
24510  for ac_func in flockfile funlockfile
24511do :
24512  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24513ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24514eval as_val=\$$as_ac_var
24515   if test "x$as_val" = x""yes; then :
24516  cat >>confdefs.h <<_ACEOF
24517#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24518_ACEOF
24519
24520fi
24521done
24522
24523  ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
24524if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
24525  ac_have_decl=1
24526else
24527  ac_have_decl=0
24528fi
24529
24530cat >>confdefs.h <<_ACEOF
24531#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
24532_ACEOF
24533
24534
24535  fi
24536
24537  if test $ac_cv_have_decl_getdelim = no; then
24538    HAVE_DECL_GETDELIM=0
24539  fi
24540
24541
24542  fi
24543
24544
24545
24546  GNULIB_GETLINE=1
24547
24548
24549
24550# Persuade glibc <stdlib.h> to declare getloadavg().
24551
24552
24553gl_have_func=no # yes means we've found a way to get the load average.
24554
24555# Make sure getloadavg.c is where it belongs, at configure-time.
24556test -f "$srcdir/lib/getloadavg.c" ||
24557  as_fn_error "$srcdir/lib/getloadavg.c is missing" "$LINENO" 5
24558
24559gl_save_LIBS=$LIBS
24560
24561# Check for getloadavg, but be sure not to touch the cache variable.
24562(ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
24563if test "x$ac_cv_func_getloadavg" = x""yes; then :
24564  exit 0
24565else
24566  exit 1
24567fi
24568) && gl_have_func=yes
24569
24570# On HPUX9, an unprivileged user can get load averages through this function.
24571for ac_func in pstat_getdynamic
24572do :
24573  ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
24574if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
24575  cat >>confdefs.h <<_ACEOF
24576#define HAVE_PSTAT_GETDYNAMIC 1
24577_ACEOF
24578
24579fi
24580done
24581
24582
24583# Solaris has libkstat which does not require root.
24584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
24585$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
24586if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
24587  $as_echo_n "(cached) " >&6
24588else
24589  ac_check_lib_save_LIBS=$LIBS
24590LIBS="-lkstat  $LIBS"
24591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24592/* end confdefs.h.  */
24593
24594/* Override any GCC internal prototype to avoid an error.
24595   Use char because int might match the return type of a GCC
24596   builtin and then its argument prototype would still apply.  */
24597#ifdef __cplusplus
24598extern "C"
24599#endif
24600char kstat_open ();
24601int
24602main ()
24603{
24604return kstat_open ();
24605  ;
24606  return 0;
24607}
24608_ACEOF
24609if ac_fn_c_try_link "$LINENO"; then :
24610  ac_cv_lib_kstat_kstat_open=yes
24611else
24612  ac_cv_lib_kstat_kstat_open=no
24613fi
24614rm -f core conftest.err conftest.$ac_objext \
24615    conftest$ac_exeext conftest.$ac_ext
24616LIBS=$ac_check_lib_save_LIBS
24617fi
24618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
24619$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
24620if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
24621  cat >>confdefs.h <<_ACEOF
24622#define HAVE_LIBKSTAT 1
24623_ACEOF
24624
24625  LIBS="-lkstat $LIBS"
24626
24627fi
24628
24629test $ac_cv_lib_kstat_kstat_open = yes && gl_have_func=yes
24630
24631# AIX has libperfstat which does not require root
24632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
24633$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
24634if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
24635  $as_echo_n "(cached) " >&6
24636else
24637  ac_check_lib_save_LIBS=$LIBS
24638LIBS="-lperfstat  $LIBS"
24639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24640/* end confdefs.h.  */
24641
24642/* Override any GCC internal prototype to avoid an error.
24643   Use char because int might match the return type of a GCC
24644   builtin and then its argument prototype would still apply.  */
24645#ifdef __cplusplus
24646extern "C"
24647#endif
24648char perfstat_cpu_total ();
24649int
24650main ()
24651{
24652return perfstat_cpu_total ();
24653  ;
24654  return 0;
24655}
24656_ACEOF
24657if ac_fn_c_try_link "$LINENO"; then :
24658  ac_cv_lib_perfstat_perfstat_cpu_total=yes
24659else
24660  ac_cv_lib_perfstat_perfstat_cpu_total=no
24661fi
24662rm -f core conftest.err conftest.$ac_objext \
24663    conftest$ac_exeext conftest.$ac_ext
24664LIBS=$ac_check_lib_save_LIBS
24665fi
24666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
24667$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
24668if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
24669  cat >>confdefs.h <<_ACEOF
24670#define HAVE_LIBPERFSTAT 1
24671_ACEOF
24672
24673  LIBS="-lperfstat $LIBS"
24674
24675fi
24676
24677test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_have_func=yes
24678
24679# Some systems with -lutil have (and need) -lkvm as well, some do not.
24680# On Solaris, -lkvm requires nlist from -lelf, so check that first
24681# to get the right answer into the cache.
24682# For kstat on solaris, we need libelf to force the definition of SVR4 below.
24683if test $gl_have_func = no; then
24684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
24685$as_echo_n "checking for elf_begin in -lelf... " >&6; }
24686if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
24687  $as_echo_n "(cached) " >&6
24688else
24689  ac_check_lib_save_LIBS=$LIBS
24690LIBS="-lelf  $LIBS"
24691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24692/* end confdefs.h.  */
24693
24694/* Override any GCC internal prototype to avoid an error.
24695   Use char because int might match the return type of a GCC
24696   builtin and then its argument prototype would still apply.  */
24697#ifdef __cplusplus
24698extern "C"
24699#endif
24700char elf_begin ();
24701int
24702main ()
24703{
24704return elf_begin ();
24705  ;
24706  return 0;
24707}
24708_ACEOF
24709if ac_fn_c_try_link "$LINENO"; then :
24710  ac_cv_lib_elf_elf_begin=yes
24711else
24712  ac_cv_lib_elf_elf_begin=no
24713fi
24714rm -f core conftest.err conftest.$ac_objext \
24715    conftest$ac_exeext conftest.$ac_ext
24716LIBS=$ac_check_lib_save_LIBS
24717fi
24718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
24719$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
24720if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
24721  LIBS="-lelf $LIBS"
24722fi
24723
24724fi
24725if test $gl_have_func = no; then
24726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
24727$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
24728if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
24729  $as_echo_n "(cached) " >&6
24730else
24731  ac_check_lib_save_LIBS=$LIBS
24732LIBS="-lkvm  $LIBS"
24733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24734/* end confdefs.h.  */
24735
24736/* Override any GCC internal prototype to avoid an error.
24737   Use char because int might match the return type of a GCC
24738   builtin and then its argument prototype would still apply.  */
24739#ifdef __cplusplus
24740extern "C"
24741#endif
24742char kvm_open ();
24743int
24744main ()
24745{
24746return kvm_open ();
24747  ;
24748  return 0;
24749}
24750_ACEOF
24751if ac_fn_c_try_link "$LINENO"; then :
24752  ac_cv_lib_kvm_kvm_open=yes
24753else
24754  ac_cv_lib_kvm_kvm_open=no
24755fi
24756rm -f core conftest.err conftest.$ac_objext \
24757    conftest$ac_exeext conftest.$ac_ext
24758LIBS=$ac_check_lib_save_LIBS
24759fi
24760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
24761$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
24762if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
24763  LIBS="-lkvm $LIBS"
24764fi
24765
24766  # Check for the 4.4BSD definition of getloadavg.
24767  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
24768$as_echo_n "checking for getloadavg in -lutil... " >&6; }
24769if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
24770  $as_echo_n "(cached) " >&6
24771else
24772  ac_check_lib_save_LIBS=$LIBS
24773LIBS="-lutil  $LIBS"
24774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24775/* end confdefs.h.  */
24776
24777/* Override any GCC internal prototype to avoid an error.
24778   Use char because int might match the return type of a GCC
24779   builtin and then its argument prototype would still apply.  */
24780#ifdef __cplusplus
24781extern "C"
24782#endif
24783char getloadavg ();
24784int
24785main ()
24786{
24787return getloadavg ();
24788  ;
24789  return 0;
24790}
24791_ACEOF
24792if ac_fn_c_try_link "$LINENO"; then :
24793  ac_cv_lib_util_getloadavg=yes
24794else
24795  ac_cv_lib_util_getloadavg=no
24796fi
24797rm -f core conftest.err conftest.$ac_objext \
24798    conftest$ac_exeext conftest.$ac_ext
24799LIBS=$ac_check_lib_save_LIBS
24800fi
24801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
24802$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
24803if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
24804  LIBS="-lutil $LIBS" gl_have_func=yes gl_cv_func_getloadavg_setgid=yes
24805fi
24806
24807fi
24808
24809if test $gl_have_func = no; then
24810  # There is a commonly available library for RS/6000 AIX.
24811  # Since it is not a standard part of AIX, it might be installed locally.
24812  gl_getloadavg_LIBS=$LIBS
24813  LIBS="-L/usr/local/lib $LIBS"
24814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
24815$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
24816if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
24817  $as_echo_n "(cached) " >&6
24818else
24819  ac_check_lib_save_LIBS=$LIBS
24820LIBS="-lgetloadavg  $LIBS"
24821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24822/* end confdefs.h.  */
24823
24824/* Override any GCC internal prototype to avoid an error.
24825   Use char because int might match the return type of a GCC
24826   builtin and then its argument prototype would still apply.  */
24827#ifdef __cplusplus
24828extern "C"
24829#endif
24830char getloadavg ();
24831int
24832main ()
24833{
24834return getloadavg ();
24835  ;
24836  return 0;
24837}
24838_ACEOF
24839if ac_fn_c_try_link "$LINENO"; then :
24840  ac_cv_lib_getloadavg_getloadavg=yes
24841else
24842  ac_cv_lib_getloadavg_getloadavg=no
24843fi
24844rm -f core conftest.err conftest.$ac_objext \
24845    conftest$ac_exeext conftest.$ac_ext
24846LIBS=$ac_check_lib_save_LIBS
24847fi
24848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
24849$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
24850if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
24851  LIBS="-lgetloadavg $LIBS"
24852else
24853  LIBS=$gl_getloadavg_LIBS
24854fi
24855
24856fi
24857
24858# Make sure it is really in the library, if we think we found it,
24859# otherwise set up the replacement function.
24860for ac_func in getloadavg
24861do :
24862  ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
24863if test "x$ac_cv_func_getloadavg" = x""yes; then :
24864  cat >>confdefs.h <<_ACEOF
24865#define HAVE_GETLOADAVG 1
24866_ACEOF
24867
24868else
24869
24870
24871
24872
24873
24874
24875
24876
24877  gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
24878
24879
24880$as_echo "#define C_GETLOADAVG 1" >>confdefs.h
24881
24882# Figure out what our getloadavg.c needs.
24883gl_have_func=no
24884ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
24885if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
24886  gl_have_func=yes
24887
24888$as_echo "#define DGUX 1" >>confdefs.h
24889
24890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
24891$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
24892if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
24893  $as_echo_n "(cached) " >&6
24894else
24895  ac_check_lib_save_LIBS=$LIBS
24896LIBS="-ldgc  $LIBS"
24897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24898/* end confdefs.h.  */
24899
24900/* Override any GCC internal prototype to avoid an error.
24901   Use char because int might match the return type of a GCC
24902   builtin and then its argument prototype would still apply.  */
24903#ifdef __cplusplus
24904extern "C"
24905#endif
24906char dg_sys_info ();
24907int
24908main ()
24909{
24910return dg_sys_info ();
24911  ;
24912  return 0;
24913}
24914_ACEOF
24915if ac_fn_c_try_link "$LINENO"; then :
24916  ac_cv_lib_dgc_dg_sys_info=yes
24917else
24918  ac_cv_lib_dgc_dg_sys_info=no
24919fi
24920rm -f core conftest.err conftest.$ac_objext \
24921    conftest$ac_exeext conftest.$ac_ext
24922LIBS=$ac_check_lib_save_LIBS
24923fi
24924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
24925$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
24926if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
24927  cat >>confdefs.h <<_ACEOF
24928#define HAVE_LIBDGC 1
24929_ACEOF
24930
24931  LIBS="-ldgc $LIBS"
24932
24933fi
24934
24935fi
24936
24937
24938
24939# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
24940# uses stabs), but it is still SVR4.  We cannot check for <elf.h> because
24941# Irix 4.0.5F has the header but not the library.
24942if test $gl_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
24943  gl_have_func=yes
24944
24945$as_echo "#define SVR4 1" >>confdefs.h
24946
24947fi
24948
24949if test $gl_have_func = no; then
24950  ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
24951if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
24952  gl_have_func=yes
24953
24954$as_echo "#define UMAX 1" >>confdefs.h
24955
24956
24957$as_echo "#define UMAX4_3 1" >>confdefs.h
24958
24959fi
24960
24961
24962fi
24963
24964if test $gl_have_func = no; then
24965  ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
24966if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
24967  gl_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h
24968
24969fi
24970
24971
24972fi
24973
24974if test $gl_have_func = no; then
24975  for ac_header in mach/mach.h
24976do :
24977  ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
24978if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
24979  cat >>confdefs.h <<_ACEOF
24980#define HAVE_MACH_MACH_H 1
24981_ACEOF
24982
24983fi
24984
24985done
24986
24987fi
24988
24989for ac_header in nlist.h
24990do :
24991  ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
24992if test "x$ac_cv_header_nlist_h" = x""yes; then :
24993  cat >>confdefs.h <<_ACEOF
24994#define HAVE_NLIST_H 1
24995_ACEOF
24996 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
24997"
24998if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
24999
25000cat >>confdefs.h <<_ACEOF
25001#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
25002_ACEOF
25003
25004
25005$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
25006
25007fi
25008
25009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25010/* end confdefs.h.  */
25011#include <nlist.h>
25012int
25013main ()
25014{
25015struct nlist x;
25016                    #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
25017                    x.n_un.n_name = "";
25018                    #else
25019                    x.n_name = "";
25020                    #endif
25021  ;
25022  return 0;
25023}
25024_ACEOF
25025if ac_fn_c_try_link "$LINENO"; then :
25026
25027$as_echo "#define N_NAME_POINTER 1" >>confdefs.h
25028
25029fi
25030rm -f core conftest.err conftest.$ac_objext \
25031    conftest$ac_exeext conftest.$ac_ext
25032
25033fi
25034
25035done
25036
25037fi
25038done
25039
25040
25041# Some definitions of getloadavg require that the program be installed setgid.
25042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5
25043$as_echo_n "checking whether getloadavg requires setgid... " >&6; }
25044if test "${gl_cv_func_getloadavg_setgid+set}" = set; then :
25045  $as_echo_n "(cached) " >&6
25046else
25047  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25048/* end confdefs.h.  */
25049#define CONFIGURING_GETLOADAVG
25050#include "$srcdir/lib/getloadavg.c"
25051#ifdef LDAV_PRIVILEGED
25052Yowza Am I SETGID yet
25053#endif
25054
25055_ACEOF
25056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25057  $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then :
25058  gl_cv_func_getloadavg_setgid=yes
25059else
25060  gl_cv_func_getloadavg_setgid=no
25061fi
25062rm -f conftest*
25063
25064fi
25065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getloadavg_setgid" >&5
25066$as_echo "$gl_cv_func_getloadavg_setgid" >&6; }
25067if test $gl_cv_func_getloadavg_setgid = yes; then
25068  NEED_SETGID=true
25069
25070$as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h
25071
25072else
25073  NEED_SETGID=false
25074fi
25075
25076if test $gl_cv_func_getloadavg_setgid = yes; then
25077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5
25078$as_echo_n "checking group of /dev/kmem... " >&6; }
25079if test "${gl_cv_group_kmem+set}" = set; then :
25080  $as_echo_n "(cached) " >&6
25081else
25082   # On Solaris, /dev/kmem is a symlink.  Get info on the real file.
25083  ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
25084  # If we got an error (system does not support symlinks), try without -L.
25085  test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
25086  gl_cv_group_kmem=`echo $ac_ls_output \
25087    | sed -ne 's/[	 ][	 ]*/ /g
25088               s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\)  *.*/\1/
25089               / /s/.* //;p'`
25090
25091fi
25092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_group_kmem" >&5
25093$as_echo "$gl_cv_group_kmem" >&6; }
25094  KMEM_GROUP=$gl_cv_group_kmem
25095fi
25096if test "x$gl_save_LIBS" = x; then
25097  GETLOADAVG_LIBS=$LIBS
25098else
25099  GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
25100fi
25101LIBS=$gl_save_LIBS
25102
25103
25104# Test whether the system declares getloadavg. Solaris has the function
25105# but declares it in <sys/loadavg.h>, not <stdlib.h>.
25106for ac_header in sys/loadavg.h
25107do :
25108  ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
25109if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
25110  cat >>confdefs.h <<_ACEOF
25111#define HAVE_SYS_LOADAVG_H 1
25112_ACEOF
25113
25114fi
25115
25116done
25117
25118if test $ac_cv_header_sys_loadavg_h = yes; then
25119  HAVE_SYS_LOADAVG_H=1
25120else
25121  HAVE_SYS_LOADAVG_H=0
25122fi
25123ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
25124   # include <sys/loadavg.h>
25125   #endif
25126   #include <stdlib.h>
25127"
25128if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
25129
25130else
25131  HAVE_DECL_GETLOADAVG=0
25132fi
25133
25134
25135
25136
25137  GNULIB_GETLOADAVG=1
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148  gl_LIBOBJS="$gl_LIBOBJS getndelim2.$ac_objext"
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163$as_echo "#define GNULIB_GETOPT_GNU 1" >>confdefs.h
25164
25165
25166
25167
25168
25169
25170
25171  if test -n "$gl_replace_getopt"; then :
25172
25173
25174
25175  GETOPT_H=getopt.h
25176
25177$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
25178
25179
25180
25181    GNULIB_UNISTD_H_GETOPT=1
25182
25183
25184
25185
25186
25187
25188
25189
25190  gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200  gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
25201
25202
25203
25204
25205
25206
25207fi
25208
25209
25210
25211
25212
25213  for ac_func in getpagesize
25214do :
25215  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
25216if test "x$ac_cv_func_getpagesize" = x""yes; then :
25217  cat >>confdefs.h <<_ACEOF
25218#define HAVE_GETPAGESIZE 1
25219_ACEOF
25220
25221fi
25222done
25223
25224  if test $ac_cv_func_getpagesize = no; then
25225    HAVE_GETPAGESIZE=0
25226    for ac_header in OS.h
25227do :
25228  ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
25229if test "x$ac_cv_header_OS_h" = x""yes; then :
25230  cat >>confdefs.h <<_ACEOF
25231#define HAVE_OS_H 1
25232_ACEOF
25233
25234fi
25235
25236done
25237
25238    if test $ac_cv_header_OS_h = yes; then
25239      HAVE_OS_H=1
25240    fi
25241    for ac_header in sys/param.h
25242do :
25243  ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
25244if test "x$ac_cv_header_sys_param_h" = x""yes; then :
25245  cat >>confdefs.h <<_ACEOF
25246#define HAVE_SYS_PARAM_H 1
25247_ACEOF
25248
25249fi
25250
25251done
25252
25253    if test $ac_cv_header_sys_param_h = yes; then
25254      HAVE_SYS_PARAM_H=1
25255    fi
25256  fi
25257  case "$host_os" in
25258    mingw*)
25259      REPLACE_GETPAGESIZE=1
25260
25261
25262
25263
25264
25265
25266
25267
25268  gl_LIBOBJS="$gl_LIBOBJS getpagesize.$ac_objext"
25269
25270      ;;
25271  esac
25272
25273
25274
25275  GNULIB_GETPAGESIZE=1
25276
25277
25278
25279
25280
25281
25282
25283
25284
25285
25286
25287  gl_LIBOBJS="$gl_LIBOBJS getpass.$ac_objext"
25288
25289
25290
25291
25292  ac_fn_c_check_decl "$LINENO" "__fsetlocking" "ac_cv_have_decl___fsetlocking" "#include <stdio.h>
25293     #if HAVE_STDIO_EXT_H
25294      #include <stdio_ext.h>
25295     #endif
25296"
25297if test "x$ac_cv_have_decl___fsetlocking" = x""yes; then :
25298  ac_have_decl=1
25299else
25300  ac_have_decl=0
25301fi
25302
25303cat >>confdefs.h <<_ACEOF
25304#define HAVE_DECL___FSETLOCKING $ac_have_decl
25305_ACEOF
25306
25307
25308
25309
25310
25311
25312  :
25313
25314
25315$as_echo "#define getpass gnu_getpass" >>confdefs.h
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330  gl_LIBOBJS="$gl_LIBOBJS gettime.$ac_objext"
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
25343$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
25344if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
25345  $as_echo_n "(cached) " >&6
25346else
25347  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25348/* end confdefs.h.  */
25349#include <sys/time.h>
25350            struct timeval c;
25351
25352int
25353main ()
25354{
25355
25356            int (*f) (struct timeval *restrict, void *restrict) = gettimeofday;
25357            int x = f (&c, 0);
25358            return !(x | c.tv_sec | c.tv_usec);
25359
25360  ;
25361  return 0;
25362}
25363_ACEOF
25364if ac_fn_c_try_compile "$LINENO"; then :
25365  gl_cv_func_gettimeofday_posix_signature=yes
25366else
25367  gl_cv_func_gettimeofday_posix_signature=no
25368fi
25369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25370fi
25371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
25372$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
25373
25374
25375
25376
25377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
25378$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
25379if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
25380  $as_echo_n "(cached) " >&6
25381else
25382  if test "$cross_compiling" = yes; then :
25383       gl_cv_func_gettimeofday_clobber=yes
25384else
25385  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25386/* end confdefs.h.  */
25387#include <string.h>
25388          #include <sys/time.h>
25389          #include <time.h>
25390          #include <stdlib.h>
25391
25392int
25393main ()
25394{
25395
25396          time_t t = 0;
25397          struct tm *lt;
25398          struct tm saved_lt;
25399          struct timeval tv;
25400          lt = localtime (&t);
25401          saved_lt = *lt;
25402          gettimeofday (&tv, NULL);
25403          return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
25404
25405  ;
25406  return 0;
25407}
25408_ACEOF
25409if ac_fn_c_try_run "$LINENO"; then :
25410  gl_cv_func_gettimeofday_clobber=no
25411else
25412  gl_cv_func_gettimeofday_clobber=yes
25413fi
25414rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25415  conftest.$ac_objext conftest.beam conftest.$ac_ext
25416fi
25417
25418fi
25419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
25420$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
25421
25422 if test $gl_cv_func_gettimeofday_clobber = yes; then
25423   REPLACE_GETTIMEOFDAY=1
25424   SYS_TIME_H=sys/time.h
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
25435
25436
25437  for ac_header in sys/timeb.h
25438do :
25439  ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
25440if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
25441  cat >>confdefs.h <<_ACEOF
25442#define HAVE_SYS_TIMEB_H 1
25443_ACEOF
25444
25445fi
25446
25447done
25448
25449  for ac_func in _ftime
25450do :
25451  ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
25452if test "x$ac_cv_func__ftime" = x""yes; then :
25453  cat >>confdefs.h <<_ACEOF
25454#define HAVE__FTIME 1
25455_ACEOF
25456
25457fi
25458done
25459
25460
25461
25462$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
25463
25464
25465$as_echo "#define localtime rpl_localtime" >>confdefs.h
25466
25467
25468
25469$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
25470
25471 fi
25472
25473
25474  if test $gl_cv_func_gettimeofday_posix_signature != yes; then
25475    REPLACE_GETTIMEOFDAY=1
25476    SYS_TIME_H=sys/time.h
25477    if test $gl_cv_func_gettimeofday_clobber != yes; then
25478
25479
25480
25481
25482
25483
25484
25485
25486  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
25487
25488
25489  for ac_header in sys/timeb.h
25490do :
25491  ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
25492if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
25493  cat >>confdefs.h <<_ACEOF
25494#define HAVE_SYS_TIMEB_H 1
25495_ACEOF
25496
25497fi
25498
25499done
25500
25501  for ac_func in _ftime
25502do :
25503  ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
25504if test "x$ac_cv_func__ftime" = x""yes; then :
25505  cat >>confdefs.h <<_ACEOF
25506#define HAVE__FTIME 1
25507_ACEOF
25508
25509fi
25510done
25511
25512
25513    fi
25514  fi
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525  gl_LIBOBJS="$gl_LIBOBJS getugroups.$ac_objext"
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542  for ac_func in getusershell
25543do :
25544  ac_fn_c_check_func "$LINENO" "getusershell" "ac_cv_func_getusershell"
25545if test "x$ac_cv_func_getusershell" = x""yes; then :
25546  cat >>confdefs.h <<_ACEOF
25547#define HAVE_GETUSERSHELL 1
25548_ACEOF
25549
25550else
25551
25552    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
25553
25554fi
25555done
25556
25557
25558  if test $ac_cv_func_getusershell = no; then
25559    HAVE_GETUSERSHELL=0
25560  fi
25561
25562
25563
25564  GNULIB_GETUSERSHELL=1
25565
25566
25567   if ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
25568  GNU_MAKE_TRUE=
25569  GNU_MAKE_FALSE='#'
25570else
25571  GNU_MAKE_TRUE='#'
25572  GNU_MAKE_FALSE=
25573fi
25574
25575
25576  # Autoconf 2.61a.99 and earlier don't support linking a file only
25577  # in VPATH builds.  But since GNUmakefile is for maintainer use
25578  # only, it does not matter if we skip the link with older autoconf.
25579  # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
25580  # builds, so use a shell variable to bypass this.
25581  GNUmakefile=GNUmakefile
25582  ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
25583
25584
25585
25586
25587      ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
25588if test "x$ac_cv_func_group_member" = x""yes; then :
25589
25590else
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600  gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
25601
25602
25603
25604
25605
25606fi
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25618  gl_LIBOBJS="$gl_LIBOBJS hard-locale.$ac_objext"
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628
25629
25630  gl_LIBOBJS="$gl_LIBOBJS hash.$ac_objext"
25631
25632
25633
25634
25635
25636    { $as_echo "$as_me:${as_lineno-$LINENO}: checking host operating system" >&5
25637$as_echo_n "checking host operating system... " >&6; }
25638if test "${gl_cv_host_operating_system+set}" = set; then :
25639  $as_echo_n "(cached) " >&6
25640else
25641  case $host_os in
25642
25643       # These operating system names do not use the default heuristic below.
25644       # They are in reverse order, so that more-specific prefixes come first.
25645       winnt*)          os='Windows NT';;
25646       vos*)            os='VOS';;
25647       sysv*)           os='Unix System V';;
25648       superux*)        os='SUPER-UX';;
25649       sunos*)          os='SunOS';;
25650       stop*)           os='STOP';;
25651       sco*)            os='SCO Unix';;
25652       riscos*)         os='RISC OS';;
25653       riscix*)         os='RISCiX';;
25654       qnx*)            os='QNX';;
25655       pw32*)           os='PW32';;
25656       ptx*)            os='ptx';;
25657       plan9*)          os='Plan 9';;
25658       osf*)            os='Tru64';;
25659       os2*)            os='OS/2';;
25660       openbsd*)        os='OpenBSD';;
25661       nsk*)            os='NonStop Kernel';;
25662       nonstopux*)      os='NonStop-UX';;
25663       netbsd*-gnu*)    os='GNU/NetBSD';; # NetBSD kernel+libc, GNU userland
25664       netbsd*)         os='NetBSD';;
25665       knetbsd*-gnu)    os='GNU/kNetBSD';; # NetBSD kernel, GNU libc+userland
25666       kfreebsd*-gnu)   os='GNU/kFreeBSD';; # FreeBSD kernel, GNU libc+userland
25667       msdosdjgpp*)     os='DJGPP';;
25668       mpeix*)          os='MPE/iX';;
25669       mint*)           os='MiNT';;
25670       mingw*)          os='MinGW';;
25671       lynxos*)         os='LynxOS';;
25672       linux*)          os='GNU/Linux';;
25673       hpux*)           os='HP-UX';;
25674       hiux*)           os='HI-UX';;
25675       gnu*)            os='GNU';;
25676       freebsd*)        os='FreeBSD';;
25677       dgux*)           os='DG/UX';;
25678       bsdi*)           os='BSD/OS';;
25679       bsd*)            os='BSD';;
25680       beos*)           os='BeOS';;
25681       aux*)            os='A/UX';;
25682       atheos*)         os='AtheOS';;
25683       amigaos*)        os='Amiga OS';;
25684       aix*)            os='AIX';;
25685
25686       # The default heuristic takes the initial alphabetic string
25687       # from $host_os, but capitalizes its first letter.
25688       [A-Za-z]*)
25689         os=`
25690           expr "X$host_os" : 'X\([A-Za-z]\)' | tr '[a-z]' '[A-Z]'
25691         ``
25692           expr "X$host_os" : 'X.\([A-Za-z]*\)'
25693         `
25694         ;;
25695
25696       # If $host_os does not start with an alphabetic string, use it unchanged.
25697       *)
25698         os=$host_os;;
25699     esac
25700     gl_cv_host_operating_system=$os
25701fi
25702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_operating_system" >&5
25703$as_echo "$gl_cv_host_operating_system" >&6; }
25704
25705cat >>confdefs.h <<_ACEOF
25706#define HOST_OPERATING_SYSTEM "$gl_cv_host_operating_system"
25707_ACEOF
25708
25709
25710
25711                  HOSTENT_LIB=
25712  gl_saved_libs="$LIBS"
25713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
25714$as_echo_n "checking for library containing gethostbyname... " >&6; }
25715if test "${ac_cv_search_gethostbyname+set}" = set; then :
25716  $as_echo_n "(cached) " >&6
25717else
25718  ac_func_search_save_LIBS=$LIBS
25719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25720/* end confdefs.h.  */
25721
25722/* Override any GCC internal prototype to avoid an error.
25723   Use char because int might match the return type of a GCC
25724   builtin and then its argument prototype would still apply.  */
25725#ifdef __cplusplus
25726extern "C"
25727#endif
25728char gethostbyname ();
25729int
25730main ()
25731{
25732return gethostbyname ();
25733  ;
25734  return 0;
25735}
25736_ACEOF
25737for ac_lib in '' nsl network net; do
25738  if test -z "$ac_lib"; then
25739    ac_res="none required"
25740  else
25741    ac_res=-l$ac_lib
25742    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25743  fi
25744  if ac_fn_c_try_link "$LINENO"; then :
25745  ac_cv_search_gethostbyname=$ac_res
25746fi
25747rm -f core conftest.err conftest.$ac_objext \
25748    conftest$ac_exeext
25749  if test "${ac_cv_search_gethostbyname+set}" = set; then :
25750  break
25751fi
25752done
25753if test "${ac_cv_search_gethostbyname+set}" = set; then :
25754
25755else
25756  ac_cv_search_gethostbyname=no
25757fi
25758rm conftest.$ac_ext
25759LIBS=$ac_func_search_save_LIBS
25760fi
25761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
25762$as_echo "$ac_cv_search_gethostbyname" >&6; }
25763ac_res=$ac_cv_search_gethostbyname
25764if test "$ac_res" != no; then :
25765  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25766  if test "$ac_cv_search_gethostbyname" != "none required"; then
25767       HOSTENT_LIB="$ac_cv_search_gethostbyname"
25768     fi
25769fi
25770
25771  LIBS="$gl_saved_libs"
25772  if test -z "$HOSTENT_LIB"; then
25773    for ac_func in gethostbyname
25774do :
25775  ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
25776if test "x$ac_cv_func_gethostbyname" = x""yes; then :
25777  cat >>confdefs.h <<_ACEOF
25778#define HAVE_GETHOSTBYNAME 1
25779_ACEOF
25780
25781else
25782
25783      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in winsock2.h and -lws2_32" >&5
25784$as_echo_n "checking for gethostbyname in winsock2.h and -lws2_32... " >&6; }
25785if test "${gl_cv_w32_gethostbyname+set}" = set; then :
25786  $as_echo_n "(cached) " >&6
25787else
25788  gl_cv_w32_gethostbyname=no
25789         gl_save_LIBS="$LIBS"
25790         LIBS="$LIBS -lws2_32"
25791         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25792/* end confdefs.h.  */
25793
25794#ifdef HAVE_WINSOCK2_H
25795#include <winsock2.h>
25796#endif
25797#include <stddef.h>
25798
25799int
25800main ()
25801{
25802gethostbyname(NULL);
25803  ;
25804  return 0;
25805}
25806_ACEOF
25807if ac_fn_c_try_link "$LINENO"; then :
25808  gl_cv_w32_gethostbyname=yes
25809fi
25810rm -f core conftest.err conftest.$ac_objext \
25811    conftest$ac_exeext conftest.$ac_ext
25812         LIBS="$gl_save_LIBS"
25813
25814fi
25815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_gethostbyname" >&5
25816$as_echo "$gl_cv_w32_gethostbyname" >&6; }
25817      if test "$gl_cv_w32_gethostbyname" = "yes"; then
25818        HOSTENT_LIB="-lws2_32"
25819      fi
25820
25821fi
25822done
25823
25824  fi
25825
25826
25827
25828
25829
25830
25831
25832
25833
25834
25835
25836  gl_LIBOBJS="$gl_LIBOBJS human.$ac_objext"
25837
25838
25839    :
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849
25850  gl_LIBOBJS="$gl_LIBOBJS i-ring.$ac_objext"
25851
25852
25853
25854
25855
25856
25857
25858          am_save_CPPFLAGS="$CPPFLAGS"
25859
25860  for element in $INCICONV; do
25861    haveit=
25862    for x in $CPPFLAGS; do
25863
25864  acl_save_prefix="$prefix"
25865  prefix="$acl_final_prefix"
25866  acl_save_exec_prefix="$exec_prefix"
25867  exec_prefix="$acl_final_exec_prefix"
25868  eval x=\"$x\"
25869  exec_prefix="$acl_save_exec_prefix"
25870  prefix="$acl_save_prefix"
25871
25872      if test "X$x" = "X$element"; then
25873        haveit=yes
25874        break
25875      fi
25876    done
25877    if test -z "$haveit"; then
25878      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
25879    fi
25880  done
25881
25882
25883  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
25884$as_echo_n "checking for iconv... " >&6; }
25885if test "${am_cv_func_iconv+set}" = set; then :
25886  $as_echo_n "(cached) " >&6
25887else
25888
25889    am_cv_func_iconv="no, consider installing GNU libiconv"
25890    am_cv_lib_iconv=no
25891    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25892/* end confdefs.h.  */
25893#include <stdlib.h>
25894#include <iconv.h>
25895int
25896main ()
25897{
25898iconv_t cd = iconv_open("","");
25899       iconv(cd,NULL,NULL,NULL,NULL);
25900       iconv_close(cd);
25901  ;
25902  return 0;
25903}
25904_ACEOF
25905if ac_fn_c_try_link "$LINENO"; then :
25906  am_cv_func_iconv=yes
25907fi
25908rm -f core conftest.err conftest.$ac_objext \
25909    conftest$ac_exeext conftest.$ac_ext
25910    if test "$am_cv_func_iconv" != yes; then
25911      am_save_LIBS="$LIBS"
25912      LIBS="$LIBS $LIBICONV"
25913      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25914/* end confdefs.h.  */
25915#include <stdlib.h>
25916#include <iconv.h>
25917int
25918main ()
25919{
25920iconv_t cd = iconv_open("","");
25921         iconv(cd,NULL,NULL,NULL,NULL);
25922         iconv_close(cd);
25923  ;
25924  return 0;
25925}
25926_ACEOF
25927if ac_fn_c_try_link "$LINENO"; then :
25928  am_cv_lib_iconv=yes
25929        am_cv_func_iconv=yes
25930fi
25931rm -f core conftest.err conftest.$ac_objext \
25932    conftest$ac_exeext conftest.$ac_ext
25933      LIBS="$am_save_LIBS"
25934    fi
25935
25936fi
25937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
25938$as_echo "$am_cv_func_iconv" >&6; }
25939  if test "$am_cv_func_iconv" = yes; then
25940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
25941$as_echo_n "checking for working iconv... " >&6; }
25942if test "${am_cv_func_iconv_works+set}" = set; then :
25943  $as_echo_n "(cached) " >&6
25944else
25945
25946            am_save_LIBS="$LIBS"
25947      if test $am_cv_lib_iconv = yes; then
25948        LIBS="$LIBS $LIBICONV"
25949      fi
25950      if test "$cross_compiling" = yes; then :
25951  case "$host_os" in
25952           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
25953           *)            am_cv_func_iconv_works="guessing yes" ;;
25954         esac
25955else
25956  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25957/* end confdefs.h.  */
25958
25959#include <iconv.h>
25960#include <string.h>
25961int main ()
25962{
25963  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
25964     returns.  */
25965  {
25966    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
25967    if (cd_utf8_to_88591 != (iconv_t)(-1))
25968      {
25969        static const char input[] = "\342\202\254"; /* EURO SIGN */
25970        char buf[10];
25971        const char *inptr = input;
25972        size_t inbytesleft = strlen (input);
25973        char *outptr = buf;
25974        size_t outbytesleft = sizeof (buf);
25975        size_t res = iconv (cd_utf8_to_88591,
25976                            (char **) &inptr, &inbytesleft,
25977                            &outptr, &outbytesleft);
25978        if (res == 0)
25979          return 1;
25980      }
25981  }
25982  /* Test against Solaris 10 bug: Failures are not distinguishable from
25983     successful returns.  */
25984  {
25985    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
25986    if (cd_ascii_to_88591 != (iconv_t)(-1))
25987      {
25988        static const char input[] = "\263";
25989        char buf[10];
25990        const char *inptr = input;
25991        size_t inbytesleft = strlen (input);
25992        char *outptr = buf;
25993        size_t outbytesleft = sizeof (buf);
25994        size_t res = iconv (cd_ascii_to_88591,
25995                            (char **) &inptr, &inbytesleft,
25996                            &outptr, &outbytesleft);
25997        if (res == 0)
25998          return 1;
25999      }
26000  }
26001#if 0 /* This bug could be worked around by the caller.  */
26002  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
26003  {
26004    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
26005    if (cd_88591_to_utf8 != (iconv_t)(-1))
26006      {
26007        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
26008        char buf[50];
26009        const char *inptr = input;
26010        size_t inbytesleft = strlen (input);
26011        char *outptr = buf;
26012        size_t outbytesleft = sizeof (buf);
26013        size_t res = iconv (cd_88591_to_utf8,
26014                            (char **) &inptr, &inbytesleft,
26015                            &outptr, &outbytesleft);
26016        if ((int)res > 0)
26017          return 1;
26018      }
26019  }
26020#endif
26021  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
26022     provided.  */
26023  if (/* Try standardized names.  */
26024      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
26025      /* Try IRIX, OSF/1 names.  */
26026      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
26027      /* Try AIX names.  */
26028      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
26029      /* Try HP-UX names.  */
26030      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
26031    return 1;
26032  return 0;
26033}
26034_ACEOF
26035if ac_fn_c_try_run "$LINENO"; then :
26036  am_cv_func_iconv_works=yes
26037else
26038  am_cv_func_iconv_works=no
26039fi
26040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26041  conftest.$ac_objext conftest.beam conftest.$ac_ext
26042fi
26043
26044      LIBS="$am_save_LIBS"
26045
26046fi
26047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
26048$as_echo "$am_cv_func_iconv_works" >&6; }
26049    case "$am_cv_func_iconv_works" in
26050      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
26051      *)   am_func_iconv=yes ;;
26052    esac
26053  else
26054    am_func_iconv=no am_cv_lib_iconv=no
26055  fi
26056  if test "$am_func_iconv" = yes; then
26057
26058$as_echo "#define HAVE_ICONV 1" >>confdefs.h
26059
26060  fi
26061  if test "$am_cv_lib_iconv" = yes; then
26062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
26063$as_echo_n "checking how to link with libiconv... " >&6; }
26064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
26065$as_echo "$LIBICONV" >&6; }
26066  else
26067            CPPFLAGS="$am_save_CPPFLAGS"
26068    LIBICONV=
26069    LTLIBICONV=
26070  fi
26071
26072
26073
26074  if test "$am_cv_func_iconv" = yes; then
26075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
26076$as_echo_n "checking for iconv declaration... " >&6; }
26077    if test "${am_cv_proto_iconv+set}" = set; then :
26078  $as_echo_n "(cached) " >&6
26079else
26080
26081      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26082/* end confdefs.h.  */
26083
26084#include <stdlib.h>
26085#include <iconv.h>
26086extern
26087#ifdef __cplusplus
26088"C"
26089#endif
26090#if defined(__STDC__) || defined(__cplusplus)
26091size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
26092#else
26093size_t iconv();
26094#endif
26095
26096int
26097main ()
26098{
26099
26100  ;
26101  return 0;
26102}
26103_ACEOF
26104if ac_fn_c_try_compile "$LINENO"; then :
26105  am_cv_proto_iconv_arg1=""
26106else
26107  am_cv_proto_iconv_arg1="const"
26108fi
26109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26110      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);"
26111fi
26112
26113    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
26114    { $as_echo "$as_me:${as_lineno-$LINENO}: result:
26115         $am_cv_proto_iconv" >&5
26116$as_echo "
26117         $am_cv_proto_iconv" >&6; }
26118
26119cat >>confdefs.h <<_ACEOF
26120#define ICONV_CONST $am_cv_proto_iconv_arg1
26121_ACEOF
26122
26123  fi
26124
26125
26126
26127
26128
26129
26130
26131
26132
26133
26134     if test $gl_cv_have_include_next = yes; then
26135       gl_cv_next_iconv_h='<'iconv.h'>'
26136     else
26137       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
26138$as_echo_n "checking absolute name of <iconv.h>... " >&6; }
26139if test "${gl_cv_next_iconv_h+set}" = set; then :
26140  $as_echo_n "(cached) " >&6
26141else
26142
26143          if test $ac_cv_header_iconv_h = yes; then
26144            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26145/* end confdefs.h.  */
26146#include <iconv.h>
26147
26148_ACEOF
26149                                                                                                case "$host_os" in
26150              aix*) gl_absname_cpp="$ac_cpp -C" ;;
26151              *)    gl_absname_cpp="$ac_cpp" ;;
26152            esac
26153                                                gl_cv_next_iconv_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26154               sed -n '\#/iconv.h#{
26155                 s#.*"\(.*/iconv.h\)".*#\1#
26156                 s#^/[^/]#//&#
26157                 p
26158                 q
26159               }'`'"'
26160          else
26161            gl_cv_next_iconv_h='<'iconv.h'>'
26162          fi
26163
26164fi
26165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
26166$as_echo "$gl_cv_next_iconv_h" >&6; }
26167     fi
26168     NEXT_ICONV_H=$gl_cv_next_iconv_h
26169
26170     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26171       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26172       gl_next_as_first_directive='<'iconv.h'>'
26173     else
26174       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26175       gl_next_as_first_directive=$gl_cv_next_iconv_h
26176     fi
26177     NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
26178
26179
26180
26181
26182
26183
26184
26185
26186  if test "$am_cv_func_iconv" = yes; then
26187            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26188/* end confdefs.h.  */
26189
26190      #include <iconv.h>
26191      #if defined _LIBICONV_VERSION || defined __GLIBC__
26192       gnu_iconv
26193      #endif
26194
26195_ACEOF
26196if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26197  $EGREP "gnu_iconv" >/dev/null 2>&1; then :
26198  gl_func_iconv_gnu=yes
26199else
26200  gl_func_iconv_gnu=no
26201fi
26202rm -f conftest*
26203
26204    if test $gl_func_iconv_gnu = no; then
26205      iconv_flavor=
26206      case "$host_os" in
26207        aix*)     iconv_flavor=ICONV_FLAVOR_AIX ;;
26208        irix*)    iconv_flavor=ICONV_FLAVOR_IRIX ;;
26209        hpux*)    iconv_flavor=ICONV_FLAVOR_HPUX ;;
26210        osf*)     iconv_flavor=ICONV_FLAVOR_OSF ;;
26211        solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
26212      esac
26213      if test -n "$iconv_flavor"; then
26214
26215cat >>confdefs.h <<_ACEOF
26216#define ICONV_FLAVOR $iconv_flavor
26217_ACEOF
26218
26219
26220
26221
26222  ICONV_H='iconv.h'
26223
26224  REPLACE_ICONV_OPEN=1
26225
26226
26227
26228
26229
26230
26231
26232
26233  gl_LIBOBJS="$gl_LIBOBJS iconv_open.$ac_objext"
26234
26235
26236      fi
26237    fi
26238  fi
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249  gl_LIBOBJS="$gl_LIBOBJS idcache.$ac_objext"
26250
26251
26252
26253
26254
26255
26256
26257    :
26258
26259
26260      gl_save_LIBS=$LIBS
26261  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
26262$as_echo_n "checking for library containing inet_ntop... " >&6; }
26263if test "${ac_cv_search_inet_ntop+set}" = set; then :
26264  $as_echo_n "(cached) " >&6
26265else
26266  ac_func_search_save_LIBS=$LIBS
26267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26268/* end confdefs.h.  */
26269
26270/* Override any GCC internal prototype to avoid an error.
26271   Use char because int might match the return type of a GCC
26272   builtin and then its argument prototype would still apply.  */
26273#ifdef __cplusplus
26274extern "C"
26275#endif
26276char inet_ntop ();
26277int
26278main ()
26279{
26280return inet_ntop ();
26281  ;
26282  return 0;
26283}
26284_ACEOF
26285for ac_lib in '' nsl; do
26286  if test -z "$ac_lib"; then
26287    ac_res="none required"
26288  else
26289    ac_res=-l$ac_lib
26290    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26291  fi
26292  if ac_fn_c_try_link "$LINENO"; then :
26293  ac_cv_search_inet_ntop=$ac_res
26294fi
26295rm -f core conftest.err conftest.$ac_objext \
26296    conftest$ac_exeext
26297  if test "${ac_cv_search_inet_ntop+set}" = set; then :
26298  break
26299fi
26300done
26301if test "${ac_cv_search_inet_ntop+set}" = set; then :
26302
26303else
26304  ac_cv_search_inet_ntop=no
26305fi
26306rm conftest.$ac_ext
26307LIBS=$ac_func_search_save_LIBS
26308fi
26309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
26310$as_echo "$ac_cv_search_inet_ntop" >&6; }
26311ac_res=$ac_cv_search_inet_ntop
26312if test "$ac_res" != no; then :
26313  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26314
26315else
26316
26317
26318
26319
26320
26321
26322
26323
26324  for ac_func in inet_ntop
26325do :
26326  ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
26327if test "x$ac_cv_func_inet_ntop" = x""yes; then :
26328  cat >>confdefs.h <<_ACEOF
26329#define HAVE_INET_NTOP 1
26330_ACEOF
26331
26332else
26333
26334    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
26335
26336fi
26337done
26338
26339
26340fi
26341
26342  LIBS=$gl_save_LIBS
26343  INET_NTOP_LIB=
26344  if test "$ac_cv_search_inet_ntop" != "no" &&
26345     test "$ac_cv_search_inet_ntop" != "none required"; then
26346    INET_NTOP_LIB="$ac_cv_search_inet_ntop"
26347  fi
26348
26349
26350
26351  ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
26352"
26353if test "x$ac_cv_have_decl_inet_ntop" = x""yes; then :
26354  ac_have_decl=1
26355else
26356  ac_have_decl=0
26357fi
26358
26359cat >>confdefs.h <<_ACEOF
26360#define HAVE_DECL_INET_NTOP $ac_have_decl
26361_ACEOF
26362
26363  if test $ac_cv_have_decl_inet_ntop = no; then
26364    HAVE_DECL_INET_NTOP=0
26365  fi
26366
26367
26368
26369
26370
26371
26372  GNULIB_INET_NTOP=1
26373
26374
26375
26376  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
26377$as_echo_n "checking whether the compiler generally respects inline... " >&6; }
26378if test "${gl_cv_c_inline_effective+set}" = set; then :
26379  $as_echo_n "(cached) " >&6
26380else
26381  if test $ac_cv_c_inline = no; then
26382       gl_cv_c_inline_effective=no
26383     else
26384                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26385/* end confdefs.h.  */
26386
26387int
26388main ()
26389{
26390#ifdef __NO_INLINE__
26391               #error "inline is not effective"
26392             #endif
26393  ;
26394  return 0;
26395}
26396_ACEOF
26397if ac_fn_c_try_compile "$LINENO"; then :
26398  gl_cv_c_inline_effective=yes
26399else
26400  gl_cv_c_inline_effective=no
26401fi
26402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26403     fi
26404
26405fi
26406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
26407$as_echo "$gl_cv_c_inline_effective" >&6; }
26408  if test $gl_cv_c_inline_effective = yes; then
26409
26410$as_echo "#define HAVE_INLINE 1" >>confdefs.h
26411
26412  fi
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423  gl_LIBOBJS="$gl_LIBOBJS imaxtostr.$ac_objext"
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433  gl_LIBOBJS="$gl_LIBOBJS offtostr.$ac_objext"
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443  gl_LIBOBJS="$gl_LIBOBJS umaxtostr.$ac_objext"
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453  gl_LIBOBJS="$gl_LIBOBJS uinttostr.$ac_objext"
26454
26455
26456
26457
26458  :
26459
26460  :
26461  :
26462  :
26463  :
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474              { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inttypes.h conforms to C99" >&5
26475$as_echo_n "checking whether inttypes.h conforms to C99... " >&6; }
26476if test "${gl_cv_header_working_inttypes_h+set}" = set; then :
26477  $as_echo_n "(cached) " >&6
26478else
26479  gl_cv_header_working_inttypes_h=no
26480     if test "$gl_cv_header_working_stdint_h" = yes \
26481        && test $ac_cv_header_inttypes_h = yes \
26482        && test "$ac_cv_have_decl_imaxabs" = yes \
26483        && test "$ac_cv_have_decl_imaxdiv" = yes \
26484        && test "$ac_cv_have_decl_strtoimax" = yes \
26485        && test "$ac_cv_have_decl_strtoumax" = yes; then
26486       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26487/* end confdefs.h.  */
26488
26489
26490#include <stddef.h>
26491#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
26492#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
26493#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
26494#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */
26495#include <inttypes.h>
26496
26497/* No need to duplicate the tests of stdint.m4; they are subsumed by
26498   $gl_cv_header_working_stdint_h = yes.  */
26499
26500/* Tests for macros supposed to be defined in inttypes.h.  */
26501
26502const char *k = /* implicit string concatenation */
26503#ifdef INT8_MAX
26504  PRId8 PRIi8
26505#endif
26506#ifdef UINT8_MAX
26507  PRIo8 PRIu8 PRIx8 PRIX8
26508#endif
26509#ifdef INT16_MAX
26510  PRId16 PRIi16
26511#endif
26512#ifdef UINT16_MAX
26513  PRIo16 PRIu16 PRIx16 PRIX16
26514#endif
26515#ifdef INT32_MAX
26516  PRId32 PRIi32
26517#endif
26518#ifdef UINT32_MAX
26519  PRIo32 PRIu32 PRIx32 PRIX32
26520#endif
26521#ifdef INT64_MAX
26522  PRId64 PRIi64
26523#endif
26524#ifdef UINT64_MAX
26525  PRIo64 PRIu64 PRIx64 PRIX64
26526#endif
26527  PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
26528  PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
26529  PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
26530  PRIdLEAST64 PRIiLEAST64
26531  PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
26532  PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
26533  PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
26534  PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
26535  PRIdFAST64 PRIiFAST64
26536  PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
26537  PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
26538#ifdef INTPTR_MAX
26539  PRIdPTR PRIiPTR
26540#endif
26541#ifdef UINTPTR_MAX
26542  PRIoPTR PRIuPTR PRIxPTR PRIXPTR
26543#endif
26544  ;
26545const char *l = /* implicit string concatenation */
26546#ifdef INT8_MAX
26547  SCNd8 SCNi8
26548#endif
26549#ifdef UINT8_MAX
26550  SCNo8 SCNu8 SCNx8
26551#endif
26552#ifdef INT16_MAX
26553  SCNd16 SCNi16
26554#endif
26555#ifdef UINT16_MAX
26556  SCNo16 SCNu16 SCNx16
26557#endif
26558#ifdef INT32_MAX
26559  SCNd32 SCNi32
26560#endif
26561#ifdef UINT32_MAX
26562  SCNo32 SCNu32 SCNx32
26563#endif
26564#ifdef INT64_MAX
26565  SCNd64 SCNi64
26566#endif
26567#ifdef UINT64_MAX
26568  SCNo64 SCNu64 SCNx64
26569#endif
26570  SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
26571  SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
26572  SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
26573  SCNdLEAST64 SCNiLEAST64
26574  SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
26575  SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
26576  SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
26577  SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
26578  SCNdFAST64 SCNiFAST64
26579  SCNoFAST64 SCNuFAST64 SCNxFAST64
26580  SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
26581#ifdef INTPTR_MAX
26582  SCNdPTR SCNiPTR
26583#endif
26584#ifdef UINTPTR_MAX
26585  SCNoPTR SCNuPTR SCNxPTR
26586#endif
26587  ;
26588
26589int
26590main ()
26591{
26592
26593  ;
26594  return 0;
26595}
26596_ACEOF
26597if ac_fn_c_try_compile "$LINENO"; then :
26598  gl_cv_header_working_inttypes_h=yes
26599fi
26600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26601     fi
26602fi
26603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_inttypes_h" >&5
26604$as_echo "$gl_cv_header_working_inttypes_h" >&6; }
26605
26606
26607
26608
26609
26610
26611
26612
26613     if test $gl_cv_have_include_next = yes; then
26614       gl_cv_next_inttypes_h='<'inttypes.h'>'
26615     else
26616       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
26617$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
26618if test "${gl_cv_next_inttypes_h+set}" = set; then :
26619  $as_echo_n "(cached) " >&6
26620else
26621
26622          if test $ac_cv_header_inttypes_h = yes; then
26623            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26624/* end confdefs.h.  */
26625#include <inttypes.h>
26626
26627_ACEOF
26628                                                                                                case "$host_os" in
26629              aix*) gl_absname_cpp="$ac_cpp -C" ;;
26630              *)    gl_absname_cpp="$ac_cpp" ;;
26631            esac
26632                                                gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26633               sed -n '\#/inttypes.h#{
26634                 s#.*"\(.*/inttypes.h\)".*#\1#
26635                 s#^/[^/]#//&#
26636                 p
26637                 q
26638               }'`'"'
26639          else
26640            gl_cv_next_inttypes_h='<'inttypes.h'>'
26641          fi
26642
26643fi
26644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
26645$as_echo "$gl_cv_next_inttypes_h" >&6; }
26646     fi
26647     NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
26648
26649     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26650       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26651       gl_next_as_first_directive='<'inttypes.h'>'
26652     else
26653       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26654       gl_next_as_first_directive=$gl_cv_next_inttypes_h
26655     fi
26656     NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
26657
26658
26659
26660
26661
26662
26663
26664$as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h
26665
26666
26667
26668  PRIPTR_PREFIX=
26669  if test -n "$STDINT_H"; then
26670        PRIPTR_PREFIX='"l"'
26671  else
26672        for glpfx in '' l ll I64; do
26673      case $glpfx in
26674        '')  gltype1='int';;
26675        l)   gltype1='long int';;
26676        ll)  gltype1='long long int';;
26677        I64) gltype1='__int64';;
26678      esac
26679      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26680/* end confdefs.h.  */
26681#include <stdint.h>
26682           extern intptr_t foo;
26683           extern $gltype1 foo;
26684int
26685main ()
26686{
26687
26688  ;
26689  return 0;
26690}
26691_ACEOF
26692if ac_fn_c_try_compile "$LINENO"; then :
26693  PRIPTR_PREFIX='"'$glpfx'"'
26694fi
26695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26696      test -n "$PRIPTR_PREFIX" && break
26697    done
26698  fi
26699
26700
26701  if test "$ac_cv_have_decl_imaxabs" = yes; then
26702    HAVE_DECL_IMAXABS=1
26703  else
26704    HAVE_DECL_IMAXABS=0
26705  fi
26706
26707  if test "$ac_cv_have_decl_imaxdiv" = yes; then
26708    HAVE_DECL_IMAXDIV=1
26709  else
26710    HAVE_DECL_IMAXDIV=0
26711  fi
26712
26713  if test "$ac_cv_have_decl_strtoimax" = yes; then
26714    HAVE_DECL_STRTOIMAX=1
26715  else
26716    HAVE_DECL_STRTOIMAX=0
26717  fi
26718
26719  if test "$ac_cv_have_decl_strtoumax" = yes; then
26720    HAVE_DECL_STRTOUMAX=1
26721  else
26722    HAVE_DECL_STRTOUMAX=0
26723  fi
26724
26725
26726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
26727$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
26728if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then :
26729  $as_echo_n "(cached) " >&6
26730else
26731  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26732/* end confdefs.h.  */
26733/* Work also in C++ mode.  */
26734            #define __STDC_LIMIT_MACROS 1
26735
26736            /* Work if build is not clean.  */
26737            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
26738
26739            #include <limits.h>
26740            #if HAVE_STDINT_H
26741             #include <stdint.h>
26742            #endif
26743
26744            #if defined INT32_MAX && defined INTMAX_MAX
26745             #define CONDITION (INT32_MAX < INTMAX_MAX)
26746            #elif HAVE_LONG_LONG_INT
26747             #define CONDITION (sizeof (int) < sizeof (long long int))
26748            #else
26749             #define CONDITION 0
26750            #endif
26751            int test[CONDITION ? 1 : -1];
26752int
26753main ()
26754{
26755
26756  ;
26757  return 0;
26758}
26759_ACEOF
26760if ac_fn_c_try_compile "$LINENO"; then :
26761  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
26762else
26763  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
26764fi
26765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26766fi
26767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
26768$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
26769  if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
26770    INT32_MAX_LT_INTMAX_MAX=1;
26771  else
26772    INT32_MAX_LT_INTMAX_MAX=0;
26773  fi
26774
26775
26776  if test $APPLE_UNIVERSAL_BUILD = 0; then
26777
26778  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
26779$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
26780if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then :
26781  $as_echo_n "(cached) " >&6
26782else
26783  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26784/* end confdefs.h.  */
26785/* Work also in C++ mode.  */
26786            #define __STDC_LIMIT_MACROS 1
26787
26788            /* Work if build is not clean.  */
26789            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
26790
26791            #include <limits.h>
26792            #if HAVE_STDINT_H
26793             #include <stdint.h>
26794            #endif
26795
26796            #if defined INT64_MAX
26797             #define CONDITION (INT64_MAX == LONG_MAX)
26798            #elif HAVE_LONG_LONG_INT
26799             #define CONDITION (sizeof (long long int) == sizeof (long int))
26800            #else
26801             #define CONDITION 0
26802            #endif
26803            int test[CONDITION ? 1 : -1];
26804int
26805main ()
26806{
26807
26808  ;
26809  return 0;
26810}
26811_ACEOF
26812if ac_fn_c_try_compile "$LINENO"; then :
26813  gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
26814else
26815  gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
26816fi
26817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26818fi
26819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
26820$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
26821  if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
26822    INT64_MAX_EQ_LONG_MAX=1;
26823  else
26824    INT64_MAX_EQ_LONG_MAX=0;
26825  fi
26826
26827
26828  else
26829    INT64_MAX_EQ_LONG_MAX=-1
26830  fi
26831
26832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
26833$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
26834if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then :
26835  $as_echo_n "(cached) " >&6
26836else
26837  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26838/* end confdefs.h.  */
26839/* Work also in C++ mode.  */
26840            #define __STDC_LIMIT_MACROS 1
26841
26842            /* Work if build is not clean.  */
26843            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
26844
26845            #include <limits.h>
26846            #if HAVE_STDINT_H
26847             #include <stdint.h>
26848            #endif
26849
26850            #if defined UINT32_MAX && defined UINTMAX_MAX
26851             #define CONDITION (UINT32_MAX < UINTMAX_MAX)
26852            #elif HAVE_LONG_LONG_INT
26853             #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
26854            #else
26855             #define CONDITION 0
26856            #endif
26857            int test[CONDITION ? 1 : -1];
26858int
26859main ()
26860{
26861
26862  ;
26863  return 0;
26864}
26865_ACEOF
26866if ac_fn_c_try_compile "$LINENO"; then :
26867  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
26868else
26869  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
26870fi
26871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26872fi
26873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
26874$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
26875  if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
26876    UINT32_MAX_LT_UINTMAX_MAX=1;
26877  else
26878    UINT32_MAX_LT_UINTMAX_MAX=0;
26879  fi
26880
26881
26882  if test $APPLE_UNIVERSAL_BUILD = 0; then
26883
26884  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
26885$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
26886if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then :
26887  $as_echo_n "(cached) " >&6
26888else
26889  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26890/* end confdefs.h.  */
26891/* Work also in C++ mode.  */
26892            #define __STDC_LIMIT_MACROS 1
26893
26894            /* Work if build is not clean.  */
26895            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
26896
26897            #include <limits.h>
26898            #if HAVE_STDINT_H
26899             #include <stdint.h>
26900            #endif
26901
26902            #if defined UINT64_MAX
26903             #define CONDITION (UINT64_MAX == ULONG_MAX)
26904            #elif HAVE_LONG_LONG_INT
26905             #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
26906            #else
26907             #define CONDITION 0
26908            #endif
26909            int test[CONDITION ? 1 : -1];
26910int
26911main ()
26912{
26913
26914  ;
26915  return 0;
26916}
26917_ACEOF
26918if ac_fn_c_try_compile "$LINENO"; then :
26919  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
26920else
26921  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
26922fi
26923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26924fi
26925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
26926$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
26927  if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
26928    UINT64_MAX_EQ_ULONG_MAX=1;
26929  else
26930    UINT64_MAX_EQ_ULONG_MAX=0;
26931  fi
26932
26933
26934  else
26935    UINT64_MAX_EQ_ULONG_MAX=-1
26936  fi
26937
26938
26939  # OpenVMS has isapipe already, so check for it.
26940
26941
26942
26943
26944
26945
26946
26947
26948  for ac_func in isapipe
26949do :
26950  ac_fn_c_check_func "$LINENO" "isapipe" "ac_cv_func_isapipe"
26951if test "x$ac_cv_func_isapipe" = x""yes; then :
26952  cat >>confdefs.h <<_ACEOF
26953#define HAVE_ISAPIPE 1
26954_ACEOF
26955
26956else
26957
26958    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
26959
26960fi
26961done
26962
26963
26964  if test $ac_cv_func_isapipe = no; then
26965
26966  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pipes are FIFOs (and for their link count)" >&5
26967$as_echo_n "checking whether pipes are FIFOs (and for their link count)... " >&6; }
26968if test "${gl_cv_pipes_are_fifos+set}" = set; then :
26969  $as_echo_n "(cached) " >&6
26970else
26971  if test "$cross_compiling" = yes; then :
26972  gl_cv_pipes_are_fifos=cross-compiling
26973else
26974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26975/* end confdefs.h.  */
26976#include <stdio.h>
26977            #include <sys/types.h>
26978            #include <sys/stat.h>
26979            #include <unistd.h>
26980            #ifndef S_ISFIFO
26981             #define S_ISFIFO(m) 0
26982            #endif
26983            #ifndef S_ISSOCK
26984             #define S_ISSOCK(m) 0
26985            #endif
26986            int
26987            main (int argc, char **argv)
26988            {
26989              int fd[2];
26990              struct stat st;
26991              if (pipe (fd) != 0 || fstat (fd[0], &st) != 0)
26992                return 1;
26993              if (2 <= argc && argv[1][0] == '-')
26994                {
26995                  char const *yesno = (S_ISFIFO (st.st_mode) ? "yes" : "no");
26996                  if (st.st_nlink <= 1)
26997                    {
26998                      long int i = st.st_nlink;
26999                      if (i != st.st_nlink)
27000                        return 1;
27001                      printf ("%s (%ld)\n", yesno, i);
27002                    }
27003                  else
27004                    {
27005                      unsigned long int i = st.st_nlink;
27006                      if (i != st.st_nlink)
27007                        return 1;
27008                      printf ("%s (%lu)\n", yesno, i);
27009                    }
27010                }
27011              else
27012                {
27013                  if (! S_ISFIFO (st.st_mode) && ! S_ISSOCK (st.st_mode))
27014                    return 1;
27015                }
27016              return 0;
27017            }
27018_ACEOF
27019if ac_fn_c_try_run "$LINENO"; then :
27020  gl_cv_pipes_are_fifos=`./conftest$ac_exeext -`
27021        test -z "$gl_cv_pipes_are_fifos" && gl_cv_pipes_are_fifos=no
27022else
27023  gl_cv_pipes_are_fifos=unknown
27024fi
27025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27026  conftest.$ac_objext conftest.beam conftest.$ac_ext
27027fi
27028
27029fi
27030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pipes_are_fifos" >&5
27031$as_echo "$gl_cv_pipes_are_fifos" >&6; }
27032
27033  case $gl_cv_pipes_are_fifos in #(
27034  'yes ('*')')
27035
27036$as_echo "#define HAVE_FIFO_PIPES 1" >>confdefs.h
27037;; #(
27038  'no ('*')')
27039    $as_echo "#define HAVE_FIFO_PIPES 0" >>confdefs.h
27040;;
27041  esac
27042
27043  case $gl_cv_pipes_are_fifos in #(
27044  *'('*')')
27045
27046cat >>confdefs.h <<_ACEOF
27047#define PIPE_LINK_COUNT_MAX `expr "$gl_cv_pipes_are_fifos" : '.*\((.*)\)'`
27048_ACEOF
27049;;
27050  esac
27051
27052  fi
27053
27054
27055
27056
27057
27058
27059  if test $ac_cv_func_isblank = no; then
27060    HAVE_ISBLANK=0
27061
27062
27063
27064
27065
27066
27067
27068
27069  gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
27070
27071  fi
27072
27073
27074
27075  GNULIB_ISBLANK=1
27076
27077
27078
27079  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
27080$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
27081if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
27082  $as_echo_n "(cached) " >&6
27083else
27084
27085      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27086/* end confdefs.h.  */
27087#include <math.h>
27088                   #if __GNUC__ >= 4
27089                   # undef isnand
27090                   # define isnand(x) __builtin_isnan ((double)(x))
27091                   #else
27092                   # undef isnand
27093                   # define isnand(x) isnan ((double)(x))
27094                   #endif
27095                   double x;
27096int
27097main ()
27098{
27099return isnand (x);
27100  ;
27101  return 0;
27102}
27103_ACEOF
27104if ac_fn_c_try_link "$LINENO"; then :
27105  gl_cv_func_isnand_no_libm=yes
27106else
27107  gl_cv_func_isnand_no_libm=no
27108fi
27109rm -f core conftest.err conftest.$ac_objext \
27110    conftest$ac_exeext conftest.$ac_ext
27111
27112fi
27113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
27114$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
27115
27116  if test $gl_cv_func_isnand_no_libm = yes; then
27117
27118$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
27119
27120  else
27121
27122
27123
27124
27125
27126
27127
27128
27129
27130  gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
27131
27132
27133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
27134$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
27135if test "${gl_cv_cc_double_expbit0+set}" = set; then :
27136  $as_echo_n "(cached) " >&6
27137else
27138
27139      if test "$cross_compiling" = yes; then :
27140
27141                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27142/* end confdefs.h.  */
27143
27144#if defined arm || defined __arm || defined __arm__
27145  mixed_endianness
27146#endif
27147
27148_ACEOF
27149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27150  $EGREP "mixed_endianness" >/dev/null 2>&1; then :
27151  gl_cv_cc_double_expbit0="unknown"
27152else
27153
27154                                                         :
27155if test "${ac_cv_c_bigendian+set}" = set; then :
27156  $as_echo_n "(cached) " >&6
27157else
27158  ac_cv_c_bigendian=unknown
27159    # See if we're dealing with a universal compiler.
27160    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27161/* end confdefs.h.  */
27162#ifndef __APPLE_CC__
27163	       not a universal capable compiler
27164	     #endif
27165	     typedef int dummy;
27166
27167_ACEOF
27168if ac_fn_c_try_compile "$LINENO"; then :
27169
27170	# Check for potential -arch flags.  It is not universal unless
27171	# there are at least two -arch flags with different values.
27172	ac_arch=
27173	ac_prev=
27174	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27175	 if test -n "$ac_prev"; then
27176	   case $ac_word in
27177	     i?86 | x86_64 | ppc | ppc64)
27178	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27179		 ac_arch=$ac_word
27180	       else
27181		 ac_cv_c_bigendian=universal
27182		 break
27183	       fi
27184	       ;;
27185	   esac
27186	   ac_prev=
27187	 elif test "x$ac_word" = "x-arch"; then
27188	   ac_prev=arch
27189	 fi
27190       done
27191fi
27192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27193    if test $ac_cv_c_bigendian = unknown; then
27194      # See if sys/param.h defines the BYTE_ORDER macro.
27195      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27196/* end confdefs.h.  */
27197#include <sys/types.h>
27198	     #include <sys/param.h>
27199
27200int
27201main ()
27202{
27203#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27204		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27205		     && LITTLE_ENDIAN)
27206	      bogus endian macros
27207	     #endif
27208
27209  ;
27210  return 0;
27211}
27212_ACEOF
27213if ac_fn_c_try_compile "$LINENO"; then :
27214  # It does; now see whether it defined to BIG_ENDIAN or not.
27215	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27216/* end confdefs.h.  */
27217#include <sys/types.h>
27218		#include <sys/param.h>
27219
27220int
27221main ()
27222{
27223#if BYTE_ORDER != BIG_ENDIAN
27224		 not big endian
27225		#endif
27226
27227  ;
27228  return 0;
27229}
27230_ACEOF
27231if ac_fn_c_try_compile "$LINENO"; then :
27232  ac_cv_c_bigendian=yes
27233else
27234  ac_cv_c_bigendian=no
27235fi
27236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27237fi
27238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27239    fi
27240    if test $ac_cv_c_bigendian = unknown; then
27241      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27242      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27243/* end confdefs.h.  */
27244#include <limits.h>
27245
27246int
27247main ()
27248{
27249#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27250	      bogus endian macros
27251	     #endif
27252
27253  ;
27254  return 0;
27255}
27256_ACEOF
27257if ac_fn_c_try_compile "$LINENO"; then :
27258  # It does; now see whether it defined to _BIG_ENDIAN or not.
27259	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27260/* end confdefs.h.  */
27261#include <limits.h>
27262
27263int
27264main ()
27265{
27266#ifndef _BIG_ENDIAN
27267		 not big endian
27268		#endif
27269
27270  ;
27271  return 0;
27272}
27273_ACEOF
27274if ac_fn_c_try_compile "$LINENO"; then :
27275  ac_cv_c_bigendian=yes
27276else
27277  ac_cv_c_bigendian=no
27278fi
27279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27280fi
27281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27282    fi
27283    if test $ac_cv_c_bigendian = unknown; then
27284      # Compile a test program.
27285      if test "$cross_compiling" = yes; then :
27286  # Try to guess by grepping values from an object file.
27287	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27288/* end confdefs.h.  */
27289short int ascii_mm[] =
27290		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27291		short int ascii_ii[] =
27292		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27293		int use_ascii (int i) {
27294		  return ascii_mm[i] + ascii_ii[i];
27295		}
27296		short int ebcdic_ii[] =
27297		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27298		short int ebcdic_mm[] =
27299		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27300		int use_ebcdic (int i) {
27301		  return ebcdic_mm[i] + ebcdic_ii[i];
27302		}
27303		extern int foo;
27304
27305int
27306main ()
27307{
27308return use_ascii (foo) == use_ebcdic (foo);
27309  ;
27310  return 0;
27311}
27312_ACEOF
27313if ac_fn_c_try_compile "$LINENO"; then :
27314  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27315	      ac_cv_c_bigendian=yes
27316	    fi
27317	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27318	      if test "$ac_cv_c_bigendian" = unknown; then
27319		ac_cv_c_bigendian=no
27320	      else
27321		# finding both strings is unlikely to happen, but who knows?
27322		ac_cv_c_bigendian=unknown
27323	      fi
27324	    fi
27325fi
27326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27327else
27328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27329/* end confdefs.h.  */
27330$ac_includes_default
27331int
27332main ()
27333{
27334
27335	     /* Are we little or big endian?  From Harbison&Steele.  */
27336	     union
27337	     {
27338	       long int l;
27339	       char c[sizeof (long int)];
27340	     } u;
27341	     u.l = 1;
27342	     return u.c[sizeof (long int) - 1] == 1;
27343
27344  ;
27345  return 0;
27346}
27347_ACEOF
27348if ac_fn_c_try_run "$LINENO"; then :
27349  ac_cv_c_bigendian=no
27350else
27351  ac_cv_c_bigendian=yes
27352fi
27353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27354  conftest.$ac_objext conftest.beam conftest.$ac_ext
27355fi
27356
27357    fi
27358fi
27359:
27360 case $ac_cv_c_bigendian in #(
27361   yes)
27362     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
27363   no)
27364     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
27365   universal)
27366
27367$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
27368
27369     ;; #(
27370   *)
27371     gl_cv_cc_double_expbit0="unknown" ;;
27372 esac
27373
27374
27375fi
27376rm -f conftest*
27377
27378
27379else
27380  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27381/* end confdefs.h.  */
27382
27383#include <float.h>
27384#include <stddef.h>
27385#include <stdio.h>
27386#include <string.h>
27387#define NWORDS \
27388  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27389typedef union { double value; unsigned int word[NWORDS]; } memory_double;
27390static unsigned int ored_words[NWORDS];
27391static unsigned int anded_words[NWORDS];
27392static void add_to_ored_words (double x)
27393{
27394  memory_double m;
27395  size_t i;
27396  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
27397  memset (&m, 0, sizeof (memory_double));
27398  m.value = x;
27399  for (i = 0; i < NWORDS; i++)
27400    {
27401      ored_words[i] |= m.word[i];
27402      anded_words[i] &= m.word[i];
27403    }
27404}
27405int main ()
27406{
27407  size_t j;
27408  FILE *fp = fopen ("conftest.out", "w");
27409  if (fp == NULL)
27410    return 1;
27411  for (j = 0; j < NWORDS; j++)
27412    anded_words[j] = ~ (unsigned int) 0;
27413  add_to_ored_words (0.25);
27414  add_to_ored_words (0.5);
27415  add_to_ored_words (1.0);
27416  add_to_ored_words (2.0);
27417  add_to_ored_words (4.0);
27418  /* Remove bits that are common (e.g. if representation of the first mantissa
27419     bit is explicit).  */
27420  for (j = 0; j < NWORDS; j++)
27421    ored_words[j] &= ~anded_words[j];
27422  /* Now find the nonzero word.  */
27423  for (j = 0; j < NWORDS; j++)
27424    if (ored_words[j] != 0)
27425      break;
27426  if (j < NWORDS)
27427    {
27428      size_t i;
27429      for (i = j + 1; i < NWORDS; i++)
27430        if (ored_words[i] != 0)
27431          {
27432            fprintf (fp, "unknown");
27433            return (fclose (fp) != 0);
27434          }
27435      for (i = 0; ; i++)
27436        if ((ored_words[j] >> i) & 1)
27437          {
27438            fprintf (fp, "word %d bit %d", (int) j, (int) i);
27439            return (fclose (fp) != 0);
27440          }
27441    }
27442  fprintf (fp, "unknown");
27443  return (fclose (fp) != 0);
27444}
27445
27446_ACEOF
27447if ac_fn_c_try_run "$LINENO"; then :
27448  gl_cv_cc_double_expbit0=`cat conftest.out`
27449else
27450  gl_cv_cc_double_expbit0="unknown"
27451fi
27452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27453  conftest.$ac_objext conftest.beam conftest.$ac_ext
27454fi
27455
27456      rm -f conftest.out
27457
27458fi
27459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
27460$as_echo "$gl_cv_cc_double_expbit0" >&6; }
27461  case "$gl_cv_cc_double_expbit0" in
27462    word*bit*)
27463      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
27464      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
27465
27466cat >>confdefs.h <<_ACEOF
27467#define DBL_EXPBIT0_WORD $word
27468_ACEOF
27469
27470
27471cat >>confdefs.h <<_ACEOF
27472#define DBL_EXPBIT0_BIT $bit
27473_ACEOF
27474
27475      ;;
27476  esac
27477
27478
27479  fi
27480
27481
27482
27483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
27484$as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
27485if test "${gl_cv_func_isnanf_no_libm+set}" = set; then :
27486  $as_echo_n "(cached) " >&6
27487else
27488
27489      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27490/* end confdefs.h.  */
27491#include <math.h>
27492                   #if __GNUC__ >= 4
27493                   # undef isnanf
27494                   # define isnanf(x) __builtin_isnanf ((float)(x))
27495                   #elif defined isnan
27496                   # undef isnanf
27497                   # define isnanf(x) isnan ((float)(x))
27498                   #endif
27499                   float x;
27500int
27501main ()
27502{
27503return isnanf (x);
27504  ;
27505  return 0;
27506}
27507_ACEOF
27508if ac_fn_c_try_link "$LINENO"; then :
27509  gl_cv_func_isnanf_no_libm=yes
27510else
27511  gl_cv_func_isnanf_no_libm=no
27512fi
27513rm -f core conftest.err conftest.$ac_objext \
27514    conftest$ac_exeext conftest.$ac_ext
27515
27516fi
27517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
27518$as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
27519
27520  if test $gl_cv_func_isnanf_no_libm = yes; then
27521
27522
27523
27524  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
27525$as_echo_n "checking whether isnan(float) works... " >&6; }
27526if test "${gl_cv_func_isnanf_works+set}" = set; then :
27527  $as_echo_n "(cached) " >&6
27528else
27529
27530      if test "$cross_compiling" = yes; then :
27531  case "$host_os" in
27532           irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
27533           *)                gl_cv_func_isnanf_works="guessing yes";;
27534         esac
27535
27536else
27537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27538/* end confdefs.h.  */
27539
27540#include <math.h>
27541#if __GNUC__ >= 4
27542# undef isnanf
27543# define isnanf(x) __builtin_isnanf ((float)(x))
27544#elif defined isnan
27545# undef isnanf
27546# define isnanf(x) isnan ((float)(x))
27547#endif
27548/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
27549#ifdef __DECC
27550static float
27551NaN ()
27552{
27553  static float zero = 0.0f;
27554  return zero / zero;
27555}
27556#else
27557# define NaN() (0.0f / 0.0f)
27558#endif
27559#define NWORDS \
27560  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27561typedef union { unsigned int word[NWORDS]; float value; } memory_float;
27562int main()
27563{
27564  memory_float m;
27565
27566  if (isnanf (1.0f / 0.0f))
27567    return 1;
27568
27569  if (!isnanf (NaN ()))
27570    return 1;
27571
27572#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
27573  /* The isnanf function should be immune against changes in the sign bit and
27574     in the mantissa bits.  The xor operation twiddles a bit that can only be
27575     a sign bit or a mantissa bit.  */
27576  if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
27577    {
27578      m.value = NaN ();
27579      /* Set the bits below the exponent to 01111...111.  */
27580      m.word[0] &= -1U << FLT_EXPBIT0_BIT;
27581      m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
27582      if (!isnanf (m.value))
27583        return 1;
27584    }
27585#endif
27586
27587  return 0;
27588}
27589_ACEOF
27590if ac_fn_c_try_run "$LINENO"; then :
27591  gl_cv_func_isnanf_works=yes
27592else
27593  gl_cv_func_isnanf_works=no
27594fi
27595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27596  conftest.$ac_objext conftest.beam conftest.$ac_ext
27597fi
27598
27599
27600fi
27601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
27602$as_echo "$gl_cv_func_isnanf_works" >&6; }
27603
27604  fi
27605  if test $gl_cv_func_isnanf_no_libm = yes \
27606     && { case "$gl_cv_func_isnanf_works" in
27607            *yes) true;;
27608            *) false;;
27609          esac
27610        }; then
27611
27612$as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
27613
27614  else
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624  gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
27625
27626
27627  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
27628$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
27629if test "${gl_cv_cc_float_expbit0+set}" = set; then :
27630  $as_echo_n "(cached) " >&6
27631else
27632
27633      if test "$cross_compiling" = yes; then :
27634  gl_cv_cc_float_expbit0="word 0 bit 23"
27635else
27636  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27637/* end confdefs.h.  */
27638
27639#include <float.h>
27640#include <stddef.h>
27641#include <stdio.h>
27642#include <string.h>
27643#define NWORDS \
27644  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27645typedef union { float value; unsigned int word[NWORDS]; } memory_float;
27646static unsigned int ored_words[NWORDS];
27647static unsigned int anded_words[NWORDS];
27648static void add_to_ored_words (float x)
27649{
27650  memory_float m;
27651  size_t i;
27652  /* Clear it first, in case
27653     sizeof (float) < sizeof (memory_float).  */
27654  memset (&m, 0, sizeof (memory_float));
27655  m.value = x;
27656  for (i = 0; i < NWORDS; i++)
27657    {
27658      ored_words[i] |= m.word[i];
27659      anded_words[i] &= m.word[i];
27660    }
27661}
27662int main ()
27663{
27664  size_t j;
27665  FILE *fp = fopen ("conftest.out", "w");
27666  if (fp == NULL)
27667    return 1;
27668  for (j = 0; j < NWORDS; j++)
27669    anded_words[j] = ~ (unsigned int) 0;
27670  add_to_ored_words (0.25f);
27671  add_to_ored_words (0.5f);
27672  add_to_ored_words (1.0f);
27673  add_to_ored_words (2.0f);
27674  add_to_ored_words (4.0f);
27675  /* Remove bits that are common (e.g. if representation of the first mantissa
27676     bit is explicit).  */
27677  for (j = 0; j < NWORDS; j++)
27678    ored_words[j] &= ~anded_words[j];
27679  /* Now find the nonzero word.  */
27680  for (j = 0; j < NWORDS; j++)
27681    if (ored_words[j] != 0)
27682      break;
27683  if (j < NWORDS)
27684    {
27685      size_t i;
27686      for (i = j + 1; i < NWORDS; i++)
27687        if (ored_words[i] != 0)
27688          {
27689            fprintf (fp, "unknown");
27690            return (fclose (fp) != 0);
27691          }
27692      for (i = 0; ; i++)
27693        if ((ored_words[j] >> i) & 1)
27694          {
27695            fprintf (fp, "word %d bit %d", (int) j, (int) i);
27696            return (fclose (fp) != 0);
27697          }
27698    }
27699  fprintf (fp, "unknown");
27700  return (fclose (fp) != 0);
27701}
27702
27703_ACEOF
27704if ac_fn_c_try_run "$LINENO"; then :
27705  gl_cv_cc_float_expbit0=`cat conftest.out`
27706else
27707  gl_cv_cc_float_expbit0="unknown"
27708fi
27709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27710  conftest.$ac_objext conftest.beam conftest.$ac_ext
27711fi
27712
27713      rm -f conftest.out
27714
27715fi
27716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
27717$as_echo "$gl_cv_cc_float_expbit0" >&6; }
27718  case "$gl_cv_cc_float_expbit0" in
27719    word*bit*)
27720      word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
27721      bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
27722
27723cat >>confdefs.h <<_ACEOF
27724#define FLT_EXPBIT0_WORD $word
27725_ACEOF
27726
27727
27728cat >>confdefs.h <<_ACEOF
27729#define FLT_EXPBIT0_BIT $bit
27730_ACEOF
27731
27732      ;;
27733  esac
27734
27735
27736  fi
27737
27738
27739
27740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
27741$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
27742if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
27743  $as_echo_n "(cached) " >&6
27744else
27745
27746      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27747/* end confdefs.h.  */
27748#include <math.h>
27749                   #if __GNUC__ >= 4
27750                   # undef isnanl
27751                   # define isnanl(x) __builtin_isnanl ((long double)(x))
27752                   #elif defined isnan
27753                   # undef isnanl
27754                   # define isnanl(x) isnan ((long double)(x))
27755                   #endif
27756                   long double x;
27757int
27758main ()
27759{
27760return isnanl (x);
27761  ;
27762  return 0;
27763}
27764_ACEOF
27765if ac_fn_c_try_link "$LINENO"; then :
27766  gl_cv_func_isnanl_no_libm=yes
27767else
27768  gl_cv_func_isnanl_no_libm=no
27769fi
27770rm -f core conftest.err conftest.$ac_objext \
27771    conftest$ac_exeext conftest.$ac_ext
27772
27773fi
27774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
27775$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
27776
27777  gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
27778  if test $gl_func_isnanl_no_libm = yes; then
27779
27780
27781
27782     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
27783$as_echo_n "checking whether isnanl works... " >&6; }
27784if test "${gl_cv_func_isnanl_works+set}" = set; then :
27785  $as_echo_n "(cached) " >&6
27786else
27787
27788      if test "$cross_compiling" = yes; then :
27789  case "$host_cpu" in
27790                               # Guess no on ia64, x86_64, i386.
27791         ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
27792         *)
27793           case "$host_os" in
27794             netbsd*) gl_cv_func_isnanl_works="guessing no";;
27795             *)       gl_cv_func_isnanl_works="guessing yes";;
27796           esac
27797           ;;
27798       esac
27799
27800else
27801  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27802/* end confdefs.h.  */
27803
27804#include <float.h>
27805#include <limits.h>
27806#include <math.h>
27807#if __GNUC__ >= 4
27808# undef isnanl
27809# define isnanl(x) __builtin_isnanl ((long double)(x))
27810#elif defined isnan
27811# undef isnanl
27812# define isnanl(x) isnan ((long double)(x))
27813#endif
27814#define NWORDS \
27815  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27816typedef union { unsigned int word[NWORDS]; long double value; }
27817        memory_long_double;
27818/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
27819   runtime type conversion.  */
27820#ifdef __sgi
27821static long double NaNl ()
27822{
27823  double zero = 0.0;
27824  return zero / zero;
27825}
27826#else
27827# define NaNl() (0.0L / 0.0L)
27828#endif
27829int main ()
27830{
27831  memory_long_double m;
27832  unsigned int i;
27833
27834  if (!isnanl (NaNl ()))
27835    return 1;
27836
27837  /* The isnanl function should be immune against changes in the sign bit and
27838     in the mantissa bits.  The xor operation twiddles a bit that can only be
27839     a sign bit or a mantissa bit (since the exponent never extends to
27840     bit 31).  */
27841  m.value = NaNl ();
27842  m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
27843  for (i = 0; i < NWORDS; i++)
27844    m.word[i] |= 1;
27845  if (!isnanl (m.value))
27846    return 1;
27847
27848#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
27849/* Representation of an 80-bit 'long double' as an initializer for a sequence
27850   of 'unsigned int' words.  */
27851# ifdef WORDS_BIGENDIAN
27852#  define LDBL80_WORDS(exponent,manthi,mantlo) \
27853     { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
27854       ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16),    \
27855       (unsigned int) (mantlo) << 16                                        \
27856     }
27857# else
27858#  define LDBL80_WORDS(exponent,manthi,mantlo) \
27859     { mantlo, manthi, exponent }
27860# endif
27861  { /* Quiet NaN.  */
27862    static memory_long_double x =
27863      { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
27864    if (!isnanl (x.value))
27865      return 1;
27866  }
27867  {
27868    /* Signalling NaN.  */
27869    static memory_long_double x =
27870      { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
27871    if (!isnanl (x.value))
27872      return 1;
27873  }
27874  /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
27875     Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
27876       Intel IA-64 Architecture Software Developer's Manual, Volume 1:
27877       Application Architecture.
27878       Table 5-2 "Floating-Point Register Encodings"
27879       Figure 5-6 "Memory to Floating-Point Register Data Translation"
27880   */
27881  { /* Pseudo-NaN.  */
27882    static memory_long_double x =
27883      { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
27884    if (!isnanl (x.value))
27885      return 1;
27886  }
27887  { /* Pseudo-Infinity.  */
27888    static memory_long_double x =
27889      { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
27890    if (!isnanl (x.value))
27891      return 1;
27892  }
27893  { /* Pseudo-Zero.  */
27894    static memory_long_double x =
27895      { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
27896    if (!isnanl (x.value))
27897      return 1;
27898  }
27899  { /* Unnormalized number.  */
27900    static memory_long_double x =
27901      { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
27902    if (!isnanl (x.value))
27903      return 1;
27904  }
27905  { /* Pseudo-Denormal.  */
27906    static memory_long_double x =
27907      { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
27908    if (!isnanl (x.value))
27909      return 1;
27910  }
27911#endif
27912
27913  return 0;
27914}
27915_ACEOF
27916if ac_fn_c_try_run "$LINENO"; then :
27917  gl_cv_func_isnanl_works=yes
27918else
27919  gl_cv_func_isnanl_works=no
27920fi
27921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27922  conftest.$ac_objext conftest.beam conftest.$ac_ext
27923fi
27924
27925
27926fi
27927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
27928$as_echo "$gl_cv_func_isnanl_works" >&6; }
27929
27930    case "$gl_cv_func_isnanl_works" in
27931      *yes) ;;
27932      *)    gl_func_isnanl_no_libm=no ;;
27933    esac
27934  fi
27935  if test $gl_func_isnanl_no_libm = yes; then
27936
27937$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
27938
27939  else
27940
27941
27942
27943
27944
27945
27946
27947
27948
27949  gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
27950
27951
27952
27953  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
27954$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
27955if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
27956  $as_echo_n "(cached) " >&6
27957else
27958
27959      if test "$cross_compiling" = yes; then :
27960
27961                              gl_cv_cc_long_double_expbit0="unknown"
27962
27963else
27964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27965/* end confdefs.h.  */
27966
27967#include <float.h>
27968#include <stddef.h>
27969#include <stdio.h>
27970#include <string.h>
27971#define NWORDS \
27972  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27973typedef union { long double value; unsigned int word[NWORDS]; }
27974        memory_long_double;
27975static unsigned int ored_words[NWORDS];
27976static unsigned int anded_words[NWORDS];
27977static void add_to_ored_words (long double x)
27978{
27979  memory_long_double m;
27980  size_t i;
27981  /* Clear it first, in case
27982     sizeof (long double) < sizeof (memory_long_double).  */
27983  memset (&m, 0, sizeof (memory_long_double));
27984  m.value = x;
27985  for (i = 0; i < NWORDS; i++)
27986    {
27987      ored_words[i] |= m.word[i];
27988      anded_words[i] &= m.word[i];
27989    }
27990}
27991int main ()
27992{
27993  size_t j;
27994  FILE *fp = fopen ("conftest.out", "w");
27995  if (fp == NULL)
27996    return 1;
27997  for (j = 0; j < NWORDS; j++)
27998    anded_words[j] = ~ (unsigned int) 0;
27999  add_to_ored_words (0.25L);
28000  add_to_ored_words (0.5L);
28001  add_to_ored_words (1.0L);
28002  add_to_ored_words (2.0L);
28003  add_to_ored_words (4.0L);
28004  /* Remove bits that are common (e.g. if representation of the first mantissa
28005     bit is explicit).  */
28006  for (j = 0; j < NWORDS; j++)
28007    ored_words[j] &= ~anded_words[j];
28008  /* Now find the nonzero word.  */
28009  for (j = 0; j < NWORDS; j++)
28010    if (ored_words[j] != 0)
28011      break;
28012  if (j < NWORDS)
28013    {
28014      size_t i;
28015      for (i = j + 1; i < NWORDS; i++)
28016        if (ored_words[i] != 0)
28017          {
28018            fprintf (fp, "unknown");
28019            return (fclose (fp) != 0);
28020          }
28021      for (i = 0; ; i++)
28022        if ((ored_words[j] >> i) & 1)
28023          {
28024            fprintf (fp, "word %d bit %d", (int) j, (int) i);
28025            return (fclose (fp) != 0);
28026          }
28027    }
28028  fprintf (fp, "unknown");
28029  return (fclose (fp) != 0);
28030}
28031
28032_ACEOF
28033if ac_fn_c_try_run "$LINENO"; then :
28034  gl_cv_cc_long_double_expbit0=`cat conftest.out`
28035else
28036  gl_cv_cc_long_double_expbit0="unknown"
28037fi
28038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28039  conftest.$ac_objext conftest.beam conftest.$ac_ext
28040fi
28041
28042      rm -f conftest.out
28043
28044fi
28045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
28046$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
28047  case "$gl_cv_cc_long_double_expbit0" in
28048    word*bit*)
28049      word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
28050      bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
28051
28052cat >>confdefs.h <<_ACEOF
28053#define LDBL_EXPBIT0_WORD $word
28054_ACEOF
28055
28056
28057cat >>confdefs.h <<_ACEOF
28058#define LDBL_EXPBIT0_BIT $bit
28059_ACEOF
28060
28061      ;;
28062  esac
28063
28064
28065  fi
28066
28067
28068
28069
28070
28071
28072
28073
28074
28075
28076
28077
28078     if test $gl_cv_have_include_next = yes; then
28079       gl_cv_next_langinfo_h='<'langinfo.h'>'
28080     else
28081       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
28082$as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
28083if test "${gl_cv_next_langinfo_h+set}" = set; then :
28084  $as_echo_n "(cached) " >&6
28085else
28086
28087          if test $ac_cv_header_langinfo_h = yes; then
28088            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28089/* end confdefs.h.  */
28090#include <langinfo.h>
28091
28092_ACEOF
28093                                                                                                case "$host_os" in
28094              aix*) gl_absname_cpp="$ac_cpp -C" ;;
28095              *)    gl_absname_cpp="$ac_cpp" ;;
28096            esac
28097                                                gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28098               sed -n '\#/langinfo.h#{
28099                 s#.*"\(.*/langinfo.h\)".*#\1#
28100                 s#^/[^/]#//&#
28101                 p
28102                 q
28103               }'`'"'
28104          else
28105            gl_cv_next_langinfo_h='<'langinfo.h'>'
28106          fi
28107
28108fi
28109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
28110$as_echo "$gl_cv_next_langinfo_h" >&6; }
28111     fi
28112     NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
28113
28114     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28115       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28116       gl_next_as_first_directive='<'langinfo.h'>'
28117     else
28118       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28119       gl_next_as_first_directive=$gl_cv_next_langinfo_h
28120     fi
28121     NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
28122
28123
28124
28125
28126    HAVE_LANGINFO_CODESET=0
28127  HAVE_LANGINFO_ERA=0
28128
28129  if test $ac_cv_header_langinfo_h = yes; then
28130    HAVE_LANGINFO_H=1
28131            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
28132$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
28133if test "${gl_cv_header_langinfo_codeset+set}" = set; then :
28134  $as_echo_n "(cached) " >&6
28135else
28136  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28137/* end confdefs.h.  */
28138#include <langinfo.h>
28139int a = CODESET;
28140
28141int
28142main ()
28143{
28144
28145  ;
28146  return 0;
28147}
28148_ACEOF
28149if ac_fn_c_try_compile "$LINENO"; then :
28150  gl_cv_header_langinfo_codeset=yes
28151else
28152  gl_cv_header_langinfo_codeset=no
28153fi
28154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28155
28156fi
28157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
28158$as_echo "$gl_cv_header_langinfo_codeset" >&6; }
28159    if test $gl_cv_header_langinfo_codeset = yes; then
28160      HAVE_LANGINFO_CODESET=1
28161    fi
28162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
28163$as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
28164if test "${gl_cv_header_langinfo_era+set}" = set; then :
28165  $as_echo_n "(cached) " >&6
28166else
28167  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28168/* end confdefs.h.  */
28169#include <langinfo.h>
28170int a = ERA;
28171
28172int
28173main ()
28174{
28175
28176  ;
28177  return 0;
28178}
28179_ACEOF
28180if ac_fn_c_try_compile "$LINENO"; then :
28181  gl_cv_header_langinfo_era=yes
28182else
28183  gl_cv_header_langinfo_era=no
28184fi
28185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28186
28187fi
28188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
28189$as_echo "$gl_cv_header_langinfo_era" >&6; }
28190    if test $gl_cv_header_langinfo_era = yes; then
28191      HAVE_LANGINFO_ERA=1
28192    fi
28193  else
28194    HAVE_LANGINFO_H=0
28195  fi
28196
28197
28198
28199
28200
28201
28202
28203
28204
28205
28206  if test $ac_cv_func_lchmod = no; then
28207    HAVE_LCHMOD=0
28208  fi
28209
28210
28211
28212  GNULIB_LCHMOD=1
28213
28214
28215
28216
28217
28218
28219
28220
28221
28222
28223
28224
28225
28226  for ac_func in lchown
28227do :
28228  ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
28229if test "x$ac_cv_func_lchown" = x""yes; then :
28230  cat >>confdefs.h <<_ACEOF
28231#define HAVE_LCHOWN 1
28232_ACEOF
28233
28234else
28235
28236    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
28237
28238fi
28239done
28240
28241
28242  if test $ac_cv_func_lchown = no; then
28243    HAVE_LCHOWN=0
28244  elif test "$gl_cv_func_chown_slash_works" != yes \
28245      || test "$gl_cv_func_chown_ctime_works" != yes; then
28246
28247
28248
28249
28250
28251
28252
28253
28254  gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext"
28255
28256    REPLACE_LCHOWN=1
28257  fi
28258
28259
28260
28261  GNULIB_LCHOWN=1
28262
28263
28264  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flag to ignore unused libraries" >&5
28265$as_echo_n "checking for flag to ignore unused libraries... " >&6; }
28266if test "${gl_cv_ignore_unused_libraries+set}" = set; then :
28267  $as_echo_n "(cached) " >&6
28268else
28269  gl_cv_ignore_unused_libraries=none
28270     gl_saved_ldflags=$LDFLAGS
28271     gl_saved_libs=$LIBS
28272     # Link with -lm to detect binutils 2.16 bug with --as-needed; see
28273     # <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00131.html>.
28274     LIBS="$LIBS -lm"
28275     # Use long option sequences like '-z ignore' to test for the feature,
28276     # to forestall problems with linkers that have -z, -i, -g, -n, etc. flags.
28277     # GCC + binutils likes '-Wl,--as-needed'.
28278     # GCC + Solaris ld likes '-Wl,-z,ignore'.
28279     # Sun C likes '-z ignore'.
28280     # Don't try bare '--as-needed'; nothing likes it and the HP-UX 11.11
28281     # native cc issues annoying warnings and then ignores it,
28282     # which would cause us to incorrectly conclude that it worked.
28283     for gl_flags in \
28284        '-Wl,--as-needed' \
28285        '-Wl,-z,ignore' \
28286        '-z ignore'
28287     do
28288       LDFLAGS="$gl_flags $LDFLAGS"
28289       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28290/* end confdefs.h.  */
28291
28292int
28293main ()
28294{
28295
28296  ;
28297  return 0;
28298}
28299_ACEOF
28300if ac_fn_c_try_link "$LINENO"; then :
28301  gl_cv_ignore_unused_libraries=$gl_flags
28302fi
28303rm -f core conftest.err conftest.$ac_objext \
28304    conftest$ac_exeext conftest.$ac_ext
28305       LDFLAGS=$gl_saved_ldflags
28306       test "$gl_cv_ignore_unused_libraries" != none && break
28307     done
28308     LIBS=$gl_saved_libs
28309fi
28310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_ignore_unused_libraries" >&5
28311$as_echo "$gl_cv_ignore_unused_libraries" >&6; }
28312
28313  test "$gl_cv_ignore_unused_libraries" != none &&
28314    LDFLAGS="$LDFLAGS $gl_cv_ignore_unused_libraries"
28315
28316
28317
28318
28319  if test $ac_cv_func_link = no; then
28320    HAVE_LINK=0
28321
28322
28323
28324
28325
28326
28327
28328
28329  gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext"
28330
28331  else
28332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link handles trailing slash correctly" >&5
28333$as_echo_n "checking whether link handles trailing slash correctly... " >&6; }
28334if test "${gl_cv_func_link_works+set}" = set; then :
28335  $as_echo_n "(cached) " >&6
28336else
28337  touch conftest.a
28338       # Assume that if we have lstat, we can also check symlinks.
28339       if test $ac_cv_func_lstat = yes; then
28340         ln -s conftest.a conftest.lnk
28341       fi
28342       if test "$cross_compiling" = yes; then :
28343  gl_cv_func_link_works="guessing no"
28344else
28345  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28346/* end confdefs.h.  */
28347#include <unistd.h>
28348
28349int
28350main ()
28351{
28352if (!link ("conftest.a", "conftest.b/")) return 1;
28353#if HAVE_LSTAT
28354      if (!link ("conftest.lnk/", "conftest.b")) return 2;
28355#endif
28356
28357  ;
28358  return 0;
28359}
28360_ACEOF
28361if ac_fn_c_try_run "$LINENO"; then :
28362  gl_cv_func_link_works=yes
28363else
28364  gl_cv_func_link_works=no
28365fi
28366rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28367  conftest.$ac_objext conftest.beam conftest.$ac_ext
28368fi
28369
28370       rm -f conftest.a conftest.b conftest.lnk
28371fi
28372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
28373$as_echo "$gl_cv_func_link_works" >&6; }
28374    if test "$gl_cv_func_link_works" != yes; then
28375      REPLACE_LINK=1
28376
28377
28378
28379
28380
28381
28382
28383
28384  gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext"
28385
28386    fi
28387  fi
28388
28389
28390
28391  GNULIB_LINK=1
28392
28393
28394          gl_link_follows_symlinks=0 # assume GNU behavior
28395  if test $ac_cv_func_readlink = yes; then
28396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link(2) dereferences a symlink" >&5
28397$as_echo_n "checking whether link(2) dereferences a symlink... " >&6; }
28398if test "${gl_cv_func_link_follows_symlink+set}" = set; then :
28399  $as_echo_n "(cached) " >&6
28400else
28401
28402      # Create a regular file.
28403      echo > conftest.file
28404      if test "$cross_compiling" = yes; then :
28405          gl_cv_func_link_follows_symlink=unknown
28406else
28407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28408/* end confdefs.h.  */
28409
28410#       include <sys/types.h>
28411#       include <sys/stat.h>
28412#       include <unistd.h>
28413#       include <stdlib.h>
28414
28415#       define SAME_INODE(Stat_buf_1, Stat_buf_2) \
28416          ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
28417           && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
28418
28419        int
28420        main ()
28421        {
28422          const char *file = "conftest.file";
28423          const char *sym = "conftest.sym";
28424          const char *hard = "conftest.hard";
28425          struct stat sb_file, sb_hard;
28426
28427          /* Create a symlink to the regular file. */
28428          if (symlink (file, sym))
28429            return 2;
28430
28431          /* Create a hard link to that symlink.  */
28432          if (link (sym, hard))
28433            return 3;
28434
28435          if (lstat (hard, &sb_hard))
28436            return 4;
28437          if (lstat (file, &sb_file))
28438            return 5;
28439
28440          /* If the dev/inode of hard and file are the same, then
28441             the link call followed the symlink.  */
28442          return SAME_INODE (sb_hard, sb_file) ? 1 : 0;
28443        }
28444
28445_ACEOF
28446if ac_fn_c_try_run "$LINENO"; then :
28447  gl_cv_func_link_follows_symlink=no
28448else
28449          gl_cv_func_link_follows_symlink=yes
28450fi
28451rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28452  conftest.$ac_objext conftest.beam conftest.$ac_ext
28453fi
28454
28455      rm -f conftest.file conftest.sym conftest.hard
28456
28457fi
28458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_follows_symlink" >&5
28459$as_echo "$gl_cv_func_link_follows_symlink" >&6; }
28460    case $gl_cv_func_link_follows_symlink in
28461      yes) gl_link_follows_symlinks=1 ;;
28462      no) ;; # already defaulted to 0
28463      *) gl_link_follows_symlinks=-1 ;;
28464    esac
28465  fi
28466
28467cat >>confdefs.h <<_ACEOF
28468#define LINK_FOLLOWS_SYMLINKS $gl_link_follows_symlinks
28469_ACEOF
28470
28471
28472
28473
28474
28475
28476
28477
28478
28479
28480  if test $ac_cv_func_linkat = no; then
28481    HAVE_LINKAT=0
28482
28483
28484
28485
28486
28487
28488
28489
28490  gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext"
28491
28492
28493
28494
28495
28496
28497
28498
28499
28500  gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
28501
28502  else
28503    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat(,AT_SYMLINK_FOLLOW) works" >&5
28504$as_echo_n "checking whether linkat(,AT_SYMLINK_FOLLOW) works... " >&6; }
28505if test "${gl_cv_func_linkat_follow+set}" = set; then :
28506  $as_echo_n "(cached) " >&6
28507else
28508  rm -rf conftest.f1 conftest.f2
28509       touch conftest.f1
28510       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28511/* end confdefs.h.  */
28512
28513#include <fcntl.h>
28514#include <unistd.h>
28515#ifdef __linux__
28516/* Linux added linkat in 2.6.16, but did not add AT_SYMLINK_FOLLOW
28517   until 2.6.18.  Always replace linkat to support older kernels.  */
28518choke me
28519#endif
28520
28521int
28522main ()
28523{
28524return linkat (AT_FDCWD, "conftest.f1", AT_FDCWD, "conftest.f2",
28525                    AT_SYMLINK_FOLLOW);
28526  ;
28527  return 0;
28528}
28529_ACEOF
28530if ac_fn_c_try_compile "$LINENO"; then :
28531  gl_cv_func_linkat_follow=yes
28532else
28533  gl_cv_func_linkat_follow="need runtime check"
28534fi
28535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28536       rm -rf conftest.f1 conftest.f2
28537fi
28538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_follow" >&5
28539$as_echo "$gl_cv_func_linkat_follow" >&6; }
28540    if test "$gl_cv_func_linkat_follow" != yes; then
28541      REPLACE_LINKAT=1
28542
28543
28544
28545
28546
28547
28548
28549
28550  gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext"
28551
28552    fi
28553  fi
28554
28555
28556
28557  GNULIB_LINKAT=1
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567  LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
28568
28569
28570
28571
28572
28573
28574
28575
28576  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
28577$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
28578if test "${gl_cv_header_locale_h_posix2001+set}" = set; then :
28579  $as_echo_n "(cached) " >&6
28580else
28581  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28582/* end confdefs.h.  */
28583#include <locale.h>
28584int x = LC_MESSAGES;
28585int
28586main ()
28587{
28588
28589  ;
28590  return 0;
28591}
28592_ACEOF
28593if ac_fn_c_try_compile "$LINENO"; then :
28594  gl_cv_header_locale_h_posix2001=yes
28595else
28596  gl_cv_header_locale_h_posix2001=no
28597fi
28598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28599fi
28600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
28601$as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
28602
28603
28604  if test $ac_cv_header_xlocale_h = yes; then
28605    HAVE_XLOCALE_H=1
28606                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
28607$as_echo_n "checking whether locale.h defines locale_t... " >&6; }
28608if test "${gl_cv_header_locale_has_locale_t+set}" = set; then :
28609  $as_echo_n "(cached) " >&6
28610else
28611  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28612/* end confdefs.h.  */
28613#include <locale.h>
28614locale_t x;
28615int
28616main ()
28617{
28618
28619  ;
28620  return 0;
28621}
28622_ACEOF
28623if ac_fn_c_try_compile "$LINENO"; then :
28624  gl_cv_header_locale_has_locale_t=yes
28625else
28626  gl_cv_header_locale_has_locale_t=no
28627fi
28628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28629
28630fi
28631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
28632$as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
28633    if test $gl_cv_header_locale_has_locale_t = yes; then
28634      gl_cv_header_locale_h_needs_xlocale_h=no
28635    else
28636      gl_cv_header_locale_h_needs_xlocale_h=yes
28637    fi
28638  else
28639    HAVE_XLOCALE_H=0
28640    gl_cv_header_locale_h_needs_xlocale_h=no
28641  fi
28642
28643
28644
28645
28646
28647
28648
28649
28650     if test $gl_cv_have_include_next = yes; then
28651       gl_cv_next_locale_h='<'locale.h'>'
28652     else
28653       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
28654$as_echo_n "checking absolute name of <locale.h>... " >&6; }
28655if test "${gl_cv_next_locale_h+set}" = set; then :
28656  $as_echo_n "(cached) " >&6
28657else
28658
28659          if test $ac_cv_header_locale_h = yes; then
28660            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28661/* end confdefs.h.  */
28662#include <locale.h>
28663
28664_ACEOF
28665                                                                                                case "$host_os" in
28666              aix*) gl_absname_cpp="$ac_cpp -C" ;;
28667              *)    gl_absname_cpp="$ac_cpp" ;;
28668            esac
28669                                                gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28670               sed -n '\#/locale.h#{
28671                 s#.*"\(.*/locale.h\)".*#\1#
28672                 s#^/[^/]#//&#
28673                 p
28674                 q
28675               }'`'"'
28676          else
28677            gl_cv_next_locale_h='<'locale.h'>'
28678          fi
28679
28680fi
28681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
28682$as_echo "$gl_cv_next_locale_h" >&6; }
28683     fi
28684     NEXT_LOCALE_H=$gl_cv_next_locale_h
28685
28686     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28687       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28688       gl_next_as_first_directive='<'locale.h'>'
28689     else
28690       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28691       gl_next_as_first_directive=$gl_cv_next_locale_h
28692     fi
28693     NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
28694
28695
28696
28697
28698  if test -n "$STDDEF_H" \
28699     || test $gl_cv_header_locale_h_posix2001 = no \
28700     || test $gl_cv_header_locale_h_needs_xlocale_h = yes; then
28701
28702    :
28703
28704  fi
28705
28706
28707
28708  if test "$gl_threads_api" = posix; then
28709    # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
28710    # pthread_rwlock_* functions.
28711    ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
28712"
28713if test "x$ac_cv_type_pthread_rwlock_t" = x""yes; then :
28714
28715$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
28716
28717fi
28718
28719    # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
28720    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28721/* end confdefs.h.  */
28722#include <pthread.h>
28723int
28724main ()
28725{
28726#if __FreeBSD__ == 4
28727error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
28728#else
28729int x = (int)PTHREAD_MUTEX_RECURSIVE;
28730return !x;
28731#endif
28732  ;
28733  return 0;
28734}
28735_ACEOF
28736if ac_fn_c_try_compile "$LINENO"; then :
28737
28738$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
28739
28740fi
28741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28742  fi
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756  gl_LIBOBJS="$gl_LIBOBJS long-options.$ac_objext"
28757
28758
28759
28760
28761
28762
28763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
28764$as_echo_n "checking whether lseek detects pipes... " >&6; }
28765if test "${gl_cv_func_lseek_pipe+set}" = set; then :
28766  $as_echo_n "(cached) " >&6
28767else
28768  if test $cross_compiling = no; then
28769       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28770/* end confdefs.h.  */
28771
28772#include <sys/types.h> /* for off_t */
28773#include <stdio.h> /* for SEEK_CUR */
28774#include <unistd.h>
28775int main ()
28776{
28777  /* Exit with success only if stdin is seekable.  */
28778  return lseek (0, (off_t)0, SEEK_CUR) < 0;
28779}
28780_ACEOF
28781if ac_fn_c_try_link "$LINENO"; then :
28782  if test -s conftest$ac_exeext \
28783             && ./conftest$ac_exeext < conftest.$ac_ext \
28784             && { echo hi | ./conftest$ac_exeext; test $? = 1; }; then
28785            gl_cv_func_lseek_pipe=yes
28786          else
28787            gl_cv_func_lseek_pipe=no
28788          fi
28789else
28790  gl_cv_func_lseek_pipe=no
28791fi
28792rm -f core conftest.err conftest.$ac_objext \
28793    conftest$ac_exeext conftest.$ac_ext
28794     else
28795       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28796/* end confdefs.h.  */
28797
28798#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
28799/* mingw and BeOS mistakenly return 0 when trying to seek on pipes.  */
28800  Choke me.
28801#endif
28802_ACEOF
28803if ac_fn_c_try_compile "$LINENO"; then :
28804  gl_cv_func_lseek_pipe=yes
28805else
28806  gl_cv_func_lseek_pipe=no
28807fi
28808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28809     fi
28810fi
28811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
28812$as_echo "$gl_cv_func_lseek_pipe" >&6; }
28813  if test $gl_cv_func_lseek_pipe = no; then
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823  gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
28824
28825
28826  REPLACE_LSEEK=1
28827
28828$as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
28829
28830
28831  fi
28832
28833
28834
28835  GNULIB_LSEEK=1
28836
28837
28838
28839
28840  if test $ac_cv_func_lstat = yes; then
28841
28842    if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
28843            REPLACE_LSTAT=1
28844    fi
28845    # Prerequisites of lib/lstat.c.
28846
28847  else
28848    HAVE_LSTAT=0
28849  fi
28850
28851
28852
28853  GNULIB_LSTAT=1
28854
28855  for ac_header in stdlib.h
28856do :
28857  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
28858if test "x$ac_cv_header_stdlib_h" = x""yes; then :
28859  cat >>confdefs.h <<_ACEOF
28860#define HAVE_STDLIB_H 1
28861_ACEOF
28862
28863fi
28864
28865done
28866
28867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
28868$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
28869if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
28870  $as_echo_n "(cached) " >&6
28871else
28872  if test "$cross_compiling" = yes; then :
28873  ac_cv_func_malloc_0_nonnull=no
28874else
28875  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28876/* end confdefs.h.  */
28877#if defined STDC_HEADERS || defined HAVE_STDLIB_H
28878# include <stdlib.h>
28879#else
28880char *malloc ();
28881#endif
28882
28883int
28884main ()
28885{
28886return ! malloc (0);
28887  ;
28888  return 0;
28889}
28890_ACEOF
28891if ac_fn_c_try_run "$LINENO"; then :
28892  ac_cv_func_malloc_0_nonnull=yes
28893else
28894  ac_cv_func_malloc_0_nonnull=no
28895fi
28896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28897  conftest.$ac_objext conftest.beam conftest.$ac_ext
28898fi
28899
28900fi
28901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
28902$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
28903if test $ac_cv_func_malloc_0_nonnull = yes; then :
28904
28905$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
28906
28907else
28908  $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
28919
28920
28921$as_echo "#define malloc rpl_malloc" >>confdefs.h
28922
28923fi
28924
28925
28926
28927$as_echo "#define GNULIB_MALLOC_GNU 1" >>confdefs.h
28928
28929
28930
28931  if test $gl_cv_func_malloc_posix = yes; then
28932    HAVE_MALLOC_POSIX=1
28933
28934$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
28935
28936  else
28937
28938
28939
28940
28941
28942
28943
28944
28945  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
28946
28947    HAVE_MALLOC_POSIX=0
28948  fi
28949
28950
28951
28952
28953  GNULIB_MALLOC_POSIX=1
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967     if test $gl_cv_have_include_next = yes; then
28968       gl_cv_next_math_h='<'math.h'>'
28969     else
28970       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
28971$as_echo_n "checking absolute name of <math.h>... " >&6; }
28972if test "${gl_cv_next_math_h+set}" = set; then :
28973  $as_echo_n "(cached) " >&6
28974else
28975
28976          if test $ac_cv_header_math_h = yes; then
28977            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28978/* end confdefs.h.  */
28979#include <math.h>
28980
28981_ACEOF
28982                                                                                                case "$host_os" in
28983              aix*) gl_absname_cpp="$ac_cpp -C" ;;
28984              *)    gl_absname_cpp="$ac_cpp" ;;
28985            esac
28986                                                gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28987               sed -n '\#/math.h#{
28988                 s#.*"\(.*/math.h\)".*#\1#
28989                 s#^/[^/]#//&#
28990                 p
28991                 q
28992               }'`'"'
28993          else
28994            gl_cv_next_math_h='<'math.h'>'
28995          fi
28996
28997fi
28998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
28999$as_echo "$gl_cv_next_math_h" >&6; }
29000     fi
29001     NEXT_MATH_H=$gl_cv_next_math_h
29002
29003     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29004       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29005       gl_next_as_first_directive='<'math.h'>'
29006     else
29007       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29008       gl_next_as_first_directive=$gl_cv_next_math_h
29009     fi
29010     NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
29011
29012
29013
29014
29015
29016  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
29017$as_echo_n "checking whether NAN macro works... " >&6; }
29018if test "${gl_cv_header_math_nan_works+set}" = set; then :
29019  $as_echo_n "(cached) " >&6
29020else
29021  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29022/* end confdefs.h.  */
29023#include <math.h>
29024int
29025main ()
29026{
29027/* Solaris 10 has a broken definition of NAN.  Other platforms
29028        fail to provide NAN, or provide it only in C99 mode; this
29029        test only needs to fail when NAN is provided but wrong.  */
29030         float f = 1.0f;
29031#ifdef NAN
29032         f = NAN;
29033#endif
29034         return f == 0;
29035  ;
29036  return 0;
29037}
29038_ACEOF
29039if ac_fn_c_try_compile "$LINENO"; then :
29040  gl_cv_header_math_nan_works=yes
29041else
29042  gl_cv_header_math_nan_works=no
29043fi
29044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29045fi
29046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
29047$as_echo "$gl_cv_header_math_nan_works" >&6; }
29048  if test $gl_cv_header_math_nan_works = no; then
29049    REPLACE_NAN=1
29050  fi
29051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
29052$as_echo_n "checking whether HUGE_VAL works... " >&6; }
29053if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
29054  $as_echo_n "(cached) " >&6
29055else
29056  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29057/* end confdefs.h.  */
29058#include <math.h>
29059int
29060main ()
29061{
29062/* Solaris 10 has a broken definition of HUGE_VAL.  */
29063         double d = HUGE_VAL;
29064         return d == 0;
29065  ;
29066  return 0;
29067}
29068_ACEOF
29069if ac_fn_c_try_compile "$LINENO"; then :
29070  gl_cv_header_math_huge_val_works=yes
29071else
29072  gl_cv_header_math_huge_val_works=no
29073fi
29074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29075fi
29076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
29077$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
29078  if test $gl_cv_header_math_huge_val_works = no; then
29079    REPLACE_HUGE_VAL=1
29080  fi
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090  :
29091
29092
29093
29094
29095
29096
29097
29098  if test $ac_cv_func_mbrlen = no; then
29099    HAVE_MBRLEN=0
29100  else
29101                    if test $REPLACE_MBRTOWC = 1; then
29102      REPLACE_MBRLEN=1
29103    fi
29104  fi
29105  if test $HAVE_MBRLEN = 0 || test $REPLACE_MBRLEN = 1; then
29106
29107    :
29108
29109
29110
29111
29112
29113
29114
29115
29116
29117  gl_LIBOBJS="$gl_LIBOBJS mbrlen.$ac_objext"
29118
29119
29120  :
29121
29122  fi
29123
29124
29125
29126  GNULIB_MBRLEN=1
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
29139
29140
29141
29142     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
29143$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
29144if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
29145  $as_echo_n "(cached) " >&6
29146else
29147
29148                  case "$host_os" in
29149              # Guess no on AIX and OSF/1.
29150        osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
29151              # Guess yes otherwise.
29152        *)    gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
29153      esac
29154      if test $LOCALE_JA != none; then
29155        if test "$cross_compiling" = yes; then :
29156  :
29157else
29158  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29159/* end confdefs.h.  */
29160
29161#include <locale.h>
29162#include <string.h>
29163#include <wchar.h>
29164int main ()
29165{
29166  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29167    {
29168      const char input[] = "B\217\253\344\217\251\316er"; /* "B����er" */
29169      mbstate_t state;
29170      wchar_t wc;
29171
29172      memset (&state, '\0', sizeof (mbstate_t));
29173      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29174        if (mbsinit (&state))
29175          return 1;
29176    }
29177  return 0;
29178}
29179_ACEOF
29180if ac_fn_c_try_run "$LINENO"; then :
29181  gl_cv_func_mbrtowc_incomplete_state=yes
29182else
29183  gl_cv_func_mbrtowc_incomplete_state=no
29184fi
29185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29186  conftest.$ac_objext conftest.beam conftest.$ac_ext
29187fi
29188
29189      fi
29190
29191fi
29192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
29193$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
29194
29195
29196
29197
29198     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
29199$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
29200if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
29201  $as_echo_n "(cached) " >&6
29202else
29203
29204                  case "$host_os" in
29205                    # Guess no on Solaris 8.
29206        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
29207                    # Guess yes otherwise.
29208        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
29209      esac
29210      if test $LOCALE_ZH_CN != none; then
29211        if test "$cross_compiling" = yes; then :
29212  :
29213else
29214  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29215/* end confdefs.h.  */
29216
29217#include <locale.h>
29218#include <stdlib.h>
29219#include <string.h>
29220#include <wchar.h>
29221int main ()
29222{
29223  /* This fails on Solaris 8:
29224     mbrtowc returns 2, and sets wc to 0x00F0.
29225     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
29226  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29227    {
29228      char input[] = "B\250\271\201\060\211\070er"; /* "B����er" */
29229      mbstate_t state;
29230      wchar_t wc;
29231
29232      memset (&state, '\0', sizeof (mbstate_t));
29233      if (mbrtowc (&wc, input + 3, 6, &state) != 4
29234          && mbtowc (&wc, input + 3, 6) == 4)
29235        return 1;
29236    }
29237  return 0;
29238}
29239_ACEOF
29240if ac_fn_c_try_run "$LINENO"; then :
29241  gl_cv_func_mbrtowc_sanitycheck=yes
29242else
29243  gl_cv_func_mbrtowc_sanitycheck=no
29244fi
29245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29246  conftest.$ac_objext conftest.beam conftest.$ac_ext
29247fi
29248
29249      fi
29250
29251fi
29252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29253$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
29254
29255    REPLACE_MBSTATE_T=0
29256    case "$gl_cv_func_mbrtowc_incomplete_state" in
29257      *yes) ;;
29258      *) REPLACE_MBSTATE_T=1 ;;
29259    esac
29260    case "$gl_cv_func_mbrtowc_sanitycheck" in
29261      *yes) ;;
29262      *) REPLACE_MBSTATE_T=1 ;;
29263    esac
29264  else
29265    REPLACE_MBSTATE_T=1
29266  fi
29267  if test $REPLACE_MBSTATE_T = 1; then
29268
29269    :
29270
29271  fi
29272
29273  if test $REPLACE_MBSTATE_T = 1; then
29274    REPLACE_MBRTOWC=1
29275  fi
29276
29277  if test $ac_cv_func_mbrtowc = no; then
29278    HAVE_MBRTOWC=0
29279  fi
29280  if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then
29281
29282
29283
29284     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
29285$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
29286if test "${gl_cv_func_mbrtowc_null_arg+set}" = set; then :
29287  $as_echo_n "(cached) " >&6
29288else
29289
29290                  case "$host_os" in
29291              # Guess no on OSF/1.
29292        osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;;
29293              # Guess yes otherwise.
29294        *)    gl_cv_func_mbrtowc_null_arg="guessing yes" ;;
29295      esac
29296      if test $LOCALE_FR_UTF8 != none; then
29297        if test "$cross_compiling" = yes; then :
29298  :
29299else
29300  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29301/* end confdefs.h.  */
29302
29303#include <locale.h>
29304#include <string.h>
29305#include <wchar.h>
29306int main ()
29307{
29308  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29309    {
29310      mbstate_t state;
29311      wchar_t wc;
29312      int ret;
29313
29314      memset (&state, '\0', sizeof (mbstate_t));
29315      wc = (wchar_t) 0xBADFACE;
29316      mbrtowc (&wc, NULL, 5, &state);
29317      /* Check that wc was not modified.  */
29318      if (wc != (wchar_t) 0xBADFACE)
29319        return 1;
29320    }
29321  return 0;
29322}
29323_ACEOF
29324if ac_fn_c_try_run "$LINENO"; then :
29325  gl_cv_func_mbrtowc_null_arg=yes
29326else
29327  gl_cv_func_mbrtowc_null_arg=no
29328fi
29329rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29330  conftest.$ac_objext conftest.beam conftest.$ac_ext
29331fi
29332
29333      fi
29334
29335fi
29336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg" >&5
29337$as_echo "$gl_cv_func_mbrtowc_null_arg" >&6; }
29338
29339
29340
29341
29342
29343     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
29344$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
29345if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
29346  $as_echo_n "(cached) " >&6
29347else
29348
29349                  case "$host_os" in
29350                          # Guess no on HP-UX and Solaris.
29351        hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;;
29352                          # Guess yes otherwise.
29353        *)                gl_cv_func_mbrtowc_retval="guessing yes" ;;
29354      esac
29355      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
29356        if test "$cross_compiling" = yes; then :
29357  :
29358else
29359  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29360/* end confdefs.h.  */
29361
29362#include <locale.h>
29363#include <string.h>
29364#include <wchar.h>
29365int main ()
29366{
29367  /* This fails on Solaris.  */
29368  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29369    {
29370      char input[] = "B\303\274\303\237er"; /* "B����er" */
29371      mbstate_t state;
29372      wchar_t wc;
29373
29374      memset (&state, '\0', sizeof (mbstate_t));
29375      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29376        {
29377          input[1] = '\0';
29378          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
29379            return 1;
29380        }
29381    }
29382  /* This fails on HP-UX 11.11.  */
29383  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29384    {
29385      char input[] = "B\217\253\344\217\251\316er"; /* "B����er" */
29386      mbstate_t state;
29387      wchar_t wc;
29388
29389      memset (&state, '\0', sizeof (mbstate_t));
29390      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29391        {
29392          input[1] = '\0';
29393          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
29394            return 1;
29395        }
29396    }
29397  return 0;
29398}
29399_ACEOF
29400if ac_fn_c_try_run "$LINENO"; then :
29401  gl_cv_func_mbrtowc_retval=yes
29402else
29403  gl_cv_func_mbrtowc_retval=no
29404fi
29405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29406  conftest.$ac_objext conftest.beam conftest.$ac_ext
29407fi
29408
29409      fi
29410
29411fi
29412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
29413$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
29414
29415
29416
29417
29418     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
29419$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
29420if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
29421  $as_echo_n "(cached) " >&6
29422else
29423
29424                  case "$host_os" in
29425                       # Guess no on Solaris 8 and 9.
29426        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
29427                       # Guess yes otherwise.
29428        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
29429      esac
29430      if test $LOCALE_ZH_CN != none; then
29431        if test "$cross_compiling" = yes; then :
29432  :
29433else
29434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29435/* end confdefs.h.  */
29436
29437#include <locale.h>
29438#include <string.h>
29439#include <wchar.h>
29440int main ()
29441{
29442  /* This fails on Solaris 8 and 9.  */
29443  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29444    {
29445      mbstate_t state;
29446      wchar_t wc;
29447
29448      memset (&state, '\0', sizeof (mbstate_t));
29449      if (mbrtowc (&wc, "", 1, &state) != 0)
29450        return 1;
29451    }
29452  return 0;
29453}
29454_ACEOF
29455if ac_fn_c_try_run "$LINENO"; then :
29456  gl_cv_func_mbrtowc_nul_retval=yes
29457else
29458  gl_cv_func_mbrtowc_nul_retval=no
29459fi
29460rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29461  conftest.$ac_objext conftest.beam conftest.$ac_ext
29462fi
29463
29464      fi
29465
29466fi
29467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
29468$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
29469
29470    case "$gl_cv_func_mbrtowc_null_arg" in
29471      *yes) ;;
29472      *)
29473$as_echo "#define MBRTOWC_NULL_ARG_BUG 1" >>confdefs.h
29474
29475         REPLACE_MBRTOWC=1
29476         ;;
29477    esac
29478    case "$gl_cv_func_mbrtowc_retval" in
29479      *yes) ;;
29480      *)
29481$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
29482
29483         REPLACE_MBRTOWC=1
29484         ;;
29485    esac
29486    case "$gl_cv_func_mbrtowc_nul_retval" in
29487      *yes) ;;
29488      *)
29489$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
29490
29491         REPLACE_MBRTOWC=1
29492         ;;
29493    esac
29494  fi
29495  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
29496
29497    :
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507  gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
29508
29509
29510  :
29511
29512  fi
29513
29514
29515
29516  GNULIB_MBRTOWC=1
29517
29518
29519
29520  GNULIB_MBSCASECMP=1
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
29533
29534
29535
29536     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
29537$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
29538if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
29539  $as_echo_n "(cached) " >&6
29540else
29541
29542                  case "$host_os" in
29543              # Guess no on AIX and OSF/1.
29544        osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
29545              # Guess yes otherwise.
29546        *)    gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
29547      esac
29548      if test $LOCALE_JA != none; then
29549        if test "$cross_compiling" = yes; then :
29550  :
29551else
29552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29553/* end confdefs.h.  */
29554
29555#include <locale.h>
29556#include <string.h>
29557#include <wchar.h>
29558int main ()
29559{
29560  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29561    {
29562      const char input[] = "B\217\253\344\217\251\316er"; /* "B����er" */
29563      mbstate_t state;
29564      wchar_t wc;
29565
29566      memset (&state, '\0', sizeof (mbstate_t));
29567      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29568        if (mbsinit (&state))
29569          return 1;
29570    }
29571  return 0;
29572}
29573_ACEOF
29574if ac_fn_c_try_run "$LINENO"; then :
29575  gl_cv_func_mbrtowc_incomplete_state=yes
29576else
29577  gl_cv_func_mbrtowc_incomplete_state=no
29578fi
29579rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29580  conftest.$ac_objext conftest.beam conftest.$ac_ext
29581fi
29582
29583      fi
29584
29585fi
29586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
29587$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
29588
29589
29590
29591
29592     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
29593$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
29594if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
29595  $as_echo_n "(cached) " >&6
29596else
29597
29598                  case "$host_os" in
29599                    # Guess no on Solaris 8.
29600        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
29601                    # Guess yes otherwise.
29602        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
29603      esac
29604      if test $LOCALE_ZH_CN != none; then
29605        if test "$cross_compiling" = yes; then :
29606  :
29607else
29608  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29609/* end confdefs.h.  */
29610
29611#include <locale.h>
29612#include <stdlib.h>
29613#include <string.h>
29614#include <wchar.h>
29615int main ()
29616{
29617  /* This fails on Solaris 8:
29618     mbrtowc returns 2, and sets wc to 0x00F0.
29619     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
29620  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29621    {
29622      char input[] = "B\250\271\201\060\211\070er"; /* "B����er" */
29623      mbstate_t state;
29624      wchar_t wc;
29625
29626      memset (&state, '\0', sizeof (mbstate_t));
29627      if (mbrtowc (&wc, input + 3, 6, &state) != 4
29628          && mbtowc (&wc, input + 3, 6) == 4)
29629        return 1;
29630    }
29631  return 0;
29632}
29633_ACEOF
29634if ac_fn_c_try_run "$LINENO"; then :
29635  gl_cv_func_mbrtowc_sanitycheck=yes
29636else
29637  gl_cv_func_mbrtowc_sanitycheck=no
29638fi
29639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29640  conftest.$ac_objext conftest.beam conftest.$ac_ext
29641fi
29642
29643      fi
29644
29645fi
29646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29647$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
29648
29649    REPLACE_MBSTATE_T=0
29650    case "$gl_cv_func_mbrtowc_incomplete_state" in
29651      *yes) ;;
29652      *) REPLACE_MBSTATE_T=1 ;;
29653    esac
29654    case "$gl_cv_func_mbrtowc_sanitycheck" in
29655      *yes) ;;
29656      *) REPLACE_MBSTATE_T=1 ;;
29657    esac
29658  else
29659    REPLACE_MBSTATE_T=1
29660  fi
29661  if test $REPLACE_MBSTATE_T = 1; then
29662
29663    :
29664
29665  fi
29666
29667  if test $REPLACE_MBSTATE_T = 1; then
29668    REPLACE_MBSINIT=1
29669  fi
29670
29671  if test $ac_cv_func_mbsinit = no; then
29672    HAVE_MBSINIT=0
29673  fi
29674  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
29675
29676    :
29677
29678
29679
29680
29681
29682
29683
29684
29685
29686  gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
29687
29688
29689  :
29690
29691  fi
29692
29693
29694
29695  GNULIB_MBSINIT=1
29696
29697
29698
29699
29700  if test $ac_cv_func_mbslen = yes; then
29701    HAVE_MBSLEN=1
29702  else
29703    HAVE_MBSLEN=0
29704  fi
29705
29706
29707
29708  GNULIB_MBSLEN=1
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
29721
29722
29723
29724     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
29725$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
29726if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
29727  $as_echo_n "(cached) " >&6
29728else
29729
29730                  case "$host_os" in
29731              # Guess no on AIX and OSF/1.
29732        osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
29733              # Guess yes otherwise.
29734        *)    gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
29735      esac
29736      if test $LOCALE_JA != none; then
29737        if test "$cross_compiling" = yes; then :
29738  :
29739else
29740  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29741/* end confdefs.h.  */
29742
29743#include <locale.h>
29744#include <string.h>
29745#include <wchar.h>
29746int main ()
29747{
29748  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29749    {
29750      const char input[] = "B\217\253\344\217\251\316er"; /* "B����er" */
29751      mbstate_t state;
29752      wchar_t wc;
29753
29754      memset (&state, '\0', sizeof (mbstate_t));
29755      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29756        if (mbsinit (&state))
29757          return 1;
29758    }
29759  return 0;
29760}
29761_ACEOF
29762if ac_fn_c_try_run "$LINENO"; then :
29763  gl_cv_func_mbrtowc_incomplete_state=yes
29764else
29765  gl_cv_func_mbrtowc_incomplete_state=no
29766fi
29767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29768  conftest.$ac_objext conftest.beam conftest.$ac_ext
29769fi
29770
29771      fi
29772
29773fi
29774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
29775$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
29776
29777
29778
29779
29780     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
29781$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
29782if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
29783  $as_echo_n "(cached) " >&6
29784else
29785
29786                  case "$host_os" in
29787                    # Guess no on Solaris 8.
29788        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
29789                    # Guess yes otherwise.
29790        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
29791      esac
29792      if test $LOCALE_ZH_CN != none; then
29793        if test "$cross_compiling" = yes; then :
29794  :
29795else
29796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29797/* end confdefs.h.  */
29798
29799#include <locale.h>
29800#include <stdlib.h>
29801#include <string.h>
29802#include <wchar.h>
29803int main ()
29804{
29805  /* This fails on Solaris 8:
29806     mbrtowc returns 2, and sets wc to 0x00F0.
29807     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
29808  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29809    {
29810      char input[] = "B\250\271\201\060\211\070er"; /* "B����er" */
29811      mbstate_t state;
29812      wchar_t wc;
29813
29814      memset (&state, '\0', sizeof (mbstate_t));
29815      if (mbrtowc (&wc, input + 3, 6, &state) != 4
29816          && mbtowc (&wc, input + 3, 6) == 4)
29817        return 1;
29818    }
29819  return 0;
29820}
29821_ACEOF
29822if ac_fn_c_try_run "$LINENO"; then :
29823  gl_cv_func_mbrtowc_sanitycheck=yes
29824else
29825  gl_cv_func_mbrtowc_sanitycheck=no
29826fi
29827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29828  conftest.$ac_objext conftest.beam conftest.$ac_ext
29829fi
29830
29831      fi
29832
29833fi
29834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29835$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
29836
29837    REPLACE_MBSTATE_T=0
29838    case "$gl_cv_func_mbrtowc_incomplete_state" in
29839      *yes) ;;
29840      *) REPLACE_MBSTATE_T=1 ;;
29841    esac
29842    case "$gl_cv_func_mbrtowc_sanitycheck" in
29843      *yes) ;;
29844      *) REPLACE_MBSTATE_T=1 ;;
29845    esac
29846  else
29847    REPLACE_MBSTATE_T=1
29848  fi
29849  if test $REPLACE_MBSTATE_T = 1; then
29850
29851    :
29852
29853  fi
29854
29855  if test $REPLACE_MBSTATE_T = 1; then
29856    REPLACE_MBSRTOWCS=1
29857  fi
29858
29859  if test $ac_cv_func_mbsrtowcs = no; then
29860    HAVE_MBSRTOWCS=0
29861  fi
29862  if test $HAVE_MBSRTOWCS != 0 && test $REPLACE_MBSRTOWCS != 1; then
29863
29864
29865
29866
29867
29868     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
29869$as_echo_n "checking whether mbsrtowcs works... " >&6; }
29870if test "${gl_cv_func_mbsrtowcs_works+set}" = set; then :
29871  $as_echo_n "(cached) " >&6
29872else
29873
29874                  case "$host_os" in
29875                          # Guess no on HP-UX and Solaris.
29876        hpux* | solaris*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
29877                          # Guess yes otherwise.
29878        *)                gl_cv_func_mbsrtowcs_works="guessing yes" ;;
29879      esac
29880      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
29881        if test "$cross_compiling" = yes; then :
29882  :
29883else
29884  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29885/* end confdefs.h.  */
29886
29887#include <locale.h>
29888#include <string.h>
29889#include <wchar.h>
29890int main ()
29891{
29892  /* Test whether the function works when started with a conversion state
29893     in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
29894  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29895    {
29896      const char input[] = "B\303\274\303\237er";
29897      mbstate_t state;
29898
29899      memset (&state, '\0', sizeof (mbstate_t));
29900      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
29901        if (!mbsinit (&state))
29902          {
29903            const char *src = input + 2;
29904            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
29905              return 1;
29906          }
29907    }
29908  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29909    {
29910      const char input[] = "<\306\374\313\334\270\354>";
29911      mbstate_t state;
29912
29913      memset (&state, '\0', sizeof (mbstate_t));
29914      if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
29915        if (!mbsinit (&state))
29916          {
29917            const char *src = input + 4;
29918            if (mbsrtowcs (NULL, &src, 10, &state) != 3)
29919              return 1;
29920          }
29921    }
29922  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29923    {
29924      const char input[] = "B\250\271\201\060\211\070er";
29925      mbstate_t state;
29926
29927      memset (&state, '\0', sizeof (mbstate_t));
29928      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
29929        if (!mbsinit (&state))
29930          {
29931            const char *src = input + 2;
29932            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
29933              return 1;
29934          }
29935    }
29936  return 0;
29937}
29938_ACEOF
29939if ac_fn_c_try_run "$LINENO"; then :
29940  gl_cv_func_mbsrtowcs_works=yes
29941else
29942  gl_cv_func_mbsrtowcs_works=no
29943fi
29944rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29945  conftest.$ac_objext conftest.beam conftest.$ac_ext
29946fi
29947
29948      fi
29949
29950fi
29951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
29952$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
29953
29954    case "$gl_cv_func_mbsrtowcs_works" in
29955      *yes) ;;
29956      *) REPLACE_MBSRTOWCS=1 ;;
29957    esac
29958  fi
29959  if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
29960
29961    :
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
29982
29983
29984  :
29985
29986  fi
29987
29988
29989
29990  GNULIB_MBSRTOWCS=1
29991
29992
29993
29994  GNULIB_MBSSTR=1
29995
29996
29997
29998
29999
30000      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbswidth is declared in <wchar.h>" >&5
30001$as_echo_n "checking whether mbswidth is declared in <wchar.h>... " >&6; }
30002if test "${ac_cv_have_decl_mbswidth+set}" = set; then :
30003  $as_echo_n "(cached) " >&6
30004else
30005  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30006/* end confdefs.h.  */
30007
30008/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
30009   <wchar.h>.
30010   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
30011   before <wchar.h>.  */
30012#include <stddef.h>
30013#include <stdio.h>
30014#include <time.h>
30015#include <wchar.h>
30016
30017int
30018main ()
30019{
30020
30021  char *p = (char *) mbswidth;
30022  return !p;
30023
30024  ;
30025  return 0;
30026}
30027_ACEOF
30028if ac_fn_c_try_compile "$LINENO"; then :
30029  ac_cv_have_decl_mbswidth=yes
30030else
30031  ac_cv_have_decl_mbswidth=no
30032fi
30033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30034fi
30035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl_mbswidth" >&5
30036$as_echo "$ac_cv_have_decl_mbswidth" >&6; }
30037  if test $ac_cv_have_decl_mbswidth = yes; then
30038    ac_val=1
30039  else
30040    ac_val=0
30041  fi
30042
30043cat >>confdefs.h <<_ACEOF
30044#define HAVE_DECL_MBSWIDTH_IN_WCHAR_H $ac_val
30045_ACEOF
30046
30047
30048
30049
30050   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
30051$as_echo_n "checking for mbstate_t... " >&6; }
30052if test "${ac_cv_type_mbstate_t+set}" = set; then :
30053  $as_echo_n "(cached) " >&6
30054else
30055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30056/* end confdefs.h.  */
30057$ac_includes_default
30058#           include <wchar.h>
30059int
30060main ()
30061{
30062mbstate_t x; return sizeof x;
30063  ;
30064  return 0;
30065}
30066_ACEOF
30067if ac_fn_c_try_compile "$LINENO"; then :
30068  ac_cv_type_mbstate_t=yes
30069else
30070  ac_cv_type_mbstate_t=no
30071fi
30072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30073fi
30074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
30075$as_echo "$ac_cv_type_mbstate_t" >&6; }
30076   if test $ac_cv_type_mbstate_t = yes; then
30077
30078$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
30079
30080   else
30081
30082$as_echo "#define mbstate_t int" >>confdefs.h
30083
30084   fi
30085
30086
30087
30088
30089
30090
30091  :
30092
30093
30094
30095
30096
30097
30098
30099
30100
30101
30102  gl_LIBOBJS="$gl_LIBOBJS memcasecmp.$ac_objext"
30103
30104
30105
30106
30107
30108  GNULIB_MEMCHR=1
30109
30110
30111  if test $cross_compiling != no; then
30112    # AC_FUNC_MEMCMP as of 2.62 defaults to 'no' when cross compiling.
30113    # We default to yes if memcmp appears to exist, which works
30114    # better for MinGW.
30115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cross-compiling target has memcmp" >&5
30116$as_echo_n "checking whether cross-compiling target has memcmp... " >&6; }
30117if test "${ac_cv_func_memcmp_working+set}" = set; then :
30118  $as_echo_n "(cached) " >&6
30119else
30120  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30121/* end confdefs.h.  */
30122
30123                        #include <string.h>
30124
30125int
30126main ()
30127{
30128int ret = memcmp ("foo", "bar", 0);
30129  ;
30130  return 0;
30131}
30132_ACEOF
30133if ac_fn_c_try_link "$LINENO"; then :
30134  ac_cv_func_memcmp_working=yes
30135else
30136  ac_cv_func_memcmp_working=no
30137fi
30138rm -f core conftest.err conftest.$ac_objext \
30139    conftest$ac_exeext conftest.$ac_ext
30140fi
30141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
30142$as_echo "$ac_cv_func_memcmp_working" >&6; }
30143  fi
30144  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
30145$as_echo_n "checking for working memcmp... " >&6; }
30146if test "${ac_cv_func_memcmp_working+set}" = set; then :
30147  $as_echo_n "(cached) " >&6
30148else
30149  if test "$cross_compiling" = yes; then :
30150  ac_cv_func_memcmp_working=no
30151else
30152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30153/* end confdefs.h.  */
30154$ac_includes_default
30155int
30156main ()
30157{
30158
30159  /* Some versions of memcmp are not 8-bit clean.  */
30160  char c0 = '\100', c1 = '\200', c2 = '\201';
30161  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
30162    return 1;
30163
30164  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
30165     or more and with at least one buffer not starting on a 4-byte boundary.
30166     William Lewis provided this test program.   */
30167  {
30168    char foo[21];
30169    char bar[21];
30170    int i;
30171    for (i = 0; i < 4; i++)
30172      {
30173	char *a = foo + i;
30174	char *b = bar + i;
30175	strcpy (a, "--------01111111");
30176	strcpy (b, "--------10000000");
30177	if (memcmp (a, b, 16) >= 0)
30178	  return 1;
30179      }
30180    return 0;
30181  }
30182
30183  ;
30184  return 0;
30185}
30186_ACEOF
30187if ac_fn_c_try_run "$LINENO"; then :
30188  ac_cv_func_memcmp_working=yes
30189else
30190  ac_cv_func_memcmp_working=no
30191fi
30192rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30193  conftest.$ac_objext conftest.beam conftest.$ac_ext
30194fi
30195
30196fi
30197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
30198$as_echo "$ac_cv_func_memcmp_working" >&6; }
30199test $ac_cv_func_memcmp_working = no &&
30200
30201
30202
30203
30204
30205
30206
30207  gl_LIBOBJS="$gl_LIBOBJS memcmp.$ac_objext"
30208
30209
30210    if test $ac_cv_func_memcmp_working = no; then
30211
30212$as_echo "#define memcmp rpl_memcmp" >>confdefs.h
30213
30214    :
30215  fi
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226  gl_LIBOBJS="$gl_LIBOBJS memcoll.$ac_objext"
30227
30228
30229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5
30230$as_echo_n "checking for working strcoll... " >&6; }
30231if test "${ac_cv_func_strcoll_works+set}" = set; then :
30232  $as_echo_n "(cached) " >&6
30233else
30234  if test "$cross_compiling" = yes; then :
30235  ac_cv_func_strcoll_works=no
30236else
30237  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30238/* end confdefs.h.  */
30239$ac_includes_default
30240int
30241main ()
30242{
30243return (strcoll ("abc", "def") >= 0 ||
30244	 strcoll ("ABC", "DEF") >= 0 ||
30245	 strcoll ("123", "456") >= 0)
30246  ;
30247  return 0;
30248}
30249_ACEOF
30250if ac_fn_c_try_run "$LINENO"; then :
30251  ac_cv_func_strcoll_works=yes
30252else
30253  ac_cv_func_strcoll_works=no
30254fi
30255rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30256  conftest.$ac_objext conftest.beam conftest.$ac_ext
30257fi
30258
30259fi
30260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcoll_works" >&5
30261$as_echo "$ac_cv_func_strcoll_works" >&6; }
30262if test $ac_cv_func_strcoll_works = yes; then
30263
30264$as_echo "#define HAVE_STRCOLL 1" >>confdefs.h
30265
30266fi
30267
30268
30269
30270
30271
30272
30273
30274
30275
30276
30277
30278  for ac_func in memcpy
30279do :
30280  ac_fn_c_check_func "$LINENO" "memcpy" "ac_cv_func_memcpy"
30281if test "x$ac_cv_func_memcpy" = x""yes; then :
30282  cat >>confdefs.h <<_ACEOF
30283#define HAVE_MEMCPY 1
30284_ACEOF
30285
30286else
30287
30288    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
30289
30290fi
30291done
30292
30293
30294  if test $ac_cv_func_memcpy = no; then
30295
30296  :
30297
30298  fi
30299
30300
30301
30302
30303
30304
30305
30306
30307
30308
30309  for ac_func in memmove
30310do :
30311  ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
30312if test "x$ac_cv_func_memmove" = x""yes; then :
30313  cat >>confdefs.h <<_ACEOF
30314#define HAVE_MEMMOVE 1
30315_ACEOF
30316
30317else
30318
30319    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
30320
30321fi
30322done
30323
30324
30325  if test $ac_cv_func_memmove = no; then
30326
30327  :
30328
30329  fi
30330
30331
30332
30333
30334
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344
30345  for ac_func in mempcpy
30346do :
30347  ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
30348if test "x$ac_cv_func_mempcpy" = x""yes; then :
30349  cat >>confdefs.h <<_ACEOF
30350#define HAVE_MEMPCPY 1
30351_ACEOF
30352
30353else
30354
30355    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
30356
30357fi
30358done
30359
30360
30361  if test $ac_cv_func_mempcpy = no; then
30362    HAVE_MEMPCPY=0
30363
30364  :
30365
30366  fi
30367
30368
30369
30370  GNULIB_MEMPCPY=1
30371
30372
30373
30374
30375
30376
30377  if test $ac_cv_have_decl_memrchr = no; then
30378    HAVE_DECL_MEMRCHR=0
30379  fi
30380
30381
30382
30383
30384
30385
30386
30387
30388
30389  for ac_func in memrchr
30390do :
30391  ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
30392if test "x$ac_cv_func_memrchr" = x""yes; then :
30393  cat >>confdefs.h <<_ACEOF
30394#define HAVE_MEMRCHR 1
30395_ACEOF
30396
30397else
30398
30399    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
30400
30401fi
30402done
30403
30404
30405  if test $ac_cv_func_memrchr = no; then
30406    :
30407  fi
30408
30409
30410
30411  GNULIB_MEMRCHR=1
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422  for ac_func in memset
30423do :
30424  ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
30425if test "x$ac_cv_func_memset" = x""yes; then :
30426  cat >>confdefs.h <<_ACEOF
30427#define HAVE_MEMSET 1
30428_ACEOF
30429
30430else
30431
30432    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
30433
30434fi
30435done
30436
30437
30438  if test $ac_cv_func_memset = no; then
30439
30440  :
30441
30442  fi
30443
30444
30445
30446
30447
30448
30449
30450
30451
30452
30453
30454  gl_LIBOBJS="$gl_LIBOBJS mgetgroups.$ac_objext"
30455
30456
30457
30458
30459
30460
30461
30462
30463
30464
30465
30466  gl_LIBOBJS="$gl_LIBOBJS mkancesdirs.$ac_objext"
30467
30468
30469
30470
30471  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
30472$as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
30473if test "${gl_cv_func_mkdir_trailing_slash_works+set}" = set; then :
30474  $as_echo_n "(cached) " >&6
30475else
30476  rm -rf conftest.dir
30477      if test "$cross_compiling" = yes; then :
30478  gl_cv_func_mkdir_trailing_slash_works="guessing no"
30479else
30480  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30481/* end confdefs.h.  */
30482
30483#       include <sys/types.h>
30484#       include <sys/stat.h>
30485
30486int
30487main ()
30488{
30489return mkdir ("conftest.dir/", 0700);
30490  ;
30491  return 0;
30492}
30493_ACEOF
30494if ac_fn_c_try_run "$LINENO"; then :
30495  gl_cv_func_mkdir_trailing_slash_works=yes
30496else
30497  gl_cv_func_mkdir_trailing_slash_works=no
30498fi
30499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30500  conftest.$ac_objext conftest.beam conftest.$ac_ext
30501fi
30502
30503    rm -rf conftest.dir
30504
30505
30506fi
30507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
30508$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
30509  if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then
30510    REPLACE_MKDIR=1
30511
30512
30513
30514
30515
30516
30517
30518
30519  gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
30520
30521  fi
30522
30523  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
30524$as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
30525if test "${gl_cv_func_mkdir_trailing_dot_works+set}" = set; then :
30526  $as_echo_n "(cached) " >&6
30527else
30528  rm -rf conftest.dir
30529      if test "$cross_compiling" = yes; then :
30530  gl_cv_func_mkdir_trailing_dot_works="guessing no"
30531else
30532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30533/* end confdefs.h.  */
30534
30535#       include <sys/types.h>
30536#       include <sys/stat.h>
30537
30538int
30539main ()
30540{
30541return !mkdir ("conftest.dir/./", 0700);
30542  ;
30543  return 0;
30544}
30545_ACEOF
30546if ac_fn_c_try_run "$LINENO"; then :
30547  gl_cv_func_mkdir_trailing_dot_works=yes
30548else
30549  gl_cv_func_mkdir_trailing_dot_works=no
30550fi
30551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30552  conftest.$ac_objext conftest.beam conftest.$ac_ext
30553fi
30554
30555    rm -rf conftest.dir
30556
30557
30558fi
30559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
30560$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
30561  if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then
30562    REPLACE_MKDIR=1
30563
30564
30565
30566
30567
30568
30569
30570
30571  gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
30572
30573
30574$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
30575
30576  fi
30577
30578
30579
30580
30581
30582
30583
30584
30585
30586
30587  gl_LIBOBJS="$gl_LIBOBJS dirchownmod.$ac_objext"
30588
30589
30590
30591
30592
30593
30594
30595
30596
30597  gl_LIBOBJS="$gl_LIBOBJS mkdir-p.$ac_objext"
30598
30599
30600
30601
30602
30603
30604
30605
30606
30607
30608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
30609$as_echo_n "checking for working mkstemp... " >&6; }
30610if test "${gl_cv_func_working_mkstemp+set}" = set; then :
30611  $as_echo_n "(cached) " >&6
30612else
30613
30614      mkdir conftest.mkstemp
30615      if test "$cross_compiling" = yes; then :
30616  gl_cv_func_working_mkstemp=no
30617else
30618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30619/* end confdefs.h.  */
30620$ac_includes_default
30621int
30622main ()
30623{
30624int i;
30625            off_t large = (off_t) 4294967295u;
30626            if (large < 0)
30627              large = 2147483647;
30628            for (i = 0; i < 70; i++)
30629              {
30630                char templ[] = "conftest.mkstemp/coXXXXXX";
30631                int (*mkstemp_function) (char *) = mkstemp;
30632                int fd = mkstemp_function (templ);
30633                if (fd < 0 || lseek (fd, large, SEEK_SET) != large)
30634                  return 1;
30635                close (fd);
30636              }
30637            return 0;
30638  ;
30639  return 0;
30640}
30641_ACEOF
30642if ac_fn_c_try_run "$LINENO"; then :
30643  gl_cv_func_working_mkstemp=yes
30644else
30645  gl_cv_func_working_mkstemp=no
30646fi
30647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30648  conftest.$ac_objext conftest.beam conftest.$ac_ext
30649fi
30650
30651      rm -rf conftest.mkstemp
30652
30653fi
30654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
30655$as_echo "$gl_cv_func_working_mkstemp" >&6; }
30656
30657  if test $gl_cv_func_working_mkstemp != yes; then
30658    REPLACE_MKSTEMP=1
30659
30660
30661
30662
30663
30664
30665
30666
30667  gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
30668
30669
30670
30671  fi
30672
30673
30674
30675  GNULIB_MKSTEMP=1
30676
30677
30678
30679
30680
30681
30682if test $APPLE_UNIVERSAL_BUILD = 1; then
30683  # A universal build on Apple MacOS X platforms.
30684  # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
30685  # But we need a configuration result that is valid in both modes.
30686  ac_cv_func_working_mktime=no
30687fi
30688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
30689$as_echo_n "checking for working mktime... " >&6; }
30690if test "${ac_cv_func_working_mktime+set}" = set; then :
30691  $as_echo_n "(cached) " >&6
30692else
30693  if test "$cross_compiling" = yes; then :
30694  ac_cv_func_working_mktime=no
30695else
30696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30697/* end confdefs.h.  */
30698/* Test program from Paul Eggert and Tony Leneis.  */
30699#include <limits.h>
30700#include <stdlib.h>
30701#include <time.h>
30702
30703#ifdef HAVE_UNISTD_H
30704# include <unistd.h>
30705#endif
30706
30707#ifndef HAVE_ALARM
30708# define alarm(X) /* empty */
30709#endif
30710
30711/* Work around redefinition to rpl_putenv by other config tests.  */
30712#undef putenv
30713
30714static time_t time_t_max;
30715static time_t time_t_min;
30716
30717/* Values we'll use to set the TZ environment variable.  */
30718static char *tz_strings[] = {
30719  (char *) 0, "TZ=GMT0", "TZ=JST-9",
30720  "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
30721};
30722#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
30723
30724/* Return 0 if mktime fails to convert a date in the spring-forward gap.
30725   Based on a problem report from Andreas Jaeger.  */
30726static int
30727spring_forward_gap ()
30728{
30729  /* glibc (up to about 1998-10-07) failed this test. */
30730  struct tm tm;
30731
30732  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
30733     instead of "TZ=America/Vancouver" in order to detect the bug even
30734     on systems that don't support the Olson extension, or don't have the
30735     full zoneinfo tables installed.  */
30736  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
30737
30738  tm.tm_year = 98;
30739  tm.tm_mon = 3;
30740  tm.tm_mday = 5;
30741  tm.tm_hour = 2;
30742  tm.tm_min = 0;
30743  tm.tm_sec = 0;
30744  tm.tm_isdst = -1;
30745  return mktime (&tm) != (time_t) -1;
30746}
30747
30748static int
30749mktime_test1 (time_t now)
30750{
30751  struct tm *lt;
30752  return ! (lt = localtime (&now)) || mktime (lt) == now;
30753}
30754
30755static int
30756mktime_test (time_t now)
30757{
30758  return (mktime_test1 (now)
30759          && mktime_test1 ((time_t) (time_t_max - now))
30760          && mktime_test1 ((time_t) (time_t_min + now)));
30761}
30762
30763static int
30764irix_6_4_bug ()
30765{
30766  /* Based on code from Ariel Faigon.  */
30767  struct tm tm;
30768  tm.tm_year = 96;
30769  tm.tm_mon = 3;
30770  tm.tm_mday = 0;
30771  tm.tm_hour = 0;
30772  tm.tm_min = 0;
30773  tm.tm_sec = 0;
30774  tm.tm_isdst = -1;
30775  mktime (&tm);
30776  return tm.tm_mon == 2 && tm.tm_mday == 31;
30777}
30778
30779static int
30780bigtime_test (int j)
30781{
30782  struct tm tm;
30783  time_t now;
30784  tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
30785  now = mktime (&tm);
30786  if (now != (time_t) -1)
30787    {
30788      struct tm *lt = localtime (&now);
30789      if (! (lt
30790             && lt->tm_year == tm.tm_year
30791             && lt->tm_mon == tm.tm_mon
30792             && lt->tm_mday == tm.tm_mday
30793             && lt->tm_hour == tm.tm_hour
30794             && lt->tm_min == tm.tm_min
30795             && lt->tm_sec == tm.tm_sec
30796             && lt->tm_yday == tm.tm_yday
30797             && lt->tm_wday == tm.tm_wday
30798             && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
30799                  == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
30800        return 0;
30801    }
30802  return 1;
30803}
30804
30805static int
30806year_2050_test ()
30807{
30808  /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
30809     ignoring leap seconds.  */
30810  unsigned long int answer = 2527315200UL;
30811
30812  struct tm tm;
30813  time_t t;
30814  tm.tm_year = 2050 - 1900;
30815  tm.tm_mon = 2 - 1;
30816  tm.tm_mday = 1;
30817  tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
30818  tm.tm_isdst = -1;
30819
30820  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
30821     instead of "TZ=America/Vancouver" in order to detect the bug even
30822     on systems that don't support the Olson extension, or don't have the
30823     full zoneinfo tables installed.  */
30824  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
30825
30826  t = mktime (&tm);
30827
30828  /* Check that the result is either a failure, or close enough
30829     to the correct answer that we can assume the discrepancy is
30830     due to leap seconds.  */
30831  return (t == (time_t) -1
30832          || (0 < t && answer - 120 <= t && t <= answer + 120));
30833}
30834
30835int
30836main ()
30837{
30838  time_t t, delta;
30839  int i, j;
30840
30841  /* This test makes some buggy mktime implementations loop.
30842     Give up after 60 seconds; a mktime slower than that
30843     isn't worth using anyway.  */
30844  alarm (60);
30845
30846  for (;;)
30847    {
30848      t = (time_t_max << 1) + 1;
30849      if (t <= time_t_max)
30850        break;
30851      time_t_max = t;
30852    }
30853  time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
30854
30855  delta = time_t_max / 997; /* a suitable prime number */
30856  for (i = 0; i < N_STRINGS; i++)
30857    {
30858      if (tz_strings[i])
30859        putenv (tz_strings[i]);
30860
30861      for (t = 0; t <= time_t_max - delta; t += delta)
30862        if (! mktime_test (t))
30863          return 1;
30864      if (! (mktime_test ((time_t) 1)
30865             && mktime_test ((time_t) (60 * 60))
30866             && mktime_test ((time_t) (60 * 60 * 24))))
30867        return 1;
30868
30869      for (j = 1; ; j <<= 1)
30870        if (! bigtime_test (j))
30871          return 1;
30872        else if (INT_MAX / 2 < j)
30873          break;
30874      if (! bigtime_test (INT_MAX))
30875        return 1;
30876    }
30877  return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
30878}
30879_ACEOF
30880if ac_fn_c_try_run "$LINENO"; then :
30881  ac_cv_func_working_mktime=yes
30882else
30883  ac_cv_func_working_mktime=no
30884fi
30885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30886  conftest.$ac_objext conftest.beam conftest.$ac_ext
30887fi
30888
30889fi
30890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
30891$as_echo "$ac_cv_func_working_mktime" >&6; }
30892if test $ac_cv_func_working_mktime = no; then
30893
30894
30895
30896
30897
30898
30899
30900
30901  gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
30902
30903fi
30904
30905    if test $ac_cv_func_working_mktime = no; then
30906    REPLACE_MKTIME=1
30907
30908
30909
30910  else
30911    REPLACE_MKTIME=0
30912  fi
30913
30914
30915
30916
30917
30918
30919
30920
30921
30922
30923  gl_LIBOBJS="$gl_LIBOBJS modechange.$ac_objext"
30924
30925
30926
30927
30928for ac_func in listmntent getmntinfo
30929do :
30930  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
30931ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
30932eval as_val=\$$as_ac_var
30933   if test "x$as_val" = x""yes; then :
30934  cat >>confdefs.h <<_ACEOF
30935#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
30936_ACEOF
30937
30938fi
30939done
30940
30941
30942
30943# We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses
30944# NGROUPS (as the array dimension for a struct member) without a definition.
30945for ac_header in sys/ucred.h
30946do :
30947  ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "#include <grp.h>
30948"
30949if test "x$ac_cv_header_sys_ucred_h" = x""yes; then :
30950  cat >>confdefs.h <<_ACEOF
30951#define HAVE_SYS_UCRED_H 1
30952_ACEOF
30953
30954fi
30955
30956done
30957
30958
30959for ac_header in sys/mount.h
30960do :
30961  ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default
30962   #if HAVE_SYS_PARAM_H
30963     #include <sys/param.h>
30964    #endif
30965"
30966if test "x$ac_cv_header_sys_mount_h" = x""yes; then :
30967  cat >>confdefs.h <<_ACEOF
30968#define HAVE_SYS_MOUNT_H 1
30969_ACEOF
30970
30971fi
30972
30973done
30974
30975
30976for ac_header in mntent.h sys/fs_types.h
30977do :
30978  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30979ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30980eval as_val=\$$as_ac_Header
30981   if test "x$as_val" = x""yes; then :
30982  cat >>confdefs.h <<_ACEOF
30983#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30984_ACEOF
30985
30986fi
30987
30988done
30989
30990    getfsstat_includes="\
30991$ac_includes_default
30992#if HAVE_SYS_PARAM_H
30993# include <sys/param.h> /* needed by powerpc-apple-darwin1.3.7 */
30994#endif
30995#if HAVE_SYS_UCRED_H
30996# include <grp.h> /* needed for definition of NGROUPS */
30997# include <sys/ucred.h> /* needed by powerpc-apple-darwin1.3.7 */
30998#endif
30999#if HAVE_SYS_MOUNT_H
31000# include <sys/mount.h>
31001#endif
31002#if HAVE_SYS_FS_TYPES_H
31003# include <sys/fs_types.h> /* needed by powerpc-apple-darwin1.3.7 */
31004#endif
31005"
31006ac_fn_c_check_member "$LINENO" "struct fsstat" "f_fstypename" "ac_cv_member_struct_fsstat_f_fstypename" "$getfsstat_includes
31007"
31008if test "x$ac_cv_member_struct_fsstat_f_fstypename" = x""yes; then :
31009
31010cat >>confdefs.h <<_ACEOF
31011#define HAVE_STRUCT_FSSTAT_F_FSTYPENAME 1
31012_ACEOF
31013
31014
31015fi
31016
31017
31018# Determine how to get the list of mounted file systems.
31019ac_list_mounted_fs=
31020
31021# If the getmntent function is available but not in the standard library,
31022# make sure LIBS contains the appropriate -l option.
31023# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4,
31024# -lseq on Dynix/PTX, -lgen on Unixware.
31025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5
31026$as_echo_n "checking for library containing getmntent... " >&6; }
31027if test "${ac_cv_search_getmntent+set}" = set; then :
31028  $as_echo_n "(cached) " >&6
31029else
31030  ac_func_search_save_LIBS=$LIBS
31031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31032/* end confdefs.h.  */
31033
31034/* Override any GCC internal prototype to avoid an error.
31035   Use char because int might match the return type of a GCC
31036   builtin and then its argument prototype would still apply.  */
31037#ifdef __cplusplus
31038extern "C"
31039#endif
31040char getmntent ();
31041int
31042main ()
31043{
31044return getmntent ();
31045  ;
31046  return 0;
31047}
31048_ACEOF
31049for ac_lib in '' sun seq gen; do
31050  if test -z "$ac_lib"; then
31051    ac_res="none required"
31052  else
31053    ac_res=-l$ac_lib
31054    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
31055  fi
31056  if ac_fn_c_try_link "$LINENO"; then :
31057  ac_cv_search_getmntent=$ac_res
31058fi
31059rm -f core conftest.err conftest.$ac_objext \
31060    conftest$ac_exeext
31061  if test "${ac_cv_search_getmntent+set}" = set; then :
31062  break
31063fi
31064done
31065if test "${ac_cv_search_getmntent+set}" = set; then :
31066
31067else
31068  ac_cv_search_getmntent=no
31069fi
31070rm conftest.$ac_ext
31071LIBS=$ac_func_search_save_LIBS
31072fi
31073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getmntent" >&5
31074$as_echo "$ac_cv_search_getmntent" >&6; }
31075ac_res=$ac_cv_search_getmntent
31076if test "$ac_res" != no; then :
31077  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
31078
31079fi
31080
31081for ac_func in getmntent
31082do :
31083  ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
31084if test "x$ac_cv_func_getmntent" = x""yes; then :
31085  cat >>confdefs.h <<_ACEOF
31086#define HAVE_GETMNTENT 1
31087_ACEOF
31088
31089fi
31090done
31091
31092
31093
31094# This test must precede the ones for getmntent because Unicos-9 is
31095# reported to have the getmntent function, but its support is incompatible
31096# with other getmntent implementations.
31097
31098# NOTE: Normally, I wouldn't use a check for system type as I've done for
31099# `CRAY' below since that goes against the whole autoconf philosophy.  But
31100# I think there is too great a chance that some non-Cray system has a
31101# function named listmntent to risk the false positive.
31102
31103if test -z "$ac_list_mounted_fs"; then
31104  # Cray UNICOS 9
31105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for listmntent of Cray/Unicos-9" >&5
31106$as_echo_n "checking for listmntent of Cray/Unicos-9... " >&6; }
31107  if test "${fu_cv_sys_mounted_cray_listmntent+set}" = set; then :
31108  $as_echo_n "(cached) " >&6
31109else
31110  fu_cv_sys_mounted_cray_listmntent=no
31111      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31112/* end confdefs.h.  */
31113#ifdef _CRAY
31114yes
31115#endif
31116
31117_ACEOF
31118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31119  $EGREP "yes" >/dev/null 2>&1; then :
31120  test $ac_cv_func_listmntent = yes \
31121            && fu_cv_sys_mounted_cray_listmntent=yes
31122
31123fi
31124rm -f conftest*
31125
31126
31127
31128fi
31129
31130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_cray_listmntent" >&5
31131$as_echo "$fu_cv_sys_mounted_cray_listmntent" >&6; }
31132  if test $fu_cv_sys_mounted_cray_listmntent = yes; then
31133    ac_list_mounted_fs=found
31134
31135$as_echo "#define MOUNTED_LISTMNTENT 1" >>confdefs.h
31136
31137  fi
31138fi
31139
31140if test -z "$ac_list_mounted_fs"; then
31141  # AIX.
31142  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mntctl function and struct vmount" >&5
31143$as_echo_n "checking for mntctl function and struct vmount... " >&6; }
31144  if test "${fu_cv_sys_mounted_vmount+set}" = set; then :
31145  $as_echo_n "(cached) " >&6
31146else
31147  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31148/* end confdefs.h.  */
31149#include <fshelp.h>
31150_ACEOF
31151if ac_fn_c_try_cpp "$LINENO"; then :
31152  fu_cv_sys_mounted_vmount=yes
31153else
31154  fu_cv_sys_mounted_vmount=no
31155fi
31156rm -f conftest.err conftest.$ac_ext
31157fi
31158
31159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_vmount" >&5
31160$as_echo "$fu_cv_sys_mounted_vmount" >&6; }
31161  if test $fu_cv_sys_mounted_vmount = yes; then
31162    ac_list_mounted_fs=found
31163
31164$as_echo "#define MOUNTED_VMOUNT 1" >>confdefs.h
31165
31166  fi
31167fi
31168
31169if test $ac_cv_func_getmntent = yes; then
31170
31171  # This system has the getmntent function.
31172  # Determine whether it's the one-argument variant or the two-argument one.
31173
31174  if test -z "$ac_list_mounted_fs"; then
31175    # 4.3BSD, SunOS, HP-UX, Dynix, Irix
31176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for one-argument getmntent function" >&5
31177$as_echo_n "checking for one-argument getmntent function... " >&6; }
31178    if test "${fu_cv_sys_mounted_getmntent1+set}" = set; then :
31179  $as_echo_n "(cached) " >&6
31180else
31181  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31182/* end confdefs.h.  */
31183
31184/* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */
31185#include <stdio.h>
31186
31187#include <mntent.h>
31188#if !defined MOUNTED
31189# if defined _PATH_MOUNTED      /* GNU libc  */
31190#  define MOUNTED _PATH_MOUNTED
31191# endif
31192# if defined MNT_MNTTAB /* HP-UX.  */
31193#  define MOUNTED MNT_MNTTAB
31194# endif
31195# if defined MNTTABNAME /* Dynix.  */
31196#  define MOUNTED MNTTABNAME
31197# endif
31198#endif
31199
31200int
31201main ()
31202{
31203 struct mntent *mnt = 0; char *table = MOUNTED;
31204                         if (sizeof mnt && sizeof table) return 0;
31205  ;
31206  return 0;
31207}
31208_ACEOF
31209if ac_fn_c_try_compile "$LINENO"; then :
31210  fu_cv_sys_mounted_getmntent1=yes
31211else
31212  fu_cv_sys_mounted_getmntent1=no
31213fi
31214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31215fi
31216
31217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntent1" >&5
31218$as_echo "$fu_cv_sys_mounted_getmntent1" >&6; }
31219    if test $fu_cv_sys_mounted_getmntent1 = yes; then
31220      ac_list_mounted_fs=found
31221
31222$as_echo "#define MOUNTED_GETMNTENT1 1" >>confdefs.h
31223
31224    fi
31225  fi
31226
31227  if test -z "$ac_list_mounted_fs"; then
31228    # SVR4
31229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument getmntent function" >&5
31230$as_echo_n "checking for two-argument getmntent function... " >&6; }
31231    if test "${fu_cv_sys_mounted_getmntent2+set}" = set; then :
31232  $as_echo_n "(cached) " >&6
31233else
31234  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31235/* end confdefs.h.  */
31236#include <sys/mnttab.h>
31237
31238_ACEOF
31239if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31240  $EGREP "getmntent" >/dev/null 2>&1; then :
31241  fu_cv_sys_mounted_getmntent2=yes
31242else
31243  fu_cv_sys_mounted_getmntent2=no
31244fi
31245rm -f conftest*
31246
31247fi
31248
31249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntent2" >&5
31250$as_echo "$fu_cv_sys_mounted_getmntent2" >&6; }
31251    if test $fu_cv_sys_mounted_getmntent2 = yes; then
31252      ac_list_mounted_fs=found
31253
31254$as_echo "#define MOUNTED_GETMNTENT2 1" >>confdefs.h
31255
31256      for ac_func in hasmntopt
31257do :
31258  ac_fn_c_check_func "$LINENO" "hasmntopt" "ac_cv_func_hasmntopt"
31259if test "x$ac_cv_func_hasmntopt" = x""yes; then :
31260  cat >>confdefs.h <<_ACEOF
31261#define HAVE_HASMNTOPT 1
31262_ACEOF
31263
31264fi
31265done
31266
31267    fi
31268  fi
31269
31270fi
31271
31272if test -z "$ac_list_mounted_fs"; then
31273  # DEC Alpha running OSF/1, and Apple Darwin 1.3.
31274  # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h
31275
31276  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getfsstat function" >&5
31277$as_echo_n "checking for getfsstat function... " >&6; }
31278  if test "${fu_cv_sys_mounted_getfsstat+set}" = set; then :
31279  $as_echo_n "(cached) " >&6
31280else
31281  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31282/* end confdefs.h.  */
31283
31284#include <sys/types.h>
31285#if HAVE_STRUCT_FSSTAT_F_FSTYPENAME
31286# define FS_TYPE(Ent) ((Ent).f_fstypename)
31287#else
31288# define FS_TYPE(Ent) mnt_names[(Ent).f_type]
31289#endif
31290$getfsstat_includes
31291
31292int
31293main ()
31294{
31295struct statfs *stats;
31296        int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT);
31297        char *t = FS_TYPE (*stats);
31298  ;
31299  return 0;
31300}
31301_ACEOF
31302if ac_fn_c_try_link "$LINENO"; then :
31303  fu_cv_sys_mounted_getfsstat=yes
31304else
31305  fu_cv_sys_mounted_getfsstat=no
31306fi
31307rm -f core conftest.err conftest.$ac_objext \
31308    conftest$ac_exeext conftest.$ac_ext
31309fi
31310
31311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getfsstat" >&5
31312$as_echo "$fu_cv_sys_mounted_getfsstat" >&6; }
31313  if test $fu_cv_sys_mounted_getfsstat = yes; then
31314    ac_list_mounted_fs=found
31315
31316$as_echo "#define MOUNTED_GETFSSTAT 1" >>confdefs.h
31317
31318  fi
31319fi
31320
31321if test -z "$ac_list_mounted_fs"; then
31322  # SVR3
31323  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIXME existence of three headers" >&5
31324$as_echo_n "checking for FIXME existence of three headers... " >&6; }
31325  if test "${fu_cv_sys_mounted_fread_fstyp+set}" = set; then :
31326  $as_echo_n "(cached) " >&6
31327else
31328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31329/* end confdefs.h.  */
31330
31331#include <sys/statfs.h>
31332#include <sys/fstyp.h>
31333#include <mnttab.h>
31334_ACEOF
31335if ac_fn_c_try_cpp "$LINENO"; then :
31336  fu_cv_sys_mounted_fread_fstyp=yes
31337else
31338  fu_cv_sys_mounted_fread_fstyp=no
31339fi
31340rm -f conftest.err conftest.$ac_ext
31341fi
31342
31343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_fread_fstyp" >&5
31344$as_echo "$fu_cv_sys_mounted_fread_fstyp" >&6; }
31345  if test $fu_cv_sys_mounted_fread_fstyp = yes; then
31346    ac_list_mounted_fs=found
31347
31348$as_echo "#define MOUNTED_FREAD_FSTYP 1" >>confdefs.h
31349
31350  fi
31351fi
31352
31353if test -z "$ac_list_mounted_fs"; then
31354  # 4.4BSD and DEC OSF/1.
31355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmntinfo function" >&5
31356$as_echo_n "checking for getmntinfo function... " >&6; }
31357  if test "${fu_cv_sys_mounted_getmntinfo+set}" = set; then :
31358  $as_echo_n "(cached) " >&6
31359else
31360
31361      test "$ac_cv_func_getmntinfo" = yes \
31362          && fu_cv_sys_mounted_getmntinfo=yes \
31363          || fu_cv_sys_mounted_getmntinfo=no
31364
31365fi
31366
31367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntinfo" >&5
31368$as_echo "$fu_cv_sys_mounted_getmntinfo" >&6; }
31369  if test $fu_cv_sys_mounted_getmntinfo = yes; then
31370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getmntinfo returns statvfs structures" >&5
31371$as_echo_n "checking whether getmntinfo returns statvfs structures... " >&6; }
31372    if test "${fu_cv_sys_mounted_getmntinfo2+set}" = set; then :
31373  $as_echo_n "(cached) " >&6
31374else
31375
31376        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31377/* end confdefs.h.  */
31378
31379#if HAVE_SYS_PARAM_H
31380# include <sys/param.h>
31381#endif
31382#include <sys/types.h>
31383#if HAVE_SYS_MOUNT_H
31384# include <sys/mount.h>
31385#endif
31386#if HAVE_SYS_STATVFS_H
31387# include <sys/statvfs.h>
31388#endif
31389extern int getmntinfo (struct statfs **, int);
31390
31391int
31392main ()
31393{
31394
31395  ;
31396  return 0;
31397}
31398_ACEOF
31399if ac_fn_c_try_compile "$LINENO"; then :
31400  fu_cv_sys_mounted_getmntinfo2=no
31401else
31402  fu_cv_sys_mounted_getmntinfo2=yes
31403fi
31404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31405
31406fi
31407
31408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntinfo2" >&5
31409$as_echo "$fu_cv_sys_mounted_getmntinfo2" >&6; }
31410    if test $fu_cv_sys_mounted_getmntinfo2 = no; then
31411      ac_list_mounted_fs=found
31412
31413$as_echo "#define MOUNTED_GETMNTINFO 1" >>confdefs.h
31414
31415    else
31416      ac_list_mounted_fs=found
31417
31418$as_echo "#define MOUNTED_GETMNTINFO2 1" >>confdefs.h
31419
31420    fi
31421  fi
31422fi
31423
31424if test -z "$ac_list_mounted_fs"; then
31425  # Ultrix
31426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmnt function" >&5
31427$as_echo_n "checking for getmnt function... " >&6; }
31428  if test "${fu_cv_sys_mounted_getmnt+set}" = set; then :
31429  $as_echo_n "(cached) " >&6
31430else
31431  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31432/* end confdefs.h.  */
31433
31434#include <sys/fs_types.h>
31435#include <sys/mount.h>
31436_ACEOF
31437if ac_fn_c_try_cpp "$LINENO"; then :
31438  fu_cv_sys_mounted_getmnt=yes
31439else
31440  fu_cv_sys_mounted_getmnt=no
31441fi
31442rm -f conftest.err conftest.$ac_ext
31443fi
31444
31445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmnt" >&5
31446$as_echo "$fu_cv_sys_mounted_getmnt" >&6; }
31447  if test $fu_cv_sys_mounted_getmnt = yes; then
31448    ac_list_mounted_fs=found
31449
31450$as_echo "#define MOUNTED_GETMNT 1" >>confdefs.h
31451
31452  fi
31453fi
31454
31455if test -z "$ac_list_mounted_fs"; then
31456  # BeOS
31457  for ac_func in next_dev fs_stat_dev
31458do :
31459  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
31460ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
31461eval as_val=\$$as_ac_var
31462   if test "x$as_val" = x""yes; then :
31463  cat >>confdefs.h <<_ACEOF
31464#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
31465_ACEOF
31466
31467fi
31468done
31469
31470  for ac_header in fs_info.h
31471do :
31472  ac_fn_c_check_header_mongrel "$LINENO" "fs_info.h" "ac_cv_header_fs_info_h" "$ac_includes_default"
31473if test "x$ac_cv_header_fs_info_h" = x""yes; then :
31474  cat >>confdefs.h <<_ACEOF
31475#define HAVE_FS_INFO_H 1
31476_ACEOF
31477
31478fi
31479
31480done
31481
31482  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BEOS mounted file system support functions" >&5
31483$as_echo_n "checking for BEOS mounted file system support functions... " >&6; }
31484  if test $ac_cv_header_fs_info_h = yes \
31485      && test $ac_cv_func_next_dev = yes \
31486        && test $ac_cv_func_fs_stat_dev = yes; then
31487    fu_result=yes
31488  else
31489    fu_result=no
31490  fi
31491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_result" >&5
31492$as_echo "$fu_result" >&6; }
31493  if test $fu_result = yes; then
31494    ac_list_mounted_fs=found
31495
31496$as_echo "#define MOUNTED_FS_STAT_DEV 1" >>confdefs.h
31497
31498  fi
31499fi
31500
31501if test -z "$ac_list_mounted_fs"; then
31502  # SVR2
31503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to resort to fread on /etc/mnttab" >&5
31504$as_echo_n "checking whether it is possible to resort to fread on /etc/mnttab... " >&6; }
31505  if test "${fu_cv_sys_mounted_fread+set}" = set; then :
31506  $as_echo_n "(cached) " >&6
31507else
31508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31509/* end confdefs.h.  */
31510#include <mnttab.h>
31511_ACEOF
31512if ac_fn_c_try_cpp "$LINENO"; then :
31513  fu_cv_sys_mounted_fread=yes
31514else
31515  fu_cv_sys_mounted_fread=no
31516fi
31517rm -f conftest.err conftest.$ac_ext
31518fi
31519
31520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_fread" >&5
31521$as_echo "$fu_cv_sys_mounted_fread" >&6; }
31522  if test $fu_cv_sys_mounted_fread = yes; then
31523    ac_list_mounted_fs=found
31524
31525$as_echo "#define MOUNTED_FREAD 1" >>confdefs.h
31526
31527  fi
31528fi
31529
31530if test -z "$ac_list_mounted_fs"; then
31531  as_fn_error "could not determine how to read list of mounted file systems" "$LINENO" 5
31532  # FIXME -- no need to abort building the whole package
31533  # Can't build mountlist.c or anything that needs its functions
31534fi
31535
31536if test $ac_list_mounted_fs = found; then :
31537  gl_cv_list_mounted_fs=yes
31538else
31539  gl_cv_list_mounted_fs=no
31540fi
31541
31542
31543  if test $gl_cv_list_mounted_fs = yes; then
31544
31545
31546
31547
31548
31549
31550
31551
31552  gl_LIBOBJS="$gl_LIBOBJS mountlist.$ac_objext"
31553
31554
31555    for ac_header in sys/mntent.h
31556do :
31557  ac_fn_c_check_header_mongrel "$LINENO" "sys/mntent.h" "ac_cv_header_sys_mntent_h" "$ac_includes_default"
31558if test "x$ac_cv_header_sys_mntent_h" = x""yes; then :
31559  cat >>confdefs.h <<_ACEOF
31560#define HAVE_SYS_MNTENT_H 1
31561_ACEOF
31562
31563fi
31564
31565done
31566
31567
31568  ac_fn_c_check_member "$LINENO" "struct statfs" "f_fstypename" "ac_cv_member_struct_statfs_f_fstypename" "
31569      #include <sys/types.h>
31570      #include <sys/param.h>
31571      #include <sys/mount.h>
31572
31573"
31574if test "x$ac_cv_member_struct_statfs_f_fstypename" = x""yes; then :
31575
31576cat >>confdefs.h <<_ACEOF
31577#define HAVE_STRUCT_STATFS_F_FSTYPENAME 1
31578_ACEOF
31579
31580
31581fi
31582
31583
31584
31585  fi
31586
31587
31588
31589
31590
31591
31592
31593
31594
31595
31596
31597  gl_LIBOBJS="$gl_LIBOBJS mpsort.$ac_objext"
31598
31599
31600
31601
31602
31603
31604
31605
31606
31607
31608 nanosleep_save_libs=$LIBS
31609
31610 # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
31611 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
31612 LIB_NANOSLEEP=
31613
31614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
31615$as_echo_n "checking for library containing nanosleep... " >&6; }
31616if test "${ac_cv_search_nanosleep+set}" = set; then :
31617  $as_echo_n "(cached) " >&6
31618else
31619  ac_func_search_save_LIBS=$LIBS
31620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31621/* end confdefs.h.  */
31622
31623/* Override any GCC internal prototype to avoid an error.
31624   Use char because int might match the return type of a GCC
31625   builtin and then its argument prototype would still apply.  */
31626#ifdef __cplusplus
31627extern "C"
31628#endif
31629char nanosleep ();
31630int
31631main ()
31632{
31633return nanosleep ();
31634  ;
31635  return 0;
31636}
31637_ACEOF
31638for ac_lib in '' rt posix4; do
31639  if test -z "$ac_lib"; then
31640    ac_res="none required"
31641  else
31642    ac_res=-l$ac_lib
31643    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
31644  fi
31645  if ac_fn_c_try_link "$LINENO"; then :
31646  ac_cv_search_nanosleep=$ac_res
31647fi
31648rm -f core conftest.err conftest.$ac_objext \
31649    conftest$ac_exeext
31650  if test "${ac_cv_search_nanosleep+set}" = set; then :
31651  break
31652fi
31653done
31654if test "${ac_cv_search_nanosleep+set}" = set; then :
31655
31656else
31657  ac_cv_search_nanosleep=no
31658fi
31659rm conftest.$ac_ext
31660LIBS=$ac_func_search_save_LIBS
31661fi
31662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
31663$as_echo "$ac_cv_search_nanosleep" >&6; }
31664ac_res=$ac_cv_search_nanosleep
31665if test "$ac_res" != no; then :
31666  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
31667  test "$ac_cv_search_nanosleep" = "none required" ||
31668                 LIB_NANOSLEEP=$ac_cv_search_nanosleep
31669fi
31670
31671
31672
31673 if test $APPLE_UNIVERSAL_BUILD = 1; then
31674   # A universal build on Apple MacOS X platforms.
31675   # The test result would be 'no (mishandles large arguments)' in 64-bit mode
31676   # but 'yes' in 32-bit mode. But we need a configuration result that is
31677   # valid in both modes.
31678   gl_cv_func_nanosleep='no (mishandles large arguments)'
31679 fi
31680
31681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
31682$as_echo_n "checking for working nanosleep... " >&6; }
31683if test "${gl_cv_func_nanosleep+set}" = set; then :
31684  $as_echo_n "(cached) " >&6
31685else
31686
31687   if test "$cross_compiling" = yes; then :
31688  gl_cv_func_nanosleep=cross-compiling
31689else
31690  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31691/* end confdefs.h.  */
31692
31693        #include <errno.h>
31694        #include <limits.h>
31695        #include <signal.h>
31696        #if HAVE_SYS_TIME_H
31697         #include <sys/time.h>
31698        #endif
31699        #include <time.h>
31700        #include <unistd.h>
31701        #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
31702        #define TYPE_MAXIMUM(t) \
31703          ((t) (! TYPE_SIGNED (t) \
31704                ? (t) -1 \
31705                : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
31706
31707        static void
31708        check_for_SIGALRM (int sig)
31709        {
31710          if (sig != SIGALRM)
31711            _exit (1);
31712        }
31713
31714        int
31715        main ()
31716        {
31717          static struct timespec ts_sleep;
31718          static struct timespec ts_remaining;
31719          static struct sigaction act;
31720          if (! nanosleep)
31721            return 1;
31722          act.sa_handler = check_for_SIGALRM;
31723          sigemptyset (&act.sa_mask);
31724          sigaction (SIGALRM, &act, NULL);
31725          ts_sleep.tv_sec = 0;
31726          ts_sleep.tv_nsec = 1;
31727          alarm (1);
31728          if (nanosleep (&ts_sleep, NULL) != 0)
31729            return 1;
31730          ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
31731          ts_sleep.tv_nsec = 999999999;
31732          alarm (1);
31733          if (nanosleep (&ts_sleep, &ts_remaining) == -1 && errno == EINTR
31734              && TYPE_MAXIMUM (time_t) - 10 < ts_remaining.tv_sec)
31735            return 0;
31736          return 119;
31737        }
31738_ACEOF
31739if ac_fn_c_try_run "$LINENO"; then :
31740  gl_cv_func_nanosleep=yes
31741else
31742  case $? in       119) gl_cv_func_nanosleep='no (mishandles large arguments)';;       *)   gl_cv_func_nanosleep=no;;
31743      esac
31744fi
31745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31746  conftest.$ac_objext conftest.beam conftest.$ac_ext
31747fi
31748
31749
31750fi
31751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
31752$as_echo "$gl_cv_func_nanosleep" >&6; }
31753  if test "$gl_cv_func_nanosleep" = yes; then
31754    REPLACE_NANOSLEEP=0
31755  else
31756    REPLACE_NANOSLEEP=1
31757    if test "$gl_cv_func_nanosleep" = 'no (mishandles large arguments)'; then
31758
31759$as_echo "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
31760
31761    else
31762      for ac_lib in $LIBSOCKET; do
31763        case " $LIB_NANOSLEEP " in
31764        *" $ac_lib "*) ;;
31765        *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
31766        esac
31767      done
31768    fi
31769
31770
31771
31772
31773
31774
31775
31776
31777  gl_LIBOBJS="$gl_LIBOBJS nanosleep.$ac_objext"
31778
31779
31780
31781
31782
31783
31784
31785  fi
31786
31787 LIBS=$nanosleep_save_libs
31788
31789
31790
31791
31792
31793
31794
31795
31796
31797
31798     if test $gl_cv_have_include_next = yes; then
31799       gl_cv_next_netdb_h='<'netdb.h'>'
31800     else
31801       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
31802$as_echo_n "checking absolute name of <netdb.h>... " >&6; }
31803if test "${gl_cv_next_netdb_h+set}" = set; then :
31804  $as_echo_n "(cached) " >&6
31805else
31806
31807          if test $ac_cv_header_netdb_h = yes; then
31808            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31809/* end confdefs.h.  */
31810#include <netdb.h>
31811
31812_ACEOF
31813                                                                                                case "$host_os" in
31814              aix*) gl_absname_cpp="$ac_cpp -C" ;;
31815              *)    gl_absname_cpp="$ac_cpp" ;;
31816            esac
31817                                                gl_cv_next_netdb_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31818               sed -n '\#/netdb.h#{
31819                 s#.*"\(.*/netdb.h\)".*#\1#
31820                 s#^/[^/]#//&#
31821                 p
31822                 q
31823               }'`'"'
31824          else
31825            gl_cv_next_netdb_h='<'netdb.h'>'
31826          fi
31827
31828fi
31829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
31830$as_echo "$gl_cv_next_netdb_h" >&6; }
31831     fi
31832     NEXT_NETDB_H=$gl_cv_next_netdb_h
31833
31834     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31835       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31836       gl_next_as_first_directive='<'netdb.h'>'
31837     else
31838       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31839       gl_next_as_first_directive=$gl_cv_next_netdb_h
31840     fi
31841     NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
31842
31843
31844
31845  if test $ac_cv_header_netdb_h = yes; then
31846    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31847/* end confdefs.h.  */
31848
31849         #include <netdb.h>
31850         struct addrinfo a;
31851         int b = EAI_OVERFLOW;
31852         int c = AI_NUMERICSERV;
31853
31854int
31855main ()
31856{
31857
31858  ;
31859  return 0;
31860}
31861_ACEOF
31862if ac_fn_c_try_compile "$LINENO"; then :
31863  NETDB_H=''
31864else
31865  NETDB_H='netdb.h'
31866fi
31867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31868    HAVE_NETDB_H=1
31869  else
31870    NETDB_H='netdb.h'
31871    HAVE_NETDB_H=0
31872  fi
31873
31874
31875
31876
31877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
31878$as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
31879if test "${gl_cv_header_netinet_in_h_selfcontained+set}" = set; then :
31880  $as_echo_n "(cached) " >&6
31881else
31882
31883      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31884/* end confdefs.h.  */
31885#include <netinet/in.h>
31886int
31887main ()
31888{
31889
31890  ;
31891  return 0;
31892}
31893_ACEOF
31894if ac_fn_c_try_compile "$LINENO"; then :
31895  gl_cv_header_netinet_in_h_selfcontained=yes
31896else
31897  gl_cv_header_netinet_in_h_selfcontained=no
31898fi
31899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31900
31901fi
31902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
31903$as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
31904  if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
31905    NETINET_IN_H=''
31906  else
31907    NETINET_IN_H='netinet/in.h'
31908    for ac_header in netinet/in.h
31909do :
31910  ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
31911if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
31912  cat >>confdefs.h <<_ACEOF
31913#define HAVE_NETINET_IN_H 1
31914_ACEOF
31915
31916fi
31917
31918done
31919
31920
31921
31922
31923
31924
31925
31926     if test $gl_cv_have_include_next = yes; then
31927       gl_cv_next_netinet_in_h='<'netinet/in.h'>'
31928     else
31929       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
31930$as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
31931if test "${gl_cv_next_netinet_in_h+set}" = set; then :
31932  $as_echo_n "(cached) " >&6
31933else
31934
31935          if test $ac_cv_header_netinet_in_h = yes; then
31936            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31937/* end confdefs.h.  */
31938#include <netinet/in.h>
31939
31940_ACEOF
31941                                                                                                case "$host_os" in
31942              aix*) gl_absname_cpp="$ac_cpp -C" ;;
31943              *)    gl_absname_cpp="$ac_cpp" ;;
31944            esac
31945                                                gl_cv_next_netinet_in_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31946               sed -n '\#/netinet/in.h#{
31947                 s#.*"\(.*/netinet/in.h\)".*#\1#
31948                 s#^/[^/]#//&#
31949                 p
31950                 q
31951               }'`'"'
31952          else
31953            gl_cv_next_netinet_in_h='<'netinet/in.h'>'
31954          fi
31955
31956fi
31957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
31958$as_echo "$gl_cv_next_netinet_in_h" >&6; }
31959     fi
31960     NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
31961
31962     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31963       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31964       gl_next_as_first_directive='<'netinet/in.h'>'
31965     else
31966       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31967       gl_next_as_first_directive=$gl_cv_next_netinet_in_h
31968     fi
31969     NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
31970
31971
31972
31973    if test $ac_cv_header_netinet_in_h = yes; then
31974      HAVE_NETINET_IN_H=1
31975    else
31976      HAVE_NETINET_IN_H=0
31977    fi
31978
31979  fi
31980
31981
31982
31983
31984
31985
31986
31987  if test $ac_cv_func_nl_langinfo = yes; then
31988    if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then
31989      :
31990    else
31991      REPLACE_NL_LANGINFO=1
31992
31993$as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
31994
31995
31996
31997
31998
31999
32000
32001
32002
32003  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
32004
32005    fi
32006  else
32007    HAVE_NL_LANGINFO=0
32008
32009
32010
32011
32012
32013
32014
32015
32016  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
32017
32018  fi
32019
32020
32021
32022  GNULIB_NL_LANGINFO=1
32023
32024
32025
32026
32027
32028  for ac_header in sys/pstat.h sys/sysmp.h sys/param.h
32029do :
32030  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
32031ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
32032"
32033eval as_val=\$$as_ac_Header
32034   if test "x$as_val" = x""yes; then :
32035  cat >>confdefs.h <<_ACEOF
32036#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
32037_ACEOF
32038
32039fi
32040
32041done
32042
32043    for ac_header in sys/sysctl.h
32044do :
32045  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
32046     #if HAVE_SYS_PARAM_H
32047     # include <sys/param.h>
32048     #endif
32049
32050"
32051if test "x$ac_cv_header_sys_sysctl_h" = x""yes; then :
32052  cat >>confdefs.h <<_ACEOF
32053#define HAVE_SYS_SYSCTL_H 1
32054_ACEOF
32055
32056fi
32057
32058done
32059
32060
32061  for ac_func in sched_getaffinity sched_getaffinity_np \
32062                  pstat_getdynamic sysmp sysctl
32063do :
32064  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
32065ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
32066eval as_val=\$$as_ac_var
32067   if test "x$as_val" = x""yes; then :
32068  cat >>confdefs.h <<_ACEOF
32069#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
32070_ACEOF
32071
32072fi
32073done
32074
32075
32076                if test $ac_cv_func_sched_getaffinity = yes; then
32077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc compatible sched_getaffinity" >&5
32078$as_echo_n "checking for glibc compatible sched_getaffinity... " >&6; }
32079if test "${gl_cv_func_sched_getaffinity3+set}" = set; then :
32080  $as_echo_n "(cached) " >&6
32081else
32082  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32083/* end confdefs.h.  */
32084#include <sched.h>
32085int
32086main ()
32087{
32088sched_getaffinity (0, 0, (cpu_set_t *) 0);
32089  ;
32090  return 0;
32091}
32092_ACEOF
32093if ac_fn_c_try_compile "$LINENO"; then :
32094  gl_cv_func_sched_getaffinity3=yes
32095else
32096  gl_cv_func_sched_getaffinity3=no
32097fi
32098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32099
32100fi
32101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sched_getaffinity3" >&5
32102$as_echo "$gl_cv_func_sched_getaffinity3" >&6; }
32103    if test $gl_cv_func_sched_getaffinity3 = yes; then
32104
32105$as_echo "#define HAVE_SCHED_GETAFFINITY_LIKE_GLIBC 1" >>confdefs.h
32106
32107    fi
32108  fi
32109
32110
32111
32112
32113
32114
32115
32116
32117
32118
32119
32120
32121
32122
32123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
32124$as_echo_n "checking for obstacks... " >&6; }
32125if test "${ac_cv_func_obstack+set}" = set; then :
32126  $as_echo_n "(cached) " >&6
32127else
32128  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32129/* end confdefs.h.  */
32130$ac_includes_default
32131		      #include "obstack.h"
32132int
32133main ()
32134{
32135struct obstack mem;
32136		       #define obstack_chunk_alloc malloc
32137		       #define obstack_chunk_free free
32138		       obstack_init (&mem);
32139		       obstack_free (&mem, 0);
32140  ;
32141  return 0;
32142}
32143_ACEOF
32144if ac_fn_c_try_link "$LINENO"; then :
32145  ac_cv_func_obstack=yes
32146else
32147  ac_cv_func_obstack=no
32148fi
32149rm -f core conftest.err conftest.$ac_objext \
32150    conftest$ac_exeext conftest.$ac_ext
32151fi
32152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
32153$as_echo "$ac_cv_func_obstack" >&6; }
32154if test $ac_cv_func_obstack = yes; then
32155
32156$as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
32157
32158else
32159
32160
32161
32162
32163
32164
32165
32166
32167  gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext"
32168
32169fi
32170
32171
32172
32173  case "$host_os" in
32174    mingw* | pw*)
32175
32176
32177  REPLACE_OPEN=1
32178
32179
32180
32181
32182
32183
32184
32185
32186  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
32187
32188
32189
32190
32191  :
32192
32193
32194      ;;
32195    *)
32196
32197      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
32198$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
32199if test "${gl_cv_func_open_slash+set}" = set; then :
32200  $as_echo_n "(cached) " >&6
32201else
32202  # Assume that if we have lstat, we can also check symlinks.
32203          if test $ac_cv_func_lstat = yes; then
32204            touch conftest.tmp
32205            ln -s conftest.tmp conftest.lnk
32206          fi
32207          if test "$cross_compiling" = yes; then :
32208
32209             case "$host_os" in
32210               freebsd*)        gl_cv_func_open_slash="guessing no" ;;
32211               solaris2.[0-9]*) gl_cv_func_open_slash="guessing no" ;;
32212               hpux*)           gl_cv_func_open_slash="guessing no" ;;
32213               *)               gl_cv_func_open_slash="guessing yes" ;;
32214             esac
32215
32216else
32217  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32218/* end confdefs.h.  */
32219
32220#include <fcntl.h>
32221#if HAVE_UNISTD_H
32222# include <unistd.h>
32223#endif
32224int main ()
32225{
32226#if HAVE_LSTAT
32227  if (open ("conftest.lnk/", O_RDONLY) != -1) return 2;
32228#endif
32229  return open ("conftest.sl/", O_CREAT, 0600) >= 0;
32230}
32231_ACEOF
32232if ac_fn_c_try_run "$LINENO"; then :
32233  gl_cv_func_open_slash=yes
32234else
32235  gl_cv_func_open_slash=no
32236fi
32237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32238  conftest.$ac_objext conftest.beam conftest.$ac_ext
32239fi
32240
32241          rm -f conftest.sl conftest.tmp conftest.lnk
32242
32243fi
32244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
32245$as_echo "$gl_cv_func_open_slash" >&6; }
32246      case "$gl_cv_func_open_slash" in
32247        *no)
32248
32249$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
32250
32251
32252
32253  REPLACE_OPEN=1
32254
32255
32256
32257
32258
32259
32260
32261
32262  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
32263
32264
32265
32266
32267  :
32268
32269
32270          ;;
32271      esac
32272      ;;
32273  esac
32274
32275
32276
32277$as_echo "#define GNULIB_OPEN 1" >>confdefs.h
32278
32279
32280
32281
32282  GNULIB_OPEN=1
32283
32284
32285
32286  GNULIB_OPENAT=1
32287
32288
32289  GNULIB_FCHMODAT=1
32290  GNULIB_FSTATAT=1
32291  GNULIB_MKDIRAT=1
32292
32293
32294  GNULIB_FCHOWNAT=1
32295  GNULIB_UNLINKAT=1
32296
32297
32298
32299
32300
32301
32302
32303
32304
32305  gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
32306
32307
32308
32309
32310
32311
32312
32313
32314
32315
32316
32317
32318
32319
32320
32321
32322
32323
32324
32325
32326
32327
32328
32329
32330
32331
32332
32333
32334
32335
32336
32337
32338
32339
32340
32341
32342
32343
32344
32345  for ac_func in fchmodat fstatat mkdirat openat unlinkat
32346do :
32347  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
32348ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
32349eval as_val=\$$as_ac_var
32350   if test "x$as_val" = x""yes; then :
32351  cat >>confdefs.h <<_ACEOF
32352#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
32353_ACEOF
32354
32355else
32356
32357    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
32358
32359fi
32360done
32361
32362
32363
32364
32365  case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in
32366  yes+yes)
32367    # GNU/Hurd has unlinkat, but it has the same bug as unlink.
32368    if test $REPLACE_UNLINK = 1; then
32369
32370
32371
32372
32373
32374
32375
32376
32377  gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
32378
32379      REPLACE_UNLINKAT=1
32380    fi ;;
32381  yes+*)
32382    # Solaris 9 has *at functions, but uniformly mishandles trailing
32383    # slash in all of them.
32384
32385
32386
32387
32388
32389
32390
32391
32392  gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
32393
32394    REPLACE_OPENAT=1
32395
32396
32397
32398
32399
32400
32401
32402
32403  gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
32404
32405    REPLACE_FSTATAT=1
32406
32407
32408
32409
32410
32411
32412
32413
32414  gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
32415
32416    REPLACE_UNLINKAT=1
32417    ;;
32418  *)
32419    HAVE_OPENAT=0
32420    HAVE_UNLINKAT=0 # No known system with unlinkat but not openat
32421    HAVE_FSTATAT=0 # No known system with fstatat but not openat
32422
32423
32424
32425  :
32426;;
32427  esac
32428  if test $ac_cv_func_fchmodat != yes; then
32429    HAVE_FCHMODAT=0
32430  fi
32431  if test $ac_cv_func_mkdirat != yes; then
32432    HAVE_MKDIRAT=0
32433  fi
32434
32435
32436  ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
32437if test "x$ac_cv_func_fchownat" = x""yes; then :
32438
32439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
32440$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
32441if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then :
32442  $as_echo_n "(cached) " >&6
32443else
32444
32445     gl_dangle=conftest.dangle
32446     # Remove any remnants of a previous test.
32447     rm -f $gl_dangle
32448     # Arrange for deletion of the temporary file this test creates.
32449     ac_clean_files="$ac_clean_files $gl_dangle"
32450     ln -s conftest.no-such $gl_dangle
32451     if test "$cross_compiling" = yes; then :
32452  gl_cv_func_fchownat_nofollow_works=no
32453else
32454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32455/* end confdefs.h.  */
32456
32457#include <fcntl.h>
32458#include <unistd.h>
32459#include <stdlib.h>
32460#include <errno.h>
32461#include <sys/types.h>
32462int
32463main ()
32464{
32465  return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
32466                    AT_SYMLINK_NOFOLLOW) != 0
32467          && errno == ENOENT);
32468}
32469
32470_ACEOF
32471if ac_fn_c_try_run "$LINENO"; then :
32472  gl_cv_func_fchownat_nofollow_works=yes
32473else
32474  gl_cv_func_fchownat_nofollow_works=no
32475fi
32476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32477  conftest.$ac_objext conftest.beam conftest.$ac_ext
32478fi
32479
32480
32481fi
32482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
32483$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
32484  if test $gl_cv_func_fchownat_nofollow_works = no; then :
32485  REPLACE_FCHOWNAT=1
32486
32487$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
32488
32489fi
32490
32491else
32492  HAVE_FCHOWNAT=0
32493fi
32494
32495  if test $REPLACE_CHOWN = 1; then
32496    REPLACE_FCHOWNAT=1
32497  fi
32498  if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
32499
32500
32501
32502
32503
32504
32505
32506
32507  gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
32508
32509  fi
32510
32511
32512
32513
32514
32515
32516
32517
32518
32519
32520
32521
32522  gl_LIBOBJS="$gl_LIBOBJS openat-safer.$ac_objext"
32523
32524
32525
32526
32527$as_echo "#define GNULIB_OPENAT_SAFER 1" >>confdefs.h
32528
32529
32530
32531
32532
32533
32534
32535    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl5.005 or newer" >&5
32536$as_echo_n "checking for perl5.005 or newer... " >&6; }
32537  if test "${PERL+set}" = set; then
32538    # `PERL' is set in the user's environment.
32539    candidate_perl_names="$PERL"
32540    perl_specified=yes
32541  else
32542    candidate_perl_names='perl perl5'
32543    perl_specified=no
32544  fi
32545
32546  found=no
32547
32548  PERL="$am_missing_run perl"
32549  for perl in $candidate_perl_names; do
32550    # Run test in a subshell; some versions of sh will print an error if
32551    # an executable is not found, even if stderr is redirected.
32552    if ( $perl -e 'require 5.005; use File::Compare' ) > /dev/null 2>&1; then
32553      PERL=$perl
32554      found=yes
32555      break
32556    fi
32557  done
32558
32559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
32560$as_echo "$found" >&6; }
32561  test $found = no && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
32562WARNING: You don't seem to have perl5.005 or newer installed, or you lack
32563         a usable version of the Perl File::Compare module.  As a result,
32564         you may be unable to run a few tests or to regenerate certain
32565         files if you modify the sources from which they are derived.
32566 " >&5
32567$as_echo "$as_me: WARNING:
32568WARNING: You don't seem to have perl5.005 or newer installed, or you lack
32569         a usable version of the Perl File::Compare module.  As a result,
32570         you may be unable to run a few tests or to regenerate certain
32571         files if you modify the sources from which they are derived.
32572 " >&2;}
32573
32574
32575
32576
32577
32578
32579
32580
32581
32582
32583  gl_LIBOBJS="$gl_LIBOBJS physmem.$ac_objext"
32584
32585
32586  # Prerequisites of lib/physmem.c.
32587  for ac_header in sys/pstat.h sys/sysmp.h sys/sysinfo.h \
32588    machine/hal_sysinfo.h sys/table.h sys/param.h sys/systemcfg.h
32589do :
32590  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
32591ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
32592"
32593eval as_val=\$$as_ac_Header
32594   if test "x$as_val" = x""yes; then :
32595  cat >>confdefs.h <<_ACEOF
32596#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
32597_ACEOF
32598
32599fi
32600
32601done
32602
32603    for ac_header in sys/sysctl.h
32604do :
32605  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
32606     #if HAVE_SYS_PARAM_H
32607     # include <sys/param.h>
32608     #endif
32609
32610"
32611if test "x$ac_cv_header_sys_sysctl_h" = x""yes; then :
32612  cat >>confdefs.h <<_ACEOF
32613#define HAVE_SYS_SYSCTL_H 1
32614_ACEOF
32615
32616fi
32617
32618done
32619
32620
32621  for ac_func in pstat_getstatic pstat_getdynamic sysmp getsysinfo sysctl table
32622do :
32623  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
32624ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
32625eval as_val=\$$as_ac_var
32626   if test "x$as_val" = x""yes; then :
32627  cat >>confdefs.h <<_ACEOF
32628#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
32629_ACEOF
32630
32631fi
32632done
32633
32634
32635
32636
32637  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a shell that conforms to POSIX" >&5
32638$as_echo_n "checking for a shell that conforms to POSIX... " >&6; }
32639if test "${gl_cv_posix_shell+set}" = set; then :
32640  $as_echo_n "(cached) " >&6
32641else
32642  gl_test_posix_shell_script='
32643       func_return () {
32644         (exit $1)
32645       }
32646       func_success () {
32647         func_return 0
32648       }
32649       func_failure () {
32650         func_return 1
32651       }
32652       func_ret_success () {
32653         return 0
32654       }
32655       func_ret_failure () {
32656         return 1
32657       }
32658       subshell_umask_sanity () {
32659         (umask 22; (umask 0); test $(umask) -eq 22)
32660       }
32661       test "$(echo foo)" = foo &&
32662       func_success &&
32663       ! func_failure &&
32664       func_ret_success &&
32665       ! func_ret_failure &&
32666       (set x && func_ret_success y && test x = "$1") &&
32667       subshell_umask_sanity
32668     '
32669     for gl_cv_posix_shell in \
32670         "$CONFIG_SHELL" "$SHELL" /bin/sh /bin/bash /bin/ksh /bin/sh5 no; do
32671       case $gl_cv_posix_shell in
32672         /*)
32673           "$gl_cv_posix_shell" -c "$gl_test_posix_shell_script" 2>/dev/null \
32674             && break;;
32675       esac
32676     done
32677fi
32678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_posix_shell" >&5
32679$as_echo "$gl_cv_posix_shell" >&6; }
32680
32681  if test "$gl_cv_posix_shell" != no; then
32682    POSIX_SHELL=$gl_cv_posix_shell
32683    PREFERABLY_POSIX_SHELL=$POSIX_SHELL
32684  else
32685    POSIX_SHELL=
32686    PREFERABLY_POSIX_SHELL=/bin/sh
32687  fi
32688
32689
32690
32691
32692
32693
32694
32695
32696
32697
32698
32699
32700  gl_LIBOBJS="$gl_LIBOBJS posixtm.$ac_objext"
32701
32702
32703
32704
32705
32706
32707
32708
32709
32710
32711
32712
32713  gl_LIBOBJS="$gl_LIBOBJS posixver.$ac_objext"
32714
32715
32716
32717
32718
32719  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp can be used without linking with libm" >&5
32720$as_echo_n "checking whether frexp can be used without linking with libm... " >&6; }
32721if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
32722  $as_echo_n "(cached) " >&6
32723else
32724
32725      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32726/* end confdefs.h.  */
32727#include <math.h>
32728                   double x;
32729                   int y;
32730int
32731main ()
32732{
32733return frexp (x, &y) < 1;
32734  ;
32735  return 0;
32736}
32737_ACEOF
32738if ac_fn_c_try_link "$LINENO"; then :
32739  gl_cv_func_frexp_no_libm=yes
32740else
32741  gl_cv_func_frexp_no_libm=no
32742fi
32743rm -f core conftest.err conftest.$ac_objext \
32744    conftest$ac_exeext conftest.$ac_ext
32745
32746fi
32747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
32748$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
32749  if test $gl_cv_func_frexp_no_libm = yes; then
32750
32751
32752     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
32753$as_echo_n "checking whether frexp works... " >&6; }
32754if test "${gl_cv_func_frexp_works+set}" = set; then :
32755  $as_echo_n "(cached) " >&6
32756else
32757
32758      if test "$cross_compiling" = yes; then :
32759  case "$host_os" in
32760         netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
32761         *)                        gl_cv_func_frexp_works="guessing yes";;
32762       esac
32763
32764else
32765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32766/* end confdefs.h.  */
32767
32768#include <float.h>
32769#include <math.h>
32770#include <string.h>
32771int main()
32772{
32773  int i;
32774  volatile double x;
32775/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
32776   So we use -zero instead.  */
32777  double zero = 0.0;
32778  /* Test on denormalized numbers.  */
32779  for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
32780    ;
32781  if (x > 0.0)
32782    {
32783      int exp;
32784      double y = frexp (x, &exp);
32785      /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
32786         On NetBSD: y = 0.75. Correct: y = 0.5.  */
32787      if (y != 0.5)
32788        return 1;
32789    }
32790  /* Test on infinite numbers.  */
32791  x = 1.0 / 0.0;
32792  {
32793    int exp;
32794    double y = frexp (x, &exp);
32795    if (y != x)
32796      return 1;
32797  }
32798  /* Test on negative zero.  */
32799  x = -zero;
32800  {
32801    int exp;
32802    double y = frexp (x, &exp);
32803    if (memcmp (&y, &x, sizeof x))
32804      return 1;
32805  }
32806  return 0;
32807}
32808_ACEOF
32809if ac_fn_c_try_run "$LINENO"; then :
32810  gl_cv_func_frexp_works=yes
32811else
32812  gl_cv_func_frexp_works=no
32813fi
32814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32815  conftest.$ac_objext conftest.beam conftest.$ac_ext
32816fi
32817
32818
32819fi
32820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
32821$as_echo "$gl_cv_func_frexp_works" >&6; }
32822
32823    case "$gl_cv_func_frexp_works" in
32824      *yes)
32825
32826$as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
32827
32828        ;;
32829    esac
32830  fi
32831
32832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
32833$as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; }
32834if test "${gl_cv_func_ldexp_no_libm+set}" = set; then :
32835  $as_echo_n "(cached) " >&6
32836else
32837
32838      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32839/* end confdefs.h.  */
32840#include <math.h>
32841                   double x;
32842                   int y;
32843int
32844main ()
32845{
32846return ldexp (x, y) < 1;
32847  ;
32848  return 0;
32849}
32850_ACEOF
32851if ac_fn_c_try_link "$LINENO"; then :
32852  gl_cv_func_ldexp_no_libm=yes
32853else
32854  gl_cv_func_ldexp_no_libm=no
32855fi
32856rm -f core conftest.err conftest.$ac_objext \
32857    conftest$ac_exeext conftest.$ac_ext
32858
32859fi
32860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
32861$as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
32862  if test $gl_cv_func_ldexp_no_libm = yes; then
32863
32864$as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
32865
32866  fi
32867
32868
32869
32870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl can be used without linking with libm" >&5
32871$as_echo_n "checking whether frexpl can be used without linking with libm... " >&6; }
32872if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
32873  $as_echo_n "(cached) " >&6
32874else
32875
32876      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32877/* end confdefs.h.  */
32878#include <math.h>
32879                   long double x;
32880                   int y;
32881int
32882main ()
32883{
32884return frexpl (x, &y) < 1;
32885  ;
32886  return 0;
32887}
32888_ACEOF
32889if ac_fn_c_try_link "$LINENO"; then :
32890  gl_cv_func_frexpl_no_libm=yes
32891else
32892  gl_cv_func_frexpl_no_libm=no
32893fi
32894rm -f core conftest.err conftest.$ac_objext \
32895    conftest$ac_exeext conftest.$ac_ext
32896
32897fi
32898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
32899$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
32900  if test $gl_cv_func_frexpl_no_libm = yes; then
32901
32902
32903     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
32904$as_echo_n "checking whether frexpl works... " >&6; }
32905if test "${gl_cv_func_frexpl_works+set}" = set; then :
32906  $as_echo_n "(cached) " >&6
32907else
32908
32909      if test "$cross_compiling" = yes; then :
32910  case "$host_os" in
32911         aix* | beos* | darwin* | irix* | mingw* | pw*)
32912            gl_cv_func_frexpl_works="guessing no";;
32913         *) gl_cv_func_frexpl_works="guessing yes";;
32914       esac
32915
32916else
32917  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32918/* end confdefs.h.  */
32919
32920#include <float.h>
32921#include <math.h>
32922/* Override the values of <float.h>, like done in float.in.h.  */
32923#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
32924# undef LDBL_MIN_EXP
32925# define LDBL_MIN_EXP    (-16381)
32926#endif
32927extern long double frexpl (long double, int *);
32928int main()
32929{
32930  volatile long double x;
32931  /* Test on finite numbers that fails on AIX 5.1.  */
32932  x = 16.0L;
32933  {
32934    int exp = -9999;
32935    frexpl (x, &exp);
32936    if (exp != 5)
32937      return 1;
32938  }
32939  /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
32940     function returns an invalid (incorrectly normalized) value: it returns
32941               y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
32942     but the correct result is
32943          0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
32944  x = 1.01L;
32945  {
32946    int exp = -9999;
32947    long double y = frexpl (x, &exp);
32948    if (!(exp == 1 && y == 0.505L))
32949      return 1;
32950  }
32951  /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
32952     LDBL_MAX_EXP = 16384.
32953     In the loop end test, we test x against Infinity, rather than comparing
32954     i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
32955  {
32956    int i;
32957    for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
32958      {
32959        int exp = -9999;
32960        frexpl (x, &exp);
32961        if (exp != i)
32962          return 1;
32963      }
32964  }
32965  /* Test on denormalized numbers.  */
32966  {
32967    int i;
32968    for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
32969      ;
32970    if (x > 0.0L)
32971      {
32972        int exp;
32973        long double y = frexpl (x, &exp);
32974        /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
32975           exp = -16382, y = 0.5.  On MacOS X 10.5: exp = -16384, y = 0.5.  */
32976        if (exp != LDBL_MIN_EXP - 1)
32977          return 1;
32978      }
32979  }
32980  /* Test on infinite numbers.  */
32981  x = 1.0L / 0.0L;
32982  {
32983    int exp;
32984    long double y = frexpl (x, &exp);
32985    if (y != x)
32986      return 1;
32987  }
32988  return 0;
32989}
32990_ACEOF
32991if ac_fn_c_try_run "$LINENO"; then :
32992  gl_cv_func_frexpl_works=yes
32993else
32994  gl_cv_func_frexpl_works=no
32995fi
32996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32997  conftest.$ac_objext conftest.beam conftest.$ac_ext
32998fi
32999
33000
33001fi
33002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
33003$as_echo "$gl_cv_func_frexpl_works" >&6; }
33004
33005    case "$gl_cv_func_frexpl_works" in
33006      *yes) gl_func_frexpl_no_libm=yes ;;
33007      *)    gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
33008    esac
33009  else
33010    gl_func_frexpl_no_libm=no
33011        REPLACE_FREXPL=1
33012  fi
33013  if test $gl_func_frexpl_no_libm = yes; then
33014
33015$as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
33016
33017            ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
33018"
33019if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
33020
33021else
33022  HAVE_DECL_FREXPL=0
33023fi
33024
33025  fi
33026
33027  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl can be used without linking with libm" >&5
33028$as_echo_n "checking whether ldexpl can be used without linking with libm... " >&6; }
33029if test "${gl_cv_func_ldexpl_no_libm+set}" = set; then :
33030  $as_echo_n "(cached) " >&6
33031else
33032
33033      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33034/* end confdefs.h.  */
33035#include <math.h>
33036                   long double x;
33037                   int y;
33038int
33039main ()
33040{
33041return ldexpl (x, y) < 1;
33042  ;
33043  return 0;
33044}
33045_ACEOF
33046if ac_fn_c_try_link "$LINENO"; then :
33047  gl_cv_func_ldexpl_no_libm=yes
33048else
33049  gl_cv_func_ldexpl_no_libm=no
33050fi
33051rm -f core conftest.err conftest.$ac_objext \
33052    conftest$ac_exeext conftest.$ac_ext
33053
33054fi
33055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
33056$as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
33057  if test $gl_cv_func_ldexpl_no_libm = yes; then
33058
33059
33060     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
33061$as_echo_n "checking whether ldexpl works... " >&6; }
33062if test "${gl_cv_func_ldexpl_works+set}" = set; then :
33063  $as_echo_n "(cached) " >&6
33064else
33065
33066      if test "$cross_compiling" = yes; then :
33067  case "$host_os" in
33068         aix*) gl_cv_func_ldexpl_works="guessing no";;
33069         *)    gl_cv_func_ldexpl_works="guessing yes";;
33070       esac
33071
33072else
33073  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33074/* end confdefs.h.  */
33075
33076#include <math.h>
33077extern long double ldexpl (long double, int);
33078int main()
33079{
33080  volatile long double x1 = 1.0;
33081  volatile long double y1 = ldexpl (x1, -1);
33082  volatile long double x2 = 1.73205L;
33083  volatile long double y2 = ldexpl (x2, 0);
33084  return (y1 != 0.5L) || (y2 != x2);
33085}
33086_ACEOF
33087if ac_fn_c_try_run "$LINENO"; then :
33088  gl_cv_func_ldexpl_works=yes
33089else
33090  gl_cv_func_ldexpl_works=no
33091fi
33092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33093  conftest.$ac_objext conftest.beam conftest.$ac_ext
33094fi
33095
33096
33097fi
33098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
33099$as_echo "$gl_cv_func_ldexpl_works" >&6; }
33100
33101    case "$gl_cv_func_ldexpl_works" in
33102      *yes)
33103
33104$as_echo "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
33105
33106                        ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
33107"
33108if test "x$ac_cv_have_decl_ldexpl" = x""yes; then :
33109
33110else
33111  HAVE_DECL_LDEXPL=0
33112fi
33113
33114        ;;
33115    esac
33116  fi
33117
33118
33119
33120
33121  for ac_func in getppriv
33122do :
33123  ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv"
33124if test "x$ac_cv_func_getppriv" = x""yes; then :
33125  cat >>confdefs.h <<_ACEOF
33126#define HAVE_GETPPRIV 1
33127_ACEOF
33128
33129fi
33130done
33131
33132
33133  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
33134"
33135if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then :
33136  ac_have_decl=1
33137else
33138  ac_have_decl=0
33139fi
33140
33141cat >>confdefs.h <<_ACEOF
33142#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
33143_ACEOF
33144
33145  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
33146"
33147if test "x$ac_cv_have_decl_program_invocation_short_name" = x""yes; then :
33148  ac_have_decl=1
33149else
33150  ac_have_decl=0
33151fi
33152
33153cat >>confdefs.h <<_ACEOF
33154#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
33155_ACEOF
33156
33157
33158
33159  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
33160
33161
33162
33163  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
33164
33165
33166
33167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
33168$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
33169if test "${gl_cv_func_svid_putenv+set}" = set; then :
33170  $as_echo_n "(cached) " >&6
33171else
33172  if test "$cross_compiling" = yes; then :
33173               gl_cv_func_svid_putenv=no
33174else
33175  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33176/* end confdefs.h.  */
33177$ac_includes_default
33178int
33179main ()
33180{
33181
33182    /* Put it in env.  */
33183    if (putenv ("CONFTEST_putenv=val"))
33184      return 1;
33185
33186    /* Try to remove it.  */
33187    if (putenv ("CONFTEST_putenv"))
33188      return 1;
33189
33190    /* Make sure it was deleted.  */
33191    if (getenv ("CONFTEST_putenv") != 0)
33192      return 1;
33193
33194    return 0;
33195
33196  ;
33197  return 0;
33198}
33199_ACEOF
33200if ac_fn_c_try_run "$LINENO"; then :
33201  gl_cv_func_svid_putenv=yes
33202else
33203  gl_cv_func_svid_putenv=no
33204fi
33205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33206  conftest.$ac_objext conftest.beam conftest.$ac_ext
33207fi
33208
33209
33210fi
33211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
33212$as_echo "$gl_cv_func_svid_putenv" >&6; }
33213  if test $gl_cv_func_svid_putenv = no; then
33214    REPLACE_PUTENV=1
33215
33216
33217
33218
33219
33220
33221
33222
33223  gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
33224
33225  fi
33226
33227
33228
33229  GNULIB_PUTENV=1
33230
33231
33232
33233
33234
33235
33236
33237
33238
33239
33240  gl_LIBOBJS="$gl_LIBOBJS quote.$ac_objext"
33241
33242
33243
33244
33245
33246
33247
33248
33249
33250
33251
33252
33253  gl_LIBOBJS="$gl_LIBOBJS quotearg.$ac_objext"
33254
33255
33256
33257
33258
33259
33260
33261
33262
33263
33264  for ac_func in raise
33265do :
33266  ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
33267if test "x$ac_cv_func_raise" = x""yes; then :
33268  cat >>confdefs.h <<_ACEOF
33269#define HAVE_RAISE 1
33270_ACEOF
33271
33272else
33273
33274    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
33275
33276fi
33277done
33278
33279
33280
33281
33282
33283  if test $ac_cv_func_readlink = no; then
33284    HAVE_READLINK=0
33285
33286
33287
33288
33289
33290
33291
33292
33293  gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
33294
33295
33296  :
33297
33298  else
33299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
33300$as_echo_n "checking whether readlink signature is correct... " >&6; }
33301if test "${gl_cv_decl_readlink_works+set}" = set; then :
33302  $as_echo_n "(cached) " >&6
33303else
33304  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33305/* end confdefs.h.  */
33306#include <unistd.h>
33307      /* Cause compilation failure if original declaration has wrong type.  */
33308      ssize_t readlink (const char *, char *, size_t);
33309int
33310main ()
33311{
33312
33313  ;
33314  return 0;
33315}
33316_ACEOF
33317if ac_fn_c_try_compile "$LINENO"; then :
33318  gl_cv_decl_readlink_works=yes
33319else
33320  gl_cv_decl_readlink_works=no
33321fi
33322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33323fi
33324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
33325$as_echo "$gl_cv_decl_readlink_works" >&6; }
33326            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
33327$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
33328if test "${gl_cv_func_readlink_works+set}" = set; then :
33329  $as_echo_n "(cached) " >&6
33330else
33331  # We have readlink, so assume ln -s works.
33332       ln -s conftest.no-such conftest.link
33333       ln -s conftest.link conftest.lnk2
33334       if test "$cross_compiling" = yes; then :
33335  gl_cv_func_readlink_works="guessing no"
33336else
33337  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33338/* end confdefs.h.  */
33339#include <unistd.h>
33340
33341int
33342main ()
33343{
33344char buf[20];
33345      return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
33346  ;
33347  return 0;
33348}
33349_ACEOF
33350if ac_fn_c_try_run "$LINENO"; then :
33351  gl_cv_func_readlink_works=yes
33352else
33353  gl_cv_func_readlink_works=no
33354fi
33355rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33356  conftest.$ac_objext conftest.beam conftest.$ac_ext
33357fi
33358
33359      rm -f conftest.link conftest.lnk2
33360fi
33361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
33362$as_echo "$gl_cv_func_readlink_works" >&6; }
33363    if test "$gl_cv_func_readlink_works" != yes; then
33364
33365$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
33366
33367      REPLACE_READLINK=1
33368
33369
33370
33371
33372
33373
33374
33375
33376  gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
33377
33378    elif test "$gl_cv_decl_readlink_works" != yes; then
33379      REPLACE_READLINK=1
33380
33381
33382
33383
33384
33385
33386
33387
33388  gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
33389
33390    fi
33391  fi
33392
33393
33394
33395  GNULIB_READLINK=1
33396
33397
33398
33399
33400
33401
33402
33403
33404
33405
33406  gl_LIBOBJS="$gl_LIBOBJS readtokens.$ac_objext"
33407
33408
33409    :
33410
33411
33412
33413
33414
33415  if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then
33416
33417
33418
33419
33420
33421
33422
33423
33424  gl_LIBOBJS="$gl_LIBOBJS readutmp.$ac_objext"
33425
33426
33427
33428
33429    ac_fn_c_check_decl "$LINENO" "getutent" "ac_cv_have_decl_getutent" "
33430#ifdef HAVE_UTMP_H
33431# include <utmp.h>
33432#endif
33433
33434"
33435if test "x$ac_cv_have_decl_getutent" = x""yes; then :
33436  ac_have_decl=1
33437else
33438  ac_have_decl=0
33439fi
33440
33441cat >>confdefs.h <<_ACEOF
33442#define HAVE_DECL_GETUTENT $ac_have_decl
33443_ACEOF
33444
33445    utmp_includes="\
33446$ac_includes_default
33447#ifdef HAVE_UTMPX_H
33448# include <utmpx.h>
33449#endif
33450#ifdef HAVE_UTMP_H
33451# if defined _THREAD_SAFE && defined UTMP_DATA_INIT
33452   /* When including both utmp.h and utmpx.h on AIX 4.3, with _THREAD_SAFE
33453      defined, work around the duplicate struct utmp_data declaration.  */
33454#  define utmp_data gl_aix_4_3_workaround_utmp_data
33455# endif
33456# include <utmp.h>
33457#endif
33458"
33459    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_user" "ac_cv_member_struct_utmpx_ut_user" "$utmp_includes
33460"
33461if test "x$ac_cv_member_struct_utmpx_ut_user" = x""yes; then :
33462
33463cat >>confdefs.h <<_ACEOF
33464#define HAVE_STRUCT_UTMPX_UT_USER 1
33465_ACEOF
33466
33467
33468fi
33469
33470    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_user" "ac_cv_member_struct_utmp_ut_user" "$utmp_includes
33471"
33472if test "x$ac_cv_member_struct_utmp_ut_user" = x""yes; then :
33473
33474cat >>confdefs.h <<_ACEOF
33475#define HAVE_STRUCT_UTMP_UT_USER 1
33476_ACEOF
33477
33478
33479fi
33480
33481    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_name" "ac_cv_member_struct_utmpx_ut_name" "$utmp_includes
33482"
33483if test "x$ac_cv_member_struct_utmpx_ut_name" = x""yes; then :
33484
33485cat >>confdefs.h <<_ACEOF
33486#define HAVE_STRUCT_UTMPX_UT_NAME 1
33487_ACEOF
33488
33489
33490fi
33491
33492    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_name" "ac_cv_member_struct_utmp_ut_name" "$utmp_includes
33493"
33494if test "x$ac_cv_member_struct_utmp_ut_name" = x""yes; then :
33495
33496cat >>confdefs.h <<_ACEOF
33497#define HAVE_STRUCT_UTMP_UT_NAME 1
33498_ACEOF
33499
33500
33501fi
33502
33503    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_type" "ac_cv_member_struct_utmpx_ut_type" "$utmp_includes
33504"
33505if test "x$ac_cv_member_struct_utmpx_ut_type" = x""yes; then :
33506
33507cat >>confdefs.h <<_ACEOF
33508#define HAVE_STRUCT_UTMPX_UT_TYPE 1
33509_ACEOF
33510
33511
33512fi
33513
33514    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_type" "ac_cv_member_struct_utmp_ut_type" "$utmp_includes
33515"
33516if test "x$ac_cv_member_struct_utmp_ut_type" = x""yes; then :
33517
33518cat >>confdefs.h <<_ACEOF
33519#define HAVE_STRUCT_UTMP_UT_TYPE 1
33520_ACEOF
33521
33522
33523fi
33524
33525    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_pid" "ac_cv_member_struct_utmpx_ut_pid" "$utmp_includes
33526"
33527if test "x$ac_cv_member_struct_utmpx_ut_pid" = x""yes; then :
33528
33529cat >>confdefs.h <<_ACEOF
33530#define HAVE_STRUCT_UTMPX_UT_PID 1
33531_ACEOF
33532
33533
33534fi
33535
33536    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_pid" "ac_cv_member_struct_utmp_ut_pid" "$utmp_includes
33537"
33538if test "x$ac_cv_member_struct_utmp_ut_pid" = x""yes; then :
33539
33540cat >>confdefs.h <<_ACEOF
33541#define HAVE_STRUCT_UTMP_UT_PID 1
33542_ACEOF
33543
33544
33545fi
33546
33547    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_id" "ac_cv_member_struct_utmpx_ut_id" "$utmp_includes
33548"
33549if test "x$ac_cv_member_struct_utmpx_ut_id" = x""yes; then :
33550
33551cat >>confdefs.h <<_ACEOF
33552#define HAVE_STRUCT_UTMPX_UT_ID 1
33553_ACEOF
33554
33555
33556fi
33557
33558    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_id" "ac_cv_member_struct_utmp_ut_id" "$utmp_includes
33559"
33560if test "x$ac_cv_member_struct_utmp_ut_id" = x""yes; then :
33561
33562cat >>confdefs.h <<_ACEOF
33563#define HAVE_STRUCT_UTMP_UT_ID 1
33564_ACEOF
33565
33566
33567fi
33568
33569    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_exit" "ac_cv_member_struct_utmpx_ut_exit" "$utmp_includes
33570"
33571if test "x$ac_cv_member_struct_utmpx_ut_exit" = x""yes; then :
33572
33573cat >>confdefs.h <<_ACEOF
33574#define HAVE_STRUCT_UTMPX_UT_EXIT 1
33575_ACEOF
33576
33577
33578fi
33579
33580    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_exit" "ac_cv_member_struct_utmp_ut_exit" "$utmp_includes
33581"
33582if test "x$ac_cv_member_struct_utmp_ut_exit" = x""yes; then :
33583
33584cat >>confdefs.h <<_ACEOF
33585#define HAVE_STRUCT_UTMP_UT_EXIT 1
33586_ACEOF
33587
33588
33589fi
33590
33591
33592    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_exit.ut_exit" "ac_cv_member_struct_utmpx_ut_exit_ut_exit" "$utmp_includes
33593"
33594if test "x$ac_cv_member_struct_utmpx_ut_exit_ut_exit" = x""yes; then :
33595
33596cat >>confdefs.h <<_ACEOF
33597#define HAVE_STRUCT_UTMPX_UT_EXIT_UT_EXIT 1
33598_ACEOF
33599
33600
33601fi
33602
33603    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_exit.ut_exit" "ac_cv_member_struct_utmp_ut_exit_ut_exit" "$utmp_includes
33604"
33605if test "x$ac_cv_member_struct_utmp_ut_exit_ut_exit" = x""yes; then :
33606
33607cat >>confdefs.h <<_ACEOF
33608#define HAVE_STRUCT_UTMP_UT_EXIT_UT_EXIT 1
33609_ACEOF
33610
33611
33612fi
33613
33614    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_exit.e_exit" "ac_cv_member_struct_utmpx_ut_exit_e_exit" "$utmp_includes
33615"
33616if test "x$ac_cv_member_struct_utmpx_ut_exit_e_exit" = x""yes; then :
33617
33618cat >>confdefs.h <<_ACEOF
33619#define HAVE_STRUCT_UTMPX_UT_EXIT_E_EXIT 1
33620_ACEOF
33621
33622
33623fi
33624
33625    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_exit.e_exit" "ac_cv_member_struct_utmp_ut_exit_e_exit" "$utmp_includes
33626"
33627if test "x$ac_cv_member_struct_utmp_ut_exit_e_exit" = x""yes; then :
33628
33629cat >>confdefs.h <<_ACEOF
33630#define HAVE_STRUCT_UTMP_UT_EXIT_E_EXIT 1
33631_ACEOF
33632
33633
33634fi
33635
33636
33637    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_exit.ut_termination" "ac_cv_member_struct_utmpx_ut_exit_ut_termination" "$utmp_includes
33638"
33639if test "x$ac_cv_member_struct_utmpx_ut_exit_ut_termination" = x""yes; then :
33640
33641cat >>confdefs.h <<_ACEOF
33642#define HAVE_STRUCT_UTMPX_UT_EXIT_UT_TERMINATION 1
33643_ACEOF
33644
33645
33646fi
33647
33648    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_exit.ut_termination" "ac_cv_member_struct_utmp_ut_exit_ut_termination" "$utmp_includes
33649"
33650if test "x$ac_cv_member_struct_utmp_ut_exit_ut_termination" = x""yes; then :
33651
33652cat >>confdefs.h <<_ACEOF
33653#define HAVE_STRUCT_UTMP_UT_EXIT_UT_TERMINATION 1
33654_ACEOF
33655
33656
33657fi
33658
33659    ac_fn_c_check_member "$LINENO" "struct utmpx" "ut_exit.e_termination" "ac_cv_member_struct_utmpx_ut_exit_e_termination" "$utmp_includes
33660"
33661if test "x$ac_cv_member_struct_utmpx_ut_exit_e_termination" = x""yes; then :
33662
33663cat >>confdefs.h <<_ACEOF
33664#define HAVE_STRUCT_UTMPX_UT_EXIT_E_TERMINATION 1
33665_ACEOF
33666
33667
33668fi
33669
33670    ac_fn_c_check_member "$LINENO" "struct utmp" "ut_exit.e_termination" "ac_cv_member_struct_utmp_ut_exit_e_termination" "$utmp_includes
33671"
33672if test "x$ac_cv_member_struct_utmp_ut_exit_e_termination" = x""yes; then :
33673
33674cat >>confdefs.h <<_ACEOF
33675#define HAVE_STRUCT_UTMP_UT_EXIT_E_TERMINATION 1
33676_ACEOF
33677
33678
33679fi
33680
33681  fi
33682
33683  for ac_header in stdlib.h
33684do :
33685  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
33686if test "x$ac_cv_header_stdlib_h" = x""yes; then :
33687  cat >>confdefs.h <<_ACEOF
33688#define HAVE_STDLIB_H 1
33689_ACEOF
33690
33691fi
33692
33693done
33694
33695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
33696$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
33697if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then :
33698  $as_echo_n "(cached) " >&6
33699else
33700  if test "$cross_compiling" = yes; then :
33701  ac_cv_func_realloc_0_nonnull=no
33702else
33703  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33704/* end confdefs.h.  */
33705#if defined STDC_HEADERS || defined HAVE_STDLIB_H
33706# include <stdlib.h>
33707#else
33708char *realloc ();
33709#endif
33710
33711int
33712main ()
33713{
33714return ! realloc (0, 0);
33715  ;
33716  return 0;
33717}
33718_ACEOF
33719if ac_fn_c_try_run "$LINENO"; then :
33720  ac_cv_func_realloc_0_nonnull=yes
33721else
33722  ac_cv_func_realloc_0_nonnull=no
33723fi
33724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33725  conftest.$ac_objext conftest.beam conftest.$ac_ext
33726fi
33727
33728fi
33729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
33730$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
33731if test $ac_cv_func_realloc_0_nonnull = yes; then :
33732
33733$as_echo "#define HAVE_REALLOC 1" >>confdefs.h
33734
33735else
33736  $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
33737
33738
33739
33740
33741
33742
33743
33744
33745
33746  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
33747
33748
33749$as_echo "#define realloc rpl_realloc" >>confdefs.h
33750
33751fi
33752
33753
33754
33755$as_echo "#define GNULIB_REALLOC_GNU 1" >>confdefs.h
33756
33757
33758
33759  if test $gl_cv_func_malloc_posix = yes; then
33760    HAVE_REALLOC_POSIX=1
33761
33762$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
33763
33764  else
33765
33766
33767
33768
33769
33770
33771
33772
33773  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
33774
33775    HAVE_REALLOC_POSIX=0
33776  fi
33777
33778
33779
33780
33781  GNULIB_REALLOC_POSIX=1
33782
33783
33784
33785
33786
33787# Check whether --with-included-regex was given.
33788if test "${with_included_regex+set}" = set; then :
33789  withval=$with_included_regex;
33790fi
33791
33792
33793  case $with_included_regex in #(
33794  yes|no) ac_use_included_regex=$with_included_regex
33795        ;;
33796  '')
33797    # If the system regex support is good enough that it passes the
33798    # following run test, then default to *not* using the included regex.c.
33799    # If cross compiling, assume the test would fail and use the included
33800    # regex.c.
33801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
33802$as_echo_n "checking for working re_compile_pattern... " >&6; }
33803if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then :
33804  $as_echo_n "(cached) " >&6
33805else
33806  if test "$cross_compiling" = yes; then :
33807         gl_cv_func_re_compile_pattern_working=no
33808else
33809  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33810/* end confdefs.h.  */
33811$ac_includes_default
33812           #if HAVE_LOCALE_H
33813            #include <locale.h>
33814           #endif
33815           #include <limits.h>
33816           #include <regex.h>
33817
33818int
33819main ()
33820{
33821static struct re_pattern_buffer regex;
33822            unsigned char folded_chars[UCHAR_MAX + 1];
33823            int i;
33824            const char *s;
33825            struct re_registers regs;
33826
33827            #if HAVE_LOCALE_H
33828              /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
33829                 This test needs valgrind to catch the bug on Debian
33830                 GNU/Linux 3.1 x86, but it might catch the bug better
33831                 on other platforms and it shouldn't hurt to try the
33832                 test here.  */
33833              if (setlocale (LC_ALL, "en_US.UTF-8"))
33834                {
33835                  static char const pat[] = "insert into";
33836                  static char const data[] =
33837                    "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
33838                  re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
33839                                 | RE_ICASE);
33840                  memset (&regex, 0, sizeof regex);
33841                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
33842                  if (s)
33843                    return 1;
33844                  if (re_search (&regex, data, sizeof data - 1,
33845                                 0, sizeof data - 1, &regs)
33846                      != -1)
33847                    return 1;
33848                  if (! setlocale (LC_ALL, "C"))
33849                    return 1;
33850                }
33851            #endif
33852
33853            /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
33854            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
33855            memset (&regex, 0, sizeof regex);
33856            s = re_compile_pattern ("a[^x]b", 6, &regex);
33857            if (s)
33858              return 1;
33859
33860            /* This should fail, but succeeds for glibc-2.5.  */
33861            if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
33862              return 1;
33863
33864            /* This regular expression is from Spencer ere test number 75
33865               in grep-2.3.  */
33866            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
33867            memset (&regex, 0, sizeof regex);
33868            for (i = 0; i <= UCHAR_MAX; i++)
33869              folded_chars[i] = i;
33870            regex.translate = folded_chars;
33871            s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
33872            /* This should fail with _Invalid character class name_ error.  */
33873            if (!s)
33874              return 1;
33875
33876            /* This should succeed, but does not for glibc-2.1.3.  */
33877            memset (&regex, 0, sizeof regex);
33878            s = re_compile_pattern ("{1", 2, &regex);
33879
33880            if (s)
33881              return 1;
33882
33883            /* The following example is derived from a problem report
33884               against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
33885            memset (&regex, 0, sizeof regex);
33886            s = re_compile_pattern ("[an\371]*n", 7, &regex);
33887            if (s)
33888              return 1;
33889
33890            /* This should match, but does not for glibc-2.2.1.  */
33891            if (re_match (&regex, "an", 2, 0, &regs) != 2)
33892              return 1;
33893
33894            memset (&regex, 0, sizeof regex);
33895            s = re_compile_pattern ("x", 1, &regex);
33896            if (s)
33897              return 1;
33898
33899            /* glibc-2.2.93 does not work with a negative RANGE argument.  */
33900            if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
33901              return 1;
33902
33903            /* The version of regex.c in older versions of gnulib
33904               ignored RE_ICASE.  Detect that problem too.  */
33905            re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
33906            memset (&regex, 0, sizeof regex);
33907            s = re_compile_pattern ("x", 1, &regex);
33908            if (s)
33909              return 1;
33910
33911            if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
33912              return 1;
33913
33914            /* Catch a bug reported by Vin Shelton in
33915               http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
33916               */
33917            re_set_syntax (RE_SYNTAX_POSIX_BASIC
33918                           & ~RE_CONTEXT_INVALID_DUP
33919                           & ~RE_NO_EMPTY_RANGES);
33920            memset (&regex, 0, sizeof regex);
33921            s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
33922            if (s)
33923              return 1;
33924
33925            /* REG_STARTEND was added to glibc on 2004-01-15.
33926               Reject older versions.  */
33927            if (! REG_STARTEND)
33928              return 1;
33929
33930            /* Reject hosts whose regoff_t values are too narrow.
33931               These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t
33932               and 32-bit int.  */
33933            if (sizeof (regoff_t) < sizeof (ptrdiff_t)
33934                || sizeof (regoff_t) < sizeof (ssize_t))
33935              return 1;
33936
33937            return 0;
33938  ;
33939  return 0;
33940}
33941_ACEOF
33942if ac_fn_c_try_run "$LINENO"; then :
33943  gl_cv_func_re_compile_pattern_working=yes
33944else
33945  gl_cv_func_re_compile_pattern_working=no
33946fi
33947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33948  conftest.$ac_objext conftest.beam conftest.$ac_ext
33949fi
33950
33951fi
33952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
33953$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
33954    case $gl_cv_func_re_compile_pattern_working in #(
33955    yes) ac_use_included_regex=no;; #(
33956    no) ac_use_included_regex=yes;;
33957    esac
33958    ;;
33959  *) as_fn_error "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
33960    ;;
33961  esac
33962
33963  if test $ac_use_included_regex = yes; then
33964
33965$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
33966
33967
33968$as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
33969
33970
33971$as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
33972
33973
33974$as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
33975
33976
33977$as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
33978
33979
33980$as_echo "#define re_search rpl_re_search" >>confdefs.h
33981
33982
33983$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
33984
33985
33986$as_echo "#define re_match rpl_re_match" >>confdefs.h
33987
33988
33989$as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
33990
33991
33992$as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
33993
33994
33995$as_echo "#define re_comp rpl_re_comp" >>confdefs.h
33996
33997
33998$as_echo "#define re_exec rpl_re_exec" >>confdefs.h
33999
34000
34001$as_echo "#define regcomp rpl_regcomp" >>confdefs.h
34002
34003
34004$as_echo "#define regexec rpl_regexec" >>confdefs.h
34005
34006
34007$as_echo "#define regerror rpl_regerror" >>confdefs.h
34008
34009
34010$as_echo "#define regfree rpl_regfree" >>confdefs.h
34011
34012
34013
34014
34015
34016
34017
34018
34019
34020  gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
34021
34022
34023
34024
34025
34026
34027  for ac_header in libintl.h
34028do :
34029  ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
34030if test "x$ac_cv_header_libintl_h" = x""yes; then :
34031  cat >>confdefs.h <<_ACEOF
34032#define HAVE_LIBINTL_H 1
34033_ACEOF
34034
34035fi
34036
34037done
34038
34039
34040  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
34041"
34042if test "x$ac_cv_have_decl_isblank" = x""yes; then :
34043  ac_have_decl=1
34044else
34045  ac_have_decl=0
34046fi
34047
34048cat >>confdefs.h <<_ACEOF
34049#define HAVE_DECL_ISBLANK $ac_have_decl
34050_ACEOF
34051
34052
34053  fi
34054
34055
34056
34057
34058
34059
34060  if test "$gl_cv_func_rmdir_works:$gl_cv_func_unlink_works" != yes:yes; then
34061            REPLACE_REMOVE=1
34062
34063
34064
34065
34066
34067
34068
34069
34070  gl_LIBOBJS="$gl_LIBOBJS remove.$ac_objext"
34071
34072  else
34073            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether remove handles directories" >&5
34074$as_echo_n "checking whether remove handles directories... " >&6; }
34075if test "${gl_cv_func_remove_dir_works+set}" = set; then :
34076  $as_echo_n "(cached) " >&6
34077else
34078  mkdir conftest.dir
34079       if test "$cross_compiling" = yes; then :
34080  case $host_os in
34081            mingw*) gl_cv_func_remove_dir_works="guessing no";;
34082            *) gl_cv_func_remove_dir_works="guessing yes";;
34083          esac
34084else
34085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34086/* end confdefs.h.  */
34087#include <stdio.h>
34088
34089int
34090main ()
34091{
34092return remove ("conftest.dir");
34093  ;
34094  return 0;
34095}
34096_ACEOF
34097if ac_fn_c_try_run "$LINENO"; then :
34098  gl_cv_func_remove_dir_works=yes
34099else
34100  gl_cv_func_remove_dir_works=no
34101fi
34102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34103  conftest.$ac_objext conftest.beam conftest.$ac_ext
34104fi
34105
34106       rm -rf conftest.dir
34107fi
34108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_remove_dir_works" >&5
34109$as_echo "$gl_cv_func_remove_dir_works" >&6; }
34110    case $gl_cv_func_remove_dir_works in
34111      *no*) REPLACE_REMOVE=1
34112
34113
34114
34115
34116
34117
34118
34119
34120  gl_LIBOBJS="$gl_LIBOBJS remove.$ac_objext"
34121;;
34122    esac
34123  fi
34124
34125
34126
34127  GNULIB_REMOVE=1
34128
34129
34130
34131
34132
34133
34134                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
34135$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
34136if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then :
34137  $as_echo_n "(cached) " >&6
34138else
34139  rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.lnk
34140    touch conftest.f && mkdir conftest.d1 ||
34141      as_fn_error "cannot create temporary files" "$LINENO" 5
34142    # Assume that if we have lstat, we can also check symlinks.
34143    if test $ac_cv_func_lstat = yes; then
34144      ln -s conftest.f conftest.lnk
34145    fi
34146    if test "$cross_compiling" = yes; then :
34147        gl_cv_func_rename_slash_dst_works="guessing no"
34148else
34149  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34150/* end confdefs.h.  */
34151
34152#       include <stdio.h>
34153#       include <stdlib.h>
34154
34155int
34156main ()
34157{
34158if (rename ("conftest.f", "conftest.f1/") == 0) return 1;
34159     if (rename ("conftest.d1", "conftest.d2/") != 0) return 2;
34160#if HAVE_LSTAT
34161     if (rename ("conftest.f", "conftest.lnk/") == 0) return 3;
34162#endif
34163
34164  ;
34165  return 0;
34166}
34167_ACEOF
34168if ac_fn_c_try_run "$LINENO"; then :
34169  gl_cv_func_rename_slash_dst_works=yes
34170else
34171  gl_cv_func_rename_slash_dst_works=no
34172fi
34173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34174  conftest.$ac_objext conftest.beam conftest.$ac_ext
34175fi
34176
34177    rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.lnk
34178
34179fi
34180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
34181$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
34182  if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
34183
34184
34185
34186
34187
34188
34189
34190
34191  gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
34192
34193    REPLACE_RENAME=1
34194
34195$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
34196
34197  fi
34198
34199            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
34200$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
34201if test "${gl_cv_func_rename_slash_src_works+set}" = set; then :
34202  $as_echo_n "(cached) " >&6
34203else
34204  rm -rf conftest.f conftest.d1 conftest.d2 conftest.lnk
34205    touch conftest.f && mkdir conftest.d1 ||
34206      as_fn_error "cannot create temporary files" "$LINENO" 5
34207    # Assume that if we have lstat, we can also check symlinks.
34208    if test $ac_cv_func_lstat = yes; then
34209      ln -s conftest.f conftest.lnk
34210    fi
34211    if test "$cross_compiling" = yes; then :
34212        gl_cv_func_rename_slash_src_works="guessing no"
34213else
34214  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34215/* end confdefs.h.  */
34216
34217#       include <stdio.h>
34218#       include <stdlib.h>
34219
34220int
34221main ()
34222{
34223if (rename ("conftest.f/", "conftest.d2") == 0) return 1;
34224     if (rename ("conftest.d1/", "conftest.d2") != 0) return 2;
34225#if HAVE_LSTAT
34226     if (rename ("conftest.lnk/", "conftest.f") == 0) return 3;
34227#endif
34228
34229  ;
34230  return 0;
34231}
34232_ACEOF
34233if ac_fn_c_try_run "$LINENO"; then :
34234  gl_cv_func_rename_slash_src_works=yes
34235else
34236  gl_cv_func_rename_slash_src_works=no
34237fi
34238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34239  conftest.$ac_objext conftest.beam conftest.$ac_ext
34240fi
34241
34242    rm -rf conftest.f conftest.d1 conftest.d2 conftest.lnk
34243
34244fi
34245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
34246$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
34247  if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
34248
34249
34250
34251
34252
34253
34254
34255
34256  gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
34257
34258    REPLACE_RENAME=1
34259
34260$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
34261
34262  fi
34263
34264        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
34265$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
34266if test "${gl_cv_func_rename_link_works+set}" = set; then :
34267  $as_echo_n "(cached) " >&6
34268else
34269  rm -rf conftest.f conftest.f1
34270    if touch conftest.f && ln conftest.f conftest.f1 &&
34271        set x `ls -i conftest.f conftest.f1` && test "" = ""; then
34272      if test "$cross_compiling" = yes; then :
34273          gl_cv_func_rename_link_works="guessing no"
34274else
34275  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34276/* end confdefs.h.  */
34277
34278#       include <stdio.h>
34279#       include <stdlib.h>
34280#       include <unistd.h>
34281
34282int
34283main ()
34284{
34285if (rename ("conftest.f", "conftest.f1")) return 1;
34286     if (unlink ("conftest.f1")) return 2;
34287     if (rename ("conftest.f", "conftest.f")) return 3;
34288     if (rename ("conftest.f1", "conftest.f1") == 0) return 4;
34289  ;
34290  return 0;
34291}
34292_ACEOF
34293if ac_fn_c_try_run "$LINENO"; then :
34294  gl_cv_func_rename_link_works=yes
34295else
34296  gl_cv_func_rename_link_works=no
34297fi
34298rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34299  conftest.$ac_objext conftest.beam conftest.$ac_ext
34300fi
34301
34302    else
34303      gl_cv_func_rename_link_works="guessing no"
34304    fi
34305    rm -rf conftest.f conftest.f1
34306
34307fi
34308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
34309$as_echo "$gl_cv_func_rename_link_works" >&6; }
34310  if test "x$gl_cv_func_rename_link_works" != xyes; then
34311
34312
34313
34314
34315
34316
34317
34318
34319  gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
34320
34321    REPLACE_RENAME=1
34322
34323$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
34324
34325  fi
34326
34327          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
34328$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
34329if test "${gl_cv_func_rename_dest_works+set}" = set; then :
34330  $as_echo_n "(cached) " >&6
34331else
34332  rm -rf conftest.f conftest.d1 conftest.d2
34333    touch conftest.f && mkdir conftest.d1 conftest.d2 ||
34334      as_fn_error "cannot create temporary files" "$LINENO" 5
34335    if test "$cross_compiling" = yes; then :
34336        gl_cv_func_rename_dest_works="guessing no"
34337else
34338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34339/* end confdefs.h.  */
34340
34341#       include <stdio.h>
34342#       include <stdlib.h>
34343
34344int
34345main ()
34346{
34347if (rename ("conftest.d1", "conftest.d2") != 0) return 1;
34348     if (rename ("conftest.d2", "conftest.f") == 0) return 2;
34349  ;
34350  return 0;
34351}
34352_ACEOF
34353if ac_fn_c_try_run "$LINENO"; then :
34354  gl_cv_func_rename_dest_works=yes
34355else
34356  gl_cv_func_rename_dest_works=no
34357fi
34358rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34359  conftest.$ac_objext conftest.beam conftest.$ac_ext
34360fi
34361
34362    rm -rf conftest.f conftest.d1 conftest.d2
34363
34364fi
34365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
34366$as_echo "$gl_cv_func_rename_dest_works" >&6; }
34367  if test "x$gl_cv_func_rename_dest_works" != xyes; then
34368
34369
34370
34371
34372
34373
34374
34375
34376  gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
34377
34378    REPLACE_RENAME=1
34379
34380$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
34381
34382  fi
34383
34384
34385
34386  GNULIB_RENAME=1
34387
34388
34389
34390
34391
34392
34393
34394
34395
34396
34397
34398
34399  for ac_func in rmdir
34400do :
34401  ac_fn_c_check_func "$LINENO" "rmdir" "ac_cv_func_rmdir"
34402if test "x$ac_cv_func_rmdir" = x""yes; then :
34403  cat >>confdefs.h <<_ACEOF
34404#define HAVE_RMDIR 1
34405_ACEOF
34406
34407else
34408
34409    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
34410
34411fi
34412done
34413
34414
34415  if test $ac_cv_func_rmdir = no; then
34416    REPLACE_RMDIR=1
34417    # If someone lacks rmdir, make configure fail, and request
34418    # a bug report to inform us about it.
34419    if test x"$SKIP_RMDIR_CHECK" != xyes; then
34420      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34421$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34422as_fn_error "Your system lacks the rmdir function.
34423              Please report this, along with the output of \"uname -a\", to the
34424              bug-coreutils@gnu.org mailing list.  To continue past this point,
34425              rerun configure with SKIP_RMDIR_CHECK=yes.
34426              E.g., ./configure SKIP_RMDIR_CHECK=yes
34427See \`config.log' for more details." "$LINENO" 5; }
34428    fi
34429  else
34430        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
34431$as_echo_n "checking whether rmdir works... " >&6; }
34432if test "${gl_cv_func_rmdir_works+set}" = set; then :
34433  $as_echo_n "(cached) " >&6
34434else
34435  mkdir conftest.dir
34436       touch conftest.file
34437       if test "$cross_compiling" = yes; then :
34438  gl_cv_func_rmdir_works="guessing no"
34439else
34440  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34441/* end confdefs.h.  */
34442#include <stdio.h>
34443             #include <errno.h>
34444             #include <unistd.h>
34445
34446int
34447main ()
34448{
34449return !rmdir ("conftest.file/") || errno != ENOTDIR
34450       || !rmdir ("conftest.dir/./");
34451  ;
34452  return 0;
34453}
34454_ACEOF
34455if ac_fn_c_try_run "$LINENO"; then :
34456  gl_cv_func_rmdir_works=yes
34457else
34458  gl_cv_func_rmdir_works=no
34459fi
34460rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34461  conftest.$ac_objext conftest.beam conftest.$ac_ext
34462fi
34463
34464       rm -rf conftest.dir conftest.file
34465fi
34466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
34467$as_echo "$gl_cv_func_rmdir_works" >&6; }
34468    if test x"$gl_cv_func_rmdir_works" != xyes; then
34469      REPLACE_RMDIR=1
34470
34471
34472
34473
34474
34475
34476
34477
34478  gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
34479
34480    fi
34481  fi
34482
34483
34484
34485  GNULIB_RMDIR=1
34486
34487
34488
34489
34490
34491
34492
34493
34494
34495
34496  gl_LIBOBJS="$gl_LIBOBJS root-dev-ino.$ac_objext"
34497
34498
34499
34500  :
34501
34502
34503
34504
34505
34506
34507
34508
34509
34510
34511
34512
34513
34514  for ac_func in rpmatch
34515do :
34516  ac_fn_c_check_func "$LINENO" "rpmatch" "ac_cv_func_rpmatch"
34517if test "x$ac_cv_func_rpmatch" = x""yes; then :
34518  cat >>confdefs.h <<_ACEOF
34519#define HAVE_RPMATCH 1
34520_ACEOF
34521
34522else
34523
34524    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
34525
34526fi
34527done
34528
34529
34530  if test $ac_cv_func_rpmatch = no; then
34531    HAVE_RPMATCH=0
34532
34533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and YESEXPR" >&5
34534$as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; }
34535if test "${gl_cv_langinfo_yesexpr+set}" = set; then :
34536  $as_echo_n "(cached) " >&6
34537else
34538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34539/* end confdefs.h.  */
34540#include <langinfo.h>
34541int
34542main ()
34543{
34544char* cs = nl_langinfo(YESEXPR); return !cs;
34545  ;
34546  return 0;
34547}
34548_ACEOF
34549if ac_fn_c_try_link "$LINENO"; then :
34550  gl_cv_langinfo_yesexpr=yes
34551else
34552  gl_cv_langinfo_yesexpr=no
34553fi
34554rm -f core conftest.err conftest.$ac_objext \
34555    conftest$ac_exeext conftest.$ac_ext
34556
34557fi
34558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_langinfo_yesexpr" >&5
34559$as_echo "$gl_cv_langinfo_yesexpr" >&6; }
34560  if test $gl_cv_langinfo_yesexpr = yes; then
34561
34562$as_echo "#define HAVE_LANGINFO_YESEXPR 1" >>confdefs.h
34563
34564  fi
34565
34566  fi
34567
34568
34569
34570  GNULIB_RPMATCH=1
34571
34572
34573
34574
34575
34576
34577
34578
34579
34580
34581  gl_LIBOBJS="$gl_LIBOBJS safe-read.$ac_objext"
34582
34583
34584
34585
34586
34587
34588
34589
34590
34591
34592
34593
34594
34595
34596
34597  gl_LIBOBJS="$gl_LIBOBJS safe-write.$ac_objext"
34598
34599
34600
34601
34602
34603
34604
34605
34606
34607
34608
34609
34610
34611
34612
34613
34614
34615  gl_LIBOBJS="$gl_LIBOBJS same.$ac_objext"
34616
34617
34618
34619
34620
34621
34622
34623
34624
34625
34626
34627
34628
34629
34630  gl_LIBOBJS="$gl_LIBOBJS save-cwd.$ac_objext"
34631
34632
34633
34634
34635
34636
34637
34638
34639
34640
34641
34642
34643  gl_LIBOBJS="$gl_LIBOBJS savedir.$ac_objext"
34644
34645
34646
34647
34648
34649
34650  if test "$ac_cv_header_winsock2_h" = yes; then
34651
34652
34653
34654
34655
34656
34657
34658
34659  gl_LIBOBJS="$gl_LIBOBJS select.$ac_objext"
34660
34661  else
34662
34663    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
34664$as_echo_n "checking whether select supports a 0 argument... " >&6; }
34665if test "${gl_cv_func_select_supports0+set}" = set; then :
34666  $as_echo_n "(cached) " >&6
34667else
34668
34669        if test "$cross_compiling" = yes; then :
34670
34671           case "$host_os" in
34672                       # Guess no on Interix.
34673             interix*) gl_cv_func_select_supports0="guessing no";;
34674                       # Guess yes otherwise.
34675             *)        gl_cv_func_select_supports0="guessing yes";;
34676           esac
34677
34678else
34679  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34680/* end confdefs.h.  */
34681
34682#include <sys/types.h>
34683#include <sys/time.h>
34684#if HAVE_SYS_SELECT_H
34685#include <sys/select.h>
34686#endif
34687int main ()
34688{
34689  struct timeval timeout;
34690  timeout.tv_sec = 0;
34691  timeout.tv_usec = 5;
34692  return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
34693}
34694_ACEOF
34695if ac_fn_c_try_run "$LINENO"; then :
34696  gl_cv_func_select_supports0=yes
34697else
34698  gl_cv_func_select_supports0=no
34699fi
34700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34701  conftest.$ac_objext conftest.beam conftest.$ac_ext
34702fi
34703
34704
34705fi
34706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
34707$as_echo "$gl_cv_func_select_supports0" >&6; }
34708    case "$gl_cv_func_select_supports0" in
34709      *yes) ;;
34710      *)
34711        REPLACE_SELECT=1
34712
34713
34714
34715
34716
34717
34718
34719
34720  gl_LIBOBJS="$gl_LIBOBJS select.$ac_objext"
34721
34722        ;;
34723    esac
34724  fi
34725
34726
34727
34728  GNULIB_SELECT=1
34729
34730  for ac_header in selinux/flask.h
34731do :
34732  ac_fn_c_check_header_mongrel "$LINENO" "selinux/flask.h" "ac_cv_header_selinux_flask_h" "$ac_includes_default"
34733if test "x$ac_cv_header_selinux_flask_h" = x""yes; then :
34734  cat >>confdefs.h <<_ACEOF
34735#define HAVE_SELINUX_FLASK_H 1
34736_ACEOF
34737
34738fi
34739
34740done
34741
34742
34743
34744
34745
34746
34747
34748
34749
34750  gl_LIBOBJS="$gl_LIBOBJS selinux-at.$ac_objext"
34751
34752
34753
34754  for ac_header in selinux/selinux.h
34755do :
34756  ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
34757if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then :
34758  cat >>confdefs.h <<_ACEOF
34759#define HAVE_SELINUX_SELINUX_H 1
34760_ACEOF
34761
34762fi
34763
34764done
34765
34766
34767  if test "$ac_cv_header_selinux_selinux_h" = yes; then
34768    # We do have <selinux/selinux.h>, so do compile getfilecon.c
34769    # and arrange to use its wrappers.
34770
34771
34772
34773
34774
34775
34776
34777
34778  gl_LIBOBJS="$gl_LIBOBJS getfilecon.$ac_objext"
34779
34780
34781
34782
34783
34784
34785
34786     if test $gl_cv_have_include_next = yes; then
34787       gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
34788     else
34789       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <selinux/selinux.h>" >&5
34790$as_echo_n "checking absolute name of <selinux/selinux.h>... " >&6; }
34791if test "${gl_cv_next_selinux_selinux_h+set}" = set; then :
34792  $as_echo_n "(cached) " >&6
34793else
34794
34795          if test $ac_cv_header_selinux_selinux_h = yes; then
34796            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34797/* end confdefs.h.  */
34798#include <selinux/selinux.h>
34799
34800_ACEOF
34801                                                                                                case "$host_os" in
34802              aix*) gl_absname_cpp="$ac_cpp -C" ;;
34803              *)    gl_absname_cpp="$ac_cpp" ;;
34804            esac
34805                                                gl_cv_next_selinux_selinux_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
34806               sed -n '\#/selinux/selinux.h#{
34807                 s#.*"\(.*/selinux/selinux.h\)".*#\1#
34808                 s#^/[^/]#//&#
34809                 p
34810                 q
34811               }'`'"'
34812          else
34813            gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
34814          fi
34815
34816fi
34817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5
34818$as_echo "$gl_cv_next_selinux_selinux_h" >&6; }
34819     fi
34820     NEXT_SELINUX_SELINUX_H=$gl_cv_next_selinux_selinux_h
34821
34822     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
34823       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
34824       gl_next_as_first_directive='<'selinux/selinux.h'>'
34825     else
34826       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
34827       gl_next_as_first_directive=$gl_cv_next_selinux_selinux_h
34828     fi
34829     NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H=$gl_next_as_first_directive
34830
34831
34832
34833
34834$as_echo "#define getfilecon rpl_getfilecon" >>confdefs.h
34835
34836
34837$as_echo "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h
34838
34839
34840$as_echo "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h
34841
34842  fi
34843
34844  case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
34845    no:*) # already warned
34846      ;;
34847    *:no)
34848      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5
34849$as_echo "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;}
34850      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU coreutils will be compiled without SELinux support." >&5
34851$as_echo "$as_me: WARNING: GNU coreutils will be compiled without SELinux support." >&2;}
34852  esac
34853
34854
34855  for ac_header in selinux/context.h
34856do :
34857  ac_fn_c_check_header_mongrel "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default"
34858if test "x$ac_cv_header_selinux_context_h" = x""yes; then :
34859  cat >>confdefs.h <<_ACEOF
34860#define HAVE_SELINUX_CONTEXT_H 1
34861_ACEOF
34862 SELINUX_CONTEXT_H=
34863else
34864  SELINUX_CONTEXT_H=selinux/context.h
34865fi
34866
34867done
34868
34869
34870
34871
34872
34873                      SERVENT_LIB=
34874  gl_saved_libs="$LIBS"
34875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getservbyname" >&5
34876$as_echo_n "checking for library containing getservbyname... " >&6; }
34877if test "${ac_cv_search_getservbyname+set}" = set; then :
34878  $as_echo_n "(cached) " >&6
34879else
34880  ac_func_search_save_LIBS=$LIBS
34881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34882/* end confdefs.h.  */
34883
34884/* Override any GCC internal prototype to avoid an error.
34885   Use char because int might match the return type of a GCC
34886   builtin and then its argument prototype would still apply.  */
34887#ifdef __cplusplus
34888extern "C"
34889#endif
34890char getservbyname ();
34891int
34892main ()
34893{
34894return getservbyname ();
34895  ;
34896  return 0;
34897}
34898_ACEOF
34899for ac_lib in '' socket network net; do
34900  if test -z "$ac_lib"; then
34901    ac_res="none required"
34902  else
34903    ac_res=-l$ac_lib
34904    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
34905  fi
34906  if ac_fn_c_try_link "$LINENO"; then :
34907  ac_cv_search_getservbyname=$ac_res
34908fi
34909rm -f core conftest.err conftest.$ac_objext \
34910    conftest$ac_exeext
34911  if test "${ac_cv_search_getservbyname+set}" = set; then :
34912  break
34913fi
34914done
34915if test "${ac_cv_search_getservbyname+set}" = set; then :
34916
34917else
34918  ac_cv_search_getservbyname=no
34919fi
34920rm conftest.$ac_ext
34921LIBS=$ac_func_search_save_LIBS
34922fi
34923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getservbyname" >&5
34924$as_echo "$ac_cv_search_getservbyname" >&6; }
34925ac_res=$ac_cv_search_getservbyname
34926if test "$ac_res" != no; then :
34927  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
34928  if test "$ac_cv_search_getservbyname" != "none required"; then
34929       SERVENT_LIB="$ac_cv_search_getservbyname"
34930     fi
34931fi
34932
34933  LIBS="$gl_saved_libs"
34934  if test -z "$SERVENT_LIB"; then
34935    for ac_func in getservbyname
34936do :
34937  ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname"
34938if test "x$ac_cv_func_getservbyname" = x""yes; then :
34939  cat >>confdefs.h <<_ACEOF
34940#define HAVE_GETSERVBYNAME 1
34941_ACEOF
34942
34943else
34944
34945      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getservbyname in winsock2.h and -lws2_32" >&5
34946$as_echo_n "checking for getservbyname in winsock2.h and -lws2_32... " >&6; }
34947if test "${gl_cv_w32_getservbyname+set}" = set; then :
34948  $as_echo_n "(cached) " >&6
34949else
34950  gl_cv_w32_getservbyname=no
34951         gl_save_LIBS="$LIBS"
34952         LIBS="$LIBS -lws2_32"
34953         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34954/* end confdefs.h.  */
34955
34956#ifdef HAVE_WINSOCK2_H
34957#include <winsock2.h>
34958#endif
34959#include <stddef.h>
34960
34961int
34962main ()
34963{
34964getservbyname(NULL,NULL);
34965  ;
34966  return 0;
34967}
34968_ACEOF
34969if ac_fn_c_try_link "$LINENO"; then :
34970  gl_cv_w32_getservbyname=yes
34971fi
34972rm -f core conftest.err conftest.$ac_objext \
34973    conftest$ac_exeext conftest.$ac_ext
34974         LIBS="$gl_save_LIBS"
34975
34976fi
34977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_getservbyname" >&5
34978$as_echo "$gl_cv_w32_getservbyname" >&6; }
34979      if test "$gl_cv_w32_getservbyname" = "yes"; then
34980        SERVENT_LIB="-lws2_32"
34981      fi
34982
34983fi
34984done
34985
34986  fi
34987
34988
34989
34990
34991  if test $HAVE_SETENV$REPLACE_SETENV != 10; then
34992
34993
34994
34995
34996
34997
34998
34999
35000  gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
35001
35002  fi
35003
35004
35005
35006  GNULIB_SETENV=1
35007
35008
35009
35010
35011
35012
35013
35014
35015
35016
35017  gl_LIBOBJS="$gl_LIBOBJS settime.$ac_objext"
35018
35019
35020
35021
35022
35023
35024
35025
35026
35027
35028
35029
35030
35031
35032
35033
35034  for ac_func in sig2str
35035do :
35036  ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
35037if test "x$ac_cv_func_sig2str" = x""yes; then :
35038  cat >>confdefs.h <<_ACEOF
35039#define HAVE_SIG2STR 1
35040_ACEOF
35041
35042else
35043
35044    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
35045
35046fi
35047done
35048
35049
35050  if test $ac_cv_func_sig2str = no; then
35051
35052  :
35053
35054  fi
35055
35056
35057
35058
35059  if test $ac_cv_func_sigaction = yes; then
35060    ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
35061"
35062if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = x""yes; then :
35063
35064cat >>confdefs.h <<_ACEOF
35065#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
35066_ACEOF
35067
35068
35069fi
35070
35071    if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
35072      HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
35073    fi
35074  else
35075    HAVE_SIGACTION=0
35076
35077
35078
35079
35080
35081
35082
35083
35084  gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext"
35085
35086
35087
35088
35089
35090
35091
35092  ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
35093#include <signal.h>
35094
35095"
35096if test "x$ac_cv_type_siginfo_t" = x""yes; then :
35097
35098cat >>confdefs.h <<_ACEOF
35099#define HAVE_SIGINFO_T 1
35100_ACEOF
35101
35102
35103fi
35104
35105  if test $ac_cv_type_siginfo_t = no; then
35106    HAVE_SIGINFO_T=0
35107  fi
35108
35109  fi
35110
35111
35112
35113  GNULIB_SIGACTION=1
35114
35115
35116
35117
35118
35119
35120
35121
35122
35123     if test $gl_cv_have_include_next = yes; then
35124       gl_cv_next_signal_h='<'signal.h'>'
35125     else
35126       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
35127$as_echo_n "checking absolute name of <signal.h>... " >&6; }
35128if test "${gl_cv_next_signal_h+set}" = set; then :
35129  $as_echo_n "(cached) " >&6
35130else
35131
35132          if test $ac_cv_header_signal_h = yes; then
35133            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35134/* end confdefs.h.  */
35135#include <signal.h>
35136
35137_ACEOF
35138                                                                                                case "$host_os" in
35139              aix*) gl_absname_cpp="$ac_cpp -C" ;;
35140              *)    gl_absname_cpp="$ac_cpp" ;;
35141            esac
35142                                                gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
35143               sed -n '\#/signal.h#{
35144                 s#.*"\(.*/signal.h\)".*#\1#
35145                 s#^/[^/]#//&#
35146                 p
35147                 q
35148               }'`'"'
35149          else
35150            gl_cv_next_signal_h='<'signal.h'>'
35151          fi
35152
35153fi
35154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
35155$as_echo "$gl_cv_next_signal_h" >&6; }
35156     fi
35157     NEXT_SIGNAL_H=$gl_cv_next_signal_h
35158
35159     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
35160       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
35161       gl_next_as_first_directive='<'signal.h'>'
35162     else
35163       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
35164       gl_next_as_first_directive=$gl_cv_next_signal_h
35165     fi
35166     NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
35167
35168
35169
35170# AIX declares sig_atomic_t to already include volatile, and C89 compilers
35171# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
35172  ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
35173#include <signal.h>
35174
35175"
35176if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
35177
35178else
35179  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
35180fi
35181
35182
35183
35184
35185
35186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
35187$as_echo_n "checking for signbit macro... " >&6; }
35188if test "${gl_cv_func_signbit+set}" = set; then :
35189  $as_echo_n "(cached) " >&6
35190else
35191
35192      if test "$cross_compiling" = yes; then :
35193  gl_cv_func_signbit="guessing no"
35194else
35195  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35196/* end confdefs.h.  */
35197
35198#include <math.h>
35199/* If signbit is defined as a function, don't use it, since calling it for
35200   'float' or 'long double' arguments would involve conversions.
35201   If signbit is not declared at all but exists as a library function, don't
35202   use it, since the prototype may not match.
35203   If signbit is not declared at all but exists as a compiler built-in, don't
35204   use it, since it's preferable to use __builtin_signbit* (no warnings,
35205   no conversions).  */
35206#ifndef signbit
35207# error "signbit should be a macro"
35208#endif
35209#include <string.h>
35210
35211/* Global variables.
35212   Needed because GCC 4 constant-folds __builtin_signbitl (literal)
35213   but cannot constant-fold            __builtin_signbitl (variable).  */
35214float vf;
35215double vd;
35216long double vl;
35217int main ()
35218{
35219/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
35220   So we use -p0f and -p0d instead.  */
35221float p0f = 0.0f;
35222float m0f = -p0f;
35223double p0d = 0.0;
35224double m0d = -p0d;
35225/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
35226   So we use another constant expression instead.
35227   But that expression does not work on other platforms, such as when
35228   cross-compiling to PowerPC on MacOS X 10.5.  */
35229long double p0l = 0.0L;
35230#if defined __hpux || defined __sgi
35231long double m0l = -LDBL_MIN * LDBL_MIN;
35232#else
35233long double m0l = -p0l;
35234#endif
35235  if (signbit (vf))
35236    vf++;
35237  {
35238    float plus_inf = 1.0f / p0f;
35239    float minus_inf = -1.0f / p0f;
35240    if (!(!signbit (255.0f)
35241          && signbit (-255.0f)
35242          && !signbit (p0f)
35243          && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
35244          && !signbit (plus_inf)
35245          && signbit (minus_inf)))
35246      return 1;
35247  }
35248  if (signbit (vd))
35249    vd++;
35250  {
35251    double plus_inf = 1.0 / p0d;
35252    double minus_inf = -1.0 / p0d;
35253    if (!(!signbit (255.0)
35254          && signbit (-255.0)
35255          && !signbit (p0d)
35256          && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
35257          && !signbit (plus_inf)
35258          && signbit (minus_inf)))
35259      return 1;
35260  }
35261  if (signbit (vl))
35262    vl++;
35263  {
35264    long double plus_inf = 1.0L / p0l;
35265    long double minus_inf = -1.0L / p0l;
35266    if (!(!signbit (255.0L)
35267          && signbit (-255.0L)
35268          && !signbit (p0l)
35269          && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))
35270          && !signbit (plus_inf)
35271          && signbit (minus_inf)))
35272      return 1;
35273  }
35274  return 0;
35275}
35276
35277
35278_ACEOF
35279if ac_fn_c_try_run "$LINENO"; then :
35280  gl_cv_func_signbit=yes
35281else
35282  gl_cv_func_signbit=no
35283fi
35284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35285  conftest.$ac_objext conftest.beam conftest.$ac_ext
35286fi
35287
35288
35289fi
35290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
35291$as_echo "$gl_cv_func_signbit" >&6; }
35292          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
35293$as_echo_n "checking for signbit compiler built-ins... " >&6; }
35294if test "${gl_cv_func_signbit_gcc+set}" = set; then :
35295  $as_echo_n "(cached) " >&6
35296else
35297
35298      if test "$cross_compiling" = yes; then :
35299  gl_cv_func_signbit_gcc="guessing no"
35300else
35301  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35302/* end confdefs.h.  */
35303
35304#if __GNUC__ >= 4
35305# define signbit(x) \
35306   (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
35307    sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
35308    __builtin_signbitf (x))
35309#else
35310# error "signbit should be three compiler built-ins"
35311#endif
35312#include <string.h>
35313
35314/* Global variables.
35315   Needed because GCC 4 constant-folds __builtin_signbitl (literal)
35316   but cannot constant-fold            __builtin_signbitl (variable).  */
35317float vf;
35318double vd;
35319long double vl;
35320int main ()
35321{
35322/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
35323   So we use -p0f and -p0d instead.  */
35324float p0f = 0.0f;
35325float m0f = -p0f;
35326double p0d = 0.0;
35327double m0d = -p0d;
35328/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
35329   So we use another constant expression instead.
35330   But that expression does not work on other platforms, such as when
35331   cross-compiling to PowerPC on MacOS X 10.5.  */
35332long double p0l = 0.0L;
35333#if defined __hpux || defined __sgi
35334long double m0l = -LDBL_MIN * LDBL_MIN;
35335#else
35336long double m0l = -p0l;
35337#endif
35338  if (signbit (vf))
35339    vf++;
35340  {
35341    float plus_inf = 1.0f / p0f;
35342    float minus_inf = -1.0f / p0f;
35343    if (!(!signbit (255.0f)
35344          && signbit (-255.0f)
35345          && !signbit (p0f)
35346          && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
35347          && !signbit (plus_inf)
35348          && signbit (minus_inf)))
35349      return 1;
35350  }
35351  if (signbit (vd))
35352    vd++;
35353  {
35354    double plus_inf = 1.0 / p0d;
35355    double minus_inf = -1.0 / p0d;
35356    if (!(!signbit (255.0)
35357          && signbit (-255.0)
35358          && !signbit (p0d)
35359          && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
35360          && !signbit (plus_inf)
35361          && signbit (minus_inf)))
35362      return 1;
35363  }
35364  if (signbit (vl))
35365    vl++;
35366  {
35367    long double plus_inf = 1.0L / p0l;
35368    long double minus_inf = -1.0L / p0l;
35369    if (!(!signbit (255.0L)
35370          && signbit (-255.0L)
35371          && !signbit (p0l)
35372          && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))
35373          && !signbit (plus_inf)
35374          && signbit (minus_inf)))
35375      return 1;
35376  }
35377  return 0;
35378}
35379
35380
35381_ACEOF
35382if ac_fn_c_try_run "$LINENO"; then :
35383  gl_cv_func_signbit_gcc=yes
35384else
35385  gl_cv_func_signbit_gcc=no
35386fi
35387rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35388  conftest.$ac_objext conftest.beam conftest.$ac_ext
35389fi
35390
35391
35392fi
35393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
35394$as_echo "$gl_cv_func_signbit_gcc" >&6; }
35395      if test "$gl_cv_func_signbit_gcc" = yes; then
35396    REPLACE_SIGNBIT_USING_GCC=1
35397  else
35398    if test "$gl_cv_func_signbit" != yes; then
35399      REPLACE_SIGNBIT=1
35400
35401
35402
35403
35404
35405
35406
35407
35408  gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext"
35409
35410
35411
35412
35413
35414
35415
35416
35417
35418  gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext"
35419
35420
35421
35422
35423
35424
35425
35426
35427
35428  gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext"
35429
35430
35431
35432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
35433$as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
35434if test "${gl_cv_cc_float_signbit+set}" = set; then :
35435  $as_echo_n "(cached) " >&6
35436else
35437
35438      if test "$cross_compiling" = yes; then :
35439
35440                              gl_cv_cc_float_signbit="unknown"
35441
35442else
35443  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35444/* end confdefs.h.  */
35445
35446#include <stddef.h>
35447#include <stdio.h>
35448#define NWORDS \
35449  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
35450typedef union { float value; unsigned int word[NWORDS]; }
35451        memory_float;
35452static memory_float plus = { 1.0f };
35453static memory_float minus = { -1.0f };
35454int main ()
35455{
35456  size_t j, k, i;
35457  unsigned int m;
35458  FILE *fp = fopen ("conftest.out", "w");
35459  if (fp == NULL)
35460    return 1;
35461  /* Find the different bit.  */
35462  k = 0; m = 0;
35463  for (j = 0; j < NWORDS; j++)
35464    {
35465      unsigned int x = plus.word[j] ^ minus.word[j];
35466      if ((x & (x - 1)) || (x && m))
35467        {
35468          /* More than one bit difference.  */
35469          fprintf (fp, "unknown");
35470          return 1;
35471        }
35472      if (x)
35473        {
35474          k = j;
35475          m = x;
35476        }
35477    }
35478  if (m == 0)
35479    {
35480      /* No difference.  */
35481      fprintf (fp, "unknown");
35482      return 1;
35483    }
35484  /* Now m = plus.word[k] ^ ~minus.word[k].  */
35485  if (plus.word[k] & ~minus.word[k])
35486    {
35487      /* Oh? The sign bit is set in the positive and cleared in the negative
35488         numbers?  */
35489      fprintf (fp, "unknown");
35490      return 1;
35491    }
35492  for (i = 0; ; i++)
35493    if ((m >> i) & 1)
35494      break;
35495  fprintf (fp, "word %d bit %d", (int) k, (int) i);
35496  return (fclose (fp) != 0);
35497}
35498
35499_ACEOF
35500if ac_fn_c_try_run "$LINENO"; then :
35501  gl_cv_cc_float_signbit=`cat conftest.out`
35502else
35503  gl_cv_cc_float_signbit="unknown"
35504fi
35505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35506  conftest.$ac_objext conftest.beam conftest.$ac_ext
35507fi
35508
35509      rm -f conftest.out
35510
35511fi
35512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
35513$as_echo "$gl_cv_cc_float_signbit" >&6; }
35514  case "$gl_cv_cc_float_signbit" in
35515    word*bit*)
35516      word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
35517      bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
35518
35519cat >>confdefs.h <<_ACEOF
35520#define FLT_SIGNBIT_WORD $word
35521_ACEOF
35522
35523
35524cat >>confdefs.h <<_ACEOF
35525#define FLT_SIGNBIT_BIT $bit
35526_ACEOF
35527
35528      ;;
35529  esac
35530
35531
35532
35533
35534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
35535$as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
35536if test "${gl_cv_cc_double_signbit+set}" = set; then :
35537  $as_echo_n "(cached) " >&6
35538else
35539
35540      if test "$cross_compiling" = yes; then :
35541
35542                              gl_cv_cc_double_signbit="unknown"
35543
35544else
35545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35546/* end confdefs.h.  */
35547
35548#include <stddef.h>
35549#include <stdio.h>
35550#define NWORDS \
35551  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
35552typedef union { double value; unsigned int word[NWORDS]; }
35553        memory_float;
35554static memory_float plus = { 1.0 };
35555static memory_float minus = { -1.0 };
35556int main ()
35557{
35558  size_t j, k, i;
35559  unsigned int m;
35560  FILE *fp = fopen ("conftest.out", "w");
35561  if (fp == NULL)
35562    return 1;
35563  /* Find the different bit.  */
35564  k = 0; m = 0;
35565  for (j = 0; j < NWORDS; j++)
35566    {
35567      unsigned int x = plus.word[j] ^ minus.word[j];
35568      if ((x & (x - 1)) || (x && m))
35569        {
35570          /* More than one bit difference.  */
35571          fprintf (fp, "unknown");
35572          return 1;
35573        }
35574      if (x)
35575        {
35576          k = j;
35577          m = x;
35578        }
35579    }
35580  if (m == 0)
35581    {
35582      /* No difference.  */
35583      fprintf (fp, "unknown");
35584      return 1;
35585    }
35586  /* Now m = plus.word[k] ^ ~minus.word[k].  */
35587  if (plus.word[k] & ~minus.word[k])
35588    {
35589      /* Oh? The sign bit is set in the positive and cleared in the negative
35590         numbers?  */
35591      fprintf (fp, "unknown");
35592      return 1;
35593    }
35594  for (i = 0; ; i++)
35595    if ((m >> i) & 1)
35596      break;
35597  fprintf (fp, "word %d bit %d", (int) k, (int) i);
35598  return (fclose (fp) != 0);
35599}
35600
35601_ACEOF
35602if ac_fn_c_try_run "$LINENO"; then :
35603  gl_cv_cc_double_signbit=`cat conftest.out`
35604else
35605  gl_cv_cc_double_signbit="unknown"
35606fi
35607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35608  conftest.$ac_objext conftest.beam conftest.$ac_ext
35609fi
35610
35611      rm -f conftest.out
35612
35613fi
35614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
35615$as_echo "$gl_cv_cc_double_signbit" >&6; }
35616  case "$gl_cv_cc_double_signbit" in
35617    word*bit*)
35618      word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
35619      bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
35620
35621cat >>confdefs.h <<_ACEOF
35622#define DBL_SIGNBIT_WORD $word
35623_ACEOF
35624
35625
35626cat >>confdefs.h <<_ACEOF
35627#define DBL_SIGNBIT_BIT $bit
35628_ACEOF
35629
35630      ;;
35631  esac
35632
35633
35634
35635
35636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
35637$as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
35638if test "${gl_cv_cc_long_double_signbit+set}" = set; then :
35639  $as_echo_n "(cached) " >&6
35640else
35641
35642      if test "$cross_compiling" = yes; then :
35643
35644                              gl_cv_cc_long_double_signbit="unknown"
35645
35646else
35647  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35648/* end confdefs.h.  */
35649
35650#include <stddef.h>
35651#include <stdio.h>
35652#define NWORDS \
35653  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
35654typedef union { long double value; unsigned int word[NWORDS]; }
35655        memory_float;
35656static memory_float plus = { 1.0L };
35657static memory_float minus = { -1.0L };
35658int main ()
35659{
35660  size_t j, k, i;
35661  unsigned int m;
35662  FILE *fp = fopen ("conftest.out", "w");
35663  if (fp == NULL)
35664    return 1;
35665  /* Find the different bit.  */
35666  k = 0; m = 0;
35667  for (j = 0; j < NWORDS; j++)
35668    {
35669      unsigned int x = plus.word[j] ^ minus.word[j];
35670      if ((x & (x - 1)) || (x && m))
35671        {
35672          /* More than one bit difference.  */
35673          fprintf (fp, "unknown");
35674          return 1;
35675        }
35676      if (x)
35677        {
35678          k = j;
35679          m = x;
35680        }
35681    }
35682  if (m == 0)
35683    {
35684      /* No difference.  */
35685      fprintf (fp, "unknown");
35686      return 1;
35687    }
35688  /* Now m = plus.word[k] ^ ~minus.word[k].  */
35689  if (plus.word[k] & ~minus.word[k])
35690    {
35691      /* Oh? The sign bit is set in the positive and cleared in the negative
35692         numbers?  */
35693      fprintf (fp, "unknown");
35694      return 1;
35695    }
35696  for (i = 0; ; i++)
35697    if ((m >> i) & 1)
35698      break;
35699  fprintf (fp, "word %d bit %d", (int) k, (int) i);
35700  return (fclose (fp) != 0);
35701}
35702
35703_ACEOF
35704if ac_fn_c_try_run "$LINENO"; then :
35705  gl_cv_cc_long_double_signbit=`cat conftest.out`
35706else
35707  gl_cv_cc_long_double_signbit="unknown"
35708fi
35709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35710  conftest.$ac_objext conftest.beam conftest.$ac_ext
35711fi
35712
35713      rm -f conftest.out
35714
35715fi
35716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
35717$as_echo "$gl_cv_cc_long_double_signbit" >&6; }
35718  case "$gl_cv_cc_long_double_signbit" in
35719    word*bit*)
35720      word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
35721      bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
35722
35723cat >>confdefs.h <<_ACEOF
35724#define LDBL_SIGNBIT_WORD $word
35725_ACEOF
35726
35727
35728cat >>confdefs.h <<_ACEOF
35729#define LDBL_SIGNBIT_BIT $bit
35730_ACEOF
35731
35732      ;;
35733  esac
35734
35735
35736      if test "$gl_cv_cc_float_signbit" = unknown; then
35737                ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
35738"
35739if test "x$ac_cv_have_decl_copysignf" = x""yes; then :
35740  ac_have_decl=1
35741else
35742  ac_have_decl=0
35743fi
35744
35745cat >>confdefs.h <<_ACEOF
35746#define HAVE_DECL_COPYSIGNF $ac_have_decl
35747_ACEOF
35748
35749        if test "$ac_cv_have_decl_copysignf" = yes; then
35750                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
35751$as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
35752if test "${gl_cv_func_copysignf_no_libm+set}" = set; then :
35753  $as_echo_n "(cached) " >&6
35754else
35755
35756              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35757/* end confdefs.h.  */
35758#include <math.h>
35759                           float x, y;
35760int
35761main ()
35762{
35763return copysignf (x, y) < 0;
35764  ;
35765  return 0;
35766}
35767_ACEOF
35768if ac_fn_c_try_link "$LINENO"; then :
35769  gl_cv_func_copysignf_no_libm=yes
35770else
35771  gl_cv_func_copysignf_no_libm=no
35772fi
35773rm -f core conftest.err conftest.$ac_objext \
35774    conftest$ac_exeext conftest.$ac_ext
35775
35776fi
35777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
35778$as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
35779          if test $gl_cv_func_copysignf_no_libm = yes; then
35780
35781$as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
35782
35783          fi
35784        fi
35785      fi
35786      if test "$gl_cv_cc_double_signbit" = unknown; then
35787                ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
35788"
35789if test "x$ac_cv_have_decl_copysign" = x""yes; then :
35790  ac_have_decl=1
35791else
35792  ac_have_decl=0
35793fi
35794
35795cat >>confdefs.h <<_ACEOF
35796#define HAVE_DECL_COPYSIGN $ac_have_decl
35797_ACEOF
35798
35799        if test "$ac_cv_have_decl_copysign" = yes; then
35800                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
35801$as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
35802if test "${gl_cv_func_copysign_no_libm+set}" = set; then :
35803  $as_echo_n "(cached) " >&6
35804else
35805
35806              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35807/* end confdefs.h.  */
35808#include <math.h>
35809                           double x, y;
35810int
35811main ()
35812{
35813return copysign (x, y) < 0;
35814  ;
35815  return 0;
35816}
35817_ACEOF
35818if ac_fn_c_try_link "$LINENO"; then :
35819  gl_cv_func_copysign_no_libm=yes
35820else
35821  gl_cv_func_copysign_no_libm=no
35822fi
35823rm -f core conftest.err conftest.$ac_objext \
35824    conftest$ac_exeext conftest.$ac_ext
35825
35826fi
35827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
35828$as_echo "$gl_cv_func_copysign_no_libm" >&6; }
35829          if test $gl_cv_func_copysign_no_libm = yes; then
35830
35831$as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
35832
35833          fi
35834        fi
35835      fi
35836      if test "$gl_cv_cc_long_double_signbit" = unknown; then
35837                ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
35838"
35839if test "x$ac_cv_have_decl_copysignl" = x""yes; then :
35840  ac_have_decl=1
35841else
35842  ac_have_decl=0
35843fi
35844
35845cat >>confdefs.h <<_ACEOF
35846#define HAVE_DECL_COPYSIGNL $ac_have_decl
35847_ACEOF
35848
35849        if test "$ac_cv_have_decl_copysignl" = yes; then
35850                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
35851$as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
35852if test "${gl_cv_func_copysignl_no_libm+set}" = set; then :
35853  $as_echo_n "(cached) " >&6
35854else
35855
35856              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35857/* end confdefs.h.  */
35858#include <math.h>
35859                           long double x, y;
35860int
35861main ()
35862{
35863return copysignl (x, y) < 0;
35864  ;
35865  return 0;
35866}
35867_ACEOF
35868if ac_fn_c_try_link "$LINENO"; then :
35869  gl_cv_func_copysignl_no_libm=yes
35870else
35871  gl_cv_func_copysignl_no_libm=no
35872fi
35873rm -f core conftest.err conftest.$ac_objext \
35874    conftest$ac_exeext conftest.$ac_ext
35875
35876fi
35877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
35878$as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
35879          if test $gl_cv_func_copysignl_no_libm = yes; then
35880
35881$as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
35882
35883          fi
35884        fi
35885      fi
35886    fi
35887  fi
35888
35889
35890
35891  GNULIB_SIGNBIT=1
35892
35893
35894
35895  signals_not_posix=
35896  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35897/* end confdefs.h.  */
35898#include <signal.h>
35899
35900_ACEOF
35901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35902  $EGREP "sigset_t" >/dev/null 2>&1; then :
35903
35904else
35905  signals_not_posix=1
35906fi
35907rm -f conftest*
35908
35909  if test -z "$signals_not_posix"; then
35910    ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
35911if test "x$ac_cv_func_sigprocmask" = x""yes; then :
35912  gl_cv_func_sigprocmask=1
35913fi
35914
35915  fi
35916  if test -z "$gl_cv_func_sigprocmask"; then
35917    HAVE_POSIX_SIGNALBLOCKING=0
35918
35919
35920
35921
35922
35923
35924
35925
35926  gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
35927
35928
35929
35930  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "#include <signal.h>
35931/* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
35932#include <sys/types.h>
35933"
35934if test "x$ac_cv_type_sigset_t" = x""yes; then :
35935
35936cat >>confdefs.h <<_ACEOF
35937#define HAVE_SIGSET_T 1
35938_ACEOF
35939
35940gl_cv_type_sigset_t=yes
35941else
35942  gl_cv_type_sigset_t=no
35943fi
35944
35945  if test $gl_cv_type_sigset_t != yes; then
35946    HAVE_SIGSET_T=0
35947  fi
35948
35949
35950  fi
35951
35952
35953
35954  GNULIB_SIGPROCMASK=1
35955
35956
35957  for ac_header in stdint.h
35958do :
35959  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
35960if test "x$ac_cv_header_stdint_h" = x""yes; then :
35961  cat >>confdefs.h <<_ACEOF
35962#define HAVE_STDINT_H 1
35963_ACEOF
35964
35965fi
35966
35967done
35968
35969    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
35970$as_echo_n "checking for SIZE_MAX... " >&6; }
35971if test "${gl_cv_size_max+set}" = set; then :
35972  $as_echo_n "(cached) " >&6
35973else
35974
35975    gl_cv_size_max=
35976    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35977/* end confdefs.h.  */
35978
35979#include <limits.h>
35980#if HAVE_STDINT_H
35981#include <stdint.h>
35982#endif
35983#ifdef SIZE_MAX
35984Found it
35985#endif
35986
35987_ACEOF
35988if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35989  $EGREP "Found it" >/dev/null 2>&1; then :
35990  gl_cv_size_max=yes
35991fi
35992rm -f conftest*
35993
35994    if test -z "$gl_cv_size_max"; then
35995                        if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
35996#include <limits.h>"; then :
35997
35998else
35999  size_t_bits_minus_1=
36000fi
36001
36002      if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"; then :
36003
36004else
36005  fits_in_uint=
36006fi
36007
36008      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
36009        if test $fits_in_uint = 1; then
36010                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36011/* end confdefs.h.  */
36012#include <stddef.h>
36013            extern size_t foo;
36014            extern unsigned long foo;
36015
36016int
36017main ()
36018{
36019
36020  ;
36021  return 0;
36022}
36023_ACEOF
36024if ac_fn_c_try_compile "$LINENO"; then :
36025  fits_in_uint=0
36026fi
36027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36028        fi
36029                                if test $fits_in_uint = 1; then
36030          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
36031        else
36032          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
36033        fi
36034      else
36035                gl_cv_size_max='((size_t)~(size_t)0)'
36036      fi
36037    fi
36038
36039fi
36040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
36041$as_echo "$gl_cv_size_max" >&6; }
36042  if test "$gl_cv_size_max" != yes; then
36043
36044cat >>confdefs.h <<_ACEOF
36045#define SIZE_MAX $gl_cv_size_max
36046_ACEOF
36047
36048  fi
36049
36050
36051
36052
36053  gl_cv_func_snprintf_usable=no
36054  for ac_func in snprintf
36055do :
36056  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
36057if test "x$ac_cv_func_snprintf" = x""yes; then :
36058  cat >>confdefs.h <<_ACEOF
36059#define HAVE_SNPRINTF 1
36060_ACEOF
36061
36062fi
36063done
36064
36065  if test $ac_cv_func_snprintf = yes; then
36066
36067
36068  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
36069$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
36070if test "${gl_cv_func_snprintf_size1+set}" = set; then :
36071  $as_echo_n "(cached) " >&6
36072else
36073
36074      if test "$cross_compiling" = yes; then :
36075  gl_cv_func_snprintf_size1="guessing yes"
36076else
36077  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36078/* end confdefs.h.  */
36079
36080#include <stdio.h>
36081int main()
36082{
36083  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
36084  snprintf (buf, 1, "%d", 12345);
36085  return buf[1] != 'E';
36086}
36087_ACEOF
36088if ac_fn_c_try_run "$LINENO"; then :
36089  gl_cv_func_snprintf_size1=yes
36090else
36091  gl_cv_func_snprintf_size1=no
36092fi
36093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36094  conftest.$ac_objext conftest.beam conftest.$ac_ext
36095fi
36096
36097
36098fi
36099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
36100$as_echo "$gl_cv_func_snprintf_size1" >&6; }
36101
36102    case "$gl_cv_func_snprintf_size1" in
36103      *yes)
36104        gl_cv_func_snprintf_usable=yes
36105        ;;
36106    esac
36107  fi
36108  if test $gl_cv_func_snprintf_usable = no; then
36109
36110
36111
36112
36113
36114
36115
36116
36117
36118
36119  gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
36120
36121  if test $ac_cv_func_snprintf = yes; then
36122    REPLACE_SNPRINTF=1
36123  fi
36124  :
36125
36126  fi
36127
36128  if test $ac_cv_have_decl_snprintf = no; then
36129    HAVE_DECL_SNPRINTF=0
36130  fi
36131
36132
36133
36134  GNULIB_SNPRINTF=1
36135
36136
36137
36138
36139
36140
36141
36142
36143  if test $ac_cv_header_sys_socket_h != yes; then
36144                    for ac_header in winsock2.h
36145do :
36146  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
36147if test "x$ac_cv_header_winsock2_h" = x""yes; then :
36148  cat >>confdefs.h <<_ACEOF
36149#define HAVE_WINSOCK2_H 1
36150_ACEOF
36151
36152fi
36153
36154done
36155
36156  fi
36157  if test "$ac_cv_header_winsock2_h" = yes; then
36158    HAVE_WINSOCK2_H=1
36159    UNISTD_H_HAVE_WINSOCK2_H=1
36160    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
36161  else
36162    HAVE_WINSOCK2_H=0
36163  fi
36164
36165   LIBSOCKET=
36166  if test $HAVE_WINSOCK2_H = 1; then
36167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5
36168$as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; }
36169if test "${gl_cv_func_wsastartup+set}" = set; then :
36170  $as_echo_n "(cached) " >&6
36171else
36172
36173      gl_save_LIBS="$LIBS"
36174      LIBS="$LIBS -lws2_32"
36175      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36176/* end confdefs.h.  */
36177
36178#ifdef HAVE_WINSOCK2_H
36179# include <winsock2.h>
36180#endif
36181int
36182main ()
36183{
36184
36185          WORD wVersionRequested = MAKEWORD(1, 1);
36186          WSADATA wsaData;
36187          int err = WSAStartup(wVersionRequested, &wsaData);
36188          WSACleanup ();
36189  ;
36190  return 0;
36191}
36192_ACEOF
36193if ac_fn_c_try_link "$LINENO"; then :
36194  gl_cv_func_wsastartup=yes
36195else
36196  gl_cv_func_wsastartup=no
36197fi
36198rm -f core conftest.err conftest.$ac_objext \
36199    conftest$ac_exeext conftest.$ac_ext
36200      LIBS="$gl_save_LIBS"
36201
36202fi
36203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
36204$as_echo "$gl_cv_func_wsastartup" >&6; }
36205    if test "$gl_cv_func_wsastartup" = "yes"; then
36206
36207$as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
36208
36209      LIBSOCKET='-lws2_32'
36210    fi
36211  else
36212                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
36213$as_echo_n "checking for library containing setsockopt... " >&6; }
36214if test "${gl_cv_lib_socket+set}" = set; then :
36215  $as_echo_n "(cached) " >&6
36216else
36217
36218      gl_cv_lib_socket=
36219      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36220/* end confdefs.h.  */
36221extern
36222#ifdef __cplusplus
36223"C"
36224#endif
36225char setsockopt();
36226int
36227main ()
36228{
36229setsockopt();
36230  ;
36231  return 0;
36232}
36233_ACEOF
36234if ac_fn_c_try_link "$LINENO"; then :
36235
36236else
36237  gl_save_LIBS="$LIBS"
36238         LIBS="$gl_save_LIBS -lsocket"
36239         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36240/* end confdefs.h.  */
36241extern
36242#ifdef __cplusplus
36243"C"
36244#endif
36245char setsockopt();
36246int
36247main ()
36248{
36249setsockopt();
36250  ;
36251  return 0;
36252}
36253_ACEOF
36254if ac_fn_c_try_link "$LINENO"; then :
36255  gl_cv_lib_socket="-lsocket"
36256fi
36257rm -f core conftest.err conftest.$ac_objext \
36258    conftest$ac_exeext conftest.$ac_ext
36259         if test -z "$gl_cv_lib_socket"; then
36260           LIBS="$gl_save_LIBS -lnetwork"
36261           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36262/* end confdefs.h.  */
36263extern
36264#ifdef __cplusplus
36265"C"
36266#endif
36267char setsockopt();
36268int
36269main ()
36270{
36271setsockopt();
36272  ;
36273  return 0;
36274}
36275_ACEOF
36276if ac_fn_c_try_link "$LINENO"; then :
36277  gl_cv_lib_socket="-lnetwork"
36278fi
36279rm -f core conftest.err conftest.$ac_objext \
36280    conftest$ac_exeext conftest.$ac_ext
36281           if test -z "$gl_cv_lib_socket"; then
36282             LIBS="$gl_save_LIBS -lnet"
36283             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36284/* end confdefs.h.  */
36285extern
36286#ifdef __cplusplus
36287"C"
36288#endif
36289char setsockopt();
36290int
36291main ()
36292{
36293setsockopt();
36294  ;
36295  return 0;
36296}
36297_ACEOF
36298if ac_fn_c_try_link "$LINENO"; then :
36299  gl_cv_lib_socket="-lnet"
36300fi
36301rm -f core conftest.err conftest.$ac_objext \
36302    conftest$ac_exeext conftest.$ac_ext
36303           fi
36304         fi
36305         LIBS="$gl_save_LIBS"
36306
36307fi
36308rm -f core conftest.err conftest.$ac_objext \
36309    conftest$ac_exeext conftest.$ac_ext
36310      if test -z "$gl_cv_lib_socket"; then
36311        gl_cv_lib_socket="none needed"
36312      fi
36313
36314fi
36315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
36316$as_echo "$gl_cv_lib_socket" >&6; }
36317    if test "$gl_cv_lib_socket" != "none needed"; then
36318      LIBSOCKET="$gl_cv_lib_socket"
36319    fi
36320  fi
36321
36322
36323  :
36324
36325
36326     ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
36327      #if HAVE_SYS_SOCKET_H
36328      # include <sys/socket.h>
36329      #elif HAVE_WS2TCPIP_H
36330      # include <ws2tcpip.h>
36331      #endif
36332"
36333if test "x$ac_cv_type_socklen_t" = x""yes; then :
36334
36335else
36336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
36337$as_echo_n "checking for socklen_t equivalent... " >&6; }
36338      if test "${gl_cv_socklen_t_equiv+set}" = set; then :
36339  $as_echo_n "(cached) " >&6
36340else
36341  # Systems have either "struct sockaddr *" or
36342         # "void *" as the second argument to getpeername
36343         gl_cv_socklen_t_equiv=
36344         for arg2 in "struct sockaddr" void; do
36345           for t in int size_t "unsigned int" "long int" "unsigned long int"; do
36346             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36347/* end confdefs.h.  */
36348#include <sys/types.h>
36349                   #include <sys/socket.h>
36350
36351                   int getpeername (int, $arg2 *, $t *);
36352int
36353main ()
36354{
36355$t len;
36356                  getpeername (0, 0, &len);
36357  ;
36358  return 0;
36359}
36360_ACEOF
36361if ac_fn_c_try_compile "$LINENO"; then :
36362  gl_cv_socklen_t_equiv="$t"
36363fi
36364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36365             test "$gl_cv_socklen_t_equiv" != "" && break
36366           done
36367           test "$gl_cv_socklen_t_equiv" != "" && break
36368         done
36369
36370fi
36371
36372      if test "$gl_cv_socklen_t_equiv" = ""; then
36373        as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
36374      fi
36375      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
36376$as_echo "$gl_cv_socklen_t_equiv" >&6; }
36377
36378cat >>confdefs.h <<_ACEOF
36379#define socklen_t $gl_cv_socklen_t_equiv
36380_ACEOF
36381
36382fi
36383
36384
36385  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
36386$as_echo_n "checking for ssize_t... " >&6; }
36387if test "${gt_cv_ssize_t+set}" = set; then :
36388  $as_echo_n "(cached) " >&6
36389else
36390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36391/* end confdefs.h.  */
36392#include <sys/types.h>
36393int
36394main ()
36395{
36396int x = sizeof (ssize_t *) + sizeof (ssize_t);
36397        return !x;
36398  ;
36399  return 0;
36400}
36401_ACEOF
36402if ac_fn_c_try_compile "$LINENO"; then :
36403  gt_cv_ssize_t=yes
36404else
36405  gt_cv_ssize_t=no
36406fi
36407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36408fi
36409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
36410$as_echo "$gt_cv_ssize_t" >&6; }
36411  if test $gt_cv_ssize_t = no; then
36412
36413$as_echo "#define ssize_t int" >>confdefs.h
36414
36415  fi
36416
36417
36418
36419
36420
36421    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
36422$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
36423if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
36424  $as_echo_n "(cached) " >&6
36425else
36426  if test "$cross_compiling" = yes; then :
36427  case $host_os in
36428            mingw*) gl_cv_func_stat_dir_slash="guessing no";;
36429            *) gl_cv_func_stat_dir_slash="guessing yes";;
36430          esac
36431else
36432  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36433/* end confdefs.h.  */
36434#include <sys/stat.h>
36435
36436int
36437main ()
36438{
36439struct stat st; return stat (".", &st) != stat ("./", &st);
36440  ;
36441  return 0;
36442}
36443_ACEOF
36444if ac_fn_c_try_run "$LINENO"; then :
36445  gl_cv_func_stat_dir_slash=yes
36446else
36447  gl_cv_func_stat_dir_slash=no
36448fi
36449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36450  conftest.$ac_objext conftest.beam conftest.$ac_ext
36451fi
36452
36453fi
36454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
36455$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
36456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
36457$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
36458if test "${gl_cv_func_stat_file_slash+set}" = set; then :
36459  $as_echo_n "(cached) " >&6
36460else
36461  touch conftest.tmp
36462       # Assume that if we have lstat, we can also check symlinks.
36463       if test $ac_cv_func_lstat = yes; then
36464         ln -s conftest.tmp conftest.lnk
36465       fi
36466       if test "$cross_compiling" = yes; then :
36467  gl_cv_func_stat_file_slash="guessing no"
36468else
36469  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36470/* end confdefs.h.  */
36471#include <sys/stat.h>
36472
36473int
36474main ()
36475{
36476struct stat st;
36477      if (!stat ("conftest.tmp/", &st)) return 1;
36478#if HAVE_LSTAT
36479      if (!stat ("conftest.lnk/", &st)) return 2;
36480#endif
36481
36482  ;
36483  return 0;
36484}
36485_ACEOF
36486if ac_fn_c_try_run "$LINENO"; then :
36487  gl_cv_func_stat_file_slash=yes
36488else
36489  gl_cv_func_stat_file_slash=no
36490fi
36491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36492  conftest.$ac_objext conftest.beam conftest.$ac_ext
36493fi
36494
36495       rm -f conftest.tmp conftest.lnk
36496fi
36497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
36498$as_echo "$gl_cv_func_stat_file_slash" >&6; }
36499  case $gl_cv_func_stat_dir_slash in
36500    *no) REPLACE_STAT=1
36501
36502$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
36503;;
36504  esac
36505  case $gl_cv_func_stat_file_slash in
36506    *no) REPLACE_STAT=1
36507
36508$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
36509;;
36510  esac
36511  if test $REPLACE_STAT = 1; then
36512
36513
36514
36515
36516
36517
36518
36519
36520  gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
36521
36522
36523  fi
36524
36525
36526
36527  GNULIB_STAT=1
36528
36529
36530
36531
36532
36533
36534  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>
36535     #include <sys/stat.h>
36536"
36537if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
36538
36539cat >>confdefs.h <<_ACEOF
36540#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
36541_ACEOF
36542
36543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
36544$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
36545if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
36546  $as_echo_n "(cached) " >&6
36547else
36548  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36549/* end confdefs.h.  */
36550
36551            #include <sys/types.h>
36552            #include <sys/stat.h>
36553            #if HAVE_SYS_TIME_H
36554            # include <sys/time.h>
36555            #endif
36556            #include <time.h>
36557            struct timespec ts;
36558            struct stat st;
36559
36560int
36561main ()
36562{
36563
36564            st.st_atim = ts;
36565
36566  ;
36567  return 0;
36568}
36569_ACEOF
36570if ac_fn_c_try_compile "$LINENO"; then :
36571  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
36572else
36573  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
36574fi
36575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36576fi
36577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
36578$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
36579     if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
36580
36581$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
36582
36583     fi
36584else
36585  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>
36586        #include <sys/stat.h>
36587"
36588if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
36589
36590cat >>confdefs.h <<_ACEOF
36591#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
36592_ACEOF
36593
36594
36595else
36596  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
36597           #include <sys/stat.h>
36598"
36599if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
36600
36601cat >>confdefs.h <<_ACEOF
36602#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
36603_ACEOF
36604
36605
36606else
36607  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>
36608              #include <sys/stat.h>
36609"
36610if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
36611
36612cat >>confdefs.h <<_ACEOF
36613#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
36614_ACEOF
36615
36616
36617fi
36618
36619fi
36620
36621fi
36622
36623fi
36624
36625
36626
36627
36628
36629
36630  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>
36631     #include <sys/stat.h>
36632"
36633if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
36634
36635cat >>confdefs.h <<_ACEOF
36636#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
36637_ACEOF
36638
36639
36640else
36641  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
36642        #include <sys/stat.h>
36643"
36644if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
36645
36646cat >>confdefs.h <<_ACEOF
36647#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
36648_ACEOF
36649
36650
36651else
36652  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>
36653          #include <sys/stat.h>
36654"
36655if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
36656
36657cat >>confdefs.h <<_ACEOF
36658#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
36659_ACEOF
36660
36661
36662fi
36663
36664fi
36665
36666fi
36667
36668
36669
36670  STDARG_H='';
36671  NEXT_STDARG_H='<stdarg.h>';
36672  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
36673$as_echo_n "checking for va_copy... " >&6; }
36674  if test "${gl_cv_func_va_copy+set}" = set; then :
36675  $as_echo_n "(cached) " >&6
36676else
36677
36678    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36679/* end confdefs.h.  */
36680#include <stdarg.h>
36681int
36682main ()
36683{
36684
36685#ifndef va_copy
36686void (*func) (va_list, va_list) = va_copy;
36687#endif
36688
36689  ;
36690  return 0;
36691}
36692_ACEOF
36693if ac_fn_c_try_compile "$LINENO"; then :
36694  gl_cv_func_va_copy=yes
36695else
36696  gl_cv_func_va_copy=no
36697fi
36698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36699fi
36700
36701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
36702$as_echo "$gl_cv_func_va_copy" >&6; }
36703  if test $gl_cv_func_va_copy = no; then
36704                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36705/* end confdefs.h.  */
36706#if defined _AIX && !defined __GNUC__
36707        AIX vaccine
36708       #endif
36709
36710_ACEOF
36711if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36712  $EGREP "vaccine" >/dev/null 2>&1; then :
36713  gl_aixcc=yes
36714else
36715  gl_aixcc=no
36716fi
36717rm -f conftest*
36718
36719    if test $gl_aixcc = yes; then
36720            STDARG_H=stdarg.h
36721
36722
36723
36724
36725
36726
36727     if test $gl_cv_have_include_next = yes; then
36728       gl_cv_next_stdarg_h='<'stdarg.h'>'
36729     else
36730       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
36731$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
36732if test "${gl_cv_next_stdarg_h+set}" = set; then :
36733  $as_echo_n "(cached) " >&6
36734else
36735
36736          if test $ac_cv_header_stdarg_h = yes; then
36737            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36738/* end confdefs.h.  */
36739#include <stdarg.h>
36740
36741_ACEOF
36742                                                                                                case "$host_os" in
36743              aix*) gl_absname_cpp="$ac_cpp -C" ;;
36744              *)    gl_absname_cpp="$ac_cpp" ;;
36745            esac
36746                                                gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36747               sed -n '\#/stdarg.h#{
36748                 s#.*"\(.*/stdarg.h\)".*#\1#
36749                 s#^/[^/]#//&#
36750                 p
36751                 q
36752               }'`'"'
36753          else
36754            gl_cv_next_stdarg_h='<'stdarg.h'>'
36755          fi
36756
36757fi
36758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
36759$as_echo "$gl_cv_next_stdarg_h" >&6; }
36760     fi
36761     NEXT_STDARG_H=$gl_cv_next_stdarg_h
36762
36763     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36764       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36765       gl_next_as_first_directive='<'stdarg.h'>'
36766     else
36767       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36768       gl_next_as_first_directive=$gl_cv_next_stdarg_h
36769     fi
36770     NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
36771
36772
36773
36774            if test "$gl_cv_next_stdarg_h" = '""'; then
36775        gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
36776        NEXT_STDARG_H="$gl_cv_next_stdarg_h"
36777      fi
36778    else
36779
36780  saved_as_echo_n="$as_echo_n"
36781  as_echo_n=':'
36782  if test "${gl_cv_func___va_copy+set}" = set; then :
36783  $as_echo_n "(cached) " >&6
36784else
36785
36786        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36787/* end confdefs.h.  */
36788#include <stdarg.h>
36789int
36790main ()
36791{
36792
36793#ifndef __va_copy
36794error, bail out
36795#endif
36796
36797  ;
36798  return 0;
36799}
36800_ACEOF
36801if ac_fn_c_try_compile "$LINENO"; then :
36802  gl_cv_func___va_copy=yes
36803else
36804  gl_cv_func___va_copy=no
36805fi
36806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36807fi
36808
36809  as_echo_n="$saved_as_echo_n"
36810
36811      if test $gl_cv_func___va_copy = yes; then
36812
36813$as_echo "#define va_copy __va_copy" >>confdefs.h
36814
36815      else
36816
36817
36818$as_echo "#define va_copy gl_va_copy" >>confdefs.h
36819
36820      fi
36821    fi
36822  fi
36823
36824
36825
36826
36827  # Define two additional variables used in the Makefile substitution.
36828
36829  if test "$ac_cv_header_stdbool_h" = yes; then
36830    STDBOOL_H=''
36831  else
36832    STDBOOL_H='stdbool.h'
36833  fi
36834
36835
36836  if test "$ac_cv_type__Bool" = yes; then
36837    HAVE__BOOL=1
36838  else
36839    HAVE__BOOL=0
36840  fi
36841
36842
36843
36844
36845
36846  if test $gt_cv_c_wchar_t = no; then
36847    HAVE_WCHAR_T=0
36848    STDDEF_H=stddef.h
36849  fi
36850  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
36851$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
36852if test "${gl_cv_decl_null_works+set}" = set; then :
36853  $as_echo_n "(cached) " >&6
36854else
36855  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36856/* end confdefs.h.  */
36857#include <stddef.h>
36858      int test[2 * (sizeof NULL == sizeof (void *)) -1];
36859
36860int
36861main ()
36862{
36863
36864  ;
36865  return 0;
36866}
36867_ACEOF
36868if ac_fn_c_try_compile "$LINENO"; then :
36869  gl_cv_decl_null_works=yes
36870else
36871  gl_cv_decl_null_works=no
36872fi
36873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36874fi
36875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
36876$as_echo "$gl_cv_decl_null_works" >&6; }
36877  if test $gl_cv_decl_null_works = no; then
36878    REPLACE_NULL=1
36879    STDDEF_H=stddef.h
36880  fi
36881  if test -n "$STDDEF_H"; then
36882
36883
36884
36885
36886
36887
36888     if test $gl_cv_have_include_next = yes; then
36889       gl_cv_next_stddef_h='<'stddef.h'>'
36890     else
36891       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
36892$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
36893if test "${gl_cv_next_stddef_h+set}" = set; then :
36894  $as_echo_n "(cached) " >&6
36895else
36896
36897          if test $ac_cv_header_stddef_h = yes; then
36898            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36899/* end confdefs.h.  */
36900#include <stddef.h>
36901
36902_ACEOF
36903                                                                                                case "$host_os" in
36904              aix*) gl_absname_cpp="$ac_cpp -C" ;;
36905              *)    gl_absname_cpp="$ac_cpp" ;;
36906            esac
36907                                                gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36908               sed -n '\#/stddef.h#{
36909                 s#.*"\(.*/stddef.h\)".*#\1#
36910                 s#^/[^/]#//&#
36911                 p
36912                 q
36913               }'`'"'
36914          else
36915            gl_cv_next_stddef_h='<'stddef.h'>'
36916          fi
36917
36918fi
36919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
36920$as_echo "$gl_cv_next_stddef_h" >&6; }
36921     fi
36922     NEXT_STDDEF_H=$gl_cv_next_stddef_h
36923
36924     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36925       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36926       gl_next_as_first_directive='<'stddef.h'>'
36927     else
36928       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36929       gl_next_as_first_directive=$gl_cv_next_stddef_h
36930     fi
36931     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
36932
36933
36934
36935  fi
36936
36937
36938
36939
36940  if test $ac_cv_type_long_long_int = yes; then
36941    HAVE_LONG_LONG_INT=1
36942  else
36943    HAVE_LONG_LONG_INT=0
36944  fi
36945
36946
36947  if test $ac_cv_type_unsigned_long_long_int = yes; then
36948    HAVE_UNSIGNED_LONG_LONG_INT=1
36949  else
36950    HAVE_UNSIGNED_LONG_LONG_INT=0
36951  fi
36952
36953
36954      if test $ac_cv_header_inttypes_h = yes; then
36955    HAVE_INTTYPES_H=1
36956  else
36957    HAVE_INTTYPES_H=0
36958  fi
36959
36960
36961      if test $ac_cv_header_sys_types_h = yes; then
36962    HAVE_SYS_TYPES_H=1
36963  else
36964    HAVE_SYS_TYPES_H=0
36965  fi
36966
36967
36968
36969
36970
36971
36972
36973
36974     if test $gl_cv_have_include_next = yes; then
36975       gl_cv_next_stdint_h='<'stdint.h'>'
36976     else
36977       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
36978$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
36979if test "${gl_cv_next_stdint_h+set}" = set; then :
36980  $as_echo_n "(cached) " >&6
36981else
36982
36983          if test $ac_cv_header_stdint_h = yes; then
36984            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36985/* end confdefs.h.  */
36986#include <stdint.h>
36987
36988_ACEOF
36989                                                                                                case "$host_os" in
36990              aix*) gl_absname_cpp="$ac_cpp -C" ;;
36991              *)    gl_absname_cpp="$ac_cpp" ;;
36992            esac
36993                                                gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36994               sed -n '\#/stdint.h#{
36995                 s#.*"\(.*/stdint.h\)".*#\1#
36996                 s#^/[^/]#//&#
36997                 p
36998                 q
36999               }'`'"'
37000          else
37001            gl_cv_next_stdint_h='<'stdint.h'>'
37002          fi
37003
37004fi
37005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
37006$as_echo "$gl_cv_next_stdint_h" >&6; }
37007     fi
37008     NEXT_STDINT_H=$gl_cv_next_stdint_h
37009
37010     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37011       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37012       gl_next_as_first_directive='<'stdint.h'>'
37013     else
37014       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37015       gl_next_as_first_directive=$gl_cv_next_stdint_h
37016     fi
37017     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
37018
37019
37020
37021  if test $ac_cv_header_stdint_h = yes; then
37022    HAVE_STDINT_H=1
37023  else
37024    HAVE_STDINT_H=0
37025  fi
37026
37027
37028    if test $ac_cv_header_stdint_h = yes; then
37029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
37030$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
37031if test "${gl_cv_header_working_stdint_h+set}" = set; then :
37032  $as_echo_n "(cached) " >&6
37033else
37034  gl_cv_header_working_stdint_h=no
37035       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37036/* end confdefs.h.  */
37037
37038
37039#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
37040#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
37041#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
37042#include <stdint.h>
37043/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
37044#if !(defined WCHAR_MIN && defined WCHAR_MAX)
37045#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
37046#endif
37047
37048
37049  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
37050     included before <wchar.h>.  */
37051  #include <stddef.h>
37052  #include <signal.h>
37053  #if HAVE_WCHAR_H
37054  # include <stdio.h>
37055  # include <time.h>
37056  # include <wchar.h>
37057  #endif
37058
37059
37060#ifdef INT8_MAX
37061int8_t a1 = INT8_MAX;
37062int8_t a1min = INT8_MIN;
37063#endif
37064#ifdef INT16_MAX
37065int16_t a2 = INT16_MAX;
37066int16_t a2min = INT16_MIN;
37067#endif
37068#ifdef INT32_MAX
37069int32_t a3 = INT32_MAX;
37070int32_t a3min = INT32_MIN;
37071#endif
37072#ifdef INT64_MAX
37073int64_t a4 = INT64_MAX;
37074int64_t a4min = INT64_MIN;
37075#endif
37076#ifdef UINT8_MAX
37077uint8_t b1 = UINT8_MAX;
37078#else
37079typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
37080#endif
37081#ifdef UINT16_MAX
37082uint16_t b2 = UINT16_MAX;
37083#endif
37084#ifdef UINT32_MAX
37085uint32_t b3 = UINT32_MAX;
37086#endif
37087#ifdef UINT64_MAX
37088uint64_t b4 = UINT64_MAX;
37089#endif
37090int_least8_t c1 = INT8_C (0x7f);
37091int_least8_t c1max = INT_LEAST8_MAX;
37092int_least8_t c1min = INT_LEAST8_MIN;
37093int_least16_t c2 = INT16_C (0x7fff);
37094int_least16_t c2max = INT_LEAST16_MAX;
37095int_least16_t c2min = INT_LEAST16_MIN;
37096int_least32_t c3 = INT32_C (0x7fffffff);
37097int_least32_t c3max = INT_LEAST32_MAX;
37098int_least32_t c3min = INT_LEAST32_MIN;
37099int_least64_t c4 = INT64_C (0x7fffffffffffffff);
37100int_least64_t c4max = INT_LEAST64_MAX;
37101int_least64_t c4min = INT_LEAST64_MIN;
37102uint_least8_t d1 = UINT8_C (0xff);
37103uint_least8_t d1max = UINT_LEAST8_MAX;
37104uint_least16_t d2 = UINT16_C (0xffff);
37105uint_least16_t d2max = UINT_LEAST16_MAX;
37106uint_least32_t d3 = UINT32_C (0xffffffff);
37107uint_least32_t d3max = UINT_LEAST32_MAX;
37108uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
37109uint_least64_t d4max = UINT_LEAST64_MAX;
37110int_fast8_t e1 = INT_FAST8_MAX;
37111int_fast8_t e1min = INT_FAST8_MIN;
37112int_fast16_t e2 = INT_FAST16_MAX;
37113int_fast16_t e2min = INT_FAST16_MIN;
37114int_fast32_t e3 = INT_FAST32_MAX;
37115int_fast32_t e3min = INT_FAST32_MIN;
37116int_fast64_t e4 = INT_FAST64_MAX;
37117int_fast64_t e4min = INT_FAST64_MIN;
37118uint_fast8_t f1 = UINT_FAST8_MAX;
37119uint_fast16_t f2 = UINT_FAST16_MAX;
37120uint_fast32_t f3 = UINT_FAST32_MAX;
37121uint_fast64_t f4 = UINT_FAST64_MAX;
37122#ifdef INTPTR_MAX
37123intptr_t g = INTPTR_MAX;
37124intptr_t gmin = INTPTR_MIN;
37125#endif
37126#ifdef UINTPTR_MAX
37127uintptr_t h = UINTPTR_MAX;
37128#endif
37129intmax_t i = INTMAX_MAX;
37130uintmax_t j = UINTMAX_MAX;
37131
37132#include <limits.h> /* for CHAR_BIT */
37133#define TYPE_MINIMUM(t) \
37134  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
37135#define TYPE_MAXIMUM(t) \
37136  ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
37137struct s {
37138  int check_PTRDIFF:
37139      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
37140      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
37141      ? 1 : -1;
37142  /* Detect bug in FreeBSD 6.0 / ia64.  */
37143  int check_SIG_ATOMIC:
37144      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
37145      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
37146      ? 1 : -1;
37147  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
37148  int check_WCHAR:
37149      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
37150      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
37151      ? 1 : -1;
37152  /* Detect bug in mingw.  */
37153  int check_WINT:
37154      WINT_MIN == TYPE_MINIMUM (wint_t)
37155      && WINT_MAX == TYPE_MAXIMUM (wint_t)
37156      ? 1 : -1;
37157
37158  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
37159  int check_UINT8_C:
37160        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
37161  int check_UINT16_C:
37162        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
37163
37164  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
37165#ifdef UINT8_MAX
37166  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
37167#endif
37168#ifdef UINT16_MAX
37169  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
37170#endif
37171#ifdef UINT32_MAX
37172  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
37173#endif
37174#ifdef UINT64_MAX
37175  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
37176#endif
37177  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
37178  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
37179  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
37180  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
37181  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
37182  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
37183  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
37184  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
37185  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
37186  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
37187  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
37188};
37189
37190int
37191main ()
37192{
37193
37194  ;
37195  return 0;
37196}
37197_ACEOF
37198if ac_fn_c_try_compile "$LINENO"; then :
37199                                                    if test "$cross_compiling" = yes; then :
37200                 gl_cv_header_working_stdint_h=yes
37201
37202else
37203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37204/* end confdefs.h.  */
37205
37206
37207#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
37208#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
37209#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
37210#include <stdint.h>
37211
37212
37213  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
37214     included before <wchar.h>.  */
37215  #include <stddef.h>
37216  #include <signal.h>
37217  #if HAVE_WCHAR_H
37218  # include <stdio.h>
37219  # include <time.h>
37220  # include <wchar.h>
37221  #endif
37222
37223
37224#include <stdio.h>
37225#include <string.h>
37226#define MVAL(macro) MVAL1(macro)
37227#define MVAL1(expression) #expression
37228static const char *macro_values[] =
37229  {
37230#ifdef INT8_MAX
37231    MVAL (INT8_MAX),
37232#endif
37233#ifdef INT16_MAX
37234    MVAL (INT16_MAX),
37235#endif
37236#ifdef INT32_MAX
37237    MVAL (INT32_MAX),
37238#endif
37239#ifdef INT64_MAX
37240    MVAL (INT64_MAX),
37241#endif
37242#ifdef UINT8_MAX
37243    MVAL (UINT8_MAX),
37244#endif
37245#ifdef UINT16_MAX
37246    MVAL (UINT16_MAX),
37247#endif
37248#ifdef UINT32_MAX
37249    MVAL (UINT32_MAX),
37250#endif
37251#ifdef UINT64_MAX
37252    MVAL (UINT64_MAX),
37253#endif
37254    NULL
37255  };
37256
37257int
37258main ()
37259{
37260
37261  const char **mv;
37262  for (mv = macro_values; *mv != NULL; mv++)
37263    {
37264      const char *value = *mv;
37265      /* Test whether it looks like a cast expression.  */
37266      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
37267          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
37268          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
37269          || strncmp (value, "((int)"/*)*/, 6) == 0
37270          || strncmp (value, "((signed short)"/*)*/, 15) == 0
37271          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
37272        return 1;
37273    }
37274  return 0;
37275
37276  ;
37277  return 0;
37278}
37279_ACEOF
37280if ac_fn_c_try_run "$LINENO"; then :
37281  gl_cv_header_working_stdint_h=yes
37282fi
37283rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37284  conftest.$ac_objext conftest.beam conftest.$ac_ext
37285fi
37286
37287
37288fi
37289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37290
37291fi
37292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
37293$as_echo "$gl_cv_header_working_stdint_h" >&6; }
37294  fi
37295  if test "$gl_cv_header_working_stdint_h" = yes; then
37296    STDINT_H=
37297  else
37298            for ac_header in sys/inttypes.h sys/bitypes.h
37299do :
37300  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
37301ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
37302eval as_val=\$$as_ac_Header
37303   if test "x$as_val" = x""yes; then :
37304  cat >>confdefs.h <<_ACEOF
37305#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
37306_ACEOF
37307
37308fi
37309
37310done
37311
37312    if test $ac_cv_header_sys_inttypes_h = yes; then
37313      HAVE_SYS_INTTYPES_H=1
37314    else
37315      HAVE_SYS_INTTYPES_H=0
37316    fi
37317
37318    if test $ac_cv_header_sys_bitypes_h = yes; then
37319      HAVE_SYS_BITYPES_H=1
37320    else
37321      HAVE_SYS_BITYPES_H=0
37322    fi
37323
37324
37325
37326
37327
37328
37329  if test $APPLE_UNIVERSAL_BUILD = 0; then
37330
37331
37332  for gltype in ptrdiff_t size_t ; do
37333    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
37334$as_echo_n "checking for bit size of $gltype... " >&6; }
37335if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
37336  $as_echo_n "(cached) " >&6
37337else
37338  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
37339  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
37340     included before <wchar.h>.  */
37341  #include <stddef.h>
37342  #include <signal.h>
37343  #if HAVE_WCHAR_H
37344  # include <stdio.h>
37345  # include <time.h>
37346  # include <wchar.h>
37347  #endif
37348
37349#include <limits.h>"; then :
37350
37351else
37352  result=unknown
37353fi
37354
37355       eval gl_cv_bitsizeof_${gltype}=\$result
37356
37357fi
37358eval ac_res=\$gl_cv_bitsizeof_${gltype}
37359	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37360$as_echo "$ac_res" >&6; }
37361    eval result=\$gl_cv_bitsizeof_${gltype}
37362    if test $result = unknown; then
37363                                                result=0
37364    fi
37365    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
37366    cat >>confdefs.h <<_ACEOF
37367#define BITSIZEOF_${GLTYPE} $result
37368_ACEOF
37369
37370    eval BITSIZEOF_${GLTYPE}=\$result
37371  done
37372
37373
37374  fi
37375
37376
37377  for gltype in sig_atomic_t wchar_t wint_t ; do
37378    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
37379$as_echo_n "checking for bit size of $gltype... " >&6; }
37380if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
37381  $as_echo_n "(cached) " >&6
37382else
37383  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
37384  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
37385     included before <wchar.h>.  */
37386  #include <stddef.h>
37387  #include <signal.h>
37388  #if HAVE_WCHAR_H
37389  # include <stdio.h>
37390  # include <time.h>
37391  # include <wchar.h>
37392  #endif
37393
37394#include <limits.h>"; then :
37395
37396else
37397  result=unknown
37398fi
37399
37400       eval gl_cv_bitsizeof_${gltype}=\$result
37401
37402fi
37403eval ac_res=\$gl_cv_bitsizeof_${gltype}
37404	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37405$as_echo "$ac_res" >&6; }
37406    eval result=\$gl_cv_bitsizeof_${gltype}
37407    if test $result = unknown; then
37408                                                result=0
37409    fi
37410    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
37411    cat >>confdefs.h <<_ACEOF
37412#define BITSIZEOF_${GLTYPE} $result
37413_ACEOF
37414
37415    eval BITSIZEOF_${GLTYPE}=\$result
37416  done
37417
37418
37419
37420
37421  for gltype in sig_atomic_t wchar_t wint_t ; do
37422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
37423$as_echo_n "checking whether $gltype is signed... " >&6; }
37424if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
37425  $as_echo_n "(cached) " >&6
37426else
37427  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37428/* end confdefs.h.  */
37429
37430  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
37431     included before <wchar.h>.  */
37432  #include <stddef.h>
37433  #include <signal.h>
37434  #if HAVE_WCHAR_H
37435  # include <stdio.h>
37436  # include <time.h>
37437  # include <wchar.h>
37438  #endif
37439
37440            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
37441int
37442main ()
37443{
37444
37445  ;
37446  return 0;
37447}
37448_ACEOF
37449if ac_fn_c_try_compile "$LINENO"; then :
37450  result=yes
37451else
37452  result=no
37453fi
37454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37455       eval gl_cv_type_${gltype}_signed=\$result
37456
37457fi
37458eval ac_res=\$gl_cv_type_${gltype}_signed
37459	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37460$as_echo "$ac_res" >&6; }
37461    eval result=\$gl_cv_type_${gltype}_signed
37462    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
37463    if test "$result" = yes; then
37464      cat >>confdefs.h <<_ACEOF
37465#define HAVE_SIGNED_${GLTYPE} 1
37466_ACEOF
37467
37468      eval HAVE_SIGNED_${GLTYPE}=1
37469    else
37470      eval HAVE_SIGNED_${GLTYPE}=0
37471    fi
37472  done
37473
37474
37475  gl_cv_type_ptrdiff_t_signed=yes
37476  gl_cv_type_size_t_signed=no
37477  if test $APPLE_UNIVERSAL_BUILD = 0; then
37478
37479
37480  for gltype in ptrdiff_t size_t ; do
37481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
37482$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
37483if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
37484  $as_echo_n "(cached) " >&6
37485else
37486  eval gl_cv_type_${gltype}_suffix=no
37487       eval result=\$gl_cv_type_${gltype}_signed
37488       if test "$result" = yes; then
37489         glsufu=
37490       else
37491         glsufu=u
37492       fi
37493       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
37494         case $glsuf in
37495           '')  gltype1='int';;
37496           l)   gltype1='long int';;
37497           ll)  gltype1='long long int';;
37498           i64) gltype1='__int64';;
37499           u)   gltype1='unsigned int';;
37500           ul)  gltype1='unsigned long int';;
37501           ull) gltype1='unsigned long long int';;
37502           ui64)gltype1='unsigned __int64';;
37503         esac
37504         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37505/* end confdefs.h.  */
37506
37507  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
37508     included before <wchar.h>.  */
37509  #include <stddef.h>
37510  #include <signal.h>
37511  #if HAVE_WCHAR_H
37512  # include <stdio.h>
37513  # include <time.h>
37514  # include <wchar.h>
37515  #endif
37516
37517              extern $gltype foo;
37518              extern $gltype1 foo;
37519int
37520main ()
37521{
37522
37523  ;
37524  return 0;
37525}
37526_ACEOF
37527if ac_fn_c_try_compile "$LINENO"; then :
37528  eval gl_cv_type_${gltype}_suffix=\$glsuf
37529fi
37530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37531         eval result=\$gl_cv_type_${gltype}_suffix
37532         test "$result" != no && break
37533       done
37534fi
37535eval ac_res=\$gl_cv_type_${gltype}_suffix
37536	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37537$as_echo "$ac_res" >&6; }
37538    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
37539    eval result=\$gl_cv_type_${gltype}_suffix
37540    test "$result" = no && result=
37541    eval ${GLTYPE}_SUFFIX=\$result
37542    cat >>confdefs.h <<_ACEOF
37543#define ${GLTYPE}_SUFFIX $result
37544_ACEOF
37545
37546  done
37547
37548
37549  fi
37550
37551
37552  for gltype in sig_atomic_t wchar_t wint_t ; do
37553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
37554$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
37555if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
37556  $as_echo_n "(cached) " >&6
37557else
37558  eval gl_cv_type_${gltype}_suffix=no
37559       eval result=\$gl_cv_type_${gltype}_signed
37560       if test "$result" = yes; then
37561         glsufu=
37562       else
37563         glsufu=u
37564       fi
37565       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
37566         case $glsuf in
37567           '')  gltype1='int';;
37568           l)   gltype1='long int';;
37569           ll)  gltype1='long long int';;
37570           i64) gltype1='__int64';;
37571           u)   gltype1='unsigned int';;
37572           ul)  gltype1='unsigned long int';;
37573           ull) gltype1='unsigned long long int';;
37574           ui64)gltype1='unsigned __int64';;
37575         esac
37576         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37577/* end confdefs.h.  */
37578
37579  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
37580     included before <wchar.h>.  */
37581  #include <stddef.h>
37582  #include <signal.h>
37583  #if HAVE_WCHAR_H
37584  # include <stdio.h>
37585  # include <time.h>
37586  # include <wchar.h>
37587  #endif
37588
37589              extern $gltype foo;
37590              extern $gltype1 foo;
37591int
37592main ()
37593{
37594
37595  ;
37596  return 0;
37597}
37598_ACEOF
37599if ac_fn_c_try_compile "$LINENO"; then :
37600  eval gl_cv_type_${gltype}_suffix=\$glsuf
37601fi
37602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37603         eval result=\$gl_cv_type_${gltype}_suffix
37604         test "$result" != no && break
37605       done
37606fi
37607eval ac_res=\$gl_cv_type_${gltype}_suffix
37608	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37609$as_echo "$ac_res" >&6; }
37610    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
37611    eval result=\$gl_cv_type_${gltype}_suffix
37612    test "$result" = no && result=
37613    eval ${GLTYPE}_SUFFIX=\$result
37614    cat >>confdefs.h <<_ACEOF
37615#define ${GLTYPE}_SUFFIX $result
37616_ACEOF
37617
37618  done
37619
37620
37621
37622    STDINT_H=stdint.h
37623  fi
37624
37625
37626
37627
37628
37629
37630
37631
37632
37633
37634
37635     if test $gl_cv_have_include_next = yes; then
37636       gl_cv_next_stdio_h='<'stdio.h'>'
37637     else
37638       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
37639$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
37640if test "${gl_cv_next_stdio_h+set}" = set; then :
37641  $as_echo_n "(cached) " >&6
37642else
37643
37644          if test $ac_cv_header_stdio_h = yes; then
37645            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37646/* end confdefs.h.  */
37647#include <stdio.h>
37648
37649_ACEOF
37650                                                                                                case "$host_os" in
37651              aix*) gl_absname_cpp="$ac_cpp -C" ;;
37652              *)    gl_absname_cpp="$ac_cpp" ;;
37653            esac
37654                                                gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37655               sed -n '\#/stdio.h#{
37656                 s#.*"\(.*/stdio.h\)".*#\1#
37657                 s#^/[^/]#//&#
37658                 p
37659                 q
37660               }'`'"'
37661          else
37662            gl_cv_next_stdio_h='<'stdio.h'>'
37663          fi
37664
37665fi
37666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
37667$as_echo "$gl_cv_next_stdio_h" >&6; }
37668     fi
37669     NEXT_STDIO_H=$gl_cv_next_stdio_h
37670
37671     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37672       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37673       gl_next_as_first_directive='<'stdio.h'>'
37674     else
37675       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37676       gl_next_as_first_directive=$gl_cv_next_stdio_h
37677     fi
37678     NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
37679
37680
37681
37682      GNULIB_FPRINTF=1
37683  GNULIB_PRINTF=1
37684  GNULIB_VFPRINTF=1
37685  GNULIB_VPRINTF=1
37686  GNULIB_FPUTC=1
37687  GNULIB_PUTC=1
37688  GNULIB_PUTCHAR=1
37689  GNULIB_FPUTS=1
37690  GNULIB_PUTS=1
37691  GNULIB_FWRITE=1
37692
37693
37694
37695    for gl_func in fseeko ftello; do
37696    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
37697    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
37698$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
37699if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
37700  $as_echo_n "(cached) " >&6
37701else
37702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37703/* end confdefs.h.  */
37704#include <stdio.h>
37705
37706int
37707main ()
37708{
37709#undef $gl_func
37710  (void) $gl_func;
37711  ;
37712  return 0;
37713}
37714_ACEOF
37715if ac_fn_c_try_compile "$LINENO"; then :
37716  eval "$as_gl_Symbol=yes"
37717else
37718  eval "$as_gl_Symbol=no"
37719fi
37720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37721fi
37722eval ac_res=\$$as_gl_Symbol
37723	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37724$as_echo "$ac_res" >&6; }
37725     eval as_val=\$$as_gl_Symbol
37726   if test "x$as_val" = x""yes; then :
37727  cat >>confdefs.h <<_ACEOF
37728#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
37729_ACEOF
37730
37731                     eval ac_cv_have_decl_$gl_func=yes
37732fi
37733      done
37734
37735
37736
37737
37738
37739
37740
37741
37742
37743
37744     if test $gl_cv_have_include_next = yes; then
37745       gl_cv_next_stdlib_h='<'stdlib.h'>'
37746     else
37747       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
37748$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
37749if test "${gl_cv_next_stdlib_h+set}" = set; then :
37750  $as_echo_n "(cached) " >&6
37751else
37752
37753          if test $ac_cv_header_stdlib_h = yes; then
37754            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37755/* end confdefs.h.  */
37756#include <stdlib.h>
37757
37758_ACEOF
37759                                                                                                case "$host_os" in
37760              aix*) gl_absname_cpp="$ac_cpp -C" ;;
37761              *)    gl_absname_cpp="$ac_cpp" ;;
37762            esac
37763                                                gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37764               sed -n '\#/stdlib.h#{
37765                 s#.*"\(.*/stdlib.h\)".*#\1#
37766                 s#^/[^/]#//&#
37767                 p
37768                 q
37769               }'`'"'
37770          else
37771            gl_cv_next_stdlib_h='<'stdlib.h'>'
37772          fi
37773
37774fi
37775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
37776$as_echo "$gl_cv_next_stdlib_h" >&6; }
37777     fi
37778     NEXT_STDLIB_H=$gl_cv_next_stdlib_h
37779
37780     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37781       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37782       gl_next_as_first_directive='<'stdlib.h'>'
37783     else
37784       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37785       gl_next_as_first_directive=$gl_cv_next_stdlib_h
37786     fi
37787     NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
37788
37789
37790
37791  for ac_header in random.h
37792do :
37793  ac_fn_c_check_header_compile "$LINENO" "random.h" "ac_cv_header_random_h" "$ac_includes_default
37794"
37795if test "x$ac_cv_header_random_h" = x""yes; then :
37796  cat >>confdefs.h <<_ACEOF
37797#define HAVE_RANDOM_H 1
37798_ACEOF
37799
37800fi
37801
37802done
37803
37804  if test $ac_cv_header_random_h = yes; then
37805    HAVE_RANDOM_H=1
37806  else
37807    HAVE_RANDOM_H=0
37808  fi
37809
37810  ac_fn_c_check_type "$LINENO" "struct random_data" "ac_cv_type_struct_random_data" "#include <stdlib.h>
37811      #if HAVE_RANDOM_H
37812      # include <random.h>
37813      #endif
37814
37815"
37816if test "x$ac_cv_type_struct_random_data" = x""yes; then :
37817
37818cat >>confdefs.h <<_ACEOF
37819#define HAVE_STRUCT_RANDOM_DATA 1
37820_ACEOF
37821
37822
37823else
37824  HAVE_STRUCT_RANDOM_DATA=0
37825fi
37826
37827
37828
37829
37830
37831
37832
37833
37834
37835
37836
37837  gl_LIBOBJS="$gl_LIBOBJS mkstemp-safer.$ac_objext"
37838
37839
37840
37841
37842$as_echo "#define GNULIB_STDLIB_SAFER 1" >>confdefs.h
37843
37844
37845
37846
37847
37848
37849
37850
37851
37852
37853
37854
37855
37856
37857
37858
37859  for ac_func in stpcpy
37860do :
37861  ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
37862if test "x$ac_cv_func_stpcpy" = x""yes; then :
37863  cat >>confdefs.h <<_ACEOF
37864#define HAVE_STPCPY 1
37865_ACEOF
37866
37867else
37868
37869    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
37870
37871fi
37872done
37873
37874
37875  if test $ac_cv_func_stpcpy = no; then
37876    HAVE_STPCPY=0
37877
37878  :
37879
37880  fi
37881
37882
37883
37884  GNULIB_STPCPY=1
37885
37886
37887
37888
37889
37890
37891
37892
37893
37894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stpncpy" >&5
37895$as_echo_n "checking for working stpncpy... " >&6; }
37896if test "${gl_cv_func_stpncpy+set}" = set; then :
37897  $as_echo_n "(cached) " >&6
37898else
37899
37900    if test "$cross_compiling" = yes; then :
37901  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37902/* end confdefs.h.  */
37903
37904#include <features.h>
37905#ifdef __GNU_LIBRARY__
37906  Thanks for using GNU
37907#endif
37908
37909_ACEOF
37910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
37911  $EGREP "Thanks for using GNU" >/dev/null 2>&1; then :
37912  gl_cv_func_stpncpy=yes
37913else
37914  gl_cv_func_stpncpy=no
37915fi
37916rm -f conftest*
37917
37918else
37919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37920/* end confdefs.h.  */
37921
37922#include <stdlib.h>
37923#include <string.h> /* for strcpy */
37924/* The stpncpy prototype is missing in <string.h> on AIX 4.  */
37925extern char *stpncpy (char *dest, const char *src, size_t n);
37926int main () {
37927  const char *src = "Hello";
37928  char dest[10];
37929  /* AIX 4.3.3 and AIX 5.1 stpncpy() returns dest+1 here.  */
37930  strcpy (dest, "\377\377\377\377\377\377");
37931  if (stpncpy (dest, src, 2) != dest + 2) exit(1);
37932  /* AIX 4.3.3 and AIX 5.1 stpncpy() returns dest+4 here.  */
37933  strcpy (dest, "\377\377\377\377\377\377");
37934  if (stpncpy (dest, src, 5) != dest + 5) exit(1);
37935  /* AIX 4.3.3 and AIX 5.1 stpncpy() returns dest+6 here.  */
37936  strcpy (dest, "\377\377\377\377\377\377");
37937  if (stpncpy (dest, src, 7) != dest + 5) exit(1);
37938  exit(0);
37939}
37940
37941_ACEOF
37942if ac_fn_c_try_run "$LINENO"; then :
37943  gl_cv_func_stpncpy=yes
37944else
37945  gl_cv_func_stpncpy=no
37946fi
37947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37948  conftest.$ac_objext conftest.beam conftest.$ac_ext
37949fi
37950
37951fi
37952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stpncpy" >&5
37953$as_echo "$gl_cv_func_stpncpy" >&6; }
37954
37955  if test $gl_cv_func_stpncpy = yes; then
37956
37957$as_echo "#define HAVE_STPNCPY 1" >>confdefs.h
37958
37959  else
37960    HAVE_STPNCPY=0
37961
37962
37963
37964
37965
37966
37967
37968
37969  gl_LIBOBJS="$gl_LIBOBJS stpncpy.$ac_objext"
37970
37971
37972  :
37973
37974  fi
37975
37976
37977
37978  GNULIB_STPNCPY=1
37979
37980
37981
37982
37983
37984
37985
37986
37987
37988
37989  for ac_func in strcspn
37990do :
37991  ac_fn_c_check_func "$LINENO" "strcspn" "ac_cv_func_strcspn"
37992if test "x$ac_cv_func_strcspn" = x""yes; then :
37993  cat >>confdefs.h <<_ACEOF
37994#define HAVE_STRCSPN 1
37995_ACEOF
37996
37997else
37998
37999    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
38000
38001fi
38002done
38003
38004
38005  if test $ac_cv_func_strcspn = no; then
38006    :
38007  fi
38008
38009
38010
38011
38012  if test $gl_cv_func_malloc_posix != yes; then
38013    REPLACE_STRDUP=1
38014
38015
38016
38017
38018
38019
38020
38021
38022  gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
38023
38024  else
38025
38026
38027
38028
38029
38030
38031
38032
38033  for ac_func in strdup
38034do :
38035  ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
38036if test "x$ac_cv_func_strdup" = x""yes; then :
38037  cat >>confdefs.h <<_ACEOF
38038#define HAVE_STRDUP 1
38039_ACEOF
38040
38041else
38042
38043    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
38044
38045fi
38046done
38047
38048
38049  fi
38050
38051  if test $ac_cv_have_decl_strdup = no; then
38052    HAVE_DECL_STRDUP=0
38053  fi
38054  :
38055
38056
38057
38058  GNULIB_STRDUP=1
38059
38060
38061
38062  if test $REPLACE_STRERROR = 1; then
38063
38064
38065
38066
38067
38068
38069
38070
38071  gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
38072
38073
38074cat >>confdefs.h <<_ACEOF
38075#define REPLACE_STRERROR $REPLACE_STRERROR
38076_ACEOF
38077
38078  fi
38079
38080
38081
38082  GNULIB_STRERROR=1
38083
38084
38085
38086
38087
38088
38089
38090
38091
38092
38093
38094  gl_LIBOBJS="$gl_LIBOBJS strftime.$ac_objext"
38095
38096
38097 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
38098
38099
38100
38101
38102
38103
38104
38105
38106
38107$as_echo "#define my_strftime nstrftime" >>confdefs.h
38108
38109
38110
38111  if test $gl_cond_libtool = false; then
38112    gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
38113    gl_libdeps="$gl_libdeps $LIBICONV"
38114  fi
38115
38116
38117
38118
38119
38120
38121
38122
38123
38124  if test $ac_cv_have_decl_strndup = no; then
38125    HAVE_DECL_STRNDUP=0
38126  fi
38127
38128  if test $ac_cv_func_strndup = yes; then
38129    # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
38130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
38131$as_echo_n "checking for working strndup... " >&6; }
38132if test "${gl_cv_func_strndup_works+set}" = set; then :
38133  $as_echo_n "(cached) " >&6
38134else
38135  if test "$cross_compiling" = yes; then :
38136  case $host_os in
38137            aix*) gl_cv_func_strndup_works="guessing no";;
38138            *) gl_cv_func_strndup_works="guessing yes";;
38139          esac
38140else
38141  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38142/* end confdefs.h.  */
38143
38144         #include <string.h>
38145                           #include <stdlib.h>
38146int
38147main ()
38148{
38149
38150#ifndef HAVE_DECL_STRNDUP
38151  extern char *strndup (const char *, size_t);
38152#endif
38153  char *s;
38154  s = strndup ("some longer string", 15);
38155  free (s);
38156  s = strndup ("shorter string", 13);
38157  return s[13] != '\0';
38158  ;
38159  return 0;
38160}
38161_ACEOF
38162if ac_fn_c_try_run "$LINENO"; then :
38163  gl_cv_func_strndup_works=yes
38164else
38165  gl_cv_func_strndup_works=no
38166fi
38167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38168  conftest.$ac_objext conftest.beam conftest.$ac_ext
38169fi
38170
38171fi
38172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
38173$as_echo "$gl_cv_func_strndup_works" >&6; }
38174    case $gl_cv_func_strndup_works in
38175      *no)
38176        REPLACE_STRNDUP=1
38177
38178
38179
38180
38181
38182
38183
38184
38185  gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
38186
38187        ;;
38188    esac
38189  else
38190
38191
38192
38193
38194
38195
38196
38197
38198  gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
38199
38200  fi
38201
38202
38203
38204  GNULIB_STRNDUP=1
38205
38206
38207
38208
38209
38210
38211  if test $ac_cv_have_decl_strnlen = no; then
38212    HAVE_DECL_STRNLEN=0
38213  fi
38214
38215  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
38216$as_echo_n "checking for working strnlen... " >&6; }
38217if test "${ac_cv_func_strnlen_working+set}" = set; then :
38218  $as_echo_n "(cached) " >&6
38219else
38220  if test "$cross_compiling" = yes; then :
38221  ac_cv_func_strnlen_working=no
38222else
38223  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38224/* end confdefs.h.  */
38225$ac_includes_default
38226int
38227main ()
38228{
38229
38230#define S "foobar"
38231#define S_LEN (sizeof S - 1)
38232
38233  /* At least one implementation is buggy: that of AIX 4.3 would
38234     give strnlen (S, 1) == 3.  */
38235
38236  int i;
38237  for (i = 0; i < S_LEN + 1; ++i)
38238    {
38239      int expected = i <= S_LEN ? i : S_LEN;
38240      if (strnlen (S, i) != expected)
38241	return 1;
38242    }
38243  return 0;
38244
38245  ;
38246  return 0;
38247}
38248_ACEOF
38249if ac_fn_c_try_run "$LINENO"; then :
38250  ac_cv_func_strnlen_working=yes
38251else
38252  ac_cv_func_strnlen_working=no
38253fi
38254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38255  conftest.$ac_objext conftest.beam conftest.$ac_ext
38256fi
38257
38258fi
38259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
38260$as_echo "$ac_cv_func_strnlen_working" >&6; }
38261test $ac_cv_func_strnlen_working = no &&
38262
38263
38264
38265
38266
38267
38268
38269  gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
38270
38271
38272  if test $ac_cv_func_strnlen_working = no; then
38273    # This is necessary because automake-1.6.1 doesn't understand
38274    # that the above use of AC_FUNC_STRNLEN means we may have to use
38275    # lib/strnlen.c.
38276    #AC_LIBOBJ([strnlen])
38277
38278$as_echo "#define strnlen rpl_strnlen" >>confdefs.h
38279
38280    :
38281  fi
38282
38283
38284
38285  GNULIB_STRNLEN=1
38286
38287
38288
38289
38290
38291
38292
38293
38294
38295
38296
38297  for ac_func in strpbrk
38298do :
38299  ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
38300if test "x$ac_cv_func_strpbrk" = x""yes; then :
38301  cat >>confdefs.h <<_ACEOF
38302#define HAVE_STRPBRK 1
38303_ACEOF
38304
38305else
38306
38307    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
38308
38309fi
38310done
38311
38312
38313  if test $ac_cv_func_strpbrk = no; then
38314    HAVE_STRPBRK=0
38315    :
38316  fi
38317
38318
38319
38320  GNULIB_STRPBRK=1
38321
38322
38323
38324
38325
38326
38327
38328  if test $ac_cv_have_decl_strsignal = no; then
38329    HAVE_DECL_STRSIGNAL=0
38330  fi
38331
38332  for ac_func in strsignal
38333do :
38334  ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
38335if test "x$ac_cv_func_strsignal" = x""yes; then :
38336  cat >>confdefs.h <<_ACEOF
38337#define HAVE_STRSIGNAL 1
38338_ACEOF
38339
38340fi
38341done
38342
38343  if test $ac_cv_func_strsignal = yes; then
38344            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strsignal always returns a string" >&5
38345$as_echo_n "checking whether strsignal always returns a string... " >&6; }
38346if test "${gl_cv_func_working_strsignal+set}" = set; then :
38347  $as_echo_n "(cached) " >&6
38348else
38349  if test "$cross_compiling" = yes; then :
38350  case "$host_os" in
38351            solaris* | aix*) gl_cv_func_working_strsignal=no;;
38352            *)               gl_cv_func_working_strsignal="guessing yes";;
38353          esac
38354else
38355  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38356/* end confdefs.h.  */
38357#include <string.h>
38358
38359int
38360main ()
38361{
38362char *s = strsignal (-1);
38363              return !(s != (char *) 0 && s != (char *) -1);
38364  ;
38365  return 0;
38366}
38367_ACEOF
38368if ac_fn_c_try_run "$LINENO"; then :
38369  gl_cv_func_working_strsignal=yes
38370else
38371  gl_cv_func_working_strsignal=no
38372fi
38373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38374  conftest.$ac_objext conftest.beam conftest.$ac_ext
38375fi
38376
38377fi
38378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strsignal" >&5
38379$as_echo "$gl_cv_func_working_strsignal" >&6; }
38380  else
38381    gl_cv_func_working_strsignal=no
38382  fi
38383
38384  if test "$gl_cv_func_working_strsignal" = no; then
38385    if test $ac_cv_func_strsignal = yes; then
38386      REPLACE_STRSIGNAL=1
38387    fi
38388
38389
38390
38391
38392
38393
38394
38395
38396  gl_LIBOBJS="$gl_LIBOBJS strsignal.$ac_objext"
38397
38398
38399
38400  ac_fn_c_check_decl "$LINENO" "_sys_siglist" "ac_cv_have_decl__sys_siglist" "#include <signal.h>
38401"
38402if test "x$ac_cv_have_decl__sys_siglist" = x""yes; then :
38403  ac_have_decl=1
38404else
38405  ac_have_decl=0
38406fi
38407
38408cat >>confdefs.h <<_ACEOF
38409#define HAVE_DECL__SYS_SIGLIST $ac_have_decl
38410_ACEOF
38411
38412
38413  fi
38414
38415
38416
38417  GNULIB_STRSIGNAL=1
38418
38419
38420
38421
38422  if test "$gl_cv_func_memchr_works" != yes; then
38423    REPLACE_STRSTR=1
38424
38425
38426
38427
38428
38429
38430
38431
38432  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
38433
38434  fi
38435
38436
38437
38438  GNULIB_STRSTR=1
38439
38440
38441
38442  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
38443$as_echo_n "checking for working strtod... " >&6; }
38444if test "${ac_cv_func_strtod+set}" = set; then :
38445  $as_echo_n "(cached) " >&6
38446else
38447  if test "$cross_compiling" = yes; then :
38448  ac_cv_func_strtod=no
38449else
38450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38451/* end confdefs.h.  */
38452
38453$ac_includes_default
38454#ifndef strtod
38455double strtod ();
38456#endif
38457int
38458main()
38459{
38460  {
38461    /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
38462    char *string = " +69";
38463    char *term;
38464    double value;
38465    value = strtod (string, &term);
38466    if (value != 69 || term != (string + 4))
38467      return 1;
38468  }
38469
38470  {
38471    /* Under Solaris 2.4, strtod returns the wrong value for the
38472       terminating character under some conditions.  */
38473    char *string = "NaN";
38474    char *term;
38475    strtod (string, &term);
38476    if (term != string && *(term - 1) == 0)
38477      return 1;
38478  }
38479  return 0;
38480}
38481
38482_ACEOF
38483if ac_fn_c_try_run "$LINENO"; then :
38484  ac_cv_func_strtod=yes
38485else
38486  ac_cv_func_strtod=no
38487fi
38488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38489  conftest.$ac_objext conftest.beam conftest.$ac_ext
38490fi
38491
38492fi
38493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
38494$as_echo "$ac_cv_func_strtod" >&6; }
38495if test $ac_cv_func_strtod = no; then
38496
38497
38498
38499
38500
38501
38502
38503
38504  gl_LIBOBJS="$gl_LIBOBJS strtod.$ac_objext"
38505
38506ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
38507if test "x$ac_cv_func_pow" = x""yes; then :
38508
38509fi
38510
38511if test $ac_cv_func_pow = no; then
38512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
38513$as_echo_n "checking for pow in -lm... " >&6; }
38514if test "${ac_cv_lib_m_pow+set}" = set; then :
38515  $as_echo_n "(cached) " >&6
38516else
38517  ac_check_lib_save_LIBS=$LIBS
38518LIBS="-lm  $LIBS"
38519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38520/* end confdefs.h.  */
38521
38522/* Override any GCC internal prototype to avoid an error.
38523   Use char because int might match the return type of a GCC
38524   builtin and then its argument prototype would still apply.  */
38525#ifdef __cplusplus
38526extern "C"
38527#endif
38528char pow ();
38529int
38530main ()
38531{
38532return pow ();
38533  ;
38534  return 0;
38535}
38536_ACEOF
38537if ac_fn_c_try_link "$LINENO"; then :
38538  ac_cv_lib_m_pow=yes
38539else
38540  ac_cv_lib_m_pow=no
38541fi
38542rm -f core conftest.err conftest.$ac_objext \
38543    conftest$ac_exeext conftest.$ac_ext
38544LIBS=$ac_check_lib_save_LIBS
38545fi
38546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
38547$as_echo "$ac_cv_lib_m_pow" >&6; }
38548if test "x$ac_cv_lib_m_pow" = x""yes; then :
38549  POW_LIB=-lm
38550else
38551  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
38552$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
38553fi
38554
38555fi
38556
38557fi
38558
38559    if test $ac_cv_func_strtod = no; then
38560    HAVE_STRTOD=0
38561    REPLACE_STRTOD=1
38562    :
38563  else
38564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtod obeys C99" >&5
38565$as_echo_n "checking whether strtod obeys C99... " >&6; }
38566if test "${gl_cv_func_strtod_works+set}" = set; then :
38567  $as_echo_n "(cached) " >&6
38568else
38569  if test "$cross_compiling" = yes; then :
38570  gl_cv_func_strtod_works="guessing no"
38571else
38572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38573/* end confdefs.h.  */
38574
38575#include <stdlib.h>
38576#include <math.h>
38577#include <errno.h>
38578/* Compare two numbers with ==.
38579   This is a separate function because IRIX 6.5 "cc -O" miscompiles an
38580   'x == x' test.  */
38581static int
38582numeric_equal (double x, double y)
38583{
38584  return x == y;
38585}
38586
38587int
38588main ()
38589{
38590
38591  {
38592    /* Older glibc and Cygwin mis-parse "-0x".  */
38593    const char *string = "-0x";
38594    char *term;
38595    double value = strtod (string, &term);
38596    double zero = 0.0;
38597    if (1.0 / value != -1.0 / zero || term != (string + 2))
38598      return 1;
38599  }
38600  {
38601    /* Many platforms do not parse hex floats.  */
38602    const char *string = "0XaP+1";
38603    char *term;
38604    double value = strtod (string, &term);
38605    if (value != 20.0 || term != (string + 6))
38606      return 1;
38607  }
38608  {
38609    /* Many platforms do not parse infinities.  HP-UX 11.31 parses inf,
38610       but mistakenly sets errno.  */
38611    const char *string = "inf";
38612    char *term;
38613    double value;
38614    errno = 0;
38615    value = strtod (string, &term);
38616    if (value != HUGE_VAL || term != (string + 3) || errno)
38617      return 1;
38618  }
38619  {
38620    /* glibc 2.7 and cygwin 1.5.24 misparse "nan()".  */
38621    const char *string = "nan()";
38622    char *term;
38623    double value = strtod (string, &term);
38624    if (numeric_equal (value, value) || term != (string + 5))
38625      return 1;
38626  }
38627  {
38628    /* darwin 10.6.1 misparses "nan(".  */
38629    const char *string = "nan(";
38630    char *term;
38631    double value = strtod (string, &term);
38632    if (numeric_equal (value, value) || term != (string + 3))
38633      return 1;
38634  }
38635
38636  ;
38637  return 0;
38638}
38639_ACEOF
38640if ac_fn_c_try_run "$LINENO"; then :
38641  gl_cv_func_strtod_works=yes
38642else
38643  gl_cv_func_strtod_works=no
38644fi
38645rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38646  conftest.$ac_objext conftest.beam conftest.$ac_ext
38647fi
38648
38649fi
38650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtod_works" >&5
38651$as_echo "$gl_cv_func_strtod_works" >&6; }
38652    if test "$gl_cv_func_strtod_works" != yes; then
38653      REPLACE_STRTOD=1
38654      :
38655
38656
38657
38658
38659
38660
38661
38662
38663  gl_LIBOBJS="$gl_LIBOBJS strtod.$ac_objext"
38664
38665ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
38666if test "x$ac_cv_func_pow" = x""yes; then :
38667
38668fi
38669
38670if test $ac_cv_func_pow = no; then
38671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
38672$as_echo_n "checking for pow in -lm... " >&6; }
38673if test "${ac_cv_lib_m_pow+set}" = set; then :
38674  $as_echo_n "(cached) " >&6
38675else
38676  ac_check_lib_save_LIBS=$LIBS
38677LIBS="-lm  $LIBS"
38678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38679/* end confdefs.h.  */
38680
38681/* Override any GCC internal prototype to avoid an error.
38682   Use char because int might match the return type of a GCC
38683   builtin and then its argument prototype would still apply.  */
38684#ifdef __cplusplus
38685extern "C"
38686#endif
38687char pow ();
38688int
38689main ()
38690{
38691return pow ();
38692  ;
38693  return 0;
38694}
38695_ACEOF
38696if ac_fn_c_try_link "$LINENO"; then :
38697  ac_cv_lib_m_pow=yes
38698else
38699  ac_cv_lib_m_pow=no
38700fi
38701rm -f core conftest.err conftest.$ac_objext \
38702    conftest$ac_exeext conftest.$ac_ext
38703LIBS=$ac_check_lib_save_LIBS
38704fi
38705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
38706$as_echo "$ac_cv_lib_m_pow" >&6; }
38707if test "x$ac_cv_lib_m_pow" = x""yes; then :
38708  POW_LIB=-lm
38709else
38710  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
38711$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
38712fi
38713
38714fi
38715
38716    fi
38717  fi
38718
38719
38720
38721  GNULIB_STRTOD=1
38722
38723
38724
38725
38726
38727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <inttypes.h> defines strtoimax as a macro" >&5
38728$as_echo_n "checking whether <inttypes.h> defines strtoimax as a macro... " >&6; }
38729if test "${gl_cv_func_strtoimax_macro+set}" = set; then :
38730  $as_echo_n "(cached) " >&6
38731else
38732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38733/* end confdefs.h.  */
38734#include <inttypes.h>
38735#ifdef strtoimax
38736 inttypes_h_defines_strtoimax
38737#endif
38738_ACEOF
38739if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38740  $EGREP "inttypes_h_defines_strtoimax" >/dev/null 2>&1; then :
38741  gl_cv_func_strtoimax_macro=yes
38742else
38743  gl_cv_func_strtoimax_macro=no
38744fi
38745rm -f conftest*
38746
38747fi
38748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax_macro" >&5
38749$as_echo "$gl_cv_func_strtoimax_macro" >&6; }
38750
38751  if test "$gl_cv_func_strtoimax_macro" != yes; then
38752
38753
38754
38755
38756
38757
38758
38759
38760  for ac_func in strtoimax
38761do :
38762  ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax"
38763if test "x$ac_cv_func_strtoimax" = x""yes; then :
38764  cat >>confdefs.h <<_ACEOF
38765#define HAVE_STRTOIMAX 1
38766_ACEOF
38767
38768else
38769
38770    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
38771
38772fi
38773done
38774
38775
38776    if test $ac_cv_func_strtoimax = no; then
38777
38778  ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
38779if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
38780  ac_have_decl=1
38781else
38782  ac_have_decl=0
38783fi
38784
38785cat >>confdefs.h <<_ACEOF
38786#define HAVE_DECL_STRTOLL $ac_have_decl
38787_ACEOF
38788
38789
38790
38791    fi
38792  fi
38793
38794
38795
38796  GNULIB_STRTOIMAX=1
38797
38798
38799
38800
38801
38802
38803
38804
38805
38806
38807  for ac_func in strtol
38808do :
38809  ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
38810if test "x$ac_cv_func_strtol" = x""yes; then :
38811  cat >>confdefs.h <<_ACEOF
38812#define HAVE_STRTOL 1
38813_ACEOF
38814
38815else
38816
38817    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
38818
38819fi
38820done
38821
38822
38823
38824
38825
38826
38827  if test "$ac_cv_type_long_long_int" = yes; then
38828
38829
38830
38831
38832
38833
38834
38835
38836  for ac_func in strtoll
38837do :
38838  ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
38839if test "x$ac_cv_func_strtoll" = x""yes; then :
38840  cat >>confdefs.h <<_ACEOF
38841#define HAVE_STRTOLL 1
38842_ACEOF
38843
38844else
38845
38846    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
38847
38848fi
38849done
38850
38851
38852    if test $ac_cv_func_strtoll = no; then
38853      HAVE_STRTOLL=0
38854
38855  :
38856
38857    fi
38858  fi
38859
38860
38861
38862  GNULIB_STRTOLL=1
38863
38864
38865
38866
38867
38868
38869
38870
38871
38872
38873  for ac_func in strtoul
38874do :
38875  ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
38876if test "x$ac_cv_func_strtoul" = x""yes; then :
38877  cat >>confdefs.h <<_ACEOF
38878#define HAVE_STRTOUL 1
38879_ACEOF
38880
38881else
38882
38883    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
38884
38885fi
38886done
38887
38888
38889
38890
38891
38892
38893  if test "$ac_cv_type_unsigned_long_long_int" = yes; then
38894
38895
38896
38897
38898
38899
38900
38901
38902  for ac_func in strtoull
38903do :
38904  ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
38905if test "x$ac_cv_func_strtoull" = x""yes; then :
38906  cat >>confdefs.h <<_ACEOF
38907#define HAVE_STRTOULL 1
38908_ACEOF
38909
38910else
38911
38912    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
38913
38914fi
38915done
38916
38917
38918    if test $ac_cv_func_strtoull = no; then
38919      HAVE_STRTOULL=0
38920
38921  :
38922
38923    fi
38924  fi
38925
38926
38927
38928  GNULIB_STRTOULL=1
38929
38930
38931
38932
38933
38934  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <inttypes.h> defines strtoumax as a macro" >&5
38935$as_echo_n "checking whether <inttypes.h> defines strtoumax as a macro... " >&6; }
38936if test "${gl_cv_func_strtoumax_macro+set}" = set; then :
38937  $as_echo_n "(cached) " >&6
38938else
38939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38940/* end confdefs.h.  */
38941#include <inttypes.h>
38942#ifdef strtoumax
38943 inttypes_h_defines_strtoumax
38944#endif
38945_ACEOF
38946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38947  $EGREP "inttypes_h_defines_strtoumax" >/dev/null 2>&1; then :
38948  gl_cv_func_strtoumax_macro=yes
38949else
38950  gl_cv_func_strtoumax_macro=no
38951fi
38952rm -f conftest*
38953
38954fi
38955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoumax_macro" >&5
38956$as_echo "$gl_cv_func_strtoumax_macro" >&6; }
38957
38958  if test "$gl_cv_func_strtoumax_macro" != yes; then
38959
38960
38961
38962
38963
38964
38965
38966
38967  for ac_func in strtoumax
38968do :
38969  ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax"
38970if test "x$ac_cv_func_strtoumax" = x""yes; then :
38971  cat >>confdefs.h <<_ACEOF
38972#define HAVE_STRTOUMAX 1
38973_ACEOF
38974
38975else
38976
38977    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
38978
38979fi
38980done
38981
38982
38983    if test $ac_cv_func_strtoumax = no; then
38984
38985  ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
38986if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
38987  ac_have_decl=1
38988else
38989  ac_have_decl=0
38990fi
38991
38992cat >>confdefs.h <<_ACEOF
38993#define HAVE_DECL_STRTOULL $ac_have_decl
38994_ACEOF
38995
38996
38997
38998    fi
38999  fi
39000
39001
39002
39003  GNULIB_STRTOUMAX=1
39004
39005
39006
39007
39008        if test $ac_cv_func_symlink = no; then
39009    HAVE_SYMLINK=0
39010
39011
39012
39013
39014
39015
39016
39017
39018  gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
39019
39020  else
39021    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
39022$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
39023if test "${gl_cv_func_symlink_works+set}" = set; then :
39024  $as_echo_n "(cached) " >&6
39025else
39026  if test "$cross_compiling" = yes; then :
39027  gl_cv_func_symlink_works="guessing no"
39028else
39029  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39030/* end confdefs.h.  */
39031#include <unistd.h>
39032
39033int
39034main ()
39035{
39036if (!symlink ("a", "conftest.link/")) return 1;
39037      if (symlink ("conftest.f", "conftest.lnk2")) return 2;
39038      if (!symlink ("a", "conftest.lnk2/")) return 3;
39039  ;
39040  return 0;
39041}
39042_ACEOF
39043if ac_fn_c_try_run "$LINENO"; then :
39044  gl_cv_func_symlink_works=yes
39045else
39046  gl_cv_func_symlink_works=no
39047fi
39048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39049  conftest.$ac_objext conftest.beam conftest.$ac_ext
39050fi
39051
39052      rm -f conftest.f conftest.link conftest.lnk2
39053fi
39054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
39055$as_echo "$gl_cv_func_symlink_works" >&6; }
39056    if test "$gl_cv_func_symlink_works" != yes; then
39057      REPLACE_SYMLINK=1
39058
39059
39060
39061
39062
39063
39064
39065
39066  gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
39067
39068    fi
39069  fi
39070
39071
39072
39073  GNULIB_SYMLINK=1
39074
39075
39076
39077
39078
39079
39080  if test $ac_cv_func_symlinkat = no; then
39081    # No known system has readlinkat but not symlinkat
39082    HAVE_SYMLINKAT=0
39083    HAVE_READLINKAT=0
39084
39085
39086
39087
39088
39089
39090
39091
39092  gl_LIBOBJS="$gl_LIBOBJS symlinkat.$ac_objext"
39093
39094  fi
39095
39096
39097
39098  GNULIB_SYMLINKAT=1
39099
39100
39101
39102  GNULIB_READLINKAT=1
39103
39104
39105
39106
39107  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
39108$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
39109if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
39110  $as_echo_n "(cached) " >&6
39111else
39112
39113                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39114/* end confdefs.h.  */
39115#include <sys/select.h>
39116int
39117main ()
39118{
39119struct timeval b;
39120  ;
39121  return 0;
39122}
39123_ACEOF
39124if ac_fn_c_try_compile "$LINENO"; then :
39125  gl_cv_header_sys_select_h_selfcontained=yes
39126else
39127  gl_cv_header_sys_select_h_selfcontained=no
39128fi
39129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39130                        if test $gl_cv_header_sys_select_h_selfcontained = yes; then
39131        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39132/* end confdefs.h.  */
39133#include <sys/select.h>
39134int
39135main ()
39136{
39137int memset; int bzero;
39138  ;
39139  return 0;
39140}
39141
39142_ACEOF
39143if ac_fn_c_try_compile "$LINENO"; then :
39144  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39145/* end confdefs.h.  */
39146#include <sys/select.h>
39147int
39148main ()
39149{
39150
39151                  #undef memset
39152                  #define memset nonexistent_memset
39153                  extern void *memset (void *, int, unsigned long);
39154                  #undef bzero
39155                  #define bzero nonexistent_bzero
39156                  extern void bzero (void *, unsigned long);
39157                  fd_set fds;
39158                  FD_ZERO (&fds);
39159
39160  ;
39161  return 0;
39162}
39163
39164_ACEOF
39165if ac_fn_c_try_link "$LINENO"; then :
39166
39167else
39168  gl_cv_header_sys_select_h_selfcontained=no
39169fi
39170rm -f core conftest.err conftest.$ac_objext \
39171    conftest$ac_exeext conftest.$ac_ext
39172
39173fi
39174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39175      fi
39176
39177fi
39178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
39179$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
39180
39181
39182
39183
39184
39185
39186
39187     if test $gl_cv_have_include_next = yes; then
39188       gl_cv_next_sys_select_h='<'sys/select.h'>'
39189     else
39190       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
39191$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
39192if test "${gl_cv_next_sys_select_h+set}" = set; then :
39193  $as_echo_n "(cached) " >&6
39194else
39195
39196          if test $ac_cv_header_sys_select_h = yes; then
39197            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39198/* end confdefs.h.  */
39199#include <sys/select.h>
39200
39201_ACEOF
39202                                                                                                case "$host_os" in
39203              aix*) gl_absname_cpp="$ac_cpp -C" ;;
39204              *)    gl_absname_cpp="$ac_cpp" ;;
39205            esac
39206                                                gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
39207               sed -n '\#/sys/select.h#{
39208                 s#.*"\(.*/sys/select.h\)".*#\1#
39209                 s#^/[^/]#//&#
39210                 p
39211                 q
39212               }'`'"'
39213          else
39214            gl_cv_next_sys_select_h='<'sys/select.h'>'
39215          fi
39216
39217fi
39218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
39219$as_echo "$gl_cv_next_sys_select_h" >&6; }
39220     fi
39221     NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
39222
39223     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
39224       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
39225       gl_next_as_first_directive='<'sys/select.h'>'
39226     else
39227       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
39228       gl_next_as_first_directive=$gl_cv_next_sys_select_h
39229     fi
39230     NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
39231
39232
39233
39234  if test $ac_cv_header_sys_select_h = yes; then
39235    HAVE_SYS_SELECT_H=1
39236  else
39237    HAVE_SYS_SELECT_H=0
39238  fi
39239
39240  if test $gl_cv_header_sys_select_h_selfcontained != yes; then
39241
39242
39243
39244
39245  if test $ac_cv_header_sys_socket_h != yes; then
39246                    for ac_header in winsock2.h
39247do :
39248  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
39249if test "x$ac_cv_header_winsock2_h" = x""yes; then :
39250  cat >>confdefs.h <<_ACEOF
39251#define HAVE_WINSOCK2_H 1
39252_ACEOF
39253
39254fi
39255
39256done
39257
39258  fi
39259  if test "$ac_cv_header_winsock2_h" = yes; then
39260    HAVE_WINSOCK2_H=1
39261    UNISTD_H_HAVE_WINSOCK2_H=1
39262    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
39263  else
39264    HAVE_WINSOCK2_H=0
39265  fi
39266
39267
39268  fi
39269
39270
39271
39272
39273
39274
39275  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
39276$as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
39277if test "${gl_cv_header_sys_socket_h_selfcontained+set}" = set; then :
39278  $as_echo_n "(cached) " >&6
39279else
39280
39281      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39282/* end confdefs.h.  */
39283#include <sys/socket.h>
39284int
39285main ()
39286{
39287
39288  ;
39289  return 0;
39290}
39291_ACEOF
39292if ac_fn_c_try_compile "$LINENO"; then :
39293  gl_cv_header_sys_socket_h_selfcontained=yes
39294else
39295  gl_cv_header_sys_socket_h_selfcontained=no
39296fi
39297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39298
39299fi
39300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
39301$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
39302  if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
39303    SYS_SOCKET_H=''
39304            for ac_func in shutdown
39305do :
39306  ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
39307if test "x$ac_cv_func_shutdown" = x""yes; then :
39308  cat >>confdefs.h <<_ACEOF
39309#define HAVE_SHUTDOWN 1
39310_ACEOF
39311
39312fi
39313done
39314
39315    if test $ac_cv_func_shutdown = yes; then
39316      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
39317$as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
39318if test "${gl_cv_header_sys_socket_h_shut+set}" = set; then :
39319  $as_echo_n "(cached) " >&6
39320else
39321
39322          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39323/* end confdefs.h.  */
39324#include <sys/socket.h>
39325int
39326main ()
39327{
39328int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
39329  ;
39330  return 0;
39331}
39332_ACEOF
39333if ac_fn_c_try_compile "$LINENO"; then :
39334  gl_cv_header_sys_socket_h_shut=yes
39335else
39336  gl_cv_header_sys_socket_h_shut=no
39337fi
39338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39339
39340fi
39341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
39342$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
39343      if test $gl_cv_header_sys_socket_h_shut = no; then
39344        SYS_SOCKET_H='sys/socket.h'
39345      fi
39346    fi
39347  else
39348    SYS_SOCKET_H='sys/socket.h'
39349  fi
39350  # We need to check for ws2tcpip.h now.
39351
39352
39353
39354
39355
39356
39357
39358     if test $gl_cv_have_include_next = yes; then
39359       gl_cv_next_sys_socket_h='<'sys/socket.h'>'
39360     else
39361       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
39362$as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
39363if test "${gl_cv_next_sys_socket_h+set}" = set; then :
39364  $as_echo_n "(cached) " >&6
39365else
39366
39367          if test $ac_cv_header_sys_socket_h = yes; then
39368            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39369/* end confdefs.h.  */
39370#include <sys/socket.h>
39371
39372_ACEOF
39373                                                                                                case "$host_os" in
39374              aix*) gl_absname_cpp="$ac_cpp -C" ;;
39375              *)    gl_absname_cpp="$ac_cpp" ;;
39376            esac
39377                                                gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
39378               sed -n '\#/sys/socket.h#{
39379                 s#.*"\(.*/sys/socket.h\)".*#\1#
39380                 s#^/[^/]#//&#
39381                 p
39382                 q
39383               }'`'"'
39384          else
39385            gl_cv_next_sys_socket_h='<'sys/socket.h'>'
39386          fi
39387
39388fi
39389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
39390$as_echo "$gl_cv_next_sys_socket_h" >&6; }
39391     fi
39392     NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
39393
39394     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
39395       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
39396       gl_next_as_first_directive='<'sys/socket.h'>'
39397     else
39398       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
39399       gl_next_as_first_directive=$gl_cv_next_sys_socket_h
39400     fi
39401     NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
39402
39403
39404
39405  if test $ac_cv_header_sys_socket_h = yes; then
39406    HAVE_SYS_SOCKET_H=1
39407    HAVE_WS2TCPIP_H=0
39408  else
39409    HAVE_SYS_SOCKET_H=0
39410                    for ac_header in ws2tcpip.h
39411do :
39412  ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
39413if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
39414  cat >>confdefs.h <<_ACEOF
39415#define HAVE_WS2TCPIP_H 1
39416_ACEOF
39417
39418fi
39419
39420done
39421
39422    if test $ac_cv_header_ws2tcpip_h = yes; then
39423      HAVE_WS2TCPIP_H=1
39424    else
39425      HAVE_WS2TCPIP_H=0
39426    fi
39427  fi
39428
39429
39430
39431  ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
39432  /* sys/types.h is not needed according to POSIX, but the
39433     sys/socket.h in i386-unknown-freebsd4.10 and
39434     powerpc-apple-darwin5.5 required it. */
39435#include <sys/types.h>
39436#ifdef HAVE_SYS_SOCKET_H
39437#include <sys/socket.h>
39438#endif
39439#ifdef HAVE_WS2TCPIP_H
39440#include <ws2tcpip.h>
39441#endif
39442
39443"
39444if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then :
39445
39446cat >>confdefs.h <<_ACEOF
39447#define HAVE_STRUCT_SOCKADDR_STORAGE 1
39448_ACEOF
39449
39450
39451fi
39452ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
39453  /* sys/types.h is not needed according to POSIX, but the
39454     sys/socket.h in i386-unknown-freebsd4.10 and
39455     powerpc-apple-darwin5.5 required it. */
39456#include <sys/types.h>
39457#ifdef HAVE_SYS_SOCKET_H
39458#include <sys/socket.h>
39459#endif
39460#ifdef HAVE_WS2TCPIP_H
39461#include <ws2tcpip.h>
39462#endif
39463
39464"
39465if test "x$ac_cv_type_sa_family_t" = x""yes; then :
39466
39467cat >>confdefs.h <<_ACEOF
39468#define HAVE_SA_FAMILY_T 1
39469_ACEOF
39470
39471
39472fi
39473
39474  if test $ac_cv_type_struct_sockaddr_storage = no; then
39475    HAVE_STRUCT_SOCKADDR_STORAGE=0
39476    SYS_SOCKET_H='sys/socket.h'
39477  fi
39478  if test $ac_cv_type_sa_family_t = no; then
39479    HAVE_SA_FAMILY_T=0
39480    SYS_SOCKET_H='sys/socket.h'
39481  fi
39482  if test -n "$SYS_SOCKET_H"; then
39483
39484
39485
39486
39487  if test $ac_cv_header_sys_socket_h != yes; then
39488                    for ac_header in winsock2.h
39489do :
39490  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
39491if test "x$ac_cv_header_winsock2_h" = x""yes; then :
39492  cat >>confdefs.h <<_ACEOF
39493#define HAVE_WINSOCK2_H 1
39494_ACEOF
39495
39496fi
39497
39498done
39499
39500  fi
39501  if test "$ac_cv_header_winsock2_h" = yes; then
39502    HAVE_WINSOCK2_H=1
39503    UNISTD_H_HAVE_WINSOCK2_H=1
39504    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
39505  else
39506    HAVE_WINSOCK2_H=0
39507  fi
39508
39509
39510  fi
39511
39512
39513
39514
39515
39516
39517
39518
39519
39520
39521
39522
39523
39524
39525
39526
39527     if test $gl_cv_have_include_next = yes; then
39528       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
39529     else
39530       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
39531$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
39532if test "${gl_cv_next_sys_stat_h+set}" = set; then :
39533  $as_echo_n "(cached) " >&6
39534else
39535
39536          if test $ac_cv_header_sys_stat_h = yes; then
39537            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39538/* end confdefs.h.  */
39539#include <sys/stat.h>
39540
39541_ACEOF
39542                                                                                                case "$host_os" in
39543              aix*) gl_absname_cpp="$ac_cpp -C" ;;
39544              *)    gl_absname_cpp="$ac_cpp" ;;
39545            esac
39546                                                gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
39547               sed -n '\#/sys/stat.h#{
39548                 s#.*"\(.*/sys/stat.h\)".*#\1#
39549                 s#^/[^/]#//&#
39550                 p
39551                 q
39552               }'`'"'
39553          else
39554            gl_cv_next_sys_stat_h='<'sys/stat.h'>'
39555          fi
39556
39557fi
39558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
39559$as_echo "$gl_cv_next_sys_stat_h" >&6; }
39560     fi
39561     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
39562
39563     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
39564       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
39565       gl_next_as_first_directive='<'sys/stat.h'>'
39566     else
39567       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
39568       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
39569     fi
39570     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
39571
39572
39573
39574
39575      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
39576     #include <sys/stat.h>
39577"
39578if test "x$ac_cv_type_nlink_t" = x""yes; then :
39579
39580else
39581
39582$as_echo "#define nlink_t int" >>confdefs.h
39583
39584fi
39585
39586
39587
39588
39589
39590
39591
39592
39593
39594
39595
39596
39597
39598
39599
39600
39601
39602     if test $gl_cv_have_include_next = yes; then
39603       gl_cv_next_sys_utsname_h='<'sys/utsname.h'>'
39604     else
39605       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/utsname.h>" >&5
39606$as_echo_n "checking absolute name of <sys/utsname.h>... " >&6; }
39607if test "${gl_cv_next_sys_utsname_h+set}" = set; then :
39608  $as_echo_n "(cached) " >&6
39609else
39610
39611          if test $ac_cv_header_sys_utsname_h = yes; then
39612            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39613/* end confdefs.h.  */
39614#include <sys/utsname.h>
39615
39616_ACEOF
39617                                                                                                case "$host_os" in
39618              aix*) gl_absname_cpp="$ac_cpp -C" ;;
39619              *)    gl_absname_cpp="$ac_cpp" ;;
39620            esac
39621                                                gl_cv_next_sys_utsname_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
39622               sed -n '\#/sys/utsname.h#{
39623                 s#.*"\(.*/sys/utsname.h\)".*#\1#
39624                 s#^/[^/]#//&#
39625                 p
39626                 q
39627               }'`'"'
39628          else
39629            gl_cv_next_sys_utsname_h='<'sys/utsname.h'>'
39630          fi
39631
39632fi
39633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_utsname_h" >&5
39634$as_echo "$gl_cv_next_sys_utsname_h" >&6; }
39635     fi
39636     NEXT_SYS_UTSNAME_H=$gl_cv_next_sys_utsname_h
39637
39638     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
39639       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
39640       gl_next_as_first_directive='<'sys/utsname.h'>'
39641     else
39642       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
39643       gl_next_as_first_directive=$gl_cv_next_sys_utsname_h
39644     fi
39645     NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H=$gl_next_as_first_directive
39646
39647
39648
39649
39650  if test $ac_cv_header_sys_utsname_h != yes; then
39651    HAVE_SYS_UTSNAME_H=0
39652    HAVE_STRUCT_UTSNAME=0
39653  else
39654    HAVE_SYS_UTSNAME_H=1
39655    ac_fn_c_check_type "$LINENO" "struct utsname" "ac_cv_type_struct_utsname" "
39656#include <sys/utsname.h>
39657
39658"
39659if test "x$ac_cv_type_struct_utsname" = x""yes; then :
39660
39661cat >>confdefs.h <<_ACEOF
39662#define HAVE_STRUCT_UTSNAME 1
39663_ACEOF
39664
39665
39666else
39667  HAVE_STRUCT_UTSNAME=0
39668fi
39669
39670  fi
39671
39672
39673
39674
39675
39676
39677
39678
39679
39680
39681
39682
39683
39684
39685  gl_LIBOBJS="$gl_LIBOBJS tempname.$ac_objext"
39686
39687
39688  :
39689
39690
39691
39692
39693
39694
39695
39696
39697
39698
39699
39700
39701
39702
39703
39704  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
39705$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
39706if test "${gl_cv_time_r_posix+set}" = set; then :
39707  $as_echo_n "(cached) " >&6
39708else
39709  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39710/* end confdefs.h.  */
39711#include <time.h>
39712int
39713main ()
39714{
39715/* We don't need to append 'restrict's to the argument types,
39716              even though the POSIX signature has the 'restrict's,
39717              since C99 says they can't affect type compatibility.  */
39718           struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
39719           if (ptr) return 0;
39720           /* Check the return type is a pointer.  On HP-UX 10 it is 'int'.  */
39721           *localtime_r (0, 0);
39722  ;
39723  return 0;
39724}
39725_ACEOF
39726if ac_fn_c_try_compile "$LINENO"; then :
39727  gl_cv_time_r_posix=yes
39728else
39729  gl_cv_time_r_posix=no
39730fi
39731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39732fi
39733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
39734$as_echo "$gl_cv_time_r_posix" >&6; }
39735  if test $gl_cv_time_r_posix = yes; then
39736    REPLACE_LOCALTIME_R=0
39737  else
39738    REPLACE_LOCALTIME_R=1
39739
39740
39741
39742
39743
39744
39745
39746
39747  gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
39748
39749
39750  :
39751
39752  fi
39753
39754
39755
39756
39757
39758
39759
39760
39761
39762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tzset clobbers localtime buffer" >&5
39763$as_echo_n "checking whether tzset clobbers localtime buffer... " >&6; }
39764if test "${gl_cv_func_tzset_clobber+set}" = set; then :
39765  $as_echo_n "(cached) " >&6
39766else
39767
39768  if test "$cross_compiling" = yes; then :
39769  gl_cv_func_tzset_clobber=yes
39770else
39771  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39772/* end confdefs.h.  */
39773
39774#include <time.h>
39775#include <stdlib.h>
39776
39777int
39778main ()
39779{
39780  time_t t1 = 853958121;
39781  struct tm *p, s;
39782  putenv ("TZ=GMT0");
39783  p = localtime (&t1);
39784  s = *p;
39785  putenv ("TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00");
39786  tzset ();
39787  return (p->tm_year != s.tm_year
39788          || p->tm_mon != s.tm_mon
39789          || p->tm_mday != s.tm_mday
39790          || p->tm_hour != s.tm_hour
39791          || p->tm_min != s.tm_min
39792          || p->tm_sec != s.tm_sec);
39793}
39794
39795_ACEOF
39796if ac_fn_c_try_run "$LINENO"; then :
39797  gl_cv_func_tzset_clobber=no
39798else
39799  gl_cv_func_tzset_clobber=yes
39800fi
39801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39802  conftest.$ac_objext conftest.beam conftest.$ac_ext
39803fi
39804
39805fi
39806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_tzset_clobber" >&5
39807$as_echo "$gl_cv_func_tzset_clobber" >&6; }
39808
39809
39810$as_echo "#define HAVE_RUN_TZSET_TEST 1" >>confdefs.h
39811
39812
39813  if test $gl_cv_func_tzset_clobber = yes; then
39814
39815
39816
39817
39818
39819
39820
39821
39822
39823  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
39824
39825
39826  for ac_header in sys/timeb.h
39827do :
39828  ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
39829if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
39830  cat >>confdefs.h <<_ACEOF
39831#define HAVE_SYS_TIMEB_H 1
39832_ACEOF
39833
39834fi
39835
39836done
39837
39838  for ac_func in _ftime
39839do :
39840  ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
39841if test "x$ac_cv_func__ftime" = x""yes; then :
39842  cat >>confdefs.h <<_ACEOF
39843#define HAVE__FTIME 1
39844_ACEOF
39845
39846fi
39847done
39848
39849
39850
39851$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
39852
39853
39854$as_echo "#define localtime rpl_localtime" >>confdefs.h
39855
39856
39857
39858
39859$as_echo "#define tzset rpl_tzset" >>confdefs.h
39860
39861
39862$as_echo "#define TZSET_CLOBBERS_LOCALTIME 1" >>confdefs.h
39863
39864  fi
39865
39866
39867
39868
39869
39870
39871
39872
39873
39874
39875
39876
39877  for ac_func in uname
39878do :
39879  ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
39880if test "x$ac_cv_func_uname" = x""yes; then :
39881  cat >>confdefs.h <<_ACEOF
39882#define HAVE_UNAME 1
39883_ACEOF
39884
39885else
39886
39887    gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
39888
39889fi
39890done
39891
39892
39893  if test $ac_cv_func_uname = no; then
39894    HAVE_UNAME=0
39895
39896  :
39897
39898  fi
39899
39900
39901
39902  GNULIB_UNAME=1
39903
39904
39905    :
39906
39907
39908
39909
39910
39911
39912
39913
39914
39915
39916
39917     if test $gl_cv_have_include_next = yes; then
39918       gl_cv_next_unistd_h='<'unistd.h'>'
39919     else
39920       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
39921$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
39922if test "${gl_cv_next_unistd_h+set}" = set; then :
39923  $as_echo_n "(cached) " >&6
39924else
39925
39926          if test $ac_cv_header_unistd_h = yes; then
39927            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39928/* end confdefs.h.  */
39929#include <unistd.h>
39930
39931_ACEOF
39932                                                                                                case "$host_os" in
39933              aix*) gl_absname_cpp="$ac_cpp -C" ;;
39934              *)    gl_absname_cpp="$ac_cpp" ;;
39935            esac
39936                                                gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
39937               sed -n '\#/unistd.h#{
39938                 s#.*"\(.*/unistd.h\)".*#\1#
39939                 s#^/[^/]#//&#
39940                 p
39941                 q
39942               }'`'"'
39943          else
39944            gl_cv_next_unistd_h='<'unistd.h'>'
39945          fi
39946
39947fi
39948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
39949$as_echo "$gl_cv_next_unistd_h" >&6; }
39950     fi
39951     NEXT_UNISTD_H=$gl_cv_next_unistd_h
39952
39953     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
39954       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
39955       gl_next_as_first_directive='<'unistd.h'>'
39956     else
39957       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
39958       gl_next_as_first_directive=$gl_cv_next_unistd_h
39959     fi
39960     NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
39961
39962
39963
39964
39965
39966  if test $ac_cv_header_unistd_h = yes; then
39967    HAVE_UNISTD_H=1
39968  else
39969    HAVE_UNISTD_H=0
39970  fi
39971
39972
39973
39974    for gl_func in environ; do
39975    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
39976    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
39977$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
39978if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
39979  $as_echo_n "(cached) " >&6
39980else
39981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39982/* end confdefs.h.  */
39983#include <unistd.h>
39984/* Some systems declare environ in the wrong header.  */
39985#ifndef __GLIBC__
39986# include <stdlib.h>
39987#endif
39988
39989int
39990main ()
39991{
39992#undef $gl_func
39993  (void) $gl_func;
39994  ;
39995  return 0;
39996}
39997_ACEOF
39998if ac_fn_c_try_compile "$LINENO"; then :
39999  eval "$as_gl_Symbol=yes"
40000else
40001  eval "$as_gl_Symbol=no"
40002fi
40003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40004fi
40005eval ac_res=\$$as_gl_Symbol
40006	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
40007$as_echo "$ac_res" >&6; }
40008     eval as_val=\$$as_gl_Symbol
40009   if test "x$as_val" = x""yes; then :
40010  cat >>confdefs.h <<_ACEOF
40011#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
40012_ACEOF
40013
40014                     eval ac_cv_have_decl_$gl_func=yes
40015fi
40016      done
40017
40018
40019
40020
40021
40022
40023
40024
40025
40026
40027
40028
40029  gl_LIBOBJS="$gl_LIBOBJS dup-safer.$ac_objext"
40030
40031
40032
40033
40034
40035
40036
40037
40038
40039  gl_LIBOBJS="$gl_LIBOBJS fd-safer.$ac_objext"
40040
40041
40042
40043
40044
40045
40046
40047
40048
40049  gl_LIBOBJS="$gl_LIBOBJS pipe-safer.$ac_objext"
40050
40051
40052
40053
40054$as_echo "#define GNULIB_UNISTR_U8_UCTOMB 1" >>confdefs.h
40055
40056
40057
40058
40059
40060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
40061$as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
40062if test "${gl_cv_func_unlink_works+set}" = set; then :
40063  $as_echo_n "(cached) " >&6
40064else
40065  touch conftest.file
40066     # Assume that if we have lstat, we can also check symlinks.
40067     if test $ac_cv_func_lstat = yes; then
40068       ln -s conftest.file conftest.lnk
40069     fi
40070     if test "$cross_compiling" = yes; then :
40071  gl_cv_func_unlink_works="guessing no"
40072else
40073  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40074/* end confdefs.h.  */
40075#include <unistd.h>
40076           #include <errno.h>
40077
40078int
40079main ()
40080{
40081if (!unlink ("conftest.file/") || errno != ENOTDIR) return 1;
40082#if HAVE_LSTAT
40083      if (!unlink ("conftest.lnk/") || errno != ENOTDIR) return 2;
40084#endif
40085
40086  ;
40087  return 0;
40088}
40089_ACEOF
40090if ac_fn_c_try_run "$LINENO"; then :
40091  gl_cv_func_unlink_works=yes
40092else
40093  gl_cv_func_unlink_works=no
40094fi
40095rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40096  conftest.$ac_objext conftest.beam conftest.$ac_ext
40097fi
40098
40099     rm -f conftest.file conftest.lnk
40100fi
40101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_works" >&5
40102$as_echo "$gl_cv_func_unlink_works" >&6; }
40103  if test x"$gl_cv_func_unlink_works" != xyes; then
40104    REPLACE_UNLINK=1
40105
40106
40107
40108
40109
40110
40111
40112
40113  gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
40114
40115  fi
40116
40117
40118
40119  GNULIB_UNLINK=1
40120
40121    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a running program can be unlinked" >&5
40122$as_echo_n "checking whether a running program can be unlinked... " >&6; }
40123if test "${gl_cv_func_unlink_busy_text+set}" = set; then :
40124  $as_echo_n "(cached) " >&6
40125else
40126
40127      if test "$cross_compiling" = yes; then :
40128  gl_cv_func_unlink_busy_text=no
40129
40130else
40131  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40132/* end confdefs.h.  */
40133$ac_includes_default
40134            int
40135            main (int argc, char **argv)
40136            {
40137              return !argc || unlink (argv[0]) != 0;
40138            }
40139_ACEOF
40140if ac_fn_c_try_run "$LINENO"; then :
40141  gl_cv_func_unlink_busy_text=yes
40142else
40143  gl_cv_func_unlink_busy_text=no
40144fi
40145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40146  conftest.$ac_objext conftest.beam conftest.$ac_ext
40147fi
40148
40149
40150
40151fi
40152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_busy_text" >&5
40153$as_echo "$gl_cv_func_unlink_busy_text" >&6; }
40154
40155  if test $gl_cv_func_unlink_busy_text = no; then
40156    INSTALL=$ac_install_sh
40157  fi
40158
40159
40160
40161$as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
40162
40163
40164
40165
40166
40167
40168
40169
40170
40171
40172
40173
40174
40175
40176
40177
40178
40179
40180
40181
40182  for ac_func in unsetenv
40183do :
40184  ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
40185if test "x$ac_cv_func_unsetenv" = x""yes; then :
40186  cat >>confdefs.h <<_ACEOF
40187#define HAVE_UNSETENV 1
40188_ACEOF
40189
40190fi
40191done
40192
40193  if test $ac_cv_func_unsetenv = no; then
40194    HAVE_UNSETENV=0
40195
40196
40197
40198
40199
40200
40201
40202
40203  gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
40204
40205
40206
40207
40208
40209  else
40210        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
40211$as_echo_n "checking for unsetenv() return type... " >&6; }
40212if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
40213  $as_echo_n "(cached) " >&6
40214else
40215  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40216/* end confdefs.h.  */
40217#include <stdlib.h>
40218extern
40219#ifdef __cplusplus
40220"C"
40221#endif
40222#if defined(__STDC__) || defined(__cplusplus)
40223int unsetenv (const char *name);
40224#else
40225int unsetenv();
40226#endif
40227
40228int
40229main ()
40230{
40231
40232  ;
40233  return 0;
40234}
40235_ACEOF
40236if ac_fn_c_try_compile "$LINENO"; then :
40237  gt_cv_func_unsetenv_ret='int'
40238else
40239  gt_cv_func_unsetenv_ret='void'
40240fi
40241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40242fi
40243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
40244$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
40245    if test $gt_cv_func_unsetenv_ret = 'void'; then
40246
40247$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
40248
40249      REPLACE_UNSETENV=1
40250
40251
40252
40253
40254
40255
40256
40257
40258  gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
40259
40260    fi
40261
40262        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv works on duplicates" >&5
40263$as_echo_n "checking whether unsetenv works on duplicates... " >&6; }
40264if test "${gl_cv_func_unsetenv_works+set}" = set; then :
40265  $as_echo_n "(cached) " >&6
40266else
40267  if test "$cross_compiling" = yes; then :
40268  gl_cv_func_unsetenv_works="guessing no"
40269else
40270  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40271/* end confdefs.h.  */
40272
40273       #include <stdlib.h>
40274
40275int
40276main ()
40277{
40278
40279       char entry[] = "b=2";
40280       if (putenv ((char *) "a=1")) return 1;
40281       if (putenv (entry)) return 2;
40282       entry[0] = 'a';
40283       unsetenv ("a");
40284       if (getenv ("a")) return 3;
40285
40286  ;
40287  return 0;
40288}
40289_ACEOF
40290if ac_fn_c_try_run "$LINENO"; then :
40291  gl_cv_func_unsetenv_works=yes
40292else
40293  gl_cv_func_unsetenv_works=no
40294fi
40295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40296  conftest.$ac_objext conftest.beam conftest.$ac_ext
40297fi
40298
40299fi
40300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
40301$as_echo "$gl_cv_func_unsetenv_works" >&6; }
40302    if test "$gl_cv_func_unsetenv_works" != yes; then
40303      REPLACE_UNSETENV=1
40304
40305
40306
40307
40308
40309
40310
40311
40312  gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
40313
40314    fi
40315  fi
40316
40317
40318
40319  GNULIB_UNSETENV=1
40320
40321
40322  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc/uptime" >&5
40323$as_echo_n "checking for /proc/uptime... " >&6; }
40324if test "${gl_cv_have_proc_uptime+set}" = set; then :
40325  $as_echo_n "(cached) " >&6
40326else
40327  gl_cv_have_proc_uptime=no
40328    test -f /proc/uptime \
40329      && test "$cross_compiling" = no \
40330      && cat < /proc/uptime >/dev/null 2>/dev/null \
40331      && gl_cv_have_proc_uptime=yes
40332fi
40333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_proc_uptime" >&5
40334$as_echo "$gl_cv_have_proc_uptime" >&6; }
40335  if test $gl_cv_have_proc_uptime = yes; then
40336
40337$as_echo "#define HAVE_PROC_UPTIME 1" >>confdefs.h
40338
40339  fi
40340
40341
40342
40343
40344
40345
40346
40347
40348
40349
40350  gl_LIBOBJS="$gl_LIBOBJS userspec.$ac_objext"
40351
40352
40353
40354
40355
40356
40357
40358
40359
40360
40361
40362
40363
40364  gl_LIBOBJS="$gl_LIBOBJS utimecmp.$ac_objext"
40365
40366
40367
40368  :
40369
40370
40371
40372
40373
40374
40375
40376
40377
40378
40379  gl_LIBOBJS="$gl_LIBOBJS utimens.$ac_objext"
40380
40381
40382
40383
40384
40385
40386
40387  if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
40388                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
40389$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
40390if test "${gl_cv_func_futimesat_works+set}" = set; then :
40391  $as_echo_n "(cached) " >&6
40392else
40393  touch conftest.file
40394       if test "$cross_compiling" = yes; then :
40395  gl_cv_func_futimesat_works="guessing no"
40396else
40397  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40398/* end confdefs.h.  */
40399
40400#include <stddef.h>
40401#include <sys/times.h>
40402
40403int
40404main ()
40405{
40406    int fd = open ("conftest.file", O_RDWR);
40407          if (fd < 0) return 1;
40408          if (futimesat (fd, NULL, NULL)) return 2;
40409
40410  ;
40411  return 0;
40412}
40413_ACEOF
40414if ac_fn_c_try_run "$LINENO"; then :
40415  gl_cv_func_futimesat_works=yes
40416else
40417  gl_cv_func_futimesat_works=no
40418fi
40419rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40420  conftest.$ac_objext conftest.beam conftest.$ac_ext
40421fi
40422
40423      rm -f conftest.file
40424fi
40425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
40426$as_echo "$gl_cv_func_futimesat_works" >&6; }
40427    if test "$gl_cv_func_futimesat_works" != yes; then
40428
40429$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
40430
40431    fi
40432  fi
40433
40434
40435
40436  if test $ac_cv_func_vasnprintf = no; then
40437
40438
40439
40440
40441
40442
40443
40444
40445
40446
40447  gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
40448
40449
40450
40451
40452
40453
40454
40455
40456
40457  gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
40458
40459
40460
40461
40462
40463
40464
40465
40466
40467  gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
40468
40469
40470
40471
40472
40473
40474
40475
40476
40477  gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
40478
40479  if test $ac_cv_func_vasnprintf = yes; then
40480
40481$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
40482
40483  fi
40484
40485
40486
40487
40488
40489
40490
40491
40492
40493
40494  ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
40495if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
40496
40497else
40498
40499$as_echo "#define ptrdiff_t long" >>confdefs.h
40500
40501
40502fi
40503
40504
40505
40506
40507
40508
40509
40510  fi
40511
40512
40513  for ac_func in vasprintf
40514do :
40515  ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
40516if test "x$ac_cv_func_vasprintf" = x""yes; then :
40517  cat >>confdefs.h <<_ACEOF
40518#define HAVE_VASPRINTF 1
40519_ACEOF
40520
40521fi
40522done
40523
40524  if test $ac_cv_func_vasprintf = no; then
40525
40526
40527
40528
40529
40530
40531
40532
40533
40534  gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
40535
40536
40537
40538
40539
40540
40541
40542
40543
40544  gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
40545
40546
40547  if test $ac_cv_func_vasprintf = yes; then
40548    REPLACE_VASPRINTF=1
40549  else
40550    HAVE_VASPRINTF=0
40551  fi
40552
40553
40554
40555
40556
40557
40558
40559
40560  fi
40561
40562
40563
40564  GNULIB_VASPRINTF=1
40565
40566
40567
40568  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
40569
40570
40571
40572  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
40573
40574
40575
40576
40577
40578
40579
40580
40581
40582
40583
40584
40585
40586
40587
40588
40589  gl_cv_func_vasprintf_posix=no
40590  for ac_func in vasprintf
40591do :
40592  ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
40593if test "x$ac_cv_func_vasprintf" = x""yes; then :
40594  cat >>confdefs.h <<_ACEOF
40595#define HAVE_VASPRINTF 1
40596_ACEOF
40597
40598fi
40599done
40600
40601  case "$gl_cv_func_printf_sizes_c99" in
40602    *yes)
40603      case "$gl_cv_func_printf_long_double" in
40604        *yes)
40605          case "$gl_cv_func_printf_infinite" in
40606            *yes)
40607              case "$gl_cv_func_printf_infinite_long_double" in
40608                *yes)
40609                  case "$gl_cv_func_printf_directive_a" in
40610                    *yes)
40611                      case "$gl_cv_func_printf_directive_f" in
40612                        *yes)
40613                          case "$gl_cv_func_printf_directive_n" in
40614                            *yes)
40615                              case "$gl_cv_func_printf_directive_ls" in
40616                                *yes)
40617                                  case "$gl_cv_func_printf_positions" in
40618                                    *yes)
40619                                      case "$gl_cv_func_printf_flag_grouping" in
40620                                        *yes)
40621                                          case "$gl_cv_func_printf_flag_leftadjust" in
40622                                            *yes)
40623                                              case "$gl_cv_func_printf_flag_zero" in
40624                                                *yes)
40625                                                  case "$gl_cv_func_printf_precision" in
40626                                                    *yes)
40627                                                      case "$gl_cv_func_printf_enomem" in
40628                                                        *yes)
40629                                                          if test $ac_cv_func_vasprintf = yes; then
40630                                                            # vasprintf exists and is
40631                                                            # already POSIX compliant.
40632                                                            gl_cv_func_vasprintf_posix=yes
40633                                                          fi
40634                                                          ;;
40635                                                      esac
40636                                                      ;;
40637                                                  esac
40638                                                  ;;
40639                                              esac
40640                                              ;;
40641                                          esac
40642                                          ;;
40643                                      esac
40644                                      ;;
40645                                  esac
40646                                  ;;
40647                              esac
40648                              ;;
40649                          esac
40650                          ;;
40651                      esac
40652                      ;;
40653                  esac
40654                  ;;
40655              esac
40656              ;;
40657          esac
40658          ;;
40659      esac
40660      ;;
40661  esac
40662  if test $gl_cv_func_vasprintf_posix = no; then
40663
40664
40665
40666  case "$gl_cv_func_printf_infinite" in
40667    *yes)
40668      ;;
40669    *)
40670
40671$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
40672
40673      ;;
40674  esac
40675
40676
40677
40678
40679  case "$gl_cv_func_printf_long_double" in
40680    *yes)
40681      case "$gl_cv_func_printf_infinite_long_double" in
40682        *yes)
40683          ;;
40684        *)
40685
40686$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
40687
40688          ;;
40689      esac
40690      ;;
40691  esac
40692
40693
40694
40695  case "$gl_cv_func_printf_directive_a" in
40696    *yes)
40697      ;;
40698    *)
40699
40700$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
40701
40702      for ac_func in nl_langinfo
40703do :
40704  ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
40705if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
40706  cat >>confdefs.h <<_ACEOF
40707#define HAVE_NL_LANGINFO 1
40708_ACEOF
40709
40710fi
40711done
40712
40713      ;;
40714  esac
40715
40716
40717
40718  case "$gl_cv_func_printf_directive_f" in
40719    *yes)
40720      ;;
40721    *)
40722
40723$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
40724
40725      ;;
40726  esac
40727
40728
40729
40730  case "$gl_cv_func_printf_directive_ls" in
40731    *yes)
40732      ;;
40733    *)
40734
40735$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
40736
40737      ;;
40738  esac
40739
40740
40741
40742  case "$gl_cv_func_printf_flag_grouping" in
40743    *yes)
40744      ;;
40745    *)
40746
40747$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
40748
40749      ;;
40750  esac
40751
40752
40753
40754  case "$gl_cv_func_printf_flag_leftadjust" in
40755    *yes)
40756      ;;
40757    *)
40758
40759$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
40760
40761      ;;
40762  esac
40763
40764
40765
40766  case "$gl_cv_func_printf_flag_zero" in
40767    *yes)
40768      ;;
40769    *)
40770
40771$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
40772
40773      ;;
40774  esac
40775
40776
40777
40778  case "$gl_cv_func_printf_precision" in
40779    *yes)
40780      ;;
40781    *)
40782
40783$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
40784
40785
40786$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
40787
40788
40789$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
40790
40791      ;;
40792  esac
40793
40794
40795
40796  case "$gl_cv_func_printf_enomem" in
40797    *yes)
40798      ;;
40799    *)
40800
40801$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
40802
40803
40804$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
40805
40806
40807$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
40808
40809      ;;
40810  esac
40811
40812
40813
40814
40815
40816
40817
40818
40819
40820
40821
40822  gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
40823
40824
40825
40826
40827
40828
40829
40830
40831
40832  gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
40833
40834
40835
40836
40837
40838
40839
40840
40841
40842  gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
40843
40844
40845
40846
40847
40848
40849
40850
40851
40852  gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
40853
40854  if test $ac_cv_func_vasnprintf = yes; then
40855
40856$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
40857
40858  fi
40859
40860
40861
40862
40863
40864
40865
40866
40867
40868
40869  ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
40870if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
40871
40872else
40873
40874$as_echo "#define ptrdiff_t long" >>confdefs.h
40875
40876
40877fi
40878
40879
40880
40881
40882
40883
40884
40885
40886
40887
40888
40889
40890
40891
40892
40893
40894  gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
40895
40896
40897
40898
40899
40900
40901
40902
40903
40904  gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
40905
40906
40907  if test $ac_cv_func_vasprintf = yes; then
40908    REPLACE_VASPRINTF=1
40909  else
40910    HAVE_VASPRINTF=0
40911  fi
40912
40913
40914
40915
40916
40917
40918
40919
40920  fi
40921
40922
40923
40924  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror:3:c-format"
40925
40926
40927
40928  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror_at_line:5:c-format"
40929
40930
40931# Check whether --with-packager was given.
40932if test "${with_packager+set}" = set; then :
40933  withval=$with_packager;       case $withval in
40934        yes|no) ;;
40935        *)
40936cat >>confdefs.h <<_ACEOF
40937#define PACKAGE_PACKAGER "$withval"
40938_ACEOF
40939 ;;
40940      esac
40941
40942fi
40943
40944
40945
40946# Check whether --with-packager-version was given.
40947if test "${with_packager_version+set}" = set; then :
40948  withval=$with_packager_version;       case $withval in
40949        yes|no) ;;
40950        *)
40951cat >>confdefs.h <<_ACEOF
40952#define PACKAGE_PACKAGER_VERSION "$withval"
40953_ACEOF
40954 ;;
40955      esac
40956
40957fi
40958
40959
40960
40961# Check whether --with-packager-bug-reports was given.
40962if test "${with_packager_bug_reports+set}" = set; then :
40963  withval=$with_packager_bug_reports;       case $withval in
40964        yes|no) ;;
40965        *)
40966cat >>confdefs.h <<_ACEOF
40967#define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
40968_ACEOF
40969 ;;
40970      esac
40971
40972fi
40973
40974
40975  if test "X$with_packager" = "X" && \
40976     test "X$with_packager_version$with_packager_bug_reports" != "X"
40977  then
40978    as_fn_error "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
40979  fi
40980
40981
40982
40983
40984
40985
40986
40987
40988
40989
40990
40991
40992
40993
40994
40995
40996  gl_cv_func_vfprintf_posix=no
40997  case "$gl_cv_func_printf_sizes_c99" in
40998    *yes)
40999      case "$gl_cv_func_printf_long_double" in
41000        *yes)
41001          case "$gl_cv_func_printf_infinite" in
41002            *yes)
41003              case "$gl_cv_func_printf_infinite_long_double" in
41004                *yes)
41005                  case "$gl_cv_func_printf_directive_a" in
41006                    *yes)
41007                      case "$gl_cv_func_printf_directive_f" in
41008                        *yes)
41009                          case "$gl_cv_func_printf_directive_n" in
41010                            *yes)
41011                              case "$gl_cv_func_printf_directive_ls" in
41012                                *yes)
41013                                  case "$gl_cv_func_printf_positions" in
41014                                    *yes)
41015                                      case "$gl_cv_func_printf_flag_grouping" in
41016                                        *yes)
41017                                          case "$gl_cv_func_printf_flag_leftadjust" in
41018                                            *yes)
41019                                              case "$gl_cv_func_printf_flag_zero" in
41020                                                *yes)
41021                                                  case "$gl_cv_func_printf_precision" in
41022                                                    *yes)
41023                                                      case "$gl_cv_func_printf_enomem" in
41024                                                        *yes)
41025                                                          # vfprintf exists and is
41026                                                          # already POSIX compliant.
41027                                                          gl_cv_func_vfprintf_posix=yes
41028                                                          ;;
41029                                                      esac
41030                                                      ;;
41031                                                  esac
41032                                                  ;;
41033                                              esac
41034                                              ;;
41035                                          esac
41036                                          ;;
41037                                      esac
41038                                      ;;
41039                                  esac
41040                                  ;;
41041                              esac
41042                              ;;
41043                          esac
41044                          ;;
41045                      esac
41046                      ;;
41047                  esac
41048                  ;;
41049              esac
41050              ;;
41051          esac
41052          ;;
41053      esac
41054      ;;
41055  esac
41056  if test $gl_cv_func_vfprintf_posix = no; then
41057
41058
41059
41060  case "$gl_cv_func_printf_infinite" in
41061    *yes)
41062      ;;
41063    *)
41064
41065$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
41066
41067      ;;
41068  esac
41069
41070
41071
41072
41073  case "$gl_cv_func_printf_long_double" in
41074    *yes)
41075      case "$gl_cv_func_printf_infinite_long_double" in
41076        *yes)
41077          ;;
41078        *)
41079
41080$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
41081
41082          ;;
41083      esac
41084      ;;
41085  esac
41086
41087
41088
41089  case "$gl_cv_func_printf_directive_a" in
41090    *yes)
41091      ;;
41092    *)
41093
41094$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
41095
41096      for ac_func in nl_langinfo
41097do :
41098  ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
41099if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
41100  cat >>confdefs.h <<_ACEOF
41101#define HAVE_NL_LANGINFO 1
41102_ACEOF
41103
41104fi
41105done
41106
41107      ;;
41108  esac
41109
41110
41111
41112  case "$gl_cv_func_printf_directive_f" in
41113    *yes)
41114      ;;
41115    *)
41116
41117$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
41118
41119      ;;
41120  esac
41121
41122
41123
41124  case "$gl_cv_func_printf_directive_ls" in
41125    *yes)
41126      ;;
41127    *)
41128
41129$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
41130
41131      ;;
41132  esac
41133
41134
41135
41136  case "$gl_cv_func_printf_flag_grouping" in
41137    *yes)
41138      ;;
41139    *)
41140
41141$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
41142
41143      ;;
41144  esac
41145
41146
41147
41148  case "$gl_cv_func_printf_flag_leftadjust" in
41149    *yes)
41150      ;;
41151    *)
41152
41153$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
41154
41155      ;;
41156  esac
41157
41158
41159
41160  case "$gl_cv_func_printf_flag_zero" in
41161    *yes)
41162      ;;
41163    *)
41164
41165$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
41166
41167      ;;
41168  esac
41169
41170
41171
41172  case "$gl_cv_func_printf_precision" in
41173    *yes)
41174      ;;
41175    *)
41176
41177$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
41178
41179
41180$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
41181
41182
41183$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
41184
41185      ;;
41186  esac
41187
41188
41189
41190  case "$gl_cv_func_printf_enomem" in
41191    *yes)
41192      ;;
41193    *)
41194
41195$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
41196
41197
41198$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
41199
41200
41201$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
41202
41203      ;;
41204  esac
41205
41206
41207
41208
41209
41210
41211
41212
41213
41214
41215
41216  gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
41217
41218
41219
41220
41221
41222
41223
41224
41225
41226  gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
41227
41228
41229
41230
41231
41232
41233
41234
41235
41236  gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
41237
41238
41239
41240
41241
41242
41243
41244
41245
41246  gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
41247
41248  if test $ac_cv_func_vasnprintf = yes; then
41249
41250$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
41251
41252  fi
41253
41254
41255
41256
41257
41258
41259
41260
41261
41262
41263  ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
41264if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
41265
41266else
41267
41268$as_echo "#define ptrdiff_t long" >>confdefs.h
41269
41270
41271fi
41272
41273
41274
41275
41276
41277
41278
41279
41280
41281
41282
41283
41284
41285
41286
41287
41288
41289  gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext"
41290
41291  REPLACE_VFPRINTF=1
41292
41293$as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
41294
41295  :
41296
41297  fi
41298
41299
41300
41301  GNULIB_VFPRINTF_POSIX=1
41302
41303
41304
41305  if test $gl_cv_func_vfprintf_posix = no; then
41306
41307
41308
41309
41310
41311
41312
41313
41314
41315
41316  gl_LIBOBJS="$gl_LIBOBJS vprintf.$ac_objext"
41317
41318  REPLACE_VPRINTF=1
41319
41320$as_echo "#define REPLACE_VPRINTF_POSIX 1" >>confdefs.h
41321
41322  :
41323
41324  fi
41325
41326
41327
41328  GNULIB_VPRINTF_POSIX=1
41329
41330
41331
41332
41333
41334
41335
41336
41337
41338
41339
41340
41341     if test $gl_cv_have_include_next = yes; then
41342       gl_cv_next_wchar_h='<'wchar.h'>'
41343     else
41344       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
41345$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
41346if test "${gl_cv_next_wchar_h+set}" = set; then :
41347  $as_echo_n "(cached) " >&6
41348else
41349
41350          if test $ac_cv_header_wchar_h = yes; then
41351            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41352/* end confdefs.h.  */
41353#include <wchar.h>
41354
41355_ACEOF
41356                                                                                                case "$host_os" in
41357              aix*) gl_absname_cpp="$ac_cpp -C" ;;
41358              *)    gl_absname_cpp="$ac_cpp" ;;
41359            esac
41360                                                gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
41361               sed -n '\#/wchar.h#{
41362                 s#.*"\(.*/wchar.h\)".*#\1#
41363                 s#^/[^/]#//&#
41364                 p
41365                 q
41366               }'`'"'
41367          else
41368            gl_cv_next_wchar_h='<'wchar.h'>'
41369          fi
41370
41371fi
41372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
41373$as_echo "$gl_cv_next_wchar_h" >&6; }
41374     fi
41375     NEXT_WCHAR_H=$gl_cv_next_wchar_h
41376
41377     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
41378       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
41379       gl_next_as_first_directive='<'wchar.h'>'
41380     else
41381       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
41382       gl_next_as_first_directive=$gl_cv_next_wchar_h
41383     fi
41384     NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
41385
41386
41387
41388  if test $ac_cv_header_wchar_h = yes; then
41389    HAVE_WCHAR_H=1
41390  else
41391    HAVE_WCHAR_H=0
41392  fi
41393
41394
41395
41396  if test $gt_cv_c_wint_t = yes; then
41397    HAVE_WINT_T=1
41398  else
41399    HAVE_WINT_T=0
41400  fi
41401
41402
41403
41404
41405
41406
41407
41408
41409
41410
41411
41412
41413  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
41414
41415
41416
41417     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
41418$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
41419if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
41420  $as_echo_n "(cached) " >&6
41421else
41422
41423                  case "$host_os" in
41424              # Guess no on AIX and OSF/1.
41425        osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
41426              # Guess yes otherwise.
41427        *)    gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
41428      esac
41429      if test $LOCALE_JA != none; then
41430        if test "$cross_compiling" = yes; then :
41431  :
41432else
41433  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41434/* end confdefs.h.  */
41435
41436#include <locale.h>
41437#include <string.h>
41438#include <wchar.h>
41439int main ()
41440{
41441  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
41442    {
41443      const char input[] = "B\217\253\344\217\251\316er"; /* "B����er" */
41444      mbstate_t state;
41445      wchar_t wc;
41446
41447      memset (&state, '\0', sizeof (mbstate_t));
41448      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
41449        if (mbsinit (&state))
41450          return 1;
41451    }
41452  return 0;
41453}
41454_ACEOF
41455if ac_fn_c_try_run "$LINENO"; then :
41456  gl_cv_func_mbrtowc_incomplete_state=yes
41457else
41458  gl_cv_func_mbrtowc_incomplete_state=no
41459fi
41460rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41461  conftest.$ac_objext conftest.beam conftest.$ac_ext
41462fi
41463
41464      fi
41465
41466fi
41467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
41468$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
41469
41470
41471
41472
41473     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
41474$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
41475if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
41476  $as_echo_n "(cached) " >&6
41477else
41478
41479                  case "$host_os" in
41480                    # Guess no on Solaris 8.
41481        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
41482                    # Guess yes otherwise.
41483        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
41484      esac
41485      if test $LOCALE_ZH_CN != none; then
41486        if test "$cross_compiling" = yes; then :
41487  :
41488else
41489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41490/* end confdefs.h.  */
41491
41492#include <locale.h>
41493#include <stdlib.h>
41494#include <string.h>
41495#include <wchar.h>
41496int main ()
41497{
41498  /* This fails on Solaris 8:
41499     mbrtowc returns 2, and sets wc to 0x00F0.
41500     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
41501  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
41502    {
41503      char input[] = "B\250\271\201\060\211\070er"; /* "B����er" */
41504      mbstate_t state;
41505      wchar_t wc;
41506
41507      memset (&state, '\0', sizeof (mbstate_t));
41508      if (mbrtowc (&wc, input + 3, 6, &state) != 4
41509          && mbtowc (&wc, input + 3, 6) == 4)
41510        return 1;
41511    }
41512  return 0;
41513}
41514_ACEOF
41515if ac_fn_c_try_run "$LINENO"; then :
41516  gl_cv_func_mbrtowc_sanitycheck=yes
41517else
41518  gl_cv_func_mbrtowc_sanitycheck=no
41519fi
41520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41521  conftest.$ac_objext conftest.beam conftest.$ac_ext
41522fi
41523
41524      fi
41525
41526fi
41527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
41528$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
41529
41530    REPLACE_MBSTATE_T=0
41531    case "$gl_cv_func_mbrtowc_incomplete_state" in
41532      *yes) ;;
41533      *) REPLACE_MBSTATE_T=1 ;;
41534    esac
41535    case "$gl_cv_func_mbrtowc_sanitycheck" in
41536      *yes) ;;
41537      *) REPLACE_MBSTATE_T=1 ;;
41538    esac
41539  else
41540    REPLACE_MBSTATE_T=1
41541  fi
41542  if test $REPLACE_MBSTATE_T = 1; then
41543
41544    :
41545
41546  fi
41547
41548  if test $REPLACE_MBSTATE_T = 1; then
41549    REPLACE_WCRTOMB=1
41550  fi
41551
41552  if test $ac_cv_func_wcrtomb = no; then
41553    HAVE_WCRTOMB=0
41554  fi
41555  if test $HAVE_WCRTOMB != 0 && test $REPLACE_WCRTOMB != 1; then
41556
41557
41558
41559
41560
41561         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
41562$as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
41563if test "${gl_cv_func_wcrtomb_retval+set}" = set; then :
41564  $as_echo_n "(cached) " >&6
41565else
41566
41567                        case "$host_os" in
41568                                   # Guess no on AIX 4, OSF/1 and Solaris.
41569          aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
41570                                   # Guess yes otherwise.
41571          *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
41572        esac
41573        if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
41574          if test "$cross_compiling" = yes; then :
41575  :
41576else
41577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41578/* end confdefs.h.  */
41579
41580#include <locale.h>
41581#include <stdio.h>
41582#include <string.h>
41583#include <wchar.h>
41584int main ()
41585{
41586  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
41587    {
41588      if (wcrtomb (NULL, 0, NULL) != 1)
41589        return 1;
41590    }
41591  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
41592    {
41593      if (wcrtomb (NULL, 0, NULL) != 1)
41594        return 1;
41595    }
41596  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
41597    {
41598      if (wcrtomb (NULL, 0, NULL) != 1)
41599        return 1;
41600    }
41601  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
41602    {
41603      if (wcrtomb (NULL, 0, NULL) != 1)
41604        return 1;
41605    }
41606  return 0;
41607}
41608_ACEOF
41609if ac_fn_c_try_run "$LINENO"; then :
41610  gl_cv_func_wcrtomb_retval=yes
41611else
41612  gl_cv_func_wcrtomb_retval=no
41613fi
41614rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41615  conftest.$ac_objext conftest.beam conftest.$ac_ext
41616fi
41617
41618        fi
41619
41620fi
41621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
41622$as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
41623    case "$gl_cv_func_wcrtomb_retval" in
41624      *yes) ;;
41625      *) REPLACE_WCRTOMB=1 ;;
41626    esac
41627  fi
41628  if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
41629
41630    :
41631
41632
41633
41634
41635
41636
41637
41638
41639
41640  gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
41641
41642
41643  :
41644
41645  fi
41646
41647
41648
41649  GNULIB_WCRTOMB=1
41650
41651
41652
41653
41654
41655  if test $ac_cv_func_iswcntrl = yes; then
41656    HAVE_ISWCNTRL=1
41657  else
41658    HAVE_ISWCNTRL=0
41659  fi
41660
41661
41662
41663
41664
41665  if test $gt_cv_c_wint_t = yes; then
41666    HAVE_WINT_T=1
41667  else
41668    HAVE_WINT_T=0
41669  fi
41670
41671
41672  WCTYPE_H=wctype.h
41673  if test $ac_cv_header_wctype_h = yes; then
41674    if test $ac_cv_func_iswcntrl = yes; then
41675                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
41676$as_echo_n "checking whether iswcntrl works... " >&6; }
41677if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
41678  $as_echo_n "(cached) " >&6
41679else
41680
41681          if test "$cross_compiling" = yes; then :
41682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41683/* end confdefs.h.  */
41684#include <stdlib.h>
41685                          #if __GNU_LIBRARY__ == 1
41686                          Linux libc5 i18n is broken.
41687                          #endif
41688int
41689main ()
41690{
41691
41692  ;
41693  return 0;
41694}
41695_ACEOF
41696if ac_fn_c_try_compile "$LINENO"; then :
41697  gl_cv_func_iswcntrl_works=yes
41698else
41699  gl_cv_func_iswcntrl_works=no
41700fi
41701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41702
41703else
41704  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41705/* end confdefs.h.  */
41706
41707                            #include <stddef.h>
41708                            #include <stdio.h>
41709                            #include <time.h>
41710                            #include <wchar.h>
41711                            #include <wctype.h>
41712                            int main () { return iswprint ('x') == 0; }
41713_ACEOF
41714if ac_fn_c_try_run "$LINENO"; then :
41715  gl_cv_func_iswcntrl_works=yes
41716else
41717  gl_cv_func_iswcntrl_works=no
41718fi
41719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41720  conftest.$ac_objext conftest.beam conftest.$ac_ext
41721fi
41722
41723
41724fi
41725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
41726$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
41727      if test $gl_cv_func_iswcntrl_works = yes; then
41728        case "$host_os" in
41729          mingw*)
41730                        ;;
41731          *)
41732                        WCTYPE_H=
41733            ;;
41734        esac
41735      fi
41736    fi
41737
41738
41739
41740
41741
41742
41743     if test $gl_cv_have_include_next = yes; then
41744       gl_cv_next_wctype_h='<'wctype.h'>'
41745     else
41746       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
41747$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
41748if test "${gl_cv_next_wctype_h+set}" = set; then :
41749  $as_echo_n "(cached) " >&6
41750else
41751
41752          if test $ac_cv_header_wctype_h = yes; then
41753            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41754/* end confdefs.h.  */
41755#include <wctype.h>
41756
41757_ACEOF
41758                                                                                                case "$host_os" in
41759              aix*) gl_absname_cpp="$ac_cpp -C" ;;
41760              *)    gl_absname_cpp="$ac_cpp" ;;
41761            esac
41762                                                gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
41763               sed -n '\#/wctype.h#{
41764                 s#.*"\(.*/wctype.h\)".*#\1#
41765                 s#^/[^/]#//&#
41766                 p
41767                 q
41768               }'`'"'
41769          else
41770            gl_cv_next_wctype_h='<'wctype.h'>'
41771          fi
41772
41773fi
41774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
41775$as_echo "$gl_cv_next_wctype_h" >&6; }
41776     fi
41777     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
41778
41779     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
41780       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
41781       gl_next_as_first_directive='<'wctype.h'>'
41782     else
41783       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
41784       gl_next_as_first_directive=$gl_cv_next_wctype_h
41785     fi
41786     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
41787
41788
41789
41790    HAVE_WCTYPE_H=1
41791  else
41792    HAVE_WCTYPE_H=0
41793  fi
41794
41795
41796
41797  if test "$gl_cv_func_iswcntrl_works" = no; then
41798    REPLACE_ISWCNTRL=1
41799  else
41800    REPLACE_ISWCNTRL=0
41801  fi
41802
41803
41804
41805
41806
41807
41808
41809
41810
41811
41812
41813
41814
41815  ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
41816/* AIX 3.2.5 declares wcwidth in <string.h>. */
41817#include <string.h>
41818/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
41819   <wchar.h>.
41820   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
41821   before <wchar.h>.  */
41822#include <stddef.h>
41823#include <stdio.h>
41824#include <time.h>
41825#include <wchar.h>
41826
41827"
41828if test "x$ac_cv_have_decl_wcwidth" = x""yes; then :
41829  ac_have_decl=1
41830else
41831  ac_have_decl=0
41832fi
41833
41834cat >>confdefs.h <<_ACEOF
41835#define HAVE_DECL_WCWIDTH $ac_have_decl
41836_ACEOF
41837
41838  if test $ac_cv_have_decl_wcwidth != yes; then
41839    HAVE_DECL_WCWIDTH=0
41840  fi
41841
41842  if test $ac_cv_func_wcwidth = no; then
41843    REPLACE_WCWIDTH=1
41844  else
41845                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
41846$as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
41847if test "${gl_cv_func_wcwidth_works+set}" = set; then :
41848  $as_echo_n "(cached) " >&6
41849else
41850
41851        if test "$cross_compiling" = yes; then :
41852
41853           case "$host_os" in
41854                     # Guess yes on glibc systems.
41855             *-gnu*) gl_cv_func_wcwidth_works="guessing yes";;
41856             *)      gl_cv_func_wcwidth_works="guessing no";;
41857           esac
41858
41859else
41860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41861/* end confdefs.h.  */
41862
41863#include <locale.h>
41864/* AIX 3.2.5 declares wcwidth in <string.h>. */
41865#include <string.h>
41866/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
41867   <wchar.h>.
41868   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
41869   before <wchar.h>.  */
41870#include <stddef.h>
41871#include <stdio.h>
41872#include <time.h>
41873#include <wchar.h>
41874#if !HAVE_DECL_WCWIDTH
41875extern
41876# ifdef __cplusplus
41877"C"
41878# endif
41879int wcwidth (int);
41880#endif
41881int main ()
41882{
41883  if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
41884    if (wcwidth (0x0301) > 0 || wcwidth (0x200B) > 0)
41885      return 1;
41886  return 0;
41887}
41888_ACEOF
41889if ac_fn_c_try_run "$LINENO"; then :
41890  gl_cv_func_wcwidth_works=yes
41891else
41892  gl_cv_func_wcwidth_works=no
41893fi
41894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41895  conftest.$ac_objext conftest.beam conftest.$ac_ext
41896fi
41897
41898
41899fi
41900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
41901$as_echo "$gl_cv_func_wcwidth_works" >&6; }
41902    case "$gl_cv_func_wcwidth_works" in
41903      *yes) ;;
41904      *no) REPLACE_WCWIDTH=1 ;;
41905    esac
41906  fi
41907  if test $REPLACE_WCWIDTH = 1; then
41908
41909
41910
41911
41912
41913
41914
41915
41916  gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
41917
41918  fi
41919
41920  if test $REPLACE_WCWIDTH = 1 || test $HAVE_DECL_WCWIDTH = 0; then
41921
41922    :
41923
41924  fi
41925
41926
41927
41928  GNULIB_WCWIDTH=1
41929
41930
41931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
41932$as_echo_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h... " >&6; }
41933if test "${gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}" = set; then :
41934  $as_echo_n "(cached) " >&6
41935else
41936  gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
41937
41938  if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no; then
41939    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41940/* end confdefs.h.  */
41941#include <sys/types.h>
41942#     include <sys/ioctl.h>
41943#     ifdef TIOCGWINSZ
41944        yes
41945#     endif
41946
41947_ACEOF
41948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41949  $EGREP "yes" >/dev/null 2>&1; then :
41950  gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
41951fi
41952rm -f conftest*
41953
41954  fi
41955
41956fi
41957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h" >&5
41958$as_echo "$gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h" >&6; }
41959  if test $gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
41960
41961$as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
41962
41963  fi
41964
41965
41966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether use of TIOCGWINSZ requires termios.h" >&5
41967$as_echo_n "checking whether use of TIOCGWINSZ requires termios.h... " >&6; }
41968if test "${gl_cv_sys_tiocgwinsz_needs_termios_h+set}" = set; then :
41969  $as_echo_n "(cached) " >&6
41970else
41971  gl_cv_sys_tiocgwinsz_needs_termios_h=no
41972
41973   if test $ac_cv_sys_posix_termios = yes; then
41974     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41975/* end confdefs.h.  */
41976#include <sys/types.h>
41977#      include <termios.h>
41978#      ifdef TIOCGWINSZ
41979         yes
41980#      endif
41981
41982_ACEOF
41983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41984  $EGREP "yes" >/dev/null 2>&1; then :
41985  gl_cv_sys_tiocgwinsz_needs_termios_h=yes
41986fi
41987rm -f conftest*
41988
41989   fi
41990
41991fi
41992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_tiocgwinsz_needs_termios_h" >&5
41993$as_echo "$gl_cv_sys_tiocgwinsz_needs_termios_h" >&6; }
41994
41995
41996   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether use of struct winsize requires sys/ptem.h" >&5
41997$as_echo_n "checking whether use of struct winsize requires sys/ptem.h... " >&6; }
41998if test "${gl_cv_sys_struct_winsize_needs_sys_ptem_h+set}" = set; then :
41999  $as_echo_n "(cached) " >&6
42000else
42001  gl_cv_sys_struct_winsize_needs_sys_ptem_h=yes
42002      if test $ac_cv_sys_posix_termios = yes; then
42003        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42004/* end confdefs.h.  */
42005#include <termios.h>
42006int
42007main ()
42008{
42009struct winsize x;
42010            if (sizeof x > 0) return 0;
42011  ;
42012  return 0;
42013}
42014_ACEOF
42015if ac_fn_c_try_compile "$LINENO"; then :
42016  gl_cv_sys_struct_winsize_needs_sys_ptem_h=no
42017fi
42018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42019      fi
42020      if test $gl_cv_sys_struct_winsize_needs_sys_ptem_h = yes; then
42021        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42022/* end confdefs.h.  */
42023#include <sys/ptem.h>
42024int
42025main ()
42026{
42027struct winsize x;
42028            if (sizeof x > 0) return 0;
42029  ;
42030  return 0;
42031}
42032_ACEOF
42033if ac_fn_c_try_compile "$LINENO"; then :
42034
42035else
42036  gl_cv_sys_struct_winsize_needs_sys_ptem_h=no
42037fi
42038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42039      fi
42040fi
42041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_winsize_needs_sys_ptem_h" >&5
42042$as_echo "$gl_cv_sys_struct_winsize_needs_sys_ptem_h" >&6; }
42043   if test $gl_cv_sys_struct_winsize_needs_sys_ptem_h = yes; then
42044
42045$as_echo "#define WINSIZE_IN_PTEM 1" >>confdefs.h
42046
42047   fi
42048
42049
42050
42051
42052
42053
42054  GNULIB_WRITE=1
42055
42056
42057
42058
42059
42060
42061
42062
42063
42064
42065
42066  gl_LIBOBJS="$gl_LIBOBJS write-any-file.$ac_objext"
42067
42068
42069
42070
42071
42072
42073
42074
42075
42076
42077
42078  gl_LIBOBJS="$gl_LIBOBJS xmalloc.$ac_objext"
42079
42080
42081
42082
42083  :
42084
42085
42086  :
42087
42088
42089
42090
42091
42092
42093
42094
42095
42096
42097
42098  gl_LIBOBJS="$gl_LIBOBJS xgetcwd.$ac_objext"
42099
42100
42101
42102
42103
42104
42105
42106
42107
42108
42109
42110
42111
42112  gl_LIBOBJS="$gl_LIBOBJS xnanosleep.$ac_objext"
42113
42114
42115
42116
42117  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xprintf:1:c-format"
42118
42119
42120
42121  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvprintf:1:c-format"
42122
42123
42124
42125  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xfprintf:2:c-format"
42126
42127
42128
42129  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvfprintf:2:c-format"
42130
42131
42132
42133
42134  for ac_header in stdint.h
42135do :
42136  ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
42137if test "x$ac_cv_header_stdint_h" = x""yes; then :
42138  cat >>confdefs.h <<_ACEOF
42139#define HAVE_STDINT_H 1
42140_ACEOF
42141
42142fi
42143
42144done
42145
42146
42147
42148
42149  :
42150
42151
42152
42153
42154
42155
42156
42157
42158
42159
42160
42161  gl_LIBOBJS="$gl_LIBOBJS xstrtod.$ac_objext"
42162
42163
42164
42165
42166
42167
42168
42169
42170
42171
42172
42173  gl_LIBOBJS="$gl_LIBOBJS xstrtol.$ac_objext"
42174
42175
42176
42177
42178
42179
42180
42181
42182
42183  gl_LIBOBJS="$gl_LIBOBJS xstrtoul.$ac_objext"
42184
42185
42186
42187
42188
42189
42190
42191
42192
42193  gl_LIBOBJS="$gl_LIBOBJS xstrtol-error.$ac_objext"
42194
42195
42196
42197
42198
42199
42200
42201
42202
42203
42204
42205  gl_LIBOBJS="$gl_LIBOBJS xstrtold.$ac_objext"
42206
42207
42208
42209
42210
42211
42212
42213  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
42214
42215
42216
42217
42218
42219
42220
42221
42222
42223
42224  gl_LIBOBJS="$gl_LIBOBJS yesno.$ac_objext"
42225
42226
42227    :
42228
42229
42230
42231
42232
42233
42234
42235
42236
42237
42238  gltests_libdeps=
42239  gltests_ltlibdeps=
42240
42241
42242
42243
42244
42245
42246
42247
42248
42249  gl_source_base='gnulib-tests'
42250
42251  if test "$ac_cv_header_winsock2_h" = yes; then
42252
42253
42254
42255
42256
42257
42258
42259
42260  gltests_LIBOBJS="$gltests_LIBOBJS accept.$ac_objext"
42261
42262  fi
42263
42264
42265  GNULIB_ACCEPT=1
42266
42267
42268
42269  if test "$ac_cv_header_winsock2_h" = yes; then
42270
42271
42272
42273
42274
42275
42276
42277
42278  gltests_LIBOBJS="$gltests_LIBOBJS bind.$ac_objext"
42279
42280  fi
42281
42282
42283  GNULIB_BIND=1
42284
42285
42286
42287
42288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
42289$as_echo_n "checking for a traditional french locale... " >&6; }
42290if test "${gt_cv_locale_fr+set}" = set; then :
42291  $as_echo_n "(cached) " >&6
42292else
42293
42294    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42295/* end confdefs.h.  */
42296
42297#include <locale.h>
42298#include <time.h>
42299#if HAVE_LANGINFO_CODESET
42300# include <langinfo.h>
42301#endif
42302#include <stdlib.h>
42303#include <string.h>
42304struct tm t;
42305char buf[16];
42306int main () {
42307  /* Check whether the given locale name is recognized by the system.  */
42308  if (setlocale (LC_ALL, "") == NULL) return 1;
42309  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42310     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
42311     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42312     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42313     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42314     some unit tests fail.  */
42315#if HAVE_LANGINFO_CODESET
42316  {
42317    const char *cs = nl_langinfo (CODESET);
42318    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
42319      return 1;
42320  }
42321#endif
42322#ifdef __CYGWIN__
42323  /* On Cygwin, avoid locale names without encoding suffix, because the
42324     locale_charset() function relies on the encoding suffix.  Note that
42325     LC_ALL is set on the command line.  */
42326  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42327#endif
42328  /* Check whether in the abbreviation of the second month, the second
42329     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
42330     one byte long. This excludes the UTF-8 encoding.  */
42331  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
42332  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
42333  /* Check whether the decimal separator is a comma.
42334     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
42335     are nl_langinfo(RADIXCHAR) are both ".".  */
42336  if (localeconv () ->decimal_point[0] != ',') return 1;
42337  return 0;
42338}
42339
42340_ACEOF
42341    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42342  (eval $ac_link) 2>&5
42343  ac_status=$?
42344  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42345  test $ac_status = 0; } && test -s conftest$ac_exeext; then
42346      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
42347      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
42348      # configure script would override the LC_ALL setting. Likewise for
42349      # LC_CTYPE, which is also set at the beginning of the configure script.
42350      # Test for the usual locale name.
42351      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42352        gt_cv_locale_fr=fr_FR
42353      else
42354        # Test for the locale name with explicit encoding suffix.
42355        if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42356          gt_cv_locale_fr=fr_FR.ISO-8859-1
42357        else
42358          # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
42359          if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42360            gt_cv_locale_fr=fr_FR.ISO8859-1
42361          else
42362            # Test for the HP-UX locale name.
42363            if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42364              gt_cv_locale_fr=fr_FR.iso88591
42365            else
42366              # Test for the Solaris 7 locale name.
42367              if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42368                gt_cv_locale_fr=fr
42369              else
42370                # None found.
42371                gt_cv_locale_fr=none
42372              fi
42373            fi
42374          fi
42375        fi
42376      fi
42377    fi
42378    rm -fr conftest*
42379
42380fi
42381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
42382$as_echo "$gt_cv_locale_fr" >&6; }
42383  LOCALE_FR=$gt_cv_locale_fr
42384
42385
42386
42387
42388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
42389$as_echo_n "checking for a french Unicode locale... " >&6; }
42390if test "${gt_cv_locale_fr_utf8+set}" = set; then :
42391  $as_echo_n "(cached) " >&6
42392else
42393
42394    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42395/* end confdefs.h.  */
42396
42397#include <locale.h>
42398#include <time.h>
42399#if HAVE_LANGINFO_CODESET
42400# include <langinfo.h>
42401#endif
42402#include <stdlib.h>
42403#include <string.h>
42404struct tm t;
42405char buf[16];
42406int main () {
42407  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
42408     imitates locale dependent behaviour by looking at the environment
42409     variables, and all locales use the UTF-8 encoding.  */
42410#if !(defined __BEOS__ || defined __HAIKU__)
42411  /* Check whether the given locale name is recognized by the system.  */
42412  if (setlocale (LC_ALL, "") == NULL) return 1;
42413  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42414     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
42415     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42416     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42417     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42418     some unit tests fail.  */
42419# if HAVE_LANGINFO_CODESET
42420  {
42421    const char *cs = nl_langinfo (CODESET);
42422    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
42423      return 1;
42424  }
42425# endif
42426# ifdef __CYGWIN__
42427  /* On Cygwin, avoid locale names without encoding suffix, because the
42428     locale_charset() function relies on the encoding suffix.  Note that
42429     LC_ALL is set on the command line.  */
42430  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42431# endif
42432  /* Check whether in the abbreviation of the second month, the second
42433     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
42434     two bytes long, with UTF-8 encoding.  */
42435  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
42436  if (strftime (buf, sizeof (buf), "%b", &t) < 4
42437      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
42438    return 1;
42439#endif
42440  /* Check whether the decimal separator is a comma.
42441     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
42442     are nl_langinfo(RADIXCHAR) are both ".".  */
42443  if (localeconv () ->decimal_point[0] != ',') return 1;
42444  return 0;
42445}
42446
42447_ACEOF
42448    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42449  (eval $ac_link) 2>&5
42450  ac_status=$?
42451  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42452  test $ac_status = 0; } && test -s conftest$ac_exeext; then
42453      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
42454      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
42455      # configure script would override the LC_ALL setting. Likewise for
42456      # LC_CTYPE, which is also set at the beginning of the configure script.
42457      # Test for the usual locale name.
42458      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42459        gt_cv_locale_fr_utf8=fr_FR
42460      else
42461        # Test for the locale name with explicit encoding suffix.
42462        if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42463          gt_cv_locale_fr_utf8=fr_FR.UTF-8
42464        else
42465          # Test for the Solaris 7 locale name.
42466          if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42467            gt_cv_locale_fr_utf8=fr.UTF-8
42468          else
42469            # None found.
42470            gt_cv_locale_fr_utf8=none
42471          fi
42472        fi
42473      fi
42474    fi
42475    rm -fr conftest*
42476
42477fi
42478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
42479$as_echo "$gt_cv_locale_fr_utf8" >&6; }
42480  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
42481
42482
42483
42484
42485
42486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
42487$as_echo_n "checking for a traditional french locale... " >&6; }
42488if test "${gt_cv_locale_fr+set}" = set; then :
42489  $as_echo_n "(cached) " >&6
42490else
42491
42492    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42493/* end confdefs.h.  */
42494
42495#include <locale.h>
42496#include <time.h>
42497#if HAVE_LANGINFO_CODESET
42498# include <langinfo.h>
42499#endif
42500#include <stdlib.h>
42501#include <string.h>
42502struct tm t;
42503char buf[16];
42504int main () {
42505  /* Check whether the given locale name is recognized by the system.  */
42506  if (setlocale (LC_ALL, "") == NULL) return 1;
42507  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42508     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
42509     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42510     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42511     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42512     some unit tests fail.  */
42513#if HAVE_LANGINFO_CODESET
42514  {
42515    const char *cs = nl_langinfo (CODESET);
42516    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
42517      return 1;
42518  }
42519#endif
42520#ifdef __CYGWIN__
42521  /* On Cygwin, avoid locale names without encoding suffix, because the
42522     locale_charset() function relies on the encoding suffix.  Note that
42523     LC_ALL is set on the command line.  */
42524  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42525#endif
42526  /* Check whether in the abbreviation of the second month, the second
42527     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
42528     one byte long. This excludes the UTF-8 encoding.  */
42529  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
42530  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
42531  /* Check whether the decimal separator is a comma.
42532     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
42533     are nl_langinfo(RADIXCHAR) are both ".".  */
42534  if (localeconv () ->decimal_point[0] != ',') return 1;
42535  return 0;
42536}
42537
42538_ACEOF
42539    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42540  (eval $ac_link) 2>&5
42541  ac_status=$?
42542  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42543  test $ac_status = 0; } && test -s conftest$ac_exeext; then
42544      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
42545      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
42546      # configure script would override the LC_ALL setting. Likewise for
42547      # LC_CTYPE, which is also set at the beginning of the configure script.
42548      # Test for the usual locale name.
42549      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42550        gt_cv_locale_fr=fr_FR
42551      else
42552        # Test for the locale name with explicit encoding suffix.
42553        if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42554          gt_cv_locale_fr=fr_FR.ISO-8859-1
42555        else
42556          # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
42557          if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42558            gt_cv_locale_fr=fr_FR.ISO8859-1
42559          else
42560            # Test for the HP-UX locale name.
42561            if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42562              gt_cv_locale_fr=fr_FR.iso88591
42563            else
42564              # Test for the Solaris 7 locale name.
42565              if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42566                gt_cv_locale_fr=fr
42567              else
42568                # None found.
42569                gt_cv_locale_fr=none
42570              fi
42571            fi
42572          fi
42573        fi
42574      fi
42575    fi
42576    rm -fr conftest*
42577
42578fi
42579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
42580$as_echo "$gt_cv_locale_fr" >&6; }
42581  LOCALE_FR=$gt_cv_locale_fr
42582
42583
42584
42585
42586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
42587$as_echo_n "checking for a turkish Unicode locale... " >&6; }
42588if test "${gt_cv_locale_tr_utf8+set}" = set; then :
42589  $as_echo_n "(cached) " >&6
42590else
42591
42592    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42593/* end confdefs.h.  */
42594
42595#include <locale.h>
42596#include <time.h>
42597#if HAVE_LANGINFO_CODESET
42598# include <langinfo.h>
42599#endif
42600#include <stdlib.h>
42601#include <string.h>
42602struct tm t;
42603char buf[16];
42604int main () {
42605  /* On BeOS, locales are not implemented in libc.  Rather, libintl
42606     imitates locale dependent behaviour by looking at the environment
42607     variables, and all locales use the UTF-8 encoding.  But BeOS does not
42608     implement the Turkish upper-/lowercase mappings.  Therefore, let this
42609     program return 1 on BeOS.  */
42610  /* Check whether the given locale name is recognized by the system.  */
42611  if (setlocale (LC_ALL, "") == NULL) return 1;
42612  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42613     On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
42614     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42615     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42616     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42617     some unit tests fail.  */
42618#if HAVE_LANGINFO_CODESET
42619  {
42620    const char *cs = nl_langinfo (CODESET);
42621    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
42622      return 1;
42623  }
42624#endif
42625#ifdef __CYGWIN__
42626  /* On Cygwin, avoid locale names without encoding suffix, because the
42627     locale_charset() function relies on the encoding suffix.  Note that
42628     LC_ALL is set on the command line.  */
42629  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42630#endif
42631  /* Check whether in the abbreviation of the eighth month, the second
42632     character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
42633     two bytes long, with UTF-8 encoding.  */
42634  t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
42635  if (strftime (buf, sizeof (buf), "%b", &t) < 4
42636      || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
42637    return 1;
42638  /* Check whether the upper-/lowercase mappings are as expected for
42639     Turkish.  */
42640  if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
42641      || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
42642    return 1;
42643  return 0;
42644}
42645
42646_ACEOF
42647    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42648  (eval $ac_link) 2>&5
42649  ac_status=$?
42650  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42651  test $ac_status = 0; } && test -s conftest$ac_exeext; then
42652      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
42653      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
42654      # configure script would override the LC_ALL setting. Likewise for
42655      # LC_CTYPE, which is also set at the beginning of the configure script.
42656      # Test for the usual locale name.
42657      if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42658        gt_cv_locale_tr_utf8=tr_TR
42659      else
42660        # Test for the locale name with explicit encoding suffix.
42661        if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42662          gt_cv_locale_tr_utf8=tr_TR.UTF-8
42663        else
42664          # Test for the Solaris 7 locale name.
42665          if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42666            gt_cv_locale_tr_utf8=tr.UTF-8
42667          else
42668            # None found.
42669            gt_cv_locale_tr_utf8=none
42670          fi
42671        fi
42672      fi
42673    else
42674      gt_cv_locale_tr_utf8=none
42675    fi
42676    rm -fr conftest*
42677
42678fi
42679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
42680$as_echo "$gt_cv_locale_tr_utf8" >&6; }
42681  LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
42682
42683
42684
42685
42686  if test "$ac_cv_header_winsock2_h" = yes; then
42687
42688
42689
42690
42691
42692
42693
42694
42695  gltests_LIBOBJS="$gltests_LIBOBJS connect.$ac_objext"
42696
42697  fi
42698
42699
42700  GNULIB_CONNECT=1
42701
42702
42703
42704
42705
42706
42707  if test $ac_cv_func_getdtablesize != yes; then
42708    HAVE_GETDTABLESIZE=0
42709
42710
42711
42712
42713
42714
42715
42716
42717  gltests_LIBOBJS="$gltests_LIBOBJS getdtablesize.$ac_objext"
42718
42719  fi
42720
42721
42722
42723  GNULIB_GETDTABLESIZE=1
42724
42725   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
42726$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
42727if test "${ac_cv_c_bigendian+set}" = set; then :
42728  $as_echo_n "(cached) " >&6
42729else
42730  ac_cv_c_bigendian=unknown
42731    # See if we're dealing with a universal compiler.
42732    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42733/* end confdefs.h.  */
42734#ifndef __APPLE_CC__
42735	       not a universal capable compiler
42736	     #endif
42737	     typedef int dummy;
42738
42739_ACEOF
42740if ac_fn_c_try_compile "$LINENO"; then :
42741
42742	# Check for potential -arch flags.  It is not universal unless
42743	# there are at least two -arch flags with different values.
42744	ac_arch=
42745	ac_prev=
42746	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42747	 if test -n "$ac_prev"; then
42748	   case $ac_word in
42749	     i?86 | x86_64 | ppc | ppc64)
42750	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42751		 ac_arch=$ac_word
42752	       else
42753		 ac_cv_c_bigendian=universal
42754		 break
42755	       fi
42756	       ;;
42757	   esac
42758	   ac_prev=
42759	 elif test "x$ac_word" = "x-arch"; then
42760	   ac_prev=arch
42761	 fi
42762       done
42763fi
42764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42765    if test $ac_cv_c_bigendian = unknown; then
42766      # See if sys/param.h defines the BYTE_ORDER macro.
42767      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42768/* end confdefs.h.  */
42769#include <sys/types.h>
42770	     #include <sys/param.h>
42771
42772int
42773main ()
42774{
42775#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42776		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42777		     && LITTLE_ENDIAN)
42778	      bogus endian macros
42779	     #endif
42780
42781  ;
42782  return 0;
42783}
42784_ACEOF
42785if ac_fn_c_try_compile "$LINENO"; then :
42786  # It does; now see whether it defined to BIG_ENDIAN or not.
42787	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42788/* end confdefs.h.  */
42789#include <sys/types.h>
42790		#include <sys/param.h>
42791
42792int
42793main ()
42794{
42795#if BYTE_ORDER != BIG_ENDIAN
42796		 not big endian
42797		#endif
42798
42799  ;
42800  return 0;
42801}
42802_ACEOF
42803if ac_fn_c_try_compile "$LINENO"; then :
42804  ac_cv_c_bigendian=yes
42805else
42806  ac_cv_c_bigendian=no
42807fi
42808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42809fi
42810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42811    fi
42812    if test $ac_cv_c_bigendian = unknown; then
42813      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42814      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42815/* end confdefs.h.  */
42816#include <limits.h>
42817
42818int
42819main ()
42820{
42821#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42822	      bogus endian macros
42823	     #endif
42824
42825  ;
42826  return 0;
42827}
42828_ACEOF
42829if ac_fn_c_try_compile "$LINENO"; then :
42830  # It does; now see whether it defined to _BIG_ENDIAN or not.
42831	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42832/* end confdefs.h.  */
42833#include <limits.h>
42834
42835int
42836main ()
42837{
42838#ifndef _BIG_ENDIAN
42839		 not big endian
42840		#endif
42841
42842  ;
42843  return 0;
42844}
42845_ACEOF
42846if ac_fn_c_try_compile "$LINENO"; then :
42847  ac_cv_c_bigendian=yes
42848else
42849  ac_cv_c_bigendian=no
42850fi
42851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42852fi
42853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42854    fi
42855    if test $ac_cv_c_bigendian = unknown; then
42856      # Compile a test program.
42857      if test "$cross_compiling" = yes; then :
42858  # Try to guess by grepping values from an object file.
42859	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42860/* end confdefs.h.  */
42861short int ascii_mm[] =
42862		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42863		short int ascii_ii[] =
42864		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42865		int use_ascii (int i) {
42866		  return ascii_mm[i] + ascii_ii[i];
42867		}
42868		short int ebcdic_ii[] =
42869		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42870		short int ebcdic_mm[] =
42871		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42872		int use_ebcdic (int i) {
42873		  return ebcdic_mm[i] + ebcdic_ii[i];
42874		}
42875		extern int foo;
42876
42877int
42878main ()
42879{
42880return use_ascii (foo) == use_ebcdic (foo);
42881  ;
42882  return 0;
42883}
42884_ACEOF
42885if ac_fn_c_try_compile "$LINENO"; then :
42886  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42887	      ac_cv_c_bigendian=yes
42888	    fi
42889	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42890	      if test "$ac_cv_c_bigendian" = unknown; then
42891		ac_cv_c_bigendian=no
42892	      else
42893		# finding both strings is unlikely to happen, but who knows?
42894		ac_cv_c_bigendian=unknown
42895	      fi
42896	    fi
42897fi
42898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42899else
42900  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42901/* end confdefs.h.  */
42902$ac_includes_default
42903int
42904main ()
42905{
42906
42907	     /* Are we little or big endian?  From Harbison&Steele.  */
42908	     union
42909	     {
42910	       long int l;
42911	       char c[sizeof (long int)];
42912	     } u;
42913	     u.l = 1;
42914	     return u.c[sizeof (long int) - 1] == 1;
42915
42916  ;
42917  return 0;
42918}
42919_ACEOF
42920if ac_fn_c_try_run "$LINENO"; then :
42921  ac_cv_c_bigendian=no
42922else
42923  ac_cv_c_bigendian=yes
42924fi
42925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42926  conftest.$ac_objext conftest.beam conftest.$ac_ext
42927fi
42928
42929    fi
42930fi
42931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42932$as_echo "$ac_cv_c_bigendian" >&6; }
42933 case $ac_cv_c_bigendian in #(
42934   yes)
42935     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
42936;; #(
42937   no)
42938      ;; #(
42939   universal)
42940
42941$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
42942
42943     ;; #(
42944   *)
42945     as_fn_error "unknown endianness
42946 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
42947 esac
42948
42949
42950
42951
42952
42953    :
42954
42955
42956      gl_save_LIBS=$LIBS
42957  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
42958$as_echo_n "checking for library containing inet_pton... " >&6; }
42959if test "${ac_cv_search_inet_pton+set}" = set; then :
42960  $as_echo_n "(cached) " >&6
42961else
42962  ac_func_search_save_LIBS=$LIBS
42963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42964/* end confdefs.h.  */
42965
42966/* Override any GCC internal prototype to avoid an error.
42967   Use char because int might match the return type of a GCC
42968   builtin and then its argument prototype would still apply.  */
42969#ifdef __cplusplus
42970extern "C"
42971#endif
42972char inet_pton ();
42973int
42974main ()
42975{
42976return inet_pton ();
42977  ;
42978  return 0;
42979}
42980_ACEOF
42981for ac_lib in '' nsl; do
42982  if test -z "$ac_lib"; then
42983    ac_res="none required"
42984  else
42985    ac_res=-l$ac_lib
42986    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
42987  fi
42988  if ac_fn_c_try_link "$LINENO"; then :
42989  ac_cv_search_inet_pton=$ac_res
42990fi
42991rm -f core conftest.err conftest.$ac_objext \
42992    conftest$ac_exeext
42993  if test "${ac_cv_search_inet_pton+set}" = set; then :
42994  break
42995fi
42996done
42997if test "${ac_cv_search_inet_pton+set}" = set; then :
42998
42999else
43000  ac_cv_search_inet_pton=no
43001fi
43002rm conftest.$ac_ext
43003LIBS=$ac_func_search_save_LIBS
43004fi
43005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
43006$as_echo "$ac_cv_search_inet_pton" >&6; }
43007ac_res=$ac_cv_search_inet_pton
43008if test "$ac_res" != no; then :
43009  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
43010
43011else
43012
43013
43014
43015
43016
43017
43018
43019
43020  for ac_func in inet_pton
43021do :
43022  ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
43023if test "x$ac_cv_func_inet_pton" = x""yes; then :
43024  cat >>confdefs.h <<_ACEOF
43025#define HAVE_INET_PTON 1
43026_ACEOF
43027
43028else
43029
43030    gltests_LIBOBJS="$gltests_LIBOBJS $ac_func.$ac_objext"
43031
43032fi
43033done
43034
43035
43036fi
43037
43038  LIBS=$gl_save_LIBS
43039  INET_PTON_LIB=
43040  if test "$ac_cv_search_inet_pton" != "no" &&
43041     test "$ac_cv_search_inet_pton" != "none required"; then
43042    INET_PTON_LIB="$ac_cv_search_inet_pton"
43043  fi
43044
43045
43046
43047  ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
43048"
43049if test "x$ac_cv_have_decl_inet_pton" = x""yes; then :
43050  ac_have_decl=1
43051else
43052  ac_have_decl=0
43053fi
43054
43055cat >>confdefs.h <<_ACEOF
43056#define HAVE_DECL_INET_PTON $ac_have_decl
43057_ACEOF
43058
43059  if test $ac_cv_have_decl_inet_pton = no; then
43060    HAVE_DECL_INET_PTON=0
43061  fi
43062
43063
43064
43065
43066
43067
43068  GNULIB_INET_PTON=1
43069
43070   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
43071$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
43072if test "${ac_cv_c_bigendian+set}" = set; then :
43073  $as_echo_n "(cached) " >&6
43074else
43075  ac_cv_c_bigendian=unknown
43076    # See if we're dealing with a universal compiler.
43077    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43078/* end confdefs.h.  */
43079#ifndef __APPLE_CC__
43080	       not a universal capable compiler
43081	     #endif
43082	     typedef int dummy;
43083
43084_ACEOF
43085if ac_fn_c_try_compile "$LINENO"; then :
43086
43087	# Check for potential -arch flags.  It is not universal unless
43088	# there are at least two -arch flags with different values.
43089	ac_arch=
43090	ac_prev=
43091	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
43092	 if test -n "$ac_prev"; then
43093	   case $ac_word in
43094	     i?86 | x86_64 | ppc | ppc64)
43095	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
43096		 ac_arch=$ac_word
43097	       else
43098		 ac_cv_c_bigendian=universal
43099		 break
43100	       fi
43101	       ;;
43102	   esac
43103	   ac_prev=
43104	 elif test "x$ac_word" = "x-arch"; then
43105	   ac_prev=arch
43106	 fi
43107       done
43108fi
43109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43110    if test $ac_cv_c_bigendian = unknown; then
43111      # See if sys/param.h defines the BYTE_ORDER macro.
43112      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43113/* end confdefs.h.  */
43114#include <sys/types.h>
43115	     #include <sys/param.h>
43116
43117int
43118main ()
43119{
43120#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
43121		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
43122		     && LITTLE_ENDIAN)
43123	      bogus endian macros
43124	     #endif
43125
43126  ;
43127  return 0;
43128}
43129_ACEOF
43130if ac_fn_c_try_compile "$LINENO"; then :
43131  # It does; now see whether it defined to BIG_ENDIAN or not.
43132	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43133/* end confdefs.h.  */
43134#include <sys/types.h>
43135		#include <sys/param.h>
43136
43137int
43138main ()
43139{
43140#if BYTE_ORDER != BIG_ENDIAN
43141		 not big endian
43142		#endif
43143
43144  ;
43145  return 0;
43146}
43147_ACEOF
43148if ac_fn_c_try_compile "$LINENO"; then :
43149  ac_cv_c_bigendian=yes
43150else
43151  ac_cv_c_bigendian=no
43152fi
43153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43154fi
43155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43156    fi
43157    if test $ac_cv_c_bigendian = unknown; then
43158      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
43159      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43160/* end confdefs.h.  */
43161#include <limits.h>
43162
43163int
43164main ()
43165{
43166#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
43167	      bogus endian macros
43168	     #endif
43169
43170  ;
43171  return 0;
43172}
43173_ACEOF
43174if ac_fn_c_try_compile "$LINENO"; then :
43175  # It does; now see whether it defined to _BIG_ENDIAN or not.
43176	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43177/* end confdefs.h.  */
43178#include <limits.h>
43179
43180int
43181main ()
43182{
43183#ifndef _BIG_ENDIAN
43184		 not big endian
43185		#endif
43186
43187  ;
43188  return 0;
43189}
43190_ACEOF
43191if ac_fn_c_try_compile "$LINENO"; then :
43192  ac_cv_c_bigendian=yes
43193else
43194  ac_cv_c_bigendian=no
43195fi
43196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43197fi
43198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43199    fi
43200    if test $ac_cv_c_bigendian = unknown; then
43201      # Compile a test program.
43202      if test "$cross_compiling" = yes; then :
43203  # Try to guess by grepping values from an object file.
43204	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43205/* end confdefs.h.  */
43206short int ascii_mm[] =
43207		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
43208		short int ascii_ii[] =
43209		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
43210		int use_ascii (int i) {
43211		  return ascii_mm[i] + ascii_ii[i];
43212		}
43213		short int ebcdic_ii[] =
43214		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
43215		short int ebcdic_mm[] =
43216		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
43217		int use_ebcdic (int i) {
43218		  return ebcdic_mm[i] + ebcdic_ii[i];
43219		}
43220		extern int foo;
43221
43222int
43223main ()
43224{
43225return use_ascii (foo) == use_ebcdic (foo);
43226  ;
43227  return 0;
43228}
43229_ACEOF
43230if ac_fn_c_try_compile "$LINENO"; then :
43231  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
43232	      ac_cv_c_bigendian=yes
43233	    fi
43234	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
43235	      if test "$ac_cv_c_bigendian" = unknown; then
43236		ac_cv_c_bigendian=no
43237	      else
43238		# finding both strings is unlikely to happen, but who knows?
43239		ac_cv_c_bigendian=unknown
43240	      fi
43241	    fi
43242fi
43243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43244else
43245  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43246/* end confdefs.h.  */
43247$ac_includes_default
43248int
43249main ()
43250{
43251
43252	     /* Are we little or big endian?  From Harbison&Steele.  */
43253	     union
43254	     {
43255	       long int l;
43256	       char c[sizeof (long int)];
43257	     } u;
43258	     u.l = 1;
43259	     return u.c[sizeof (long int) - 1] == 1;
43260
43261  ;
43262  return 0;
43263}
43264_ACEOF
43265if ac_fn_c_try_run "$LINENO"; then :
43266  ac_cv_c_bigendian=no
43267else
43268  ac_cv_c_bigendian=yes
43269fi
43270rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43271  conftest.$ac_objext conftest.beam conftest.$ac_ext
43272fi
43273
43274    fi
43275fi
43276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
43277$as_echo "$ac_cv_c_bigendian" >&6; }
43278 case $ac_cv_c_bigendian in #(
43279   yes)
43280     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
43281;; #(
43282   no)
43283      ;; #(
43284   universal)
43285
43286$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
43287
43288     ;; #(
43289   *)
43290     as_fn_error "unknown endianness
43291 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
43292 esac
43293
43294
43295  if test "$ac_cv_header_winsock2_h" = yes; then
43296
43297
43298
43299
43300
43301
43302
43303
43304  gltests_LIBOBJS="$gltests_LIBOBJS ioctl.$ac_objext"
43305
43306
43307    :
43308
43309  fi
43310
43311
43312  GNULIB_IOCTL=1
43313
43314
43315
43316$as_echo "#define GNULIB_IOCTL 1" >>confdefs.h
43317
43318
43319
43320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
43321$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
43322if test "${gl_cv_cc_double_expbit0+set}" = set; then :
43323  $as_echo_n "(cached) " >&6
43324else
43325
43326      if test "$cross_compiling" = yes; then :
43327
43328                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43329/* end confdefs.h.  */
43330
43331#if defined arm || defined __arm || defined __arm__
43332  mixed_endianness
43333#endif
43334
43335_ACEOF
43336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
43337  $EGREP "mixed_endianness" >/dev/null 2>&1; then :
43338  gl_cv_cc_double_expbit0="unknown"
43339else
43340
43341                                                         :
43342if test "${ac_cv_c_bigendian+set}" = set; then :
43343  $as_echo_n "(cached) " >&6
43344else
43345  ac_cv_c_bigendian=unknown
43346    # See if we're dealing with a universal compiler.
43347    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43348/* end confdefs.h.  */
43349#ifndef __APPLE_CC__
43350	       not a universal capable compiler
43351	     #endif
43352	     typedef int dummy;
43353
43354_ACEOF
43355if ac_fn_c_try_compile "$LINENO"; then :
43356
43357	# Check for potential -arch flags.  It is not universal unless
43358	# there are at least two -arch flags with different values.
43359	ac_arch=
43360	ac_prev=
43361	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
43362	 if test -n "$ac_prev"; then
43363	   case $ac_word in
43364	     i?86 | x86_64 | ppc | ppc64)
43365	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
43366		 ac_arch=$ac_word
43367	       else
43368		 ac_cv_c_bigendian=universal
43369		 break
43370	       fi
43371	       ;;
43372	   esac
43373	   ac_prev=
43374	 elif test "x$ac_word" = "x-arch"; then
43375	   ac_prev=arch
43376	 fi
43377       done
43378fi
43379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43380    if test $ac_cv_c_bigendian = unknown; then
43381      # See if sys/param.h defines the BYTE_ORDER macro.
43382      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43383/* end confdefs.h.  */
43384#include <sys/types.h>
43385	     #include <sys/param.h>
43386
43387int
43388main ()
43389{
43390#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
43391		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
43392		     && LITTLE_ENDIAN)
43393	      bogus endian macros
43394	     #endif
43395
43396  ;
43397  return 0;
43398}
43399_ACEOF
43400if ac_fn_c_try_compile "$LINENO"; then :
43401  # It does; now see whether it defined to BIG_ENDIAN or not.
43402	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43403/* end confdefs.h.  */
43404#include <sys/types.h>
43405		#include <sys/param.h>
43406
43407int
43408main ()
43409{
43410#if BYTE_ORDER != BIG_ENDIAN
43411		 not big endian
43412		#endif
43413
43414  ;
43415  return 0;
43416}
43417_ACEOF
43418if ac_fn_c_try_compile "$LINENO"; then :
43419  ac_cv_c_bigendian=yes
43420else
43421  ac_cv_c_bigendian=no
43422fi
43423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43424fi
43425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43426    fi
43427    if test $ac_cv_c_bigendian = unknown; then
43428      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
43429      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43430/* end confdefs.h.  */
43431#include <limits.h>
43432
43433int
43434main ()
43435{
43436#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
43437	      bogus endian macros
43438	     #endif
43439
43440  ;
43441  return 0;
43442}
43443_ACEOF
43444if ac_fn_c_try_compile "$LINENO"; then :
43445  # It does; now see whether it defined to _BIG_ENDIAN or not.
43446	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43447/* end confdefs.h.  */
43448#include <limits.h>
43449
43450int
43451main ()
43452{
43453#ifndef _BIG_ENDIAN
43454		 not big endian
43455		#endif
43456
43457  ;
43458  return 0;
43459}
43460_ACEOF
43461if ac_fn_c_try_compile "$LINENO"; then :
43462  ac_cv_c_bigendian=yes
43463else
43464  ac_cv_c_bigendian=no
43465fi
43466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43467fi
43468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43469    fi
43470    if test $ac_cv_c_bigendian = unknown; then
43471      # Compile a test program.
43472      if test "$cross_compiling" = yes; then :
43473  # Try to guess by grepping values from an object file.
43474	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43475/* end confdefs.h.  */
43476short int ascii_mm[] =
43477		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
43478		short int ascii_ii[] =
43479		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
43480		int use_ascii (int i) {
43481		  return ascii_mm[i] + ascii_ii[i];
43482		}
43483		short int ebcdic_ii[] =
43484		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
43485		short int ebcdic_mm[] =
43486		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
43487		int use_ebcdic (int i) {
43488		  return ebcdic_mm[i] + ebcdic_ii[i];
43489		}
43490		extern int foo;
43491
43492int
43493main ()
43494{
43495return use_ascii (foo) == use_ebcdic (foo);
43496  ;
43497  return 0;
43498}
43499_ACEOF
43500if ac_fn_c_try_compile "$LINENO"; then :
43501  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
43502	      ac_cv_c_bigendian=yes
43503	    fi
43504	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
43505	      if test "$ac_cv_c_bigendian" = unknown; then
43506		ac_cv_c_bigendian=no
43507	      else
43508		# finding both strings is unlikely to happen, but who knows?
43509		ac_cv_c_bigendian=unknown
43510	      fi
43511	    fi
43512fi
43513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43514else
43515  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43516/* end confdefs.h.  */
43517$ac_includes_default
43518int
43519main ()
43520{
43521
43522	     /* Are we little or big endian?  From Harbison&Steele.  */
43523	     union
43524	     {
43525	       long int l;
43526	       char c[sizeof (long int)];
43527	     } u;
43528	     u.l = 1;
43529	     return u.c[sizeof (long int) - 1] == 1;
43530
43531  ;
43532  return 0;
43533}
43534_ACEOF
43535if ac_fn_c_try_run "$LINENO"; then :
43536  ac_cv_c_bigendian=no
43537else
43538  ac_cv_c_bigendian=yes
43539fi
43540rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43541  conftest.$ac_objext conftest.beam conftest.$ac_ext
43542fi
43543
43544    fi
43545fi
43546:
43547 case $ac_cv_c_bigendian in #(
43548   yes)
43549     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
43550   no)
43551     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
43552   universal)
43553
43554$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
43555
43556     ;; #(
43557   *)
43558     gl_cv_cc_double_expbit0="unknown" ;;
43559 esac
43560
43561
43562fi
43563rm -f conftest*
43564
43565
43566else
43567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43568/* end confdefs.h.  */
43569
43570#include <float.h>
43571#include <stddef.h>
43572#include <stdio.h>
43573#include <string.h>
43574#define NWORDS \
43575  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
43576typedef union { double value; unsigned int word[NWORDS]; } memory_double;
43577static unsigned int ored_words[NWORDS];
43578static unsigned int anded_words[NWORDS];
43579static void add_to_ored_words (double x)
43580{
43581  memory_double m;
43582  size_t i;
43583  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
43584  memset (&m, 0, sizeof (memory_double));
43585  m.value = x;
43586  for (i = 0; i < NWORDS; i++)
43587    {
43588      ored_words[i] |= m.word[i];
43589      anded_words[i] &= m.word[i];
43590    }
43591}
43592int main ()
43593{
43594  size_t j;
43595  FILE *fp = fopen ("conftest.out", "w");
43596  if (fp == NULL)
43597    return 1;
43598  for (j = 0; j < NWORDS; j++)
43599    anded_words[j] = ~ (unsigned int) 0;
43600  add_to_ored_words (0.25);
43601  add_to_ored_words (0.5);
43602  add_to_ored_words (1.0);
43603  add_to_ored_words (2.0);
43604  add_to_ored_words (4.0);
43605  /* Remove bits that are common (e.g. if representation of the first mantissa
43606     bit is explicit).  */
43607  for (j = 0; j < NWORDS; j++)
43608    ored_words[j] &= ~anded_words[j];
43609  /* Now find the nonzero word.  */
43610  for (j = 0; j < NWORDS; j++)
43611    if (ored_words[j] != 0)
43612      break;
43613  if (j < NWORDS)
43614    {
43615      size_t i;
43616      for (i = j + 1; i < NWORDS; i++)
43617        if (ored_words[i] != 0)
43618          {
43619            fprintf (fp, "unknown");
43620            return (fclose (fp) != 0);
43621          }
43622      for (i = 0; ; i++)
43623        if ((ored_words[j] >> i) & 1)
43624          {
43625            fprintf (fp, "word %d bit %d", (int) j, (int) i);
43626            return (fclose (fp) != 0);
43627          }
43628    }
43629  fprintf (fp, "unknown");
43630  return (fclose (fp) != 0);
43631}
43632
43633_ACEOF
43634if ac_fn_c_try_run "$LINENO"; then :
43635  gl_cv_cc_double_expbit0=`cat conftest.out`
43636else
43637  gl_cv_cc_double_expbit0="unknown"
43638fi
43639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43640  conftest.$ac_objext conftest.beam conftest.$ac_ext
43641fi
43642
43643      rm -f conftest.out
43644
43645fi
43646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
43647$as_echo "$gl_cv_cc_double_expbit0" >&6; }
43648  case "$gl_cv_cc_double_expbit0" in
43649    word*bit*)
43650      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
43651      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
43652
43653cat >>confdefs.h <<_ACEOF
43654#define DBL_EXPBIT0_WORD $word
43655_ACEOF
43656
43657
43658cat >>confdefs.h <<_ACEOF
43659#define DBL_EXPBIT0_BIT $bit
43660_ACEOF
43661
43662      ;;
43663  esac
43664
43665
43666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
43667$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
43668if test "${gl_cv_cc_float_expbit0+set}" = set; then :
43669  $as_echo_n "(cached) " >&6
43670else
43671
43672      if test "$cross_compiling" = yes; then :
43673  gl_cv_cc_float_expbit0="word 0 bit 23"
43674else
43675  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43676/* end confdefs.h.  */
43677
43678#include <float.h>
43679#include <stddef.h>
43680#include <stdio.h>
43681#include <string.h>
43682#define NWORDS \
43683  ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
43684typedef union { float value; unsigned int word[NWORDS]; } memory_float;
43685static unsigned int ored_words[NWORDS];
43686static unsigned int anded_words[NWORDS];
43687static void add_to_ored_words (float x)
43688{
43689  memory_float m;
43690  size_t i;
43691  /* Clear it first, in case
43692     sizeof (float) < sizeof (memory_float).  */
43693  memset (&m, 0, sizeof (memory_float));
43694  m.value = x;
43695  for (i = 0; i < NWORDS; i++)
43696    {
43697      ored_words[i] |= m.word[i];
43698      anded_words[i] &= m.word[i];
43699    }
43700}
43701int main ()
43702{
43703  size_t j;
43704  FILE *fp = fopen ("conftest.out", "w");
43705  if (fp == NULL)
43706    return 1;
43707  for (j = 0; j < NWORDS; j++)
43708    anded_words[j] = ~ (unsigned int) 0;
43709  add_to_ored_words (0.25f);
43710  add_to_ored_words (0.5f);
43711  add_to_ored_words (1.0f);
43712  add_to_ored_words (2.0f);
43713  add_to_ored_words (4.0f);
43714  /* Remove bits that are common (e.g. if representation of the first mantissa
43715     bit is explicit).  */
43716  for (j = 0; j < NWORDS; j++)
43717    ored_words[j] &= ~anded_words[j];
43718  /* Now find the nonzero word.  */
43719  for (j = 0; j < NWORDS; j++)
43720    if (ored_words[j] != 0)
43721      break;
43722  if (j < NWORDS)
43723    {
43724      size_t i;
43725      for (i = j + 1; i < NWORDS; i++)
43726        if (ored_words[i] != 0)
43727          {
43728            fprintf (fp, "unknown");
43729            return (fclose (fp) != 0);
43730          }
43731      for (i = 0; ; i++)
43732        if ((ored_words[j] >> i) & 1)
43733          {
43734            fprintf (fp, "word %d bit %d", (int) j, (int) i);
43735            return (fclose (fp) != 0);
43736          }
43737    }
43738  fprintf (fp, "unknown");
43739  return (fclose (fp) != 0);
43740}
43741
43742_ACEOF
43743if ac_fn_c_try_run "$LINENO"; then :
43744  gl_cv_cc_float_expbit0=`cat conftest.out`
43745else
43746  gl_cv_cc_float_expbit0="unknown"
43747fi
43748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43749  conftest.$ac_objext conftest.beam conftest.$ac_ext
43750fi
43751
43752      rm -f conftest.out
43753
43754fi
43755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
43756$as_echo "$gl_cv_cc_float_expbit0" >&6; }
43757  case "$gl_cv_cc_float_expbit0" in
43758    word*bit*)
43759      word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
43760      bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
43761
43762cat >>confdefs.h <<_ACEOF
43763#define FLT_EXPBIT0_WORD $word
43764_ACEOF
43765
43766
43767cat >>confdefs.h <<_ACEOF
43768#define FLT_EXPBIT0_BIT $bit
43769_ACEOF
43770
43771      ;;
43772  esac
43773
43774
43775
43776  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
43777$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
43778if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
43779  $as_echo_n "(cached) " >&6
43780else
43781
43782      if test "$cross_compiling" = yes; then :
43783
43784                              gl_cv_cc_long_double_expbit0="unknown"
43785
43786else
43787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43788/* end confdefs.h.  */
43789
43790#include <float.h>
43791#include <stddef.h>
43792#include <stdio.h>
43793#include <string.h>
43794#define NWORDS \
43795  ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
43796typedef union { long double value; unsigned int word[NWORDS]; }
43797        memory_long_double;
43798static unsigned int ored_words[NWORDS];
43799static unsigned int anded_words[NWORDS];
43800static void add_to_ored_words (long double x)
43801{
43802  memory_long_double m;
43803  size_t i;
43804  /* Clear it first, in case
43805     sizeof (long double) < sizeof (memory_long_double).  */
43806  memset (&m, 0, sizeof (memory_long_double));
43807  m.value = x;
43808  for (i = 0; i < NWORDS; i++)
43809    {
43810      ored_words[i] |= m.word[i];
43811      anded_words[i] &= m.word[i];
43812    }
43813}
43814int main ()
43815{
43816  size_t j;
43817  FILE *fp = fopen ("conftest.out", "w");
43818  if (fp == NULL)
43819    return 1;
43820  for (j = 0; j < NWORDS; j++)
43821    anded_words[j] = ~ (unsigned int) 0;
43822  add_to_ored_words (0.25L);
43823  add_to_ored_words (0.5L);
43824  add_to_ored_words (1.0L);
43825  add_to_ored_words (2.0L);
43826  add_to_ored_words (4.0L);
43827  /* Remove bits that are common (e.g. if representation of the first mantissa
43828     bit is explicit).  */
43829  for (j = 0; j < NWORDS; j++)
43830    ored_words[j] &= ~anded_words[j];
43831  /* Now find the nonzero word.  */
43832  for (j = 0; j < NWORDS; j++)
43833    if (ored_words[j] != 0)
43834      break;
43835  if (j < NWORDS)
43836    {
43837      size_t i;
43838      for (i = j + 1; i < NWORDS; i++)
43839        if (ored_words[i] != 0)
43840          {
43841            fprintf (fp, "unknown");
43842            return (fclose (fp) != 0);
43843          }
43844      for (i = 0; ; i++)
43845        if ((ored_words[j] >> i) & 1)
43846          {
43847            fprintf (fp, "word %d bit %d", (int) j, (int) i);
43848            return (fclose (fp) != 0);
43849          }
43850    }
43851  fprintf (fp, "unknown");
43852  return (fclose (fp) != 0);
43853}
43854
43855_ACEOF
43856if ac_fn_c_try_run "$LINENO"; then :
43857  gl_cv_cc_long_double_expbit0=`cat conftest.out`
43858else
43859  gl_cv_cc_long_double_expbit0="unknown"
43860fi
43861rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
43862  conftest.$ac_objext conftest.beam conftest.$ac_ext
43863fi
43864
43865      rm -f conftest.out
43866
43867fi
43868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
43869$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
43870  case "$gl_cv_cc_long_double_expbit0" in
43871    word*bit*)
43872      word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
43873      bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
43874
43875cat >>confdefs.h <<_ACEOF
43876#define LDBL_EXPBIT0_WORD $word
43877_ACEOF
43878
43879
43880cat >>confdefs.h <<_ACEOF
43881#define LDBL_EXPBIT0_BIT $bit
43882_ACEOF
43883
43884      ;;
43885  esac
43886
43887
43888
43889  if test "$ac_cv_header_winsock2_h" = yes; then
43890
43891
43892
43893
43894
43895
43896
43897
43898  gltests_LIBOBJS="$gltests_LIBOBJS listen.$ac_objext"
43899
43900  fi
43901
43902
43903  GNULIB_LISTEN=1
43904
43905
43906
43907
43908
43909  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
43910$as_echo_n "checking for a traditional french locale... " >&6; }
43911if test "${gt_cv_locale_fr+set}" = set; then :
43912  $as_echo_n "(cached) " >&6
43913else
43914
43915    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43916/* end confdefs.h.  */
43917
43918#include <locale.h>
43919#include <time.h>
43920#if HAVE_LANGINFO_CODESET
43921# include <langinfo.h>
43922#endif
43923#include <stdlib.h>
43924#include <string.h>
43925struct tm t;
43926char buf[16];
43927int main () {
43928  /* Check whether the given locale name is recognized by the system.  */
43929  if (setlocale (LC_ALL, "") == NULL) return 1;
43930  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43931     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
43932     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43933     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43934     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43935     some unit tests fail.  */
43936#if HAVE_LANGINFO_CODESET
43937  {
43938    const char *cs = nl_langinfo (CODESET);
43939    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
43940      return 1;
43941  }
43942#endif
43943#ifdef __CYGWIN__
43944  /* On Cygwin, avoid locale names without encoding suffix, because the
43945     locale_charset() function relies on the encoding suffix.  Note that
43946     LC_ALL is set on the command line.  */
43947  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43948#endif
43949  /* Check whether in the abbreviation of the second month, the second
43950     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
43951     one byte long. This excludes the UTF-8 encoding.  */
43952  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
43953  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
43954  /* Check whether the decimal separator is a comma.
43955     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
43956     are nl_langinfo(RADIXCHAR) are both ".".  */
43957  if (localeconv () ->decimal_point[0] != ',') return 1;
43958  return 0;
43959}
43960
43961_ACEOF
43962    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43963  (eval $ac_link) 2>&5
43964  ac_status=$?
43965  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43966  test $ac_status = 0; } && test -s conftest$ac_exeext; then
43967      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43968      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
43969      # configure script would override the LC_ALL setting. Likewise for
43970      # LC_CTYPE, which is also set at the beginning of the configure script.
43971      # Test for the usual locale name.
43972      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43973        gt_cv_locale_fr=fr_FR
43974      else
43975        # Test for the locale name with explicit encoding suffix.
43976        if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43977          gt_cv_locale_fr=fr_FR.ISO-8859-1
43978        else
43979          # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
43980          if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43981            gt_cv_locale_fr=fr_FR.ISO8859-1
43982          else
43983            # Test for the HP-UX locale name.
43984            if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43985              gt_cv_locale_fr=fr_FR.iso88591
43986            else
43987              # Test for the Solaris 7 locale name.
43988              if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43989                gt_cv_locale_fr=fr
43990              else
43991                # None found.
43992                gt_cv_locale_fr=none
43993              fi
43994            fi
43995          fi
43996        fi
43997      fi
43998    fi
43999    rm -fr conftest*
44000
44001fi
44002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
44003$as_echo "$gt_cv_locale_fr" >&6; }
44004  LOCALE_FR=$gt_cv_locale_fr
44005
44006
44007
44008
44009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
44010$as_echo_n "checking for a french Unicode locale... " >&6; }
44011if test "${gt_cv_locale_fr_utf8+set}" = set; then :
44012  $as_echo_n "(cached) " >&6
44013else
44014
44015    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44016/* end confdefs.h.  */
44017
44018#include <locale.h>
44019#include <time.h>
44020#if HAVE_LANGINFO_CODESET
44021# include <langinfo.h>
44022#endif
44023#include <stdlib.h>
44024#include <string.h>
44025struct tm t;
44026char buf[16];
44027int main () {
44028  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
44029     imitates locale dependent behaviour by looking at the environment
44030     variables, and all locales use the UTF-8 encoding.  */
44031#if !(defined __BEOS__ || defined __HAIKU__)
44032  /* Check whether the given locale name is recognized by the system.  */
44033  if (setlocale (LC_ALL, "") == NULL) return 1;
44034  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44035     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44036     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44037     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44038     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44039     some unit tests fail.  */
44040# if HAVE_LANGINFO_CODESET
44041  {
44042    const char *cs = nl_langinfo (CODESET);
44043    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44044      return 1;
44045  }
44046# endif
44047# ifdef __CYGWIN__
44048  /* On Cygwin, avoid locale names without encoding suffix, because the
44049     locale_charset() function relies on the encoding suffix.  Note that
44050     LC_ALL is set on the command line.  */
44051  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44052# endif
44053  /* Check whether in the abbreviation of the second month, the second
44054     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
44055     two bytes long, with UTF-8 encoding.  */
44056  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44057  if (strftime (buf, sizeof (buf), "%b", &t) < 4
44058      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
44059    return 1;
44060#endif
44061  /* Check whether the decimal separator is a comma.
44062     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
44063     are nl_langinfo(RADIXCHAR) are both ".".  */
44064  if (localeconv () ->decimal_point[0] != ',') return 1;
44065  return 0;
44066}
44067
44068_ACEOF
44069    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44070  (eval $ac_link) 2>&5
44071  ac_status=$?
44072  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44073  test $ac_status = 0; } && test -s conftest$ac_exeext; then
44074      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44075      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
44076      # configure script would override the LC_ALL setting. Likewise for
44077      # LC_CTYPE, which is also set at the beginning of the configure script.
44078      # Test for the usual locale name.
44079      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44080        gt_cv_locale_fr_utf8=fr_FR
44081      else
44082        # Test for the locale name with explicit encoding suffix.
44083        if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44084          gt_cv_locale_fr_utf8=fr_FR.UTF-8
44085        else
44086          # Test for the Solaris 7 locale name.
44087          if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44088            gt_cv_locale_fr_utf8=fr.UTF-8
44089          else
44090            # None found.
44091            gt_cv_locale_fr_utf8=none
44092          fi
44093        fi
44094      fi
44095    fi
44096    rm -fr conftest*
44097
44098fi
44099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
44100$as_echo "$gt_cv_locale_fr_utf8" >&6; }
44101  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
44102
44103
44104
44105
44106
44107  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
44108$as_echo_n "checking for a traditional japanese locale... " >&6; }
44109if test "${gt_cv_locale_ja+set}" = set; then :
44110  $as_echo_n "(cached) " >&6
44111else
44112
44113    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44114/* end confdefs.h.  */
44115
44116#include <locale.h>
44117#include <time.h>
44118#if HAVE_LANGINFO_CODESET
44119# include <langinfo.h>
44120#endif
44121#include <stdlib.h>
44122#include <string.h>
44123struct tm t;
44124char buf[16];
44125int main ()
44126{
44127  const char *p;
44128  /* Check whether the given locale name is recognized by the system.  */
44129  if (setlocale (LC_ALL, "") == NULL) return 1;
44130  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44131     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44132     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44133     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44134     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44135     some unit tests fail.  */
44136#if HAVE_LANGINFO_CODESET
44137  {
44138    const char *cs = nl_langinfo (CODESET);
44139    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44140      return 1;
44141  }
44142#endif
44143#ifdef __CYGWIN__
44144  /* On Cygwin, avoid locale names without encoding suffix, because the
44145     locale_charset() function relies on the encoding suffix.  Note that
44146     LC_ALL is set on the command line.  */
44147  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44148#endif
44149  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
44150     on Cygwin 1.5.x.  */
44151  if (MB_CUR_MAX == 1)
44152    return 1;
44153  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
44154     This excludes the UTF-8 encoding.  */
44155  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44156  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
44157  for (p = buf; *p != '\0'; p++)
44158    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
44159      return 1;
44160  return 0;
44161}
44162
44163_ACEOF
44164    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44165  (eval $ac_link) 2>&5
44166  ac_status=$?
44167  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44168  test $ac_status = 0; } && test -s conftest$ac_exeext; then
44169      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44170      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
44171      # configure script would override the LC_ALL setting. Likewise for
44172      # LC_CTYPE, which is also set at the beginning of the configure script.
44173      # Test for the AIX locale name.
44174      if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44175        gt_cv_locale_ja=ja_JP
44176      else
44177        # Test for the locale name with explicit encoding suffix.
44178        if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44179          gt_cv_locale_ja=ja_JP.EUC-JP
44180        else
44181          # Test for the HP-UX, OSF/1, NetBSD locale name.
44182          if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44183            gt_cv_locale_ja=ja_JP.eucJP
44184          else
44185            # Test for the IRIX, FreeBSD locale name.
44186            if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44187              gt_cv_locale_ja=ja_JP.EUC
44188            else
44189              # Test for the Solaris 7 locale name.
44190              if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44191                gt_cv_locale_ja=ja
44192              else
44193                # Special test for NetBSD 1.6.
44194                if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
44195                  gt_cv_locale_ja=ja_JP.eucJP
44196                else
44197                  # None found.
44198                  gt_cv_locale_ja=none
44199                fi
44200              fi
44201            fi
44202          fi
44203        fi
44204      fi
44205    fi
44206    rm -fr conftest*
44207
44208fi
44209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
44210$as_echo "$gt_cv_locale_ja" >&6; }
44211  LOCALE_JA=$gt_cv_locale_ja
44212
44213
44214
44215
44216
44217  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
44218$as_echo_n "checking for a transitional chinese locale... " >&6; }
44219if test "${gt_cv_locale_zh_CN+set}" = set; then :
44220  $as_echo_n "(cached) " >&6
44221else
44222
44223    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44224/* end confdefs.h.  */
44225
44226#include <locale.h>
44227#include <stdlib.h>
44228#include <time.h>
44229#if HAVE_LANGINFO_CODESET
44230# include <langinfo.h>
44231#endif
44232#include <stdlib.h>
44233#include <string.h>
44234struct tm t;
44235char buf[16];
44236int main ()
44237{
44238  const char *p;
44239  /* Check whether the given locale name is recognized by the system.  */
44240  if (setlocale (LC_ALL, "") == NULL) return 1;
44241  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44242     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44243     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44244     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44245     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44246     some unit tests fail.  */
44247#if HAVE_LANGINFO_CODESET
44248  {
44249    const char *cs = nl_langinfo (CODESET);
44250    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44251      return 1;
44252  }
44253#endif
44254#ifdef __CYGWIN__
44255  /* On Cygwin, avoid locale names without encoding suffix, because the
44256     locale_charset() function relies on the encoding suffix.  Note that
44257     LC_ALL is set on the command line.  */
44258  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44259#endif
44260  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
44261     This excludes the UTF-8 encoding.  */
44262  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44263  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
44264  for (p = buf; *p != '\0'; p++)
44265    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
44266      return 1;
44267  /* Check whether a typical GB18030 multibyte sequence is recognized as a
44268     single wide character.  This excludes the GB2312 and GBK encodings.  */
44269  if (mblen ("\203\062\332\066", 5) != 4)
44270    return 1;
44271  return 0;
44272}
44273
44274_ACEOF
44275    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44276  (eval $ac_link) 2>&5
44277  ac_status=$?
44278  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44279  test $ac_status = 0; } && test -s conftest$ac_exeext; then
44280      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44281      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
44282      # configure script would override the LC_ALL setting. Likewise for
44283      # LC_CTYPE, which is also set at the beginning of the configure script.
44284      # Test for the locale name without encoding suffix.
44285      if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44286        gt_cv_locale_zh_CN=zh_CN
44287      else
44288        # Test for the locale name with explicit encoding suffix.
44289        if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44290          gt_cv_locale_zh_CN=zh_CN.GB18030
44291        else
44292          # None found.
44293          gt_cv_locale_zh_CN=none
44294        fi
44295      fi
44296    else
44297      # If there was a link error, due to mblen(), the system is so old that
44298      # it certainly doesn't have a chinese locale.
44299      gt_cv_locale_zh_CN=none
44300    fi
44301    rm -fr conftest*
44302
44303fi
44304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
44305$as_echo "$gt_cv_locale_zh_CN" >&6; }
44306  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
44307
44308
44309
44310
44311  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
44312$as_echo_n "checking for a turkish Unicode locale... " >&6; }
44313if test "${gt_cv_locale_tr_utf8+set}" = set; then :
44314  $as_echo_n "(cached) " >&6
44315else
44316
44317    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44318/* end confdefs.h.  */
44319
44320#include <locale.h>
44321#include <time.h>
44322#if HAVE_LANGINFO_CODESET
44323# include <langinfo.h>
44324#endif
44325#include <stdlib.h>
44326#include <string.h>
44327struct tm t;
44328char buf[16];
44329int main () {
44330  /* On BeOS, locales are not implemented in libc.  Rather, libintl
44331     imitates locale dependent behaviour by looking at the environment
44332     variables, and all locales use the UTF-8 encoding.  But BeOS does not
44333     implement the Turkish upper-/lowercase mappings.  Therefore, let this
44334     program return 1 on BeOS.  */
44335  /* Check whether the given locale name is recognized by the system.  */
44336  if (setlocale (LC_ALL, "") == NULL) return 1;
44337  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44338     On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
44339     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44340     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44341     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44342     some unit tests fail.  */
44343#if HAVE_LANGINFO_CODESET
44344  {
44345    const char *cs = nl_langinfo (CODESET);
44346    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44347      return 1;
44348  }
44349#endif
44350#ifdef __CYGWIN__
44351  /* On Cygwin, avoid locale names without encoding suffix, because the
44352     locale_charset() function relies on the encoding suffix.  Note that
44353     LC_ALL is set on the command line.  */
44354  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44355#endif
44356  /* Check whether in the abbreviation of the eighth month, the second
44357     character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
44358     two bytes long, with UTF-8 encoding.  */
44359  t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
44360  if (strftime (buf, sizeof (buf), "%b", &t) < 4
44361      || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
44362    return 1;
44363  /* Check whether the upper-/lowercase mappings are as expected for
44364     Turkish.  */
44365  if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
44366      || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
44367    return 1;
44368  return 0;
44369}
44370
44371_ACEOF
44372    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44373  (eval $ac_link) 2>&5
44374  ac_status=$?
44375  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44376  test $ac_status = 0; } && test -s conftest$ac_exeext; then
44377      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44378      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
44379      # configure script would override the LC_ALL setting. Likewise for
44380      # LC_CTYPE, which is also set at the beginning of the configure script.
44381      # Test for the usual locale name.
44382      if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44383        gt_cv_locale_tr_utf8=tr_TR
44384      else
44385        # Test for the locale name with explicit encoding suffix.
44386        if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44387          gt_cv_locale_tr_utf8=tr_TR.UTF-8
44388        else
44389          # Test for the Solaris 7 locale name.
44390          if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44391            gt_cv_locale_tr_utf8=tr.UTF-8
44392          else
44393            # None found.
44394            gt_cv_locale_tr_utf8=none
44395          fi
44396        fi
44397      fi
44398    else
44399      gt_cv_locale_tr_utf8=none
44400    fi
44401    rm -fr conftest*
44402
44403fi
44404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
44405$as_echo "$gt_cv_locale_tr_utf8" >&6; }
44406  LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
44407
44408
44409
44410
44411  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
44412$as_echo_n "checking for a french Unicode locale... " >&6; }
44413if test "${gt_cv_locale_fr_utf8+set}" = set; then :
44414  $as_echo_n "(cached) " >&6
44415else
44416
44417    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44418/* end confdefs.h.  */
44419
44420#include <locale.h>
44421#include <time.h>
44422#if HAVE_LANGINFO_CODESET
44423# include <langinfo.h>
44424#endif
44425#include <stdlib.h>
44426#include <string.h>
44427struct tm t;
44428char buf[16];
44429int main () {
44430  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
44431     imitates locale dependent behaviour by looking at the environment
44432     variables, and all locales use the UTF-8 encoding.  */
44433#if !(defined __BEOS__ || defined __HAIKU__)
44434  /* Check whether the given locale name is recognized by the system.  */
44435  if (setlocale (LC_ALL, "") == NULL) return 1;
44436  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44437     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44438     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44439     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44440     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44441     some unit tests fail.  */
44442# if HAVE_LANGINFO_CODESET
44443  {
44444    const char *cs = nl_langinfo (CODESET);
44445    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44446      return 1;
44447  }
44448# endif
44449# ifdef __CYGWIN__
44450  /* On Cygwin, avoid locale names without encoding suffix, because the
44451     locale_charset() function relies on the encoding suffix.  Note that
44452     LC_ALL is set on the command line.  */
44453  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44454# endif
44455  /* Check whether in the abbreviation of the second month, the second
44456     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
44457     two bytes long, with UTF-8 encoding.  */
44458  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44459  if (strftime (buf, sizeof (buf), "%b", &t) < 4
44460      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
44461    return 1;
44462#endif
44463  /* Check whether the decimal separator is a comma.
44464     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
44465     are nl_langinfo(RADIXCHAR) are both ".".  */
44466  if (localeconv () ->decimal_point[0] != ',') return 1;
44467  return 0;
44468}
44469
44470_ACEOF
44471    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44472  (eval $ac_link) 2>&5
44473  ac_status=$?
44474  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44475  test $ac_status = 0; } && test -s conftest$ac_exeext; then
44476      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44477      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
44478      # configure script would override the LC_ALL setting. Likewise for
44479      # LC_CTYPE, which is also set at the beginning of the configure script.
44480      # Test for the usual locale name.
44481      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44482        gt_cv_locale_fr_utf8=fr_FR
44483      else
44484        # Test for the locale name with explicit encoding suffix.
44485        if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44486          gt_cv_locale_fr_utf8=fr_FR.UTF-8
44487        else
44488          # Test for the Solaris 7 locale name.
44489          if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44490            gt_cv_locale_fr_utf8=fr.UTF-8
44491          else
44492            # None found.
44493            gt_cv_locale_fr_utf8=none
44494          fi
44495        fi
44496      fi
44497    fi
44498    rm -fr conftest*
44499
44500fi
44501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
44502$as_echo "$gt_cv_locale_fr_utf8" >&6; }
44503  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
44504
44505
44506
44507
44508
44509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
44510$as_echo_n "checking for a traditional french locale... " >&6; }
44511if test "${gt_cv_locale_fr+set}" = set; then :
44512  $as_echo_n "(cached) " >&6
44513else
44514
44515    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44516/* end confdefs.h.  */
44517
44518#include <locale.h>
44519#include <time.h>
44520#if HAVE_LANGINFO_CODESET
44521# include <langinfo.h>
44522#endif
44523#include <stdlib.h>
44524#include <string.h>
44525struct tm t;
44526char buf[16];
44527int main () {
44528  /* Check whether the given locale name is recognized by the system.  */
44529  if (setlocale (LC_ALL, "") == NULL) return 1;
44530  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44531     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44532     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44533     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44534     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44535     some unit tests fail.  */
44536#if HAVE_LANGINFO_CODESET
44537  {
44538    const char *cs = nl_langinfo (CODESET);
44539    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44540      return 1;
44541  }
44542#endif
44543#ifdef __CYGWIN__
44544  /* On Cygwin, avoid locale names without encoding suffix, because the
44545     locale_charset() function relies on the encoding suffix.  Note that
44546     LC_ALL is set on the command line.  */
44547  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44548#endif
44549  /* Check whether in the abbreviation of the second month, the second
44550     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
44551     one byte long. This excludes the UTF-8 encoding.  */
44552  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44553  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
44554  /* Check whether the decimal separator is a comma.
44555     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
44556     are nl_langinfo(RADIXCHAR) are both ".".  */
44557  if (localeconv () ->decimal_point[0] != ',') return 1;
44558  return 0;
44559}
44560
44561_ACEOF
44562    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44563  (eval $ac_link) 2>&5
44564  ac_status=$?
44565  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44566  test $ac_status = 0; } && test -s conftest$ac_exeext; then
44567      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44568      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
44569      # configure script would override the LC_ALL setting. Likewise for
44570      # LC_CTYPE, which is also set at the beginning of the configure script.
44571      # Test for the usual locale name.
44572      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44573        gt_cv_locale_fr=fr_FR
44574      else
44575        # Test for the locale name with explicit encoding suffix.
44576        if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44577          gt_cv_locale_fr=fr_FR.ISO-8859-1
44578        else
44579          # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
44580          if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44581            gt_cv_locale_fr=fr_FR.ISO8859-1
44582          else
44583            # Test for the HP-UX locale name.
44584            if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44585              gt_cv_locale_fr=fr_FR.iso88591
44586            else
44587              # Test for the Solaris 7 locale name.
44588              if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44589                gt_cv_locale_fr=fr
44590              else
44591                # None found.
44592                gt_cv_locale_fr=none
44593              fi
44594            fi
44595          fi
44596        fi
44597      fi
44598    fi
44599    rm -fr conftest*
44600
44601fi
44602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
44603$as_echo "$gt_cv_locale_fr" >&6; }
44604  LOCALE_FR=$gt_cv_locale_fr
44605
44606
44607
44608
44609  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
44610$as_echo_n "checking for a french Unicode locale... " >&6; }
44611if test "${gt_cv_locale_fr_utf8+set}" = set; then :
44612  $as_echo_n "(cached) " >&6
44613else
44614
44615    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44616/* end confdefs.h.  */
44617
44618#include <locale.h>
44619#include <time.h>
44620#if HAVE_LANGINFO_CODESET
44621# include <langinfo.h>
44622#endif
44623#include <stdlib.h>
44624#include <string.h>
44625struct tm t;
44626char buf[16];
44627int main () {
44628  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
44629     imitates locale dependent behaviour by looking at the environment
44630     variables, and all locales use the UTF-8 encoding.  */
44631#if !(defined __BEOS__ || defined __HAIKU__)
44632  /* Check whether the given locale name is recognized by the system.  */
44633  if (setlocale (LC_ALL, "") == NULL) return 1;
44634  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44635     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44636     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44637     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44638     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44639     some unit tests fail.  */
44640# if HAVE_LANGINFO_CODESET
44641  {
44642    const char *cs = nl_langinfo (CODESET);
44643    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44644      return 1;
44645  }
44646# endif
44647# ifdef __CYGWIN__
44648  /* On Cygwin, avoid locale names without encoding suffix, because the
44649     locale_charset() function relies on the encoding suffix.  Note that
44650     LC_ALL is set on the command line.  */
44651  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44652# endif
44653  /* Check whether in the abbreviation of the second month, the second
44654     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
44655     two bytes long, with UTF-8 encoding.  */
44656  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44657  if (strftime (buf, sizeof (buf), "%b", &t) < 4
44658      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
44659    return 1;
44660#endif
44661  /* Check whether the decimal separator is a comma.
44662     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
44663     are nl_langinfo(RADIXCHAR) are both ".".  */
44664  if (localeconv () ->decimal_point[0] != ',') return 1;
44665  return 0;
44666}
44667
44668_ACEOF
44669    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44670  (eval $ac_link) 2>&5
44671  ac_status=$?
44672  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44673  test $ac_status = 0; } && test -s conftest$ac_exeext; then
44674      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44675      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
44676      # configure script would override the LC_ALL setting. Likewise for
44677      # LC_CTYPE, which is also set at the beginning of the configure script.
44678      # Test for the usual locale name.
44679      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44680        gt_cv_locale_fr_utf8=fr_FR
44681      else
44682        # Test for the locale name with explicit encoding suffix.
44683        if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44684          gt_cv_locale_fr_utf8=fr_FR.UTF-8
44685        else
44686          # Test for the Solaris 7 locale name.
44687          if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44688            gt_cv_locale_fr_utf8=fr.UTF-8
44689          else
44690            # None found.
44691            gt_cv_locale_fr_utf8=none
44692          fi
44693        fi
44694      fi
44695    fi
44696    rm -fr conftest*
44697
44698fi
44699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
44700$as_echo "$gt_cv_locale_fr_utf8" >&6; }
44701  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
44702
44703
44704
44705
44706
44707  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
44708$as_echo_n "checking for a traditional japanese locale... " >&6; }
44709if test "${gt_cv_locale_ja+set}" = set; then :
44710  $as_echo_n "(cached) " >&6
44711else
44712
44713    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44714/* end confdefs.h.  */
44715
44716#include <locale.h>
44717#include <time.h>
44718#if HAVE_LANGINFO_CODESET
44719# include <langinfo.h>
44720#endif
44721#include <stdlib.h>
44722#include <string.h>
44723struct tm t;
44724char buf[16];
44725int main ()
44726{
44727  const char *p;
44728  /* Check whether the given locale name is recognized by the system.  */
44729  if (setlocale (LC_ALL, "") == NULL) return 1;
44730  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44731     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44732     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44733     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44734     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44735     some unit tests fail.  */
44736#if HAVE_LANGINFO_CODESET
44737  {
44738    const char *cs = nl_langinfo (CODESET);
44739    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44740      return 1;
44741  }
44742#endif
44743#ifdef __CYGWIN__
44744  /* On Cygwin, avoid locale names without encoding suffix, because the
44745     locale_charset() function relies on the encoding suffix.  Note that
44746     LC_ALL is set on the command line.  */
44747  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44748#endif
44749  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
44750     on Cygwin 1.5.x.  */
44751  if (MB_CUR_MAX == 1)
44752    return 1;
44753  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
44754     This excludes the UTF-8 encoding.  */
44755  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44756  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
44757  for (p = buf; *p != '\0'; p++)
44758    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
44759      return 1;
44760  return 0;
44761}
44762
44763_ACEOF
44764    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44765  (eval $ac_link) 2>&5
44766  ac_status=$?
44767  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44768  test $ac_status = 0; } && test -s conftest$ac_exeext; then
44769      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44770      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
44771      # configure script would override the LC_ALL setting. Likewise for
44772      # LC_CTYPE, which is also set at the beginning of the configure script.
44773      # Test for the AIX locale name.
44774      if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44775        gt_cv_locale_ja=ja_JP
44776      else
44777        # Test for the locale name with explicit encoding suffix.
44778        if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44779          gt_cv_locale_ja=ja_JP.EUC-JP
44780        else
44781          # Test for the HP-UX, OSF/1, NetBSD locale name.
44782          if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44783            gt_cv_locale_ja=ja_JP.eucJP
44784          else
44785            # Test for the IRIX, FreeBSD locale name.
44786            if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44787              gt_cv_locale_ja=ja_JP.EUC
44788            else
44789              # Test for the Solaris 7 locale name.
44790              if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44791                gt_cv_locale_ja=ja
44792              else
44793                # Special test for NetBSD 1.6.
44794                if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
44795                  gt_cv_locale_ja=ja_JP.eucJP
44796                else
44797                  # None found.
44798                  gt_cv_locale_ja=none
44799                fi
44800              fi
44801            fi
44802          fi
44803        fi
44804      fi
44805    fi
44806    rm -fr conftest*
44807
44808fi
44809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
44810$as_echo "$gt_cv_locale_ja" >&6; }
44811  LOCALE_JA=$gt_cv_locale_ja
44812
44813
44814
44815
44816
44817  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
44818$as_echo_n "checking for a transitional chinese locale... " >&6; }
44819if test "${gt_cv_locale_zh_CN+set}" = set; then :
44820  $as_echo_n "(cached) " >&6
44821else
44822
44823    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44824/* end confdefs.h.  */
44825
44826#include <locale.h>
44827#include <stdlib.h>
44828#include <time.h>
44829#if HAVE_LANGINFO_CODESET
44830# include <langinfo.h>
44831#endif
44832#include <stdlib.h>
44833#include <string.h>
44834struct tm t;
44835char buf[16];
44836int main ()
44837{
44838  const char *p;
44839  /* Check whether the given locale name is recognized by the system.  */
44840  if (setlocale (LC_ALL, "") == NULL) return 1;
44841  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44842     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44843     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44844     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44845     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44846     some unit tests fail.  */
44847#if HAVE_LANGINFO_CODESET
44848  {
44849    const char *cs = nl_langinfo (CODESET);
44850    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44851      return 1;
44852  }
44853#endif
44854#ifdef __CYGWIN__
44855  /* On Cygwin, avoid locale names without encoding suffix, because the
44856     locale_charset() function relies on the encoding suffix.  Note that
44857     LC_ALL is set on the command line.  */
44858  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44859#endif
44860  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
44861     This excludes the UTF-8 encoding.  */
44862  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44863  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
44864  for (p = buf; *p != '\0'; p++)
44865    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
44866      return 1;
44867  /* Check whether a typical GB18030 multibyte sequence is recognized as a
44868     single wide character.  This excludes the GB2312 and GBK encodings.  */
44869  if (mblen ("\203\062\332\066", 5) != 4)
44870    return 1;
44871  return 0;
44872}
44873
44874_ACEOF
44875    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44876  (eval $ac_link) 2>&5
44877  ac_status=$?
44878  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44879  test $ac_status = 0; } && test -s conftest$ac_exeext; then
44880      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44881      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
44882      # configure script would override the LC_ALL setting. Likewise for
44883      # LC_CTYPE, which is also set at the beginning of the configure script.
44884      # Test for the locale name without encoding suffix.
44885      if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44886        gt_cv_locale_zh_CN=zh_CN
44887      else
44888        # Test for the locale name with explicit encoding suffix.
44889        if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44890          gt_cv_locale_zh_CN=zh_CN.GB18030
44891        else
44892          # None found.
44893          gt_cv_locale_zh_CN=none
44894        fi
44895      fi
44896    else
44897      # If there was a link error, due to mblen(), the system is so old that
44898      # it certainly doesn't have a chinese locale.
44899      gt_cv_locale_zh_CN=none
44900    fi
44901    rm -fr conftest*
44902
44903fi
44904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
44905$as_echo "$gt_cv_locale_zh_CN" >&6; }
44906  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
44907
44908
44909
44910
44911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
44912$as_echo_n "checking for a french Unicode locale... " >&6; }
44913if test "${gt_cv_locale_fr_utf8+set}" = set; then :
44914  $as_echo_n "(cached) " >&6
44915else
44916
44917    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44918/* end confdefs.h.  */
44919
44920#include <locale.h>
44921#include <time.h>
44922#if HAVE_LANGINFO_CODESET
44923# include <langinfo.h>
44924#endif
44925#include <stdlib.h>
44926#include <string.h>
44927struct tm t;
44928char buf[16];
44929int main () {
44930  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
44931     imitates locale dependent behaviour by looking at the environment
44932     variables, and all locales use the UTF-8 encoding.  */
44933#if !(defined __BEOS__ || defined __HAIKU__)
44934  /* Check whether the given locale name is recognized by the system.  */
44935  if (setlocale (LC_ALL, "") == NULL) return 1;
44936  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44937     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44938     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44939     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44940     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44941     some unit tests fail.  */
44942# if HAVE_LANGINFO_CODESET
44943  {
44944    const char *cs = nl_langinfo (CODESET);
44945    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44946      return 1;
44947  }
44948# endif
44949# ifdef __CYGWIN__
44950  /* On Cygwin, avoid locale names without encoding suffix, because the
44951     locale_charset() function relies on the encoding suffix.  Note that
44952     LC_ALL is set on the command line.  */
44953  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44954# endif
44955  /* Check whether in the abbreviation of the second month, the second
44956     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
44957     two bytes long, with UTF-8 encoding.  */
44958  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44959  if (strftime (buf, sizeof (buf), "%b", &t) < 4
44960      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
44961    return 1;
44962#endif
44963  /* Check whether the decimal separator is a comma.
44964     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
44965     are nl_langinfo(RADIXCHAR) are both ".".  */
44966  if (localeconv () ->decimal_point[0] != ',') return 1;
44967  return 0;
44968}
44969
44970_ACEOF
44971    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44972  (eval $ac_link) 2>&5
44973  ac_status=$?
44974  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44975  test $ac_status = 0; } && test -s conftest$ac_exeext; then
44976      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44977      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
44978      # configure script would override the LC_ALL setting. Likewise for
44979      # LC_CTYPE, which is also set at the beginning of the configure script.
44980      # Test for the usual locale name.
44981      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44982        gt_cv_locale_fr_utf8=fr_FR
44983      else
44984        # Test for the locale name with explicit encoding suffix.
44985        if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44986          gt_cv_locale_fr_utf8=fr_FR.UTF-8
44987        else
44988          # Test for the Solaris 7 locale name.
44989          if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44990            gt_cv_locale_fr_utf8=fr.UTF-8
44991          else
44992            # None found.
44993            gt_cv_locale_fr_utf8=none
44994          fi
44995        fi
44996      fi
44997    fi
44998    rm -fr conftest*
44999
45000fi
45001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
45002$as_echo "$gt_cv_locale_fr_utf8" >&6; }
45003  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
45004
45005
45006
45007
45008
45009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
45010$as_echo_n "checking for a transitional chinese locale... " >&6; }
45011if test "${gt_cv_locale_zh_CN+set}" = set; then :
45012  $as_echo_n "(cached) " >&6
45013else
45014
45015    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45016/* end confdefs.h.  */
45017
45018#include <locale.h>
45019#include <stdlib.h>
45020#include <time.h>
45021#if HAVE_LANGINFO_CODESET
45022# include <langinfo.h>
45023#endif
45024#include <stdlib.h>
45025#include <string.h>
45026struct tm t;
45027char buf[16];
45028int main ()
45029{
45030  const char *p;
45031  /* Check whether the given locale name is recognized by the system.  */
45032  if (setlocale (LC_ALL, "") == NULL) return 1;
45033  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
45034     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
45035     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
45036     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
45037     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
45038     some unit tests fail.  */
45039#if HAVE_LANGINFO_CODESET
45040  {
45041    const char *cs = nl_langinfo (CODESET);
45042    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
45043      return 1;
45044  }
45045#endif
45046#ifdef __CYGWIN__
45047  /* On Cygwin, avoid locale names without encoding suffix, because the
45048     locale_charset() function relies on the encoding suffix.  Note that
45049     LC_ALL is set on the command line.  */
45050  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
45051#endif
45052  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
45053     This excludes the UTF-8 encoding.  */
45054  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
45055  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
45056  for (p = buf; *p != '\0'; p++)
45057    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
45058      return 1;
45059  /* Check whether a typical GB18030 multibyte sequence is recognized as a
45060     single wide character.  This excludes the GB2312 and GBK encodings.  */
45061  if (mblen ("\203\062\332\066", 5) != 4)
45062    return 1;
45063  return 0;
45064}
45065
45066_ACEOF
45067    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
45068  (eval $ac_link) 2>&5
45069  ac_status=$?
45070  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45071  test $ac_status = 0; } && test -s conftest$ac_exeext; then
45072      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
45073      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
45074      # configure script would override the LC_ALL setting. Likewise for
45075      # LC_CTYPE, which is also set at the beginning of the configure script.
45076      # Test for the locale name without encoding suffix.
45077      if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45078        gt_cv_locale_zh_CN=zh_CN
45079      else
45080        # Test for the locale name with explicit encoding suffix.
45081        if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45082          gt_cv_locale_zh_CN=zh_CN.GB18030
45083        else
45084          # None found.
45085          gt_cv_locale_zh_CN=none
45086        fi
45087      fi
45088    else
45089      # If there was a link error, due to mblen(), the system is so old that
45090      # it certainly doesn't have a chinese locale.
45091      gt_cv_locale_zh_CN=none
45092    fi
45093    rm -fr conftest*
45094
45095fi
45096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
45097$as_echo "$gt_cv_locale_zh_CN" >&6; }
45098  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
45099
45100
45101
45102
45103
45104
45105
45106
45107  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
45108  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
45109  # irrelevant for anonymous mappings.
45110  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
45111if test "x$ac_cv_func_mmap" = x""yes; then :
45112  gl_have_mmap=yes
45113else
45114  gl_have_mmap=no
45115fi
45116
45117
45118  # Try to allow MAP_ANONYMOUS.
45119  gl_have_mmap_anonymous=no
45120  if test $gl_have_mmap = yes; then
45121    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
45122$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
45123    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45124/* end confdefs.h.  */
45125
45126#include <sys/mman.h>
45127#ifdef MAP_ANONYMOUS
45128    I cant identify this map.
45129#endif
45130
45131_ACEOF
45132if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45133  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
45134  gl_have_mmap_anonymous=yes
45135fi
45136rm -f conftest*
45137
45138    if test $gl_have_mmap_anonymous != yes; then
45139      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45140/* end confdefs.h.  */
45141
45142#include <sys/mman.h>
45143#ifdef MAP_ANON
45144    I cant identify this map.
45145#endif
45146
45147_ACEOF
45148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45149  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
45150
45151$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
45152
45153         gl_have_mmap_anonymous=yes
45154fi
45155rm -f conftest*
45156
45157    fi
45158    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
45159$as_echo "$gl_have_mmap_anonymous" >&6; }
45160    if test $gl_have_mmap_anonymous = yes; then
45161
45162$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
45163
45164    fi
45165  fi
45166
45167
45168
45169
45170
45171
45172
45173
45174
45175  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
45176  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
45177  # irrelevant for anonymous mappings.
45178  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
45179if test "x$ac_cv_func_mmap" = x""yes; then :
45180  gl_have_mmap=yes
45181else
45182  gl_have_mmap=no
45183fi
45184
45185
45186  # Try to allow MAP_ANONYMOUS.
45187  gl_have_mmap_anonymous=no
45188  if test $gl_have_mmap = yes; then
45189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
45190$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
45191    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45192/* end confdefs.h.  */
45193
45194#include <sys/mman.h>
45195#ifdef MAP_ANONYMOUS
45196    I cant identify this map.
45197#endif
45198
45199_ACEOF
45200if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45201  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
45202  gl_have_mmap_anonymous=yes
45203fi
45204rm -f conftest*
45205
45206    if test $gl_have_mmap_anonymous != yes; then
45207      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45208/* end confdefs.h.  */
45209
45210#include <sys/mman.h>
45211#ifdef MAP_ANON
45212    I cant identify this map.
45213#endif
45214
45215_ACEOF
45216if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45217  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
45218
45219$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
45220
45221         gl_have_mmap_anonymous=yes
45222fi
45223rm -f conftest*
45224
45225    fi
45226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
45227$as_echo "$gl_have_mmap_anonymous" >&6; }
45228    if test $gl_have_mmap_anonymous = yes; then
45229
45230$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
45231
45232    fi
45233  fi
45234
45235
45236
45237
45238
45239
45240
45241
45242
45243  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
45244  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
45245  # irrelevant for anonymous mappings.
45246  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
45247if test "x$ac_cv_func_mmap" = x""yes; then :
45248  gl_have_mmap=yes
45249else
45250  gl_have_mmap=no
45251fi
45252
45253
45254  # Try to allow MAP_ANONYMOUS.
45255  gl_have_mmap_anonymous=no
45256  if test $gl_have_mmap = yes; then
45257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
45258$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
45259    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45260/* end confdefs.h.  */
45261
45262#include <sys/mman.h>
45263#ifdef MAP_ANONYMOUS
45264    I cant identify this map.
45265#endif
45266
45267_ACEOF
45268if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45269  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
45270  gl_have_mmap_anonymous=yes
45271fi
45272rm -f conftest*
45273
45274    if test $gl_have_mmap_anonymous != yes; then
45275      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45276/* end confdefs.h.  */
45277
45278#include <sys/mman.h>
45279#ifdef MAP_ANON
45280    I cant identify this map.
45281#endif
45282
45283_ACEOF
45284if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45285  $EGREP "I cant identify this map." >/dev/null 2>&1; then :
45286
45287$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
45288
45289         gl_have_mmap_anonymous=yes
45290fi
45291rm -f conftest*
45292
45293    fi
45294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
45295$as_echo "$gl_have_mmap_anonymous" >&6; }
45296    if test $gl_have_mmap_anonymous = yes; then
45297
45298$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
45299
45300    fi
45301  fi
45302
45303
45304
45305
45306
45307
45308
45309  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
45310$as_echo_n "checking for a traditional french locale... " >&6; }
45311if test "${gt_cv_locale_fr+set}" = set; then :
45312  $as_echo_n "(cached) " >&6
45313else
45314
45315    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45316/* end confdefs.h.  */
45317
45318#include <locale.h>
45319#include <time.h>
45320#if HAVE_LANGINFO_CODESET
45321# include <langinfo.h>
45322#endif
45323#include <stdlib.h>
45324#include <string.h>
45325struct tm t;
45326char buf[16];
45327int main () {
45328  /* Check whether the given locale name is recognized by the system.  */
45329  if (setlocale (LC_ALL, "") == NULL) return 1;
45330  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
45331     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
45332     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
45333     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
45334     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
45335     some unit tests fail.  */
45336#if HAVE_LANGINFO_CODESET
45337  {
45338    const char *cs = nl_langinfo (CODESET);
45339    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
45340      return 1;
45341  }
45342#endif
45343#ifdef __CYGWIN__
45344  /* On Cygwin, avoid locale names without encoding suffix, because the
45345     locale_charset() function relies on the encoding suffix.  Note that
45346     LC_ALL is set on the command line.  */
45347  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
45348#endif
45349  /* Check whether in the abbreviation of the second month, the second
45350     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
45351     one byte long. This excludes the UTF-8 encoding.  */
45352  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
45353  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
45354  /* Check whether the decimal separator is a comma.
45355     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
45356     are nl_langinfo(RADIXCHAR) are both ".".  */
45357  if (localeconv () ->decimal_point[0] != ',') return 1;
45358  return 0;
45359}
45360
45361_ACEOF
45362    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
45363  (eval $ac_link) 2>&5
45364  ac_status=$?
45365  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45366  test $ac_status = 0; } && test -s conftest$ac_exeext; then
45367      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
45368      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
45369      # configure script would override the LC_ALL setting. Likewise for
45370      # LC_CTYPE, which is also set at the beginning of the configure script.
45371      # Test for the usual locale name.
45372      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45373        gt_cv_locale_fr=fr_FR
45374      else
45375        # Test for the locale name with explicit encoding suffix.
45376        if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45377          gt_cv_locale_fr=fr_FR.ISO-8859-1
45378        else
45379          # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
45380          if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45381            gt_cv_locale_fr=fr_FR.ISO8859-1
45382          else
45383            # Test for the HP-UX locale name.
45384            if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45385              gt_cv_locale_fr=fr_FR.iso88591
45386            else
45387              # Test for the Solaris 7 locale name.
45388              if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45389                gt_cv_locale_fr=fr
45390              else
45391                # None found.
45392                gt_cv_locale_fr=none
45393              fi
45394            fi
45395          fi
45396        fi
45397      fi
45398    fi
45399    rm -fr conftest*
45400
45401fi
45402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
45403$as_echo "$gt_cv_locale_fr" >&6; }
45404  LOCALE_FR=$gt_cv_locale_fr
45405
45406
45407
45408
45409  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
45410$as_echo_n "checking for a french Unicode locale... " >&6; }
45411if test "${gt_cv_locale_fr_utf8+set}" = set; then :
45412  $as_echo_n "(cached) " >&6
45413else
45414
45415    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45416/* end confdefs.h.  */
45417
45418#include <locale.h>
45419#include <time.h>
45420#if HAVE_LANGINFO_CODESET
45421# include <langinfo.h>
45422#endif
45423#include <stdlib.h>
45424#include <string.h>
45425struct tm t;
45426char buf[16];
45427int main () {
45428  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
45429     imitates locale dependent behaviour by looking at the environment
45430     variables, and all locales use the UTF-8 encoding.  */
45431#if !(defined __BEOS__ || defined __HAIKU__)
45432  /* Check whether the given locale name is recognized by the system.  */
45433  if (setlocale (LC_ALL, "") == NULL) return 1;
45434  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
45435     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
45436     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
45437     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
45438     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
45439     some unit tests fail.  */
45440# if HAVE_LANGINFO_CODESET
45441  {
45442    const char *cs = nl_langinfo (CODESET);
45443    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
45444      return 1;
45445  }
45446# endif
45447# ifdef __CYGWIN__
45448  /* On Cygwin, avoid locale names without encoding suffix, because the
45449     locale_charset() function relies on the encoding suffix.  Note that
45450     LC_ALL is set on the command line.  */
45451  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
45452# endif
45453  /* Check whether in the abbreviation of the second month, the second
45454     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
45455     two bytes long, with UTF-8 encoding.  */
45456  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
45457  if (strftime (buf, sizeof (buf), "%b", &t) < 4
45458      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
45459    return 1;
45460#endif
45461  /* Check whether the decimal separator is a comma.
45462     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
45463     are nl_langinfo(RADIXCHAR) are both ".".  */
45464  if (localeconv () ->decimal_point[0] != ',') return 1;
45465  return 0;
45466}
45467
45468_ACEOF
45469    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
45470  (eval $ac_link) 2>&5
45471  ac_status=$?
45472  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45473  test $ac_status = 0; } && test -s conftest$ac_exeext; then
45474      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
45475      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
45476      # configure script would override the LC_ALL setting. Likewise for
45477      # LC_CTYPE, which is also set at the beginning of the configure script.
45478      # Test for the usual locale name.
45479      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45480        gt_cv_locale_fr_utf8=fr_FR
45481      else
45482        # Test for the locale name with explicit encoding suffix.
45483        if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45484          gt_cv_locale_fr_utf8=fr_FR.UTF-8
45485        else
45486          # Test for the Solaris 7 locale name.
45487          if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45488            gt_cv_locale_fr_utf8=fr.UTF-8
45489          else
45490            # None found.
45491            gt_cv_locale_fr_utf8=none
45492          fi
45493        fi
45494      fi
45495    fi
45496    rm -fr conftest*
45497
45498fi
45499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
45500$as_echo "$gt_cv_locale_fr_utf8" >&6; }
45501  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
45502
45503
45504
45505
45506
45507
45508  if test -n "$ERRNO_H"; then
45509            REPLACE_PERROR=1
45510
45511
45512
45513
45514
45515
45516
45517
45518  gltests_LIBOBJS="$gltests_LIBOBJS perror.$ac_objext"
45519
45520  fi
45521
45522
45523
45524  GNULIB_PERROR=1
45525
45526
45527
45528
45529  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
45530$as_echo_n "checking for a traditional french locale... " >&6; }
45531if test "${gt_cv_locale_fr+set}" = set; then :
45532  $as_echo_n "(cached) " >&6
45533else
45534
45535    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45536/* end confdefs.h.  */
45537
45538#include <locale.h>
45539#include <time.h>
45540#if HAVE_LANGINFO_CODESET
45541# include <langinfo.h>
45542#endif
45543#include <stdlib.h>
45544#include <string.h>
45545struct tm t;
45546char buf[16];
45547int main () {
45548  /* Check whether the given locale name is recognized by the system.  */
45549  if (setlocale (LC_ALL, "") == NULL) return 1;
45550  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
45551     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
45552     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
45553     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
45554     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
45555     some unit tests fail.  */
45556#if HAVE_LANGINFO_CODESET
45557  {
45558    const char *cs = nl_langinfo (CODESET);
45559    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
45560      return 1;
45561  }
45562#endif
45563#ifdef __CYGWIN__
45564  /* On Cygwin, avoid locale names without encoding suffix, because the
45565     locale_charset() function relies on the encoding suffix.  Note that
45566     LC_ALL is set on the command line.  */
45567  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
45568#endif
45569  /* Check whether in the abbreviation of the second month, the second
45570     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
45571     one byte long. This excludes the UTF-8 encoding.  */
45572  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
45573  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
45574  /* Check whether the decimal separator is a comma.
45575     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
45576     are nl_langinfo(RADIXCHAR) are both ".".  */
45577  if (localeconv () ->decimal_point[0] != ',') return 1;
45578  return 0;
45579}
45580
45581_ACEOF
45582    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
45583  (eval $ac_link) 2>&5
45584  ac_status=$?
45585  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45586  test $ac_status = 0; } && test -s conftest$ac_exeext; then
45587      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
45588      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
45589      # configure script would override the LC_ALL setting. Likewise for
45590      # LC_CTYPE, which is also set at the beginning of the configure script.
45591      # Test for the usual locale name.
45592      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45593        gt_cv_locale_fr=fr_FR
45594      else
45595        # Test for the locale name with explicit encoding suffix.
45596        if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45597          gt_cv_locale_fr=fr_FR.ISO-8859-1
45598        else
45599          # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
45600          if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45601            gt_cv_locale_fr=fr_FR.ISO8859-1
45602          else
45603            # Test for the HP-UX locale name.
45604            if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45605              gt_cv_locale_fr=fr_FR.iso88591
45606            else
45607              # Test for the Solaris 7 locale name.
45608              if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45609                gt_cv_locale_fr=fr
45610              else
45611                # None found.
45612                gt_cv_locale_fr=none
45613              fi
45614            fi
45615          fi
45616        fi
45617      fi
45618    fi
45619    rm -fr conftest*
45620
45621fi
45622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
45623$as_echo "$gt_cv_locale_fr" >&6; }
45624  LOCALE_FR=$gt_cv_locale_fr
45625
45626
45627
45628
45629  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
45630$as_echo_n "checking for a french Unicode locale... " >&6; }
45631if test "${gt_cv_locale_fr_utf8+set}" = set; then :
45632  $as_echo_n "(cached) " >&6
45633else
45634
45635    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45636/* end confdefs.h.  */
45637
45638#include <locale.h>
45639#include <time.h>
45640#if HAVE_LANGINFO_CODESET
45641# include <langinfo.h>
45642#endif
45643#include <stdlib.h>
45644#include <string.h>
45645struct tm t;
45646char buf[16];
45647int main () {
45648  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
45649     imitates locale dependent behaviour by looking at the environment
45650     variables, and all locales use the UTF-8 encoding.  */
45651#if !(defined __BEOS__ || defined __HAIKU__)
45652  /* Check whether the given locale name is recognized by the system.  */
45653  if (setlocale (LC_ALL, "") == NULL) return 1;
45654  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
45655     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
45656     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
45657     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
45658     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
45659     some unit tests fail.  */
45660# if HAVE_LANGINFO_CODESET
45661  {
45662    const char *cs = nl_langinfo (CODESET);
45663    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
45664      return 1;
45665  }
45666# endif
45667# ifdef __CYGWIN__
45668  /* On Cygwin, avoid locale names without encoding suffix, because the
45669     locale_charset() function relies on the encoding suffix.  Note that
45670     LC_ALL is set on the command line.  */
45671  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
45672# endif
45673  /* Check whether in the abbreviation of the second month, the second
45674     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
45675     two bytes long, with UTF-8 encoding.  */
45676  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
45677  if (strftime (buf, sizeof (buf), "%b", &t) < 4
45678      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
45679    return 1;
45680#endif
45681  /* Check whether the decimal separator is a comma.
45682     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
45683     are nl_langinfo(RADIXCHAR) are both ".".  */
45684  if (localeconv () ->decimal_point[0] != ',') return 1;
45685  return 0;
45686}
45687
45688_ACEOF
45689    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
45690  (eval $ac_link) 2>&5
45691  ac_status=$?
45692  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45693  test $ac_status = 0; } && test -s conftest$ac_exeext; then
45694      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
45695      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
45696      # configure script would override the LC_ALL setting. Likewise for
45697      # LC_CTYPE, which is also set at the beginning of the configure script.
45698      # Test for the usual locale name.
45699      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45700        gt_cv_locale_fr_utf8=fr_FR
45701      else
45702        # Test for the locale name with explicit encoding suffix.
45703        if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45704          gt_cv_locale_fr_utf8=fr_FR.UTF-8
45705        else
45706          # Test for the Solaris 7 locale name.
45707          if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45708            gt_cv_locale_fr_utf8=fr.UTF-8
45709          else
45710            # None found.
45711            gt_cv_locale_fr_utf8=none
45712          fi
45713        fi
45714      fi
45715    fi
45716    rm -fr conftest*
45717
45718fi
45719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
45720$as_echo "$gt_cv_locale_fr_utf8" >&6; }
45721  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
45722
45723
45724
45725
45726
45727
45728
45729
45730
45731
45732
45733  gltests_LIBOBJS="$gltests_LIBOBJS read-file.$ac_objext"
45734
45735  :
45736
45737
45738
45739  if test "$ac_cv_header_winsock2_h" = yes; then
45740
45741
45742
45743
45744
45745
45746
45747
45748  gltests_LIBOBJS="$gltests_LIBOBJS setsockopt.$ac_objext"
45749
45750  fi
45751
45752
45753  GNULIB_SETSOCKOPT=1
45754
45755
45756
45757
45758
45759
45760            ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
45761"
45762if test "x$ac_cv_have_decl_sleep" = x""yes; then :
45763  ac_have_decl=1
45764else
45765  ac_have_decl=0
45766fi
45767
45768cat >>confdefs.h <<_ACEOF
45769#define HAVE_DECL_SLEEP $ac_have_decl
45770_ACEOF
45771
45772
45773  if test $ac_cv_have_decl_sleep != yes; then
45774    HAVE_SLEEP=0
45775
45776
45777
45778
45779
45780
45781
45782
45783  gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext"
45784
45785  else
45786        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
45787$as_echo_n "checking for working sleep... " >&6; }
45788if test "${gl_cv_func_sleep_works+set}" = set; then :
45789  $as_echo_n "(cached) " >&6
45790else
45791  if test "$cross_compiling" = yes; then :
45792  gl_cv_func_sleep_works="guessing no"
45793else
45794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45795/* end confdefs.h.  */
45796
45797#include <errno.h>
45798#include <unistd.h>
45799#include <signal.h>
45800static void
45801handle_alarm (int sig)
45802{
45803  if (sig != SIGALRM)
45804    _exit (2);
45805}
45806
45807int
45808main ()
45809{
45810
45811    /* Failure to compile this test due to missing alarm is okay,
45812       since all such platforms (mingw) also lack sleep.  */
45813    unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days.  */
45814    unsigned int remaining;
45815    signal (SIGALRM, handle_alarm);
45816    alarm (1);
45817    remaining = sleep (pentecost);
45818    return !(pentecost - 10 < remaining && remaining <= pentecost);
45819  ;
45820  return 0;
45821}
45822_ACEOF
45823if ac_fn_c_try_run "$LINENO"; then :
45824  gl_cv_func_sleep_works=yes
45825else
45826  gl_cv_func_sleep_works=no
45827fi
45828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45829  conftest.$ac_objext conftest.beam conftest.$ac_ext
45830fi
45831
45832fi
45833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
45834$as_echo "$gl_cv_func_sleep_works" >&6; }
45835    if test "$gl_cv_func_sleep_works" != yes; then
45836      REPLACE_SLEEP=1
45837
45838
45839
45840
45841
45842
45843
45844
45845  gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext"
45846
45847    fi
45848  fi
45849
45850
45851
45852  GNULIB_SLEEP=1
45853
45854
45855
45856  if test "$ac_cv_header_winsock2_h" = yes; then
45857
45858
45859
45860
45861
45862
45863
45864
45865  gltests_LIBOBJS="$gltests_LIBOBJS socket.$ac_objext"
45866
45867  fi
45868  # When this module is used, sockets may actually occur as file descriptors,
45869  # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
45870
45871
45872
45873  if test "$ac_cv_header_winsock2_h" = yes; then
45874    UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
45875    SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
45876  fi
45877
45878
45879  GNULIB_SOCKET=1
45880
45881
45882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
45883$as_echo_n "checking for wchar_t... " >&6; }
45884if test "${gt_cv_c_wchar_t+set}" = set; then :
45885  $as_echo_n "(cached) " >&6
45886else
45887  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45888/* end confdefs.h.  */
45889#include <stddef.h>
45890       wchar_t foo = (wchar_t)'\0';
45891int
45892main ()
45893{
45894
45895  ;
45896  return 0;
45897}
45898_ACEOF
45899if ac_fn_c_try_compile "$LINENO"; then :
45900  gt_cv_c_wchar_t=yes
45901else
45902  gt_cv_c_wchar_t=no
45903fi
45904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45905fi
45906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
45907$as_echo "$gt_cv_c_wchar_t" >&6; }
45908  if test $gt_cv_c_wchar_t = yes; then
45909
45910$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
45911
45912  fi
45913
45914
45915  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
45916$as_echo_n "checking for wint_t... " >&6; }
45917if test "${gt_cv_c_wint_t+set}" = set; then :
45918  $as_echo_n "(cached) " >&6
45919else
45920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45921/* end confdefs.h.  */
45922
45923/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
45924   <wchar.h>.
45925   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
45926   before <wchar.h>.  */
45927#include <stddef.h>
45928#include <stdio.h>
45929#include <time.h>
45930#include <wchar.h>
45931       wint_t foo = (wchar_t)'\0';
45932int
45933main ()
45934{
45935
45936  ;
45937  return 0;
45938}
45939_ACEOF
45940if ac_fn_c_try_compile "$LINENO"; then :
45941  gt_cv_c_wint_t=yes
45942else
45943  gt_cv_c_wint_t=no
45944fi
45945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45946fi
45947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
45948$as_echo "$gt_cv_c_wint_t" >&6; }
45949  if test $gt_cv_c_wint_t = yes; then
45950
45951$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
45952
45953  fi
45954
45955
45956
45957
45958
45959  if test $ac_cv_header_sys_ioctl_h = yes; then
45960    HAVE_SYS_IOCTL_H=1
45961            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
45962$as_echo_n "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
45963if test "${gl_cv_decl_ioctl_in_sys_ioctl_h+set}" = set; then :
45964  $as_echo_n "(cached) " >&6
45965else
45966         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45967/* end confdefs.h.  */
45968#include <sys/ioctl.h>
45969
45970int
45971main ()
45972{
45973(void) ioctl;
45974  ;
45975  return 0;
45976}
45977_ACEOF
45978if ac_fn_c_try_compile "$LINENO"; then :
45979  gl_cv_decl_ioctl_in_sys_ioctl_h=yes
45980else
45981  gl_cv_decl_ioctl_in_sys_ioctl_h=no
45982fi
45983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45984
45985fi
45986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
45987$as_echo "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
45988  else
45989    HAVE_SYS_IOCTL_H=0
45990  fi
45991
45992
45993
45994
45995
45996
45997
45998     if test $gl_cv_have_include_next = yes; then
45999       gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
46000     else
46001       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
46002$as_echo_n "checking absolute name of <sys/ioctl.h>... " >&6; }
46003if test "${gl_cv_next_sys_ioctl_h+set}" = set; then :
46004  $as_echo_n "(cached) " >&6
46005else
46006
46007          if test $ac_cv_header_sys_ioctl_h = yes; then
46008            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46009/* end confdefs.h.  */
46010#include <sys/ioctl.h>
46011
46012_ACEOF
46013                                                                                                case "$host_os" in
46014              aix*) gl_absname_cpp="$ac_cpp -C" ;;
46015              *)    gl_absname_cpp="$ac_cpp" ;;
46016            esac
46017                                                gl_cv_next_sys_ioctl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
46018               sed -n '\#/sys/ioctl.h#{
46019                 s#.*"\(.*/sys/ioctl.h\)".*#\1#
46020                 s#^/[^/]#//&#
46021                 p
46022                 q
46023               }'`'"'
46024          else
46025            gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
46026          fi
46027
46028fi
46029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
46030$as_echo "$gl_cv_next_sys_ioctl_h" >&6; }
46031     fi
46032     NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
46033
46034     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
46035       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
46036       gl_next_as_first_directive='<'sys/ioctl.h'>'
46037     else
46038       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
46039       gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
46040     fi
46041     NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
46042
46043
46044
46045
46046
46047
46048
46049
46050
46051
46052  if test $gl_threads_api = posix; then
46053    gl_save_LIBS="$LIBS"
46054    LIBS="$LIBS $LIBMULTITHREAD"
46055    for ac_func in pthread_atfork
46056do :
46057  ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
46058if test "x$ac_cv_func_pthread_atfork" = x""yes; then :
46059  cat >>confdefs.h <<_ACEOF
46060#define HAVE_PTHREAD_ATFORK 1
46061_ACEOF
46062
46063fi
46064done
46065
46066    LIBS="$gl_save_LIBS"
46067  fi
46068
46069
46070
46071
46072
46073
46074
46075
46076
46077
46078
46079
46080
46081  gltests_LIBOBJS="$gltests_LIBOBJS unlinkdir.$ac_objext"
46082
46083
46084  # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later,
46085  # Cygwin, and mingw never let anyone (even root) unlink directories.
46086  # If anyone knows of another system for which unlink can never
46087  # remove a directory, please report it to <bug-coreutils@gnu.org>.
46088  # Unfortunately this is difficult to test for, since it requires root access
46089  # and might create garbage in the file system,
46090  # so the code below simply relies on the kernel name and version number.
46091  case $host_os in
46092  gnu[0-9]* | \
46093  linux-* | linux | \
46094  freebsd2.2* | freebsd[3-9]* | freebsd[1-9][0-9]* | \
46095  cygwin | \
46096  mingw*)
46097
46098$as_echo "#define UNLINK_CANNOT_UNLINK_DIR 1" >>confdefs.h
46099;;
46100  esac
46101
46102  abs_aux_dir=`cd "$ac_aux_dir"; pwd`
46103
46104
46105
46106
46107
46108  ac_fn_c_check_type "$LINENO" "useconds_t" "ac_cv_type_useconds_t" "$ac_includes_default"
46109if test "x$ac_cv_type_useconds_t" = x""yes; then :
46110
46111else
46112
46113$as_echo "#define useconds_t unsigned int" >>confdefs.h
46114
46115fi
46116
46117  if test $ac_cv_func_usleep = no; then
46118    HAVE_USLEEP=0
46119
46120
46121
46122
46123
46124
46125
46126
46127  gltests_LIBOBJS="$gltests_LIBOBJS usleep.$ac_objext"
46128
46129  else
46130            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usleep allows large arguments" >&5
46131$as_echo_n "checking whether usleep allows large arguments... " >&6; }
46132if test "${gl_cv_func_usleep_works+set}" = set; then :
46133  $as_echo_n "(cached) " >&6
46134else
46135  if test "$cross_compiling" = yes; then :
46136  gl_cv_func_usleep_works="guessing no"
46137else
46138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46139/* end confdefs.h.  */
46140
46141#include <unistd.h>
46142
46143int
46144main ()
46145{
46146return !!usleep (1000000);
46147  ;
46148  return 0;
46149}
46150_ACEOF
46151if ac_fn_c_try_run "$LINENO"; then :
46152  gl_cv_func_usleep_works=yes
46153else
46154  gl_cv_func_usleep_works=no
46155fi
46156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46157  conftest.$ac_objext conftest.beam conftest.$ac_ext
46158fi
46159
46160fi
46161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_usleep_works" >&5
46162$as_echo "$gl_cv_func_usleep_works" >&6; }
46163    if test "$gl_cv_func_usleep_works" != yes; then
46164      REPLACE_USLEEP=1
46165
46166
46167
46168
46169
46170
46171
46172
46173  gltests_LIBOBJS="$gltests_LIBOBJS usleep.$ac_objext"
46174
46175    fi
46176  fi
46177
46178
46179
46180  GNULIB_USLEEP=1
46181
46182  abs_aux_dir=`cd "$ac_aux_dir"; pwd`
46183
46184
46185
46186
46187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
46188$as_echo_n "checking for a traditional french locale... " >&6; }
46189if test "${gt_cv_locale_fr+set}" = set; then :
46190  $as_echo_n "(cached) " >&6
46191else
46192
46193    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46194/* end confdefs.h.  */
46195
46196#include <locale.h>
46197#include <time.h>
46198#if HAVE_LANGINFO_CODESET
46199# include <langinfo.h>
46200#endif
46201#include <stdlib.h>
46202#include <string.h>
46203struct tm t;
46204char buf[16];
46205int main () {
46206  /* Check whether the given locale name is recognized by the system.  */
46207  if (setlocale (LC_ALL, "") == NULL) return 1;
46208  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
46209     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
46210     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
46211     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
46212     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
46213     some unit tests fail.  */
46214#if HAVE_LANGINFO_CODESET
46215  {
46216    const char *cs = nl_langinfo (CODESET);
46217    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
46218      return 1;
46219  }
46220#endif
46221#ifdef __CYGWIN__
46222  /* On Cygwin, avoid locale names without encoding suffix, because the
46223     locale_charset() function relies on the encoding suffix.  Note that
46224     LC_ALL is set on the command line.  */
46225  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
46226#endif
46227  /* Check whether in the abbreviation of the second month, the second
46228     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
46229     one byte long. This excludes the UTF-8 encoding.  */
46230  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
46231  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
46232  /* Check whether the decimal separator is a comma.
46233     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
46234     are nl_langinfo(RADIXCHAR) are both ".".  */
46235  if (localeconv () ->decimal_point[0] != ',') return 1;
46236  return 0;
46237}
46238
46239_ACEOF
46240    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
46241  (eval $ac_link) 2>&5
46242  ac_status=$?
46243  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46244  test $ac_status = 0; } && test -s conftest$ac_exeext; then
46245      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
46246      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
46247      # configure script would override the LC_ALL setting. Likewise for
46248      # LC_CTYPE, which is also set at the beginning of the configure script.
46249      # Test for the usual locale name.
46250      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46251        gt_cv_locale_fr=fr_FR
46252      else
46253        # Test for the locale name with explicit encoding suffix.
46254        if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46255          gt_cv_locale_fr=fr_FR.ISO-8859-1
46256        else
46257          # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
46258          if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46259            gt_cv_locale_fr=fr_FR.ISO8859-1
46260          else
46261            # Test for the HP-UX locale name.
46262            if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46263              gt_cv_locale_fr=fr_FR.iso88591
46264            else
46265              # Test for the Solaris 7 locale name.
46266              if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46267                gt_cv_locale_fr=fr
46268              else
46269                # None found.
46270                gt_cv_locale_fr=none
46271              fi
46272            fi
46273          fi
46274        fi
46275      fi
46276    fi
46277    rm -fr conftest*
46278
46279fi
46280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
46281$as_echo "$gt_cv_locale_fr" >&6; }
46282  LOCALE_FR=$gt_cv_locale_fr
46283
46284
46285
46286
46287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
46288$as_echo_n "checking for a french Unicode locale... " >&6; }
46289if test "${gt_cv_locale_fr_utf8+set}" = set; then :
46290  $as_echo_n "(cached) " >&6
46291else
46292
46293    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46294/* end confdefs.h.  */
46295
46296#include <locale.h>
46297#include <time.h>
46298#if HAVE_LANGINFO_CODESET
46299# include <langinfo.h>
46300#endif
46301#include <stdlib.h>
46302#include <string.h>
46303struct tm t;
46304char buf[16];
46305int main () {
46306  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
46307     imitates locale dependent behaviour by looking at the environment
46308     variables, and all locales use the UTF-8 encoding.  */
46309#if !(defined __BEOS__ || defined __HAIKU__)
46310  /* Check whether the given locale name is recognized by the system.  */
46311  if (setlocale (LC_ALL, "") == NULL) return 1;
46312  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
46313     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
46314     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
46315     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
46316     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
46317     some unit tests fail.  */
46318# if HAVE_LANGINFO_CODESET
46319  {
46320    const char *cs = nl_langinfo (CODESET);
46321    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
46322      return 1;
46323  }
46324# endif
46325# ifdef __CYGWIN__
46326  /* On Cygwin, avoid locale names without encoding suffix, because the
46327     locale_charset() function relies on the encoding suffix.  Note that
46328     LC_ALL is set on the command line.  */
46329  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
46330# endif
46331  /* Check whether in the abbreviation of the second month, the second
46332     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
46333     two bytes long, with UTF-8 encoding.  */
46334  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
46335  if (strftime (buf, sizeof (buf), "%b", &t) < 4
46336      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
46337    return 1;
46338#endif
46339  /* Check whether the decimal separator is a comma.
46340     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
46341     are nl_langinfo(RADIXCHAR) are both ".".  */
46342  if (localeconv () ->decimal_point[0] != ',') return 1;
46343  return 0;
46344}
46345
46346_ACEOF
46347    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
46348  (eval $ac_link) 2>&5
46349  ac_status=$?
46350  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46351  test $ac_status = 0; } && test -s conftest$ac_exeext; then
46352      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
46353      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
46354      # configure script would override the LC_ALL setting. Likewise for
46355      # LC_CTYPE, which is also set at the beginning of the configure script.
46356      # Test for the usual locale name.
46357      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46358        gt_cv_locale_fr_utf8=fr_FR
46359      else
46360        # Test for the locale name with explicit encoding suffix.
46361        if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46362          gt_cv_locale_fr_utf8=fr_FR.UTF-8
46363        else
46364          # Test for the Solaris 7 locale name.
46365          if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46366            gt_cv_locale_fr_utf8=fr.UTF-8
46367          else
46368            # None found.
46369            gt_cv_locale_fr_utf8=none
46370          fi
46371        fi
46372      fi
46373    fi
46374    rm -fr conftest*
46375
46376fi
46377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
46378$as_echo "$gt_cv_locale_fr_utf8" >&6; }
46379  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
46380
46381
46382
46383
46384
46385  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
46386$as_echo_n "checking for a traditional japanese locale... " >&6; }
46387if test "${gt_cv_locale_ja+set}" = set; then :
46388  $as_echo_n "(cached) " >&6
46389else
46390
46391    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46392/* end confdefs.h.  */
46393
46394#include <locale.h>
46395#include <time.h>
46396#if HAVE_LANGINFO_CODESET
46397# include <langinfo.h>
46398#endif
46399#include <stdlib.h>
46400#include <string.h>
46401struct tm t;
46402char buf[16];
46403int main ()
46404{
46405  const char *p;
46406  /* Check whether the given locale name is recognized by the system.  */
46407  if (setlocale (LC_ALL, "") == NULL) return 1;
46408  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
46409     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
46410     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
46411     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
46412     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
46413     some unit tests fail.  */
46414#if HAVE_LANGINFO_CODESET
46415  {
46416    const char *cs = nl_langinfo (CODESET);
46417    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
46418      return 1;
46419  }
46420#endif
46421#ifdef __CYGWIN__
46422  /* On Cygwin, avoid locale names without encoding suffix, because the
46423     locale_charset() function relies on the encoding suffix.  Note that
46424     LC_ALL is set on the command line.  */
46425  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
46426#endif
46427  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
46428     on Cygwin 1.5.x.  */
46429  if (MB_CUR_MAX == 1)
46430    return 1;
46431  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
46432     This excludes the UTF-8 encoding.  */
46433  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
46434  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
46435  for (p = buf; *p != '\0'; p++)
46436    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
46437      return 1;
46438  return 0;
46439}
46440
46441_ACEOF
46442    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
46443  (eval $ac_link) 2>&5
46444  ac_status=$?
46445  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46446  test $ac_status = 0; } && test -s conftest$ac_exeext; then
46447      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
46448      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
46449      # configure script would override the LC_ALL setting. Likewise for
46450      # LC_CTYPE, which is also set at the beginning of the configure script.
46451      # Test for the AIX locale name.
46452      if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46453        gt_cv_locale_ja=ja_JP
46454      else
46455        # Test for the locale name with explicit encoding suffix.
46456        if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46457          gt_cv_locale_ja=ja_JP.EUC-JP
46458        else
46459          # Test for the HP-UX, OSF/1, NetBSD locale name.
46460          if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46461            gt_cv_locale_ja=ja_JP.eucJP
46462          else
46463            # Test for the IRIX, FreeBSD locale name.
46464            if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46465              gt_cv_locale_ja=ja_JP.EUC
46466            else
46467              # Test for the Solaris 7 locale name.
46468              if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46469                gt_cv_locale_ja=ja
46470              else
46471                # Special test for NetBSD 1.6.
46472                if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
46473                  gt_cv_locale_ja=ja_JP.eucJP
46474                else
46475                  # None found.
46476                  gt_cv_locale_ja=none
46477                fi
46478              fi
46479            fi
46480          fi
46481        fi
46482      fi
46483    fi
46484    rm -fr conftest*
46485
46486fi
46487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
46488$as_echo "$gt_cv_locale_ja" >&6; }
46489  LOCALE_JA=$gt_cv_locale_ja
46490
46491
46492
46493
46494
46495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
46496$as_echo_n "checking for a transitional chinese locale... " >&6; }
46497if test "${gt_cv_locale_zh_CN+set}" = set; then :
46498  $as_echo_n "(cached) " >&6
46499else
46500
46501    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46502/* end confdefs.h.  */
46503
46504#include <locale.h>
46505#include <stdlib.h>
46506#include <time.h>
46507#if HAVE_LANGINFO_CODESET
46508# include <langinfo.h>
46509#endif
46510#include <stdlib.h>
46511#include <string.h>
46512struct tm t;
46513char buf[16];
46514int main ()
46515{
46516  const char *p;
46517  /* Check whether the given locale name is recognized by the system.  */
46518  if (setlocale (LC_ALL, "") == NULL) return 1;
46519  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
46520     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
46521     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
46522     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
46523     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
46524     some unit tests fail.  */
46525#if HAVE_LANGINFO_CODESET
46526  {
46527    const char *cs = nl_langinfo (CODESET);
46528    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
46529      return 1;
46530  }
46531#endif
46532#ifdef __CYGWIN__
46533  /* On Cygwin, avoid locale names without encoding suffix, because the
46534     locale_charset() function relies on the encoding suffix.  Note that
46535     LC_ALL is set on the command line.  */
46536  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
46537#endif
46538  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
46539     This excludes the UTF-8 encoding.  */
46540  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
46541  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
46542  for (p = buf; *p != '\0'; p++)
46543    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
46544      return 1;
46545  /* Check whether a typical GB18030 multibyte sequence is recognized as a
46546     single wide character.  This excludes the GB2312 and GBK encodings.  */
46547  if (mblen ("\203\062\332\066", 5) != 4)
46548    return 1;
46549  return 0;
46550}
46551
46552_ACEOF
46553    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
46554  (eval $ac_link) 2>&5
46555  ac_status=$?
46556  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46557  test $ac_status = 0; } && test -s conftest$ac_exeext; then
46558      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
46559      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
46560      # configure script would override the LC_ALL setting. Likewise for
46561      # LC_CTYPE, which is also set at the beginning of the configure script.
46562      # Test for the locale name without encoding suffix.
46563      if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46564        gt_cv_locale_zh_CN=zh_CN
46565      else
46566        # Test for the locale name with explicit encoding suffix.
46567        if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46568          gt_cv_locale_zh_CN=zh_CN.GB18030
46569        else
46570          # None found.
46571          gt_cv_locale_zh_CN=none
46572        fi
46573      fi
46574    else
46575      # If there was a link error, due to mblen(), the system is so old that
46576      # it certainly doesn't have a chinese locale.
46577      gt_cv_locale_zh_CN=none
46578    fi
46579    rm -fr conftest*
46580
46581fi
46582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
46583$as_echo "$gt_cv_locale_zh_CN" >&6; }
46584  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
46585
46586
46587
46588
46589
46590
46591  if test $ac_cv_func_wctob = no; then
46592    HAVE_DECL_WCTOB=0
46593
46594    :
46595
46596
46597
46598
46599
46600
46601
46602
46603
46604  gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext"
46605
46606
46607  :
46608
46609  else
46610
46611
46612
46613         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
46614$as_echo_n "checking whether wctob works... " >&6; }
46615if test "${gl_cv_func_wctob_works+set}" = set; then :
46616  $as_echo_n "(cached) " >&6
46617else
46618
46619                        case "$host_os" in
46620            # Guess no on Solaris <= 9.
46621          solaris2.[1-9] | solaris2.[1-9].*)
46622            gl_cv_func_wctob_works="guessing no" ;;
46623            # Guess yes otherwise.
46624          *) gl_cv_func_wctob_works="guessing yes" ;;
46625        esac
46626        if test $LOCALE_FR != none; then
46627          if test "$cross_compiling" = yes; then :
46628  :
46629else
46630  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46631/* end confdefs.h.  */
46632
46633#include <locale.h>
46634#include <string.h>
46635#include <wchar.h>
46636int main ()
46637{
46638  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
46639    {
46640      wchar_t wc;
46641
46642      if (mbtowc (&wc, "\374", 1) == 1)
46643        if (wctob (wc) != (unsigned char) '\374')
46644          return 1;
46645    }
46646  return 0;
46647}
46648_ACEOF
46649if ac_fn_c_try_run "$LINENO"; then :
46650  gl_cv_func_wctob_works=yes
46651else
46652  gl_cv_func_wctob_works=no
46653fi
46654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46655  conftest.$ac_objext conftest.beam conftest.$ac_ext
46656fi
46657
46658        fi
46659
46660fi
46661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
46662$as_echo "$gl_cv_func_wctob_works" >&6; }
46663    case "$gl_cv_func_wctob_works" in
46664      *yes) ;;
46665      *) REPLACE_WCTOB=1 ;;
46666    esac
46667    if test $REPLACE_WCTOB = 1; then
46668
46669    :
46670
46671
46672
46673
46674
46675
46676
46677
46678
46679  gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext"
46680
46681
46682  :
46683
46684    else
46685
46686            ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
46687/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
46688   <wchar.h>.
46689   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
46690   before <wchar.h>.  */
46691#include <stddef.h>
46692#include <stdio.h>
46693#include <time.h>
46694#include <wchar.h>
46695
46696"
46697if test "x$ac_cv_have_decl_wctob" = x""yes; then :
46698  ac_have_decl=1
46699else
46700  ac_have_decl=0
46701fi
46702
46703cat >>confdefs.h <<_ACEOF
46704#define HAVE_DECL_WCTOB $ac_have_decl
46705_ACEOF
46706
46707      if test $ac_cv_have_decl_wctob != yes; then
46708        HAVE_DECL_WCTOB=0
46709
46710    :
46711
46712      fi
46713    fi
46714  fi
46715
46716
46717
46718  GNULIB_WCTOB=1
46719
46720
46721
46722    YIELD_LIB=
46723  if test $gl_threads_api = posix; then
46724        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
46725$as_echo_n "checking for sched_yield in -lrt... " >&6; }
46726if test "${ac_cv_lib_rt_sched_yield+set}" = set; then :
46727  $as_echo_n "(cached) " >&6
46728else
46729  ac_check_lib_save_LIBS=$LIBS
46730LIBS="-lrt  $LIBS"
46731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46732/* end confdefs.h.  */
46733
46734/* Override any GCC internal prototype to avoid an error.
46735   Use char because int might match the return type of a GCC
46736   builtin and then its argument prototype would still apply.  */
46737#ifdef __cplusplus
46738extern "C"
46739#endif
46740char sched_yield ();
46741int
46742main ()
46743{
46744return sched_yield ();
46745  ;
46746  return 0;
46747}
46748_ACEOF
46749if ac_fn_c_try_link "$LINENO"; then :
46750  ac_cv_lib_rt_sched_yield=yes
46751else
46752  ac_cv_lib_rt_sched_yield=no
46753fi
46754rm -f core conftest.err conftest.$ac_objext \
46755    conftest$ac_exeext conftest.$ac_ext
46756LIBS=$ac_check_lib_save_LIBS
46757fi
46758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
46759$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
46760if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then :
46761  YIELD_LIB=-lrt
46762else
46763         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
46764$as_echo_n "checking for sched_yield in -lposix4... " >&6; }
46765if test "${ac_cv_lib_posix4_sched_yield+set}" = set; then :
46766  $as_echo_n "(cached) " >&6
46767else
46768  ac_check_lib_save_LIBS=$LIBS
46769LIBS="-lposix4  $LIBS"
46770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46771/* end confdefs.h.  */
46772
46773/* Override any GCC internal prototype to avoid an error.
46774   Use char because int might match the return type of a GCC
46775   builtin and then its argument prototype would still apply.  */
46776#ifdef __cplusplus
46777extern "C"
46778#endif
46779char sched_yield ();
46780int
46781main ()
46782{
46783return sched_yield ();
46784  ;
46785  return 0;
46786}
46787_ACEOF
46788if ac_fn_c_try_link "$LINENO"; then :
46789  ac_cv_lib_posix4_sched_yield=yes
46790else
46791  ac_cv_lib_posix4_sched_yield=no
46792fi
46793rm -f core conftest.err conftest.$ac_objext \
46794    conftest$ac_exeext conftest.$ac_ext
46795LIBS=$ac_check_lib_save_LIBS
46796fi
46797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
46798$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
46799if test "x$ac_cv_lib_posix4_sched_yield" = x""yes; then :
46800  YIELD_LIB=-lposix4
46801fi
46802
46803fi
46804
46805  fi
46806
46807
46808
46809
46810
46811
46812
46813
46814
46815
46816
46817  LIBCOREUTILS_LIBDEPS="$gl_libdeps"
46818
46819  LIBCOREUTILS_LTLIBDEPS="$gl_ltlibdeps"
46820
46821  LIBTESTS_LIBDEPS="$gltests_libdeps"
46822
46823
46824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
46825$as_echo_n "checking for library containing strerror... " >&6; }
46826if test "${ac_cv_search_strerror+set}" = set; then :
46827  $as_echo_n "(cached) " >&6
46828else
46829  ac_func_search_save_LIBS=$LIBS
46830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46831/* end confdefs.h.  */
46832
46833/* Override any GCC internal prototype to avoid an error.
46834   Use char because int might match the return type of a GCC
46835   builtin and then its argument prototype would still apply.  */
46836#ifdef __cplusplus
46837extern "C"
46838#endif
46839char strerror ();
46840int
46841main ()
46842{
46843return strerror ();
46844  ;
46845  return 0;
46846}
46847_ACEOF
46848for ac_lib in '' cposix; do
46849  if test -z "$ac_lib"; then
46850    ac_res="none required"
46851  else
46852    ac_res=-l$ac_lib
46853    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
46854  fi
46855  if ac_fn_c_try_link "$LINENO"; then :
46856  ac_cv_search_strerror=$ac_res
46857fi
46858rm -f core conftest.err conftest.$ac_objext \
46859    conftest$ac_exeext
46860  if test "${ac_cv_search_strerror+set}" = set; then :
46861  break
46862fi
46863done
46864if test "${ac_cv_search_strerror+set}" = set; then :
46865
46866else
46867  ac_cv_search_strerror=no
46868fi
46869rm conftest.$ac_ext
46870LIBS=$ac_func_search_save_LIBS
46871fi
46872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
46873$as_echo "$ac_cv_search_strerror" >&6; }
46874ac_res=$ac_cv_search_strerror
46875if test "$ac_res" != no; then :
46876  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
46877
46878fi
46879
46880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
46881$as_echo_n "checking for function prototypes... " >&6; }
46882if test "$ac_cv_prog_cc_c89" != no; then
46883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46884$as_echo "yes" >&6; }
46885
46886$as_echo "#define PROTOTYPES 1" >>confdefs.h
46887
46888
46889$as_echo "#define __PROTOTYPES 1" >>confdefs.h
46890
46891else
46892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46893$as_echo "no" >&6; }
46894fi
46895
46896
46897if test "$ac_cv_prog_cc_stdc" != no; then
46898  U= ANSI2KNR=
46899else
46900  U=_ ANSI2KNR=./ansi2knr
46901fi
46902# Ensure some checks needed by ansi2knr itself.
46903
46904for ac_header in string.h
46905do :
46906  ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
46907if test "x$ac_cv_header_string_h" = x""yes; then :
46908  cat >>confdefs.h <<_ACEOF
46909#define HAVE_STRING_H 1
46910_ACEOF
46911
46912fi
46913
46914done
46915
46916
46917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
46918$as_echo_n "checking for working volatile... " >&6; }
46919if test "${ac_cv_c_volatile+set}" = set; then :
46920  $as_echo_n "(cached) " >&6
46921else
46922  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46923/* end confdefs.h.  */
46924
46925int
46926main ()
46927{
46928
46929volatile int x;
46930int * volatile y = (int *) 0;
46931return !x && !y;
46932  ;
46933  return 0;
46934}
46935_ACEOF
46936if ac_fn_c_try_compile "$LINENO"; then :
46937  ac_cv_c_volatile=yes
46938else
46939  ac_cv_c_volatile=no
46940fi
46941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46942fi
46943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
46944$as_echo "$ac_cv_c_volatile" >&6; }
46945if test $ac_cv_c_volatile = no; then
46946
46947$as_echo "#define volatile /**/" >>confdefs.h
46948
46949fi
46950
46951
46952
46953
46954
46955
46956
46957
46958
46959
46960
46961
46962
46963
46964
46965  for ac_header in sys/sysctl.h
46966do :
46967  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
46968     #if HAVE_SYS_PARAM_H
46969       #include <sys/param.h>
46970      #endif
46971"
46972if test "x$ac_cv_header_sys_sysctl_h" = x""yes; then :
46973  cat >>confdefs.h <<_ACEOF
46974#define HAVE_SYS_SYSCTL_H 1
46975_ACEOF
46976
46977fi
46978
46979done
46980
46981
46982ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
46983if test "x$ac_cv_type_pid_t" = x""yes; then :
46984
46985else
46986
46987cat >>confdefs.h <<_ACEOF
46988#define pid_t int
46989_ACEOF
46990
46991fi
46992
46993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
46994$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
46995if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
46996  $as_echo_n "(cached) " >&6
46997else
46998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46999/* end confdefs.h.  */
47000#include <sys/types.h>
47001int
47002main ()
47003{
47004return makedev(0, 0);
47005  ;
47006  return 0;
47007}
47008_ACEOF
47009if ac_fn_c_try_link "$LINENO"; then :
47010  ac_cv_header_sys_types_h_makedev=yes
47011else
47012  ac_cv_header_sys_types_h_makedev=no
47013fi
47014rm -f core conftest.err conftest.$ac_objext \
47015    conftest$ac_exeext conftest.$ac_ext
47016
47017fi
47018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
47019$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
47020
47021if test $ac_cv_header_sys_types_h_makedev = no; then
47022ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
47023if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
47024
47025$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
47026
47027fi
47028
47029
47030
47031  if test $ac_cv_header_sys_mkdev_h = no; then
47032    ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
47033if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
47034
47035$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
47036
47037fi
47038
47039
47040  fi
47041fi
47042
47043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
47044$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
47045if test "${ac_cv_header_time+set}" = set; then :
47046  $as_echo_n "(cached) " >&6
47047else
47048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47049/* end confdefs.h.  */
47050#include <sys/types.h>
47051#include <sys/time.h>
47052#include <time.h>
47053
47054int
47055main ()
47056{
47057if ((struct tm *) 0)
47058return 0;
47059  ;
47060  return 0;
47061}
47062_ACEOF
47063if ac_fn_c_try_compile "$LINENO"; then :
47064  ac_cv_header_time=yes
47065else
47066  ac_cv_header_time=no
47067fi
47068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47069fi
47070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
47071$as_echo "$ac_cv_header_time" >&6; }
47072if test $ac_cv_header_time = yes; then
47073
47074$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
47075
47076fi
47077
47078
47079
47080ac_fn_c_check_decl "$LINENO" "geteuid" "ac_cv_have_decl_geteuid" "$ac_includes_default"
47081if test "x$ac_cv_have_decl_geteuid" = x""yes; then :
47082  ac_have_decl=1
47083else
47084  ac_have_decl=0
47085fi
47086
47087cat >>confdefs.h <<_ACEOF
47088#define HAVE_DECL_GETEUID $ac_have_decl
47089_ACEOF
47090
47091ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
47092if test "x$ac_cv_have_decl_getlogin" = x""yes; then :
47093  ac_have_decl=1
47094else
47095  ac_have_decl=0
47096fi
47097
47098cat >>confdefs.h <<_ACEOF
47099#define HAVE_DECL_GETLOGIN $ac_have_decl
47100_ACEOF
47101
47102ac_fn_c_check_decl "$LINENO" "getuid" "ac_cv_have_decl_getuid" "$ac_includes_default"
47103if test "x$ac_cv_have_decl_getuid" = x""yes; then :
47104  ac_have_decl=1
47105else
47106  ac_have_decl=0
47107fi
47108
47109cat >>confdefs.h <<_ACEOF
47110#define HAVE_DECL_GETUID $ac_have_decl
47111_ACEOF
47112
47113
47114
47115
47116
47117  headers='
47118#include <sys/types.h>
47119
47120#include <unistd.h>
47121
47122#if HAVE_GRP_H
47123# include <grp.h>
47124#endif
47125
47126#if HAVE_PWD_H
47127# include <pwd.h>
47128#endif
47129'
47130  ac_fn_c_check_decl "$LINENO" "getgrgid" "ac_cv_have_decl_getgrgid" "$headers
47131"
47132if test "x$ac_cv_have_decl_getgrgid" = x""yes; then :
47133  ac_have_decl=1
47134else
47135  ac_have_decl=0
47136fi
47137
47138cat >>confdefs.h <<_ACEOF
47139#define HAVE_DECL_GETGRGID $ac_have_decl
47140_ACEOF
47141ac_fn_c_check_decl "$LINENO" "getpwuid" "ac_cv_have_decl_getpwuid" "$headers
47142"
47143if test "x$ac_cv_have_decl_getpwuid" = x""yes; then :
47144  ac_have_decl=1
47145else
47146  ac_have_decl=0
47147fi
47148
47149cat >>confdefs.h <<_ACEOF
47150#define HAVE_DECL_GETPWUID $ac_have_decl
47151_ACEOF
47152ac_fn_c_check_decl "$LINENO" "ttyname" "ac_cv_have_decl_ttyname" "$headers
47153"
47154if test "x$ac_cv_have_decl_ttyname" = x""yes; then :
47155  ac_have_decl=1
47156else
47157  ac_have_decl=0
47158fi
47159
47160cat >>confdefs.h <<_ACEOF
47161#define HAVE_DECL_TTYNAME $ac_have_decl
47162_ACEOF
47163
47164
47165
47166
47167
47168
47169
47170
47171
47172$as_echo "#define PREFER_NONREENTRANT_EUIDACCESS 1" >>confdefs.h
47173
47174
47175
47176
47177  case " $LIBOBJS " in
47178  *" euidaccess-stat.$ac_objext "* ) ;;
47179  *) LIBOBJS="$LIBOBJS euidaccess-stat.$ac_objext"
47180 ;;
47181esac
47182
47183
47184
47185
47186  case " $LIBOBJS " in
47187  *" fd-reopen.$ac_objext "* ) ;;
47188  *) LIBOBJS="$LIBOBJS fd-reopen.$ac_objext"
47189 ;;
47190esac
47191
47192
47193
47194  # Check whether --enable-xattr was given.
47195if test "${enable_xattr+set}" = set; then :
47196  enableval=$enable_xattr; use_xattr=$enableval
47197else
47198  use_xattr=yes
47199fi
47200
47201
47202  LIB_XATTR=
47203
47204
47205  if test "$use_xattr" = "yes"; then
47206    for ac_header in attr/error_context.h attr/libattr.h
47207do :
47208  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47209ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
47210eval as_val=\$$as_ac_Header
47211   if test "x$as_val" = x""yes; then :
47212  cat >>confdefs.h <<_ACEOF
47213#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47214_ACEOF
47215
47216fi
47217
47218done
47219
47220    use_xattr=no
47221    if test $ac_cv_header_attr_libattr_h = yes \
47222        && test $ac_cv_header_attr_error_context_h = yes; then
47223      xattr_saved_LIBS=$LIBS
47224      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing attr_copy_file" >&5
47225$as_echo_n "checking for library containing attr_copy_file... " >&6; }
47226if test "${ac_cv_search_attr_copy_file+set}" = set; then :
47227  $as_echo_n "(cached) " >&6
47228else
47229  ac_func_search_save_LIBS=$LIBS
47230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47231/* end confdefs.h.  */
47232
47233/* Override any GCC internal prototype to avoid an error.
47234   Use char because int might match the return type of a GCC
47235   builtin and then its argument prototype would still apply.  */
47236#ifdef __cplusplus
47237extern "C"
47238#endif
47239char attr_copy_file ();
47240int
47241main ()
47242{
47243return attr_copy_file ();
47244  ;
47245  return 0;
47246}
47247_ACEOF
47248for ac_lib in '' attr; do
47249  if test -z "$ac_lib"; then
47250    ac_res="none required"
47251  else
47252    ac_res=-l$ac_lib
47253    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
47254  fi
47255  if ac_fn_c_try_link "$LINENO"; then :
47256  ac_cv_search_attr_copy_file=$ac_res
47257fi
47258rm -f core conftest.err conftest.$ac_objext \
47259    conftest$ac_exeext
47260  if test "${ac_cv_search_attr_copy_file+set}" = set; then :
47261  break
47262fi
47263done
47264if test "${ac_cv_search_attr_copy_file+set}" = set; then :
47265
47266else
47267  ac_cv_search_attr_copy_file=no
47268fi
47269rm conftest.$ac_ext
47270LIBS=$ac_func_search_save_LIBS
47271fi
47272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_attr_copy_file" >&5
47273$as_echo "$ac_cv_search_attr_copy_file" >&6; }
47274ac_res=$ac_cv_search_attr_copy_file
47275if test "$ac_res" != no; then :
47276  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
47277  test "$ac_cv_search_attr_copy_file" = "none required" ||
47278                        LIB_XATTR=$ac_cv_search_attr_copy_file
47279fi
47280
47281      for ac_func in attr_copy_file
47282do :
47283  ac_fn_c_check_func "$LINENO" "attr_copy_file" "ac_cv_func_attr_copy_file"
47284if test "x$ac_cv_func_attr_copy_file" = x""yes; then :
47285  cat >>confdefs.h <<_ACEOF
47286#define HAVE_ATTR_COPY_FILE 1
47287_ACEOF
47288
47289fi
47290done
47291
47292      LIBS=$xattr_saved_LIBS
47293      if test $ac_cv_func_attr_copy_file = yes; then
47294        use_xattr=yes
47295      fi
47296    fi
47297
47298cat >>confdefs.h <<_ACEOF
47299#define USE_XATTR $use_xattr
47300_ACEOF
47301
47302    if test $use_xattr = no; then
47303      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libattr development library was not found or not usable." >&5
47304$as_echo "$as_me: WARNING: libattr development library was not found or not usable." >&2;}
47305      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU coreutils will be built without xattr support." >&5
47306$as_echo "$as_me: WARNING: GNU coreutils will be built without xattr support." >&2;}
47307    fi
47308  fi
47309
47310
47311
47312  case " $LIBOBJS " in
47313  *" xfts.$ac_objext "* ) ;;
47314  *) LIBOBJS="$LIBOBJS xfts.$ac_objext"
47315 ;;
47316esac
47317
47318
47319    :
47320
47321
47322
47323
47324
47325  case " $LIBOBJS " in
47326  *" memxfrm.$ac_objext "* ) ;;
47327  *) LIBOBJS="$LIBOBJS memxfrm.$ac_objext"
47328 ;;
47329esac
47330
47331
47332
47333
47334
47335
47336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
47337$as_echo_n "checking for inline... " >&6; }
47338if test "${ac_cv_c_inline+set}" = set; then :
47339  $as_echo_n "(cached) " >&6
47340else
47341  ac_cv_c_inline=no
47342for ac_kw in inline __inline__ __inline; do
47343  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47344/* end confdefs.h.  */
47345#ifndef __cplusplus
47346typedef int foo_t;
47347static $ac_kw foo_t static_foo () {return 0; }
47348$ac_kw foo_t foo () {return 0; }
47349#endif
47350
47351_ACEOF
47352if ac_fn_c_try_compile "$LINENO"; then :
47353  ac_cv_c_inline=$ac_kw
47354fi
47355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47356  test "$ac_cv_c_inline" != no && break
47357done
47358
47359fi
47360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
47361$as_echo "$ac_cv_c_inline" >&6; }
47362
47363case $ac_cv_c_inline in
47364  inline | yes) ;;
47365  *)
47366    case $ac_cv_c_inline in
47367      no) ac_val=;;
47368      *) ac_val=$ac_cv_c_inline;;
47369    esac
47370    cat >>confdefs.h <<_ACEOF
47371#ifndef __cplusplus
47372#define inline $ac_val
47373#endif
47374_ACEOF
47375    ;;
47376esac
47377
47378
47379
47380  case " $LIBOBJS " in
47381  *" strintcmp.$ac_objext "* ) ;;
47382  *) LIBOBJS="$LIBOBJS strintcmp.$ac_objext"
47383 ;;
47384esac
47385
47386
47387
47388
47389
47390
47391  case " $LIBOBJS " in
47392  *" strnumcmp.$ac_objext "* ) ;;
47393  *) LIBOBJS="$LIBOBJS strnumcmp.$ac_objext"
47394 ;;
47395esac
47396
47397
47398
47399
47400
47401  # gnulib settings.
47402
47403
47404  # We don't use c-stack.c.
47405  # AC_REQUIRE([gl_C_STACK])
47406
47407  # Invoke macros of modules that may migrate into gnulib.
47408  # There's no need to list gnulib modules here, since gnulib-tool
47409  # handles that; see ../bootstrap.conf.
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460  ac_fn_c_check_member "$LINENO" "struct stat" "st_author" "ac_cv_member_struct_stat_st_author" "$ac_includes_default
47461#include <sys/stat.h>
47462
47463"
47464if test "x$ac_cv_member_struct_stat_st_author" = x""yes; then :
47465
47466cat >>confdefs.h <<_ACEOF
47467#define HAVE_STRUCT_STAT_ST_AUTHOR 1
47468_ACEOF
47469
47470
47471fi
47472
47473
47474
47475
47476
47477
47478
47479
47480
47481
47482  ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
47483if test "x$ac_cv_type_ino_t" = x""yes; then :
47484
47485else
47486
47487cat >>confdefs.h <<_ACEOF
47488#define ino_t unsigned long int
47489_ACEOF
47490
47491fi
47492
47493
47494      ac_fn_c_check_type "$LINENO" "major_t" "ac_cv_type_major_t" "$ac_includes_default"
47495if test "x$ac_cv_type_major_t" = x""yes; then :
47496
47497else
47498
47499cat >>confdefs.h <<_ACEOF
47500#define major_t unsigned int
47501_ACEOF
47502
47503fi
47504
47505  ac_fn_c_check_type "$LINENO" "minor_t" "ac_cv_type_minor_t" "$ac_includes_default"
47506if test "x$ac_cv_type_minor_t" = x""yes; then :
47507
47508else
47509
47510cat >>confdefs.h <<_ACEOF
47511#define minor_t unsigned int
47512_ACEOF
47513
47514fi
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526  # By default, argmatch should fail calling usage (1).
47527
47528$as_echo "#define ARGMATCH_DIE usage (1)" >>confdefs.h
47529
47530
47531$as_echo "#define ARGMATCH_DIE_DECL void usage (int _e)" >>confdefs.h
47532
47533
47534  # used by ls
47535
47536  # used by shred
47537
47538
47539  # Used by install.c.
47540  coreutils_saved_libs=$LIBS
47541    LIBS="$LIBS $LIB_SELINUX"
47542    for ac_func in matchpathcon_init_prefix
47543do :
47544  ac_fn_c_check_func "$LINENO" "matchpathcon_init_prefix" "ac_cv_func_matchpathcon_init_prefix"
47545if test "x$ac_cv_func_matchpathcon_init_prefix" = x""yes; then :
47546  cat >>confdefs.h <<_ACEOF
47547#define HAVE_MATCHPATHCON_INIT_PREFIX 1
47548_ACEOF
47549
47550else
47551
47552      case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
47553        no:*) # SELinux disabled
47554          ;;
47555        *:no) # SELinux disabled
47556          ;;
47557        *)
47558        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SELinux enabled, but matchpathcon_init_prefix not found" >&5
47559$as_echo "$as_me: WARNING: SELinux enabled, but matchpathcon_init_prefix not found" >&2;}
47560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The install utility may run slowly" >&5
47561$as_echo "$as_me: WARNING: The install utility may run slowly" >&2;}
47562      esac
47563
47564fi
47565done
47566
47567  LIBS=$coreutils_saved_libs
47568
47569  # Used by sort.c.
47570
47571
47572  # Used by tail.c.
47573  for ac_func in inotify_init
47574do :
47575  ac_fn_c_check_func "$LINENO" "inotify_init" "ac_cv_func_inotify_init"
47576if test "x$ac_cv_func_inotify_init" = x""yes; then :
47577  cat >>confdefs.h <<_ACEOF
47578#define HAVE_INOTIFY_INIT 1
47579_ACEOF
47580
47581$as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
47582
47583fi
47584done
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594      test $ac_cv_header_sys_param_h = yes &&
47595  test $ac_cv_header_sys_mount_h = yes &&
47596  for ac_header in nfs/vfs.h
47597do :
47598  ac_fn_c_check_header_mongrel "$LINENO" "nfs/vfs.h" "ac_cv_header_nfs_vfs_h" "$ac_includes_default"
47599if test "x$ac_cv_header_nfs_vfs_h" = x""yes; then :
47600  cat >>confdefs.h <<_ACEOF
47601#define HAVE_NFS_VFS_H 1
47602_ACEOF
47603 for ac_header in nfs/nfs_client.h
47604do :
47605  ac_fn_c_check_header_mongrel "$LINENO" "nfs/nfs_client.h" "ac_cv_header_nfs_nfs_client_h" "$ac_includes_default"
47606if test "x$ac_cv_header_nfs_nfs_client_h" = x""yes; then :
47607  cat >>confdefs.h <<_ACEOF
47608#define HAVE_NFS_NFS_CLIENT_H 1
47609_ACEOF
47610
47611fi
47612
47613done
47614
47615fi
47616
47617done
47618
47619
47620  statvfs_includes="\
47621$ac_includes_default
47622#include <sys/statvfs.h>
47623"
47624  statfs_includes="\
47625$ac_includes_default
47626#if HAVE_SYS_VFS_H
47627# include <sys/vfs.h>
47628#elif HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H
47629# include <sys/param.h>
47630# include <sys/mount.h>
47631# if HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H
47632#  include <netinet/in.h>
47633#  include <nfs/nfs_clnt.h>
47634#  include <nfs/vfs.h>
47635# endif
47636#elif HAVE_OS_H
47637# include <fs_info.h>
47638#endif
47639"
47640      if test "$fu_cv_sys_stat_statvfs" = yes &&
47641     { ac_fn_c_check_member "$LINENO" "struct statvfs" "f_basetype" "ac_cv_member_struct_statvfs_f_basetype" "$statvfs_includes
47642"
47643if test "x$ac_cv_member_struct_statvfs_f_basetype" = x""yes; then :
47644
47645cat >>confdefs.h <<_ACEOF
47646#define HAVE_STRUCT_STATVFS_F_BASETYPE 1
47647_ACEOF
47648
47649
47650fi
47651
47652       test $ac_cv_member_struct_statvfs_f_basetype = yes ||
47653       { ac_fn_c_check_member "$LINENO" "struct statvfs" "f_fstypename" "ac_cv_member_struct_statvfs_f_fstypename" "$statvfs_includes
47654"
47655if test "x$ac_cv_member_struct_statvfs_f_fstypename" = x""yes; then :
47656
47657cat >>confdefs.h <<_ACEOF
47658#define HAVE_STRUCT_STATVFS_F_FSTYPENAME 1
47659_ACEOF
47660
47661
47662fi
47663
47664         test $ac_cv_member_struct_statvfs_f_fstypename = yes ||
47665         { test $ac_cv_member_struct_statfs_f_fstypename != yes &&
47666           { ac_fn_c_check_member "$LINENO" "struct statvfs" "f_type" "ac_cv_member_struct_statvfs_f_type" "$statvfs_includes
47667"
47668if test "x$ac_cv_member_struct_statvfs_f_type" = x""yes; then :
47669
47670cat >>confdefs.h <<_ACEOF
47671#define HAVE_STRUCT_STATVFS_F_TYPE 1
47672_ACEOF
47673
47674
47675fi
47676
47677             test $ac_cv_member_struct_statvfs_f_type = yes; }; }; }; }
47678  then
47679    ac_fn_c_check_member "$LINENO" "struct statvfs" "f_namemax" "ac_cv_member_struct_statvfs_f_namemax" "$statvfs_includes
47680"
47681if test "x$ac_cv_member_struct_statvfs_f_namemax" = x""yes; then :
47682
47683cat >>confdefs.h <<_ACEOF
47684#define HAVE_STRUCT_STATVFS_F_NAMEMAX 1
47685_ACEOF
47686
47687
47688fi
47689
47690    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47691/* end confdefs.h.  */
47692$statvfs_includes
47693int
47694main ()
47695{
47696static statvfs s;
47697          return (s.s_fsid ^ 0) == 0;
47698  ;
47699  return 0;
47700}
47701_ACEOF
47702if ac_fn_c_try_compile "$LINENO"; then :
47703
47704$as_echo "#define STRUCT_STATVFS_F_FSID_IS_INTEGER 1" >>confdefs.h
47705
47706fi
47707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47708  else
47709    ac_fn_c_check_member "$LINENO" "struct statfs" "f_namelen" "ac_cv_member_struct_statfs_f_namelen" "$statfs_includes
47710"
47711if test "x$ac_cv_member_struct_statfs_f_namelen" = x""yes; then :
47712
47713cat >>confdefs.h <<_ACEOF
47714#define HAVE_STRUCT_STATFS_F_NAMELEN 1
47715_ACEOF
47716
47717
47718fi
47719ac_fn_c_check_member "$LINENO" "struct statfs" "f_type" "ac_cv_member_struct_statfs_f_type" "$statfs_includes
47720"
47721if test "x$ac_cv_member_struct_statfs_f_type" = x""yes; then :
47722
47723cat >>confdefs.h <<_ACEOF
47724#define HAVE_STRUCT_STATFS_F_TYPE 1
47725_ACEOF
47726
47727
47728fi
47729
47730    if test $ac_cv_header_OS_h != yes; then
47731      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47732/* end confdefs.h.  */
47733$statfs_includes
47734int
47735main ()
47736{
47737static statfs s;
47738            return (s.s_fsid ^ 0) == 0;
47739  ;
47740  return 0;
47741}
47742_ACEOF
47743if ac_fn_c_try_compile "$LINENO"; then :
47744
47745$as_echo "#define STRUCT_STATFS_F_FSID_IS_INTEGER 1" >>confdefs.h
47746
47747fi
47748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47749    fi
47750  fi
47751
47752
47753  # for dd.c and shred.c
47754  coreutils_saved_libs=$LIBS
47755    LIB_FDATASYNC=
47756    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
47757$as_echo_n "checking for library containing fdatasync... " >&6; }
47758if test "${ac_cv_search_fdatasync+set}" = set; then :
47759  $as_echo_n "(cached) " >&6
47760else
47761  ac_func_search_save_LIBS=$LIBS
47762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47763/* end confdefs.h.  */
47764
47765/* Override any GCC internal prototype to avoid an error.
47766   Use char because int might match the return type of a GCC
47767   builtin and then its argument prototype would still apply.  */
47768#ifdef __cplusplus
47769extern "C"
47770#endif
47771char fdatasync ();
47772int
47773main ()
47774{
47775return fdatasync ();
47776  ;
47777  return 0;
47778}
47779_ACEOF
47780for ac_lib in '' rt posix4; do
47781  if test -z "$ac_lib"; then
47782    ac_res="none required"
47783  else
47784    ac_res=-l$ac_lib
47785    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
47786  fi
47787  if ac_fn_c_try_link "$LINENO"; then :
47788  ac_cv_search_fdatasync=$ac_res
47789fi
47790rm -f core conftest.err conftest.$ac_objext \
47791    conftest$ac_exeext
47792  if test "${ac_cv_search_fdatasync+set}" = set; then :
47793  break
47794fi
47795done
47796if test "${ac_cv_search_fdatasync+set}" = set; then :
47797
47798else
47799  ac_cv_search_fdatasync=no
47800fi
47801rm conftest.$ac_ext
47802LIBS=$ac_func_search_save_LIBS
47803fi
47804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
47805$as_echo "$ac_cv_search_fdatasync" >&6; }
47806ac_res=$ac_cv_search_fdatasync
47807if test "$ac_res" != no; then :
47808  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
47809  test "$ac_cv_search_fdatasync" = "none required" ||
47810                    LIB_FDATASYNC=$ac_cv_search_fdatasync
47811fi
47812
47813
47814    for ac_func in fdatasync
47815do :
47816  ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
47817if test "x$ac_cv_func_fdatasync" = x""yes; then :
47818  cat >>confdefs.h <<_ACEOF
47819#define HAVE_FDATASYNC 1
47820_ACEOF
47821
47822fi
47823done
47824
47825  LIBS=$coreutils_saved_libs
47826
47827  # Check whether libcap is usable -- for ls --color support
47828  LIB_CAP=
47829  # Check whether --enable-libcap was given.
47830if test "${enable_libcap+set}" = set; then :
47831  enableval=$enable_libcap;
47832fi
47833
47834  if test "X$enable_libcap" != "Xno"; then
47835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_get_file in -lcap" >&5
47836$as_echo_n "checking for cap_get_file in -lcap... " >&6; }
47837if test "${ac_cv_lib_cap_cap_get_file+set}" = set; then :
47838  $as_echo_n "(cached) " >&6
47839else
47840  ac_check_lib_save_LIBS=$LIBS
47841LIBS="-lcap  $LIBS"
47842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47843/* end confdefs.h.  */
47844
47845/* Override any GCC internal prototype to avoid an error.
47846   Use char because int might match the return type of a GCC
47847   builtin and then its argument prototype would still apply.  */
47848#ifdef __cplusplus
47849extern "C"
47850#endif
47851char cap_get_file ();
47852int
47853main ()
47854{
47855return cap_get_file ();
47856  ;
47857  return 0;
47858}
47859_ACEOF
47860if ac_fn_c_try_link "$LINENO"; then :
47861  ac_cv_lib_cap_cap_get_file=yes
47862else
47863  ac_cv_lib_cap_cap_get_file=no
47864fi
47865rm -f core conftest.err conftest.$ac_objext \
47866    conftest$ac_exeext conftest.$ac_ext
47867LIBS=$ac_check_lib_save_LIBS
47868fi
47869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_cap_get_file" >&5
47870$as_echo "$ac_cv_lib_cap_cap_get_file" >&6; }
47871if test "x$ac_cv_lib_cap_cap_get_file" = x""yes; then :
47872  ac_fn_c_check_header_mongrel "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
47873if test "x$ac_cv_header_sys_capability_h" = x""yes; then :
47874  LIB_CAP=-lcap
47875
47876$as_echo "#define HAVE_CAP 1" >>confdefs.h
47877
47878
47879fi
47880
47881
47882fi
47883
47884    if test "X$LIB_CAP" = "X"; then
47885      if test "X$enable_libcap" = "Xyes"; then
47886        as_fn_error "libcap library was not found or not usable" "$LINENO" 5
47887      else
47888        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcap library was not found or not usable." >&5
47889$as_echo "$as_me: WARNING: libcap library was not found or not usable." >&2;}
47890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU coreutils will be built without capability support." >&5
47891$as_echo "$as_me: WARNING: GNU coreutils will be built without capability support." >&2;}
47892      fi
47893    fi
47894  else
47895    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcap support disabled by user" >&5
47896$as_echo "$as_me: WARNING: libcap support disabled by user" >&2;}
47897  fi
47898
47899
47900  # See if linking `seq' requires -lm.
47901  # It does on nearly every system.  The single exception (so far) is
47902  # BeOS which has all the math functions in the normal runtime library
47903  # and doesn't have a separate math library.
47904
47905
47906  ac_seq_body='
47907     static double x, y;
47908     x = floor (x);
47909     x = rint (x);
47910     x = modf (x, &y);'
47911  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47912/* end confdefs.h.  */
47913#include <math.h>
47914int
47915main ()
47916{
47917$ac_seq_body
47918  ;
47919  return 0;
47920}
47921_ACEOF
47922if ac_fn_c_try_link "$LINENO"; then :
47923
47924else
47925  ac_seq_save_LIBS="$LIBS"
47926     LIBS="$LIBS -lm"
47927     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47928/* end confdefs.h.  */
47929#include <math.h>
47930int
47931main ()
47932{
47933$ac_seq_body
47934  ;
47935  return 0;
47936}
47937_ACEOF
47938if ac_fn_c_try_link "$LINENO"; then :
47939  SEQ_LIBM=-lm
47940fi
47941rm -f core conftest.err conftest.$ac_objext \
47942    conftest$ac_exeext conftest.$ac_ext
47943     LIBS="$ac_seq_save_LIBS"
47944
47945fi
47946rm -f core conftest.err conftest.$ac_objext \
47947    conftest$ac_exeext conftest.$ac_ext
47948
47949
47950
47951
47952# Check whether --enable-gcc-warnings was given.
47953if test "${enable_gcc_warnings+set}" = set; then :
47954  enableval=$enable_gcc_warnings; case $enableval in
47955     yes|no) ;;
47956     *)      as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
47957   esac
47958   gl_gcc_warnings=$enableval
47959else
47960  gl_gcc_warnings=no
47961
47962fi
47963
47964
47965if test "$gl_gcc_warnings" = yes; then
47966  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Werror" >&5
47967$as_echo_n "checking whether compiler handles -Werror... " >&6; }
47968if test "${gl_cv_warn__Werror+set}" = set; then :
47969  $as_echo_n "(cached) " >&6
47970else
47971
47972  save_CPPFLAGS="$CPPFLAGS"
47973  CPPFLAGS="${CPPFLAGS} -Werror"
47974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47975/* end confdefs.h.  */
47976
47977int
47978main ()
47979{
47980
47981  ;
47982  return 0;
47983}
47984_ACEOF
47985if ac_fn_c_try_cpp "$LINENO"; then :
47986  gl_cv_warn__Werror=yes
47987else
47988  gl_cv_warn__Werror=no
47989fi
47990rm -f conftest.err conftest.$ac_ext
47991  CPPFLAGS="$save_CPPFLAGS"
47992
47993fi
47994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Werror" >&5
47995$as_echo "$gl_cv_warn__Werror" >&6; }
47996if test "x$gl_cv_warn__Werror" = x""yes; then :
47997  as_fn_append WERROR_CFLAGS " -Werror"
47998fi
47999
48000
48001
48002  nw=
48003  # This, $nw, is the list of warnings we disable.
48004  nw="$nw -Wdeclaration-after-statement" # too useful to forbid
48005  nw="$nw -Waggregate-return"       # anachronistic
48006  nw="$nw -Wlong-long"              # C90 is anachronistic (lib/gethrxtime.h)
48007  nw="$nw -Wc++-compat"             # We don't care about C++ compilers
48008  nw="$nw -Wundef"                  # Warns on '#if GNULIB_FOO' etc in gnulib
48009  nw="$nw -Wtraditional"            # Warns on #elif which we use often
48010  nw="$nw -Wcast-qual"              # Too many warnings for now
48011  nw="$nw -Wconversion"             # Too many warnings for now
48012  nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
48013  nw="$nw -Wsign-conversion"        # Too many warnings for now
48014  nw="$nw -Wtraditional-conversion" # Too many warnings for now
48015  nw="$nw -Wunreachable-code"       # Too many warnings for now
48016  nw="$nw -Wpadded"                 # Our structs are not padded
48017  nw="$nw -Wredundant-decls"        # openat.h declares e.g., mkdirat
48018  nw="$nw -Wlogical-op"             # any use of fwrite provokes this
48019  nw="$nw -Wformat-nonliteral"      # who.c and pinky.c strftime uses
48020  nw="$nw -Wvla"                    # warnings in gettext.h
48021  nw="$nw -Wnested-externs"         # use of XARGMATCH/verify_function__
48022  nw="$nw -Wswitch-enum"            # Too many warnings for now
48023  nw="$nw -Wswitch-default"         # Too many warnings for now
48024  nw="$nw -Wstack-protector"        # not worth working around
48025  # things I might fix soon:
48026  nw="$nw -Wfloat-equal"            # sort.c, seq.c
48027  nw="$nw -Wmissing-format-attribute" # copy.c
48028  nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
48029  nw="$nw -Winline"                 # system.h's readdir_ignoring_dot_and_dotdot
48030  nw="$nw -Wstrict-overflow"        # expr.c, pr.c, tr.c, factor.c
48031  # ?? -Wstrict-overflow
48032
48033
48034 gl_manywarn_set=
48035 for gl_manywarn_item in \
48036   -Wall \
48037   -W \
48038   -Wformat-y2k \
48039   -Wformat-nonliteral \
48040   -Wformat-security \
48041   -Winit-self \
48042   -Wmissing-include-dirs \
48043   -Wswitch-default \
48044   -Wswitch-enum \
48045   -Wunused \
48046   -Wunknown-pragmas \
48047   -Wstrict-aliasing \
48048   -Wstrict-overflow \
48049   -Wsystem-headers \
48050   -Wfloat-equal \
48051   -Wtraditional \
48052   -Wtraditional-conversion \
48053   -Wdeclaration-after-statement \
48054   -Wundef \
48055   -Wshadow \
48056   -Wunsafe-loop-optimizations \
48057   -Wpointer-arith \
48058   -Wbad-function-cast \
48059   -Wc++-compat \
48060   -Wcast-qual \
48061   -Wcast-align \
48062   -Wwrite-strings \
48063   -Wconversion \
48064   -Wsign-conversion \
48065   -Wlogical-op \
48066   -Waggregate-return \
48067   -Wstrict-prototypes \
48068   -Wold-style-definition \
48069   -Wmissing-prototypes \
48070   -Wmissing-declarations \
48071   -Wmissing-noreturn \
48072   -Wmissing-format-attribute \
48073   -Wpacked \
48074   -Wpadded \
48075   -Wredundant-decls \
48076   -Wnested-externs \
48077   -Wunreachable-code \
48078   -Winline \
48079   -Winvalid-pch \
48080   -Wlong-long \
48081   -Wvla \
48082   -Wvolatile-register-var \
48083   -Wdisabled-optimization \
48084   -Wstack-protector \
48085   -Woverlength-strings \
48086   -Wbuiltin-macro-redefined \
48087   -Wmudflap \
48088   -Wpacked-bitfield-compat \
48089   -Wsync-nand \
48090  ; do
48091    gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
48092  done
48093 # The following are not documented in the manual but are included in
48094 # output from gcc --help=warnings.
48095 for gl_manywarn_item in \
48096   -Wattributes \
48097   -Wcoverage-mismatch \
48098   -Wmultichar \
48099   -Wunused-macros \
48100  ; do
48101    gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
48102  done
48103  ws=$gl_manywarn_set
48104
48105
48106  gl_warn_set=
48107  set x $ws; shift
48108  for gl_warn_item
48109  do
48110    case " $nw " in
48111      *" $gl_warn_item "*)
48112        ;;
48113      *)
48114        gl_warn_set="$gl_warn_set $gl_warn_item"
48115        ;;
48116    esac
48117  done
48118  ws=$gl_warn_set
48119
48120  for w in $ws; do
48121    as_gl_Warn=`$as_echo "gl_cv_warn_$w" | $as_tr_sh`
48122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles $w" >&5
48123$as_echo_n "checking whether compiler handles $w... " >&6; }
48124if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
48125  $as_echo_n "(cached) " >&6
48126else
48127
48128  save_CPPFLAGS="$CPPFLAGS"
48129  CPPFLAGS="${CPPFLAGS} $w"
48130  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48131/* end confdefs.h.  */
48132
48133int
48134main ()
48135{
48136
48137  ;
48138  return 0;
48139}
48140_ACEOF
48141if ac_fn_c_try_cpp "$LINENO"; then :
48142  eval "$as_gl_Warn=yes"
48143else
48144  eval "$as_gl_Warn=no"
48145fi
48146rm -f conftest.err conftest.$ac_ext
48147  CPPFLAGS="$save_CPPFLAGS"
48148
48149fi
48150eval ac_res=\$$as_gl_Warn
48151	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
48152$as_echo "$ac_res" >&6; }
48153eval as_val=\$$as_gl_Warn
48154   if test "x$as_val" = x""yes; then :
48155  as_fn_append WARN_CFLAGS " $w"
48156fi
48157
48158  done
48159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-missing-field-initializers" >&5
48160$as_echo_n "checking whether compiler handles -Wno-missing-field-initializers... " >&6; }
48161if test "${gl_cv_warn__Wno_missing_field_initializers+set}" = set; then :
48162  $as_echo_n "(cached) " >&6
48163else
48164
48165  save_CPPFLAGS="$CPPFLAGS"
48166  CPPFLAGS="${CPPFLAGS} -Wno-missing-field-initializers"
48167  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48168/* end confdefs.h.  */
48169
48170int
48171main ()
48172{
48173
48174  ;
48175  return 0;
48176}
48177_ACEOF
48178if ac_fn_c_try_cpp "$LINENO"; then :
48179  gl_cv_warn__Wno_missing_field_initializers=yes
48180else
48181  gl_cv_warn__Wno_missing_field_initializers=no
48182fi
48183rm -f conftest.err conftest.$ac_ext
48184  CPPFLAGS="$save_CPPFLAGS"
48185
48186fi
48187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_missing_field_initializers" >&5
48188$as_echo "$gl_cv_warn__Wno_missing_field_initializers" >&6; }
48189if test "x$gl_cv_warn__Wno_missing_field_initializers" = x""yes; then :
48190  as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
48191fi
48192 # We need this one
48193  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-sign-compare" >&5
48194$as_echo_n "checking whether compiler handles -Wno-sign-compare... " >&6; }
48195if test "${gl_cv_warn__Wno_sign_compare+set}" = set; then :
48196  $as_echo_n "(cached) " >&6
48197else
48198
48199  save_CPPFLAGS="$CPPFLAGS"
48200  CPPFLAGS="${CPPFLAGS} -Wno-sign-compare"
48201  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48202/* end confdefs.h.  */
48203
48204int
48205main ()
48206{
48207
48208  ;
48209  return 0;
48210}
48211_ACEOF
48212if ac_fn_c_try_cpp "$LINENO"; then :
48213  gl_cv_warn__Wno_sign_compare=yes
48214else
48215  gl_cv_warn__Wno_sign_compare=no
48216fi
48217rm -f conftest.err conftest.$ac_ext
48218  CPPFLAGS="$save_CPPFLAGS"
48219
48220fi
48221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_sign_compare" >&5
48222$as_echo "$gl_cv_warn__Wno_sign_compare" >&6; }
48223if test "x$gl_cv_warn__Wno_sign_compare" = x""yes; then :
48224  as_fn_append WARN_CFLAGS " -Wno-sign-compare"
48225fi
48226     # Too many warnings for now
48227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-pointer-sign" >&5
48228$as_echo_n "checking whether compiler handles -Wno-pointer-sign... " >&6; }
48229if test "${gl_cv_warn__Wno_pointer_sign+set}" = set; then :
48230  $as_echo_n "(cached) " >&6
48231else
48232
48233  save_CPPFLAGS="$CPPFLAGS"
48234  CPPFLAGS="${CPPFLAGS} -Wno-pointer-sign"
48235  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48236/* end confdefs.h.  */
48237
48238int
48239main ()
48240{
48241
48242  ;
48243  return 0;
48244}
48245_ACEOF
48246if ac_fn_c_try_cpp "$LINENO"; then :
48247  gl_cv_warn__Wno_pointer_sign=yes
48248else
48249  gl_cv_warn__Wno_pointer_sign=no
48250fi
48251rm -f conftest.err conftest.$ac_ext
48252  CPPFLAGS="$save_CPPFLAGS"
48253
48254fi
48255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_pointer_sign" >&5
48256$as_echo "$gl_cv_warn__Wno_pointer_sign" >&6; }
48257if test "x$gl_cv_warn__Wno_pointer_sign" = x""yes; then :
48258  as_fn_append WARN_CFLAGS " -Wno-pointer-sign"
48259fi
48260     # Too many warnings for now
48261  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-unused-parameter" >&5
48262$as_echo_n "checking whether compiler handles -Wno-unused-parameter... " >&6; }
48263if test "${gl_cv_warn__Wno_unused_parameter+set}" = set; then :
48264  $as_echo_n "(cached) " >&6
48265else
48266
48267  save_CPPFLAGS="$CPPFLAGS"
48268  CPPFLAGS="${CPPFLAGS} -Wno-unused-parameter"
48269  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48270/* end confdefs.h.  */
48271
48272int
48273main ()
48274{
48275
48276  ;
48277  return 0;
48278}
48279_ACEOF
48280if ac_fn_c_try_cpp "$LINENO"; then :
48281  gl_cv_warn__Wno_unused_parameter=yes
48282else
48283  gl_cv_warn__Wno_unused_parameter=no
48284fi
48285rm -f conftest.err conftest.$ac_ext
48286  CPPFLAGS="$save_CPPFLAGS"
48287
48288fi
48289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_unused_parameter" >&5
48290$as_echo "$gl_cv_warn__Wno_unused_parameter" >&6; }
48291if test "x$gl_cv_warn__Wno_unused_parameter" = x""yes; then :
48292  as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
48293fi
48294 # Too many warnings for now
48295
48296  # In spite of excluding -Wlogical-op above, it is enabled, as of
48297  # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
48298  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-logical-op" >&5
48299$as_echo_n "checking whether compiler handles -Wno-logical-op... " >&6; }
48300if test "${gl_cv_warn__Wno_logical_op+set}" = set; then :
48301  $as_echo_n "(cached) " >&6
48302else
48303
48304  save_CPPFLAGS="$CPPFLAGS"
48305  CPPFLAGS="${CPPFLAGS} -Wno-logical-op"
48306  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48307/* end confdefs.h.  */
48308
48309int
48310main ()
48311{
48312
48313  ;
48314  return 0;
48315}
48316_ACEOF
48317if ac_fn_c_try_cpp "$LINENO"; then :
48318  gl_cv_warn__Wno_logical_op=yes
48319else
48320  gl_cv_warn__Wno_logical_op=no
48321fi
48322rm -f conftest.err conftest.$ac_ext
48323  CPPFLAGS="$save_CPPFLAGS"
48324
48325fi
48326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_logical_op" >&5
48327$as_echo "$gl_cv_warn__Wno_logical_op" >&6; }
48328if test "x$gl_cv_warn__Wno_logical_op" = x""yes; then :
48329  as_fn_append WARN_CFLAGS " -Wno-logical-op"
48330fi
48331
48332
48333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -fdiagnostics-show-option" >&5
48334$as_echo_n "checking whether compiler handles -fdiagnostics-show-option... " >&6; }
48335if test "${gl_cv_warn__fdiagnostics_show_option+set}" = set; then :
48336  $as_echo_n "(cached) " >&6
48337else
48338
48339  save_CPPFLAGS="$CPPFLAGS"
48340  CPPFLAGS="${CPPFLAGS} -fdiagnostics-show-option"
48341  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48342/* end confdefs.h.  */
48343
48344int
48345main ()
48346{
48347
48348  ;
48349  return 0;
48350}
48351_ACEOF
48352if ac_fn_c_try_cpp "$LINENO"; then :
48353  gl_cv_warn__fdiagnostics_show_option=yes
48354else
48355  gl_cv_warn__fdiagnostics_show_option=no
48356fi
48357rm -f conftest.err conftest.$ac_ext
48358  CPPFLAGS="$save_CPPFLAGS"
48359
48360fi
48361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__fdiagnostics_show_option" >&5
48362$as_echo "$gl_cv_warn__fdiagnostics_show_option" >&6; }
48363if test "x$gl_cv_warn__fdiagnostics_show_option" = x""yes; then :
48364  as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
48365fi
48366
48367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -funit-at-a-time" >&5
48368$as_echo_n "checking whether compiler handles -funit-at-a-time... " >&6; }
48369if test "${gl_cv_warn__funit_at_a_time+set}" = set; then :
48370  $as_echo_n "(cached) " >&6
48371else
48372
48373  save_CPPFLAGS="$CPPFLAGS"
48374  CPPFLAGS="${CPPFLAGS} -funit-at-a-time"
48375  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48376/* end confdefs.h.  */
48377
48378int
48379main ()
48380{
48381
48382  ;
48383  return 0;
48384}
48385_ACEOF
48386if ac_fn_c_try_cpp "$LINENO"; then :
48387  gl_cv_warn__funit_at_a_time=yes
48388else
48389  gl_cv_warn__funit_at_a_time=no
48390fi
48391rm -f conftest.err conftest.$ac_ext
48392  CPPFLAGS="$save_CPPFLAGS"
48393
48394fi
48395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__funit_at_a_time" >&5
48396$as_echo "$gl_cv_warn__funit_at_a_time" >&6; }
48397if test "x$gl_cv_warn__funit_at_a_time" = x""yes; then :
48398  as_fn_append WARN_CFLAGS " -funit-at-a-time"
48399fi
48400
48401
48402
48403
48404
48405$as_echo "#define lint 1" >>confdefs.h
48406
48407
48408$as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h
48409
48410
48411$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
48412
48413
48414  # We use a slightly smaller set of warning options for lib/.
48415  # Remove the following and save the result in GNULIB_WARN_CFLAGS.
48416  nw=
48417  nw="$nw -Wuninitialized"
48418  nw="$nw -Wunused-macros"
48419  nw="$nw -Wmissing-prototypes"
48420  nw="$nw -Wold-style-definition"
48421
48422  gl_warn_set=
48423  set x $WARN_CFLAGS; shift
48424  for gl_warn_item
48425  do
48426    case " $nw " in
48427      *" $gl_warn_item "*)
48428        ;;
48429      *)
48430        gl_warn_set="$gl_warn_set $gl_warn_item"
48431        ;;
48432    esac
48433  done
48434  GNULIB_WARN_CFLAGS=$gl_warn_set
48435
48436
48437fi
48438
48439for ac_header in vfork.h
48440do :
48441  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
48442if test "x$ac_cv_header_vfork_h" = x""yes; then :
48443  cat >>confdefs.h <<_ACEOF
48444#define HAVE_VFORK_H 1
48445_ACEOF
48446
48447fi
48448
48449done
48450
48451for ac_func in fork vfork
48452do :
48453  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
48454ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
48455eval as_val=\$$as_ac_var
48456   if test "x$as_val" = x""yes; then :
48457  cat >>confdefs.h <<_ACEOF
48458#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
48459_ACEOF
48460
48461fi
48462done
48463
48464if test "x$ac_cv_func_fork" = xyes; then
48465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
48466$as_echo_n "checking for working fork... " >&6; }
48467if test "${ac_cv_func_fork_works+set}" = set; then :
48468  $as_echo_n "(cached) " >&6
48469else
48470  if test "$cross_compiling" = yes; then :
48471  ac_cv_func_fork_works=cross
48472else
48473  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48474/* end confdefs.h.  */
48475$ac_includes_default
48476int
48477main ()
48478{
48479
48480	  /* By Ruediger Kuhlmann. */
48481	  return fork () < 0;
48482
48483  ;
48484  return 0;
48485}
48486_ACEOF
48487if ac_fn_c_try_run "$LINENO"; then :
48488  ac_cv_func_fork_works=yes
48489else
48490  ac_cv_func_fork_works=no
48491fi
48492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48493  conftest.$ac_objext conftest.beam conftest.$ac_ext
48494fi
48495
48496fi
48497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
48498$as_echo "$ac_cv_func_fork_works" >&6; }
48499
48500else
48501  ac_cv_func_fork_works=$ac_cv_func_fork
48502fi
48503if test "x$ac_cv_func_fork_works" = xcross; then
48504  case $host in
48505    *-*-amigaos* | *-*-msdosdjgpp*)
48506      # Override, as these systems have only a dummy fork() stub
48507      ac_cv_func_fork_works=no
48508      ;;
48509    *)
48510      ac_cv_func_fork_works=yes
48511      ;;
48512  esac
48513  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
48514$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
48515fi
48516ac_cv_func_vfork_works=$ac_cv_func_vfork
48517if test "x$ac_cv_func_vfork" = xyes; then
48518  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
48519$as_echo_n "checking for working vfork... " >&6; }
48520if test "${ac_cv_func_vfork_works+set}" = set; then :
48521  $as_echo_n "(cached) " >&6
48522else
48523  if test "$cross_compiling" = yes; then :
48524  ac_cv_func_vfork_works=cross
48525else
48526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48527/* end confdefs.h.  */
48528/* Thanks to Paul Eggert for this test.  */
48529$ac_includes_default
48530#include <sys/wait.h>
48531#ifdef HAVE_VFORK_H
48532# include <vfork.h>
48533#endif
48534/* On some sparc systems, changes by the child to local and incoming
48535   argument registers are propagated back to the parent.  The compiler
48536   is told about this with #include <vfork.h>, but some compilers
48537   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
48538   static variable whose address is put into a register that is
48539   clobbered by the vfork.  */
48540static void
48541#ifdef __cplusplus
48542sparc_address_test (int arg)
48543# else
48544sparc_address_test (arg) int arg;
48545#endif
48546{
48547  static pid_t child;
48548  if (!child) {
48549    child = vfork ();
48550    if (child < 0) {
48551      perror ("vfork");
48552      _exit(2);
48553    }
48554    if (!child) {
48555      arg = getpid();
48556      write(-1, "", 0);
48557      _exit (arg);
48558    }
48559  }
48560}
48561
48562int
48563main ()
48564{
48565  pid_t parent = getpid ();
48566  pid_t child;
48567
48568  sparc_address_test (0);
48569
48570  child = vfork ();
48571
48572  if (child == 0) {
48573    /* Here is another test for sparc vfork register problems.  This
48574       test uses lots of local variables, at least as many local
48575       variables as main has allocated so far including compiler
48576       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
48577       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
48578       reuse the register of parent for one of the local variables,
48579       since it will think that parent can't possibly be used any more
48580       in this routine.  Assigning to the local variable will thus
48581       munge parent in the parent process.  */
48582    pid_t
48583      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
48584      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
48585    /* Convince the compiler that p..p7 are live; otherwise, it might
48586       use the same hardware register for all 8 local variables.  */
48587    if (p != p1 || p != p2 || p != p3 || p != p4
48588	|| p != p5 || p != p6 || p != p7)
48589      _exit(1);
48590
48591    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
48592       from child file descriptors.  If the child closes a descriptor
48593       before it execs or exits, this munges the parent's descriptor
48594       as well.  Test for this by closing stdout in the child.  */
48595    _exit(close(fileno(stdout)) != 0);
48596  } else {
48597    int status;
48598    struct stat st;
48599
48600    while (wait(&status) != child)
48601      ;
48602    return (
48603	 /* Was there some problem with vforking?  */
48604	 child < 0
48605
48606	 /* Did the child fail?  (This shouldn't happen.)  */
48607	 || status
48608
48609	 /* Did the vfork/compiler bug occur?  */
48610	 || parent != getpid()
48611
48612	 /* Did the file descriptor bug occur?  */
48613	 || fstat(fileno(stdout), &st) != 0
48614	 );
48615  }
48616}
48617_ACEOF
48618if ac_fn_c_try_run "$LINENO"; then :
48619  ac_cv_func_vfork_works=yes
48620else
48621  ac_cv_func_vfork_works=no
48622fi
48623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48624  conftest.$ac_objext conftest.beam conftest.$ac_ext
48625fi
48626
48627fi
48628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
48629$as_echo "$ac_cv_func_vfork_works" >&6; }
48630
48631fi;
48632if test "x$ac_cv_func_fork_works" = xcross; then
48633  ac_cv_func_vfork_works=$ac_cv_func_vfork
48634  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
48635$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
48636fi
48637
48638if test "x$ac_cv_func_vfork_works" = xyes; then
48639
48640$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
48641
48642else
48643
48644$as_echo "#define vfork fork" >>confdefs.h
48645
48646fi
48647if test "x$ac_cv_func_fork_works" = xyes; then
48648
48649$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
48650
48651fi
48652
48653
48654optional_bin_progs=
48655for ac_func in chroot
48656do :
48657  ac_fn_c_check_func "$LINENO" "chroot" "ac_cv_func_chroot"
48658if test "x$ac_cv_func_chroot" = x""yes; then :
48659  cat >>confdefs.h <<_ACEOF
48660#define HAVE_CHROOT 1
48661_ACEOF
48662 {
48663  if test -z "$optional_bin_progs"; then
48664    optional_bin_progs=chroot
48665  else
48666    optional_bin_progs="$optional_bin_progs chroot"
48667  fi
48668}
48669fi
48670done
48671
48672for ac_func in gethostid
48673do :
48674  ac_fn_c_check_func "$LINENO" "gethostid" "ac_cv_func_gethostid"
48675if test "x$ac_cv_func_gethostid" = x""yes; then :
48676  cat >>confdefs.h <<_ACEOF
48677#define HAVE_GETHOSTID 1
48678_ACEOF
48679 {
48680  if test -z "$optional_bin_progs"; then
48681    optional_bin_progs=hostid
48682  else
48683    optional_bin_progs="$optional_bin_progs hostid"
48684  fi
48685}
48686fi
48687done
48688
48689
48690
48691   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether use of struct winsize requires sys/ptem.h" >&5
48692$as_echo_n "checking whether use of struct winsize requires sys/ptem.h... " >&6; }
48693if test "${gl_cv_sys_struct_winsize_needs_sys_ptem_h+set}" = set; then :
48694  $as_echo_n "(cached) " >&6
48695else
48696  gl_cv_sys_struct_winsize_needs_sys_ptem_h=yes
48697      if test $ac_cv_sys_posix_termios = yes; then
48698        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48699/* end confdefs.h.  */
48700#include <termios.h>
48701int
48702main ()
48703{
48704struct winsize x;
48705            if (sizeof x > 0) return 0;
48706  ;
48707  return 0;
48708}
48709_ACEOF
48710if ac_fn_c_try_compile "$LINENO"; then :
48711  gl_cv_sys_struct_winsize_needs_sys_ptem_h=no
48712fi
48713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48714      fi
48715      if test $gl_cv_sys_struct_winsize_needs_sys_ptem_h = yes; then
48716        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48717/* end confdefs.h.  */
48718#include <sys/ptem.h>
48719int
48720main ()
48721{
48722struct winsize x;
48723            if (sizeof x > 0) return 0;
48724  ;
48725  return 0;
48726}
48727_ACEOF
48728if ac_fn_c_try_compile "$LINENO"; then :
48729
48730else
48731  gl_cv_sys_struct_winsize_needs_sys_ptem_h=no
48732fi
48733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48734      fi
48735fi
48736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_winsize_needs_sys_ptem_h" >&5
48737$as_echo "$gl_cv_sys_struct_winsize_needs_sys_ptem_h" >&6; }
48738   if test $gl_cv_sys_struct_winsize_needs_sys_ptem_h = yes; then
48739
48740$as_echo "#define WINSIZE_IN_PTEM 1" >>confdefs.h
48741
48742   fi
48743
48744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
48745$as_echo_n "checking whether localtime caches TZ... " >&6; }
48746if test "${utils_cv_localtime_cache+set}" = set; then :
48747  $as_echo_n "(cached) " >&6
48748else
48749  if test x$ac_cv_func_tzset = xyes; then
48750if test "$cross_compiling" = yes; then :
48751  # If we have tzset, assume the worst when cross-compiling.
48752utils_cv_localtime_cache=yes
48753else
48754  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48755/* end confdefs.h.  */
48756#include <time.h>
48757#if STDC_HEADERS
48758# include <stdlib.h>
48759#endif
48760extern char **environ;
48761void unset_TZ (void)
48762{
48763  char **from, **to;
48764  for (to = from = environ; (*to = *from); from++)
48765    if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
48766      to++;
48767}
48768int main()
48769{
48770  time_t now = time ((time_t *) 0);
48771  int hour_GMT0, hour_unset;
48772  if (putenv ("TZ=GMT0") != 0)
48773    exit (1);
48774  hour_GMT0 = localtime (&now)->tm_hour;
48775  unset_TZ ();
48776  hour_unset = localtime (&now)->tm_hour;
48777  if (putenv ("TZ=PST8") != 0)
48778    exit (1);
48779  if (localtime (&now)->tm_hour == hour_GMT0)
48780    exit (1);
48781  unset_TZ ();
48782  if (localtime (&now)->tm_hour != hour_unset)
48783    exit (1);
48784  exit (0);
48785}
48786_ACEOF
48787if ac_fn_c_try_run "$LINENO"; then :
48788  utils_cv_localtime_cache=no
48789else
48790  utils_cv_localtime_cache=yes
48791fi
48792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48793  conftest.$ac_objext conftest.beam conftest.$ac_ext
48794fi
48795
48796else
48797        # If we lack tzset, report that localtime does not cache TZ,
48798        # since we can't invalidate the cache if we don't have tzset.
48799        utils_cv_localtime_cache=no
48800fi
48801fi
48802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $utils_cv_localtime_cache" >&5
48803$as_echo "$utils_cv_localtime_cache" >&6; }
48804if test $utils_cv_localtime_cache = yes; then
48805
48806$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
48807
48808fi
48809
48810# SCO-ODT-3.0 is reported to need -los to link programs using initgroups
48811for ac_func in initgroups
48812do :
48813  ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
48814if test "x$ac_cv_func_initgroups" = x""yes; then :
48815  cat >>confdefs.h <<_ACEOF
48816#define HAVE_INITGROUPS 1
48817_ACEOF
48818
48819fi
48820done
48821
48822if test $ac_cv_func_initgroups = no; then
48823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initgroups in -los" >&5
48824$as_echo_n "checking for initgroups in -los... " >&6; }
48825if test "${ac_cv_lib_os_initgroups+set}" = set; then :
48826  $as_echo_n "(cached) " >&6
48827else
48828  ac_check_lib_save_LIBS=$LIBS
48829LIBS="-los  $LIBS"
48830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48831/* end confdefs.h.  */
48832
48833/* Override any GCC internal prototype to avoid an error.
48834   Use char because int might match the return type of a GCC
48835   builtin and then its argument prototype would still apply.  */
48836#ifdef __cplusplus
48837extern "C"
48838#endif
48839char initgroups ();
48840int
48841main ()
48842{
48843return initgroups ();
48844  ;
48845  return 0;
48846}
48847_ACEOF
48848if ac_fn_c_try_link "$LINENO"; then :
48849  ac_cv_lib_os_initgroups=yes
48850else
48851  ac_cv_lib_os_initgroups=no
48852fi
48853rm -f core conftest.err conftest.$ac_objext \
48854    conftest$ac_exeext conftest.$ac_ext
48855LIBS=$ac_check_lib_save_LIBS
48856fi
48857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_os_initgroups" >&5
48858$as_echo "$ac_cv_lib_os_initgroups" >&6; }
48859if test "x$ac_cv_lib_os_initgroups" = x""yes; then :
48860  cat >>confdefs.h <<_ACEOF
48861#define HAVE_LIBOS 1
48862_ACEOF
48863
48864  LIBS="-los $LIBS"
48865
48866fi
48867
48868fi
48869
48870for ac_func in syslog
48871do :
48872  ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
48873if test "x$ac_cv_func_syslog" = x""yes; then :
48874  cat >>confdefs.h <<_ACEOF
48875#define HAVE_SYSLOG 1
48876_ACEOF
48877
48878fi
48879done
48880
48881if test $ac_cv_func_syslog = no; then
48882  # syslog is not in the default libraries.  See if it's in some other.
48883  for lib in bsd socket inet; do
48884    as_ac_Lib=`$as_echo "ac_cv_lib_$lib''_syslog" | $as_tr_sh`
48885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syslog in -l$lib" >&5
48886$as_echo_n "checking for syslog in -l$lib... " >&6; }
48887if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
48888  $as_echo_n "(cached) " >&6
48889else
48890  ac_check_lib_save_LIBS=$LIBS
48891LIBS="-l$lib  $LIBS"
48892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48893/* end confdefs.h.  */
48894
48895/* Override any GCC internal prototype to avoid an error.
48896   Use char because int might match the return type of a GCC
48897   builtin and then its argument prototype would still apply.  */
48898#ifdef __cplusplus
48899extern "C"
48900#endif
48901char syslog ();
48902int
48903main ()
48904{
48905return syslog ();
48906  ;
48907  return 0;
48908}
48909_ACEOF
48910if ac_fn_c_try_link "$LINENO"; then :
48911  eval "$as_ac_Lib=yes"
48912else
48913  eval "$as_ac_Lib=no"
48914fi
48915rm -f core conftest.err conftest.$ac_objext \
48916    conftest$ac_exeext conftest.$ac_ext
48917LIBS=$ac_check_lib_save_LIBS
48918fi
48919eval ac_res=\$$as_ac_Lib
48920	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
48921$as_echo "$ac_res" >&6; }
48922eval as_val=\$$as_ac_Lib
48923   if test "x$as_val" = x""yes; then :
48924
48925$as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
48926
48927      LIBS="$LIBS -l$lib"; break
48928fi
48929
48930  done
48931fi
48932
48933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 3-argument setpriority function" >&5
48934$as_echo_n "checking for 3-argument setpriority function... " >&6; }
48935if test "${utils_cv_func_setpriority+set}" = set; then :
48936  $as_echo_n "(cached) " >&6
48937else
48938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48939/* end confdefs.h.  */
48940#include <sys/time.h>
48941         #include <sys/resource.h>
48942
48943int
48944main ()
48945{
48946setpriority (0, 0, 0);
48947  ;
48948  return 0;
48949}
48950_ACEOF
48951if ac_fn_c_try_link "$LINENO"; then :
48952  utils_cv_func_setpriority=yes
48953else
48954  utils_cv_func_setpriority=no
48955fi
48956rm -f core conftest.err conftest.$ac_objext \
48957    conftest$ac_exeext conftest.$ac_ext
48958fi
48959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $utils_cv_func_setpriority" >&5
48960$as_echo "$utils_cv_func_setpriority" >&6; }
48961if test $utils_cv_func_setpriority = no; then
48962  for ac_func in nice
48963do :
48964  ac_fn_c_check_func "$LINENO" "nice" "ac_cv_func_nice"
48965if test "x$ac_cv_func_nice" = x""yes; then :
48966  cat >>confdefs.h <<_ACEOF
48967#define HAVE_NICE 1
48968_ACEOF
48969
48970fi
48971done
48972
48973fi
48974case $utils_cv_func_setpriority,$ac_cv_func_nice in
48975*yes*)
48976  {
48977  if test -z "$optional_bin_progs"; then
48978    optional_bin_progs=nice
48979  else
48980    optional_bin_progs="$optional_bin_progs nice"
48981  fi
48982}
48983esac
48984
48985
48986
48987
48988  if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then
48989    {
48990  if test -z "$optional_bin_progs"; then
48991    optional_bin_progs=who
48992  else
48993    optional_bin_progs="$optional_bin_progs who"
48994  fi
48995}
48996    {
48997  if test -z "$optional_bin_progs"; then
48998    optional_bin_progs=users
48999  else
49000    optional_bin_progs="$optional_bin_progs users"
49001  fi
49002}
49003    {
49004  if test -z "$optional_bin_progs"; then
49005    optional_bin_progs=pinky
49006  else
49007    optional_bin_progs="$optional_bin_progs pinky"
49008  fi
49009}
49010  fi
49011
49012
49013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ut_host in struct utmp" >&5
49014$as_echo_n "checking ut_host in struct utmp... " >&6; }
49015if test "${su_cv_func_ut_host_in_utmp+set}" = set; then :
49016  $as_echo_n "(cached) " >&6
49017else
49018  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49019/* end confdefs.h.  */
49020#include <sys/types.h>
49021#include <utmp.h>
49022int
49023main ()
49024{
49025struct utmp ut; return !sizeof ut.ut_host;
49026  ;
49027  return 0;
49028}
49029_ACEOF
49030if ac_fn_c_try_link "$LINENO"; then :
49031  su_cv_func_ut_host_in_utmp=yes
49032else
49033  su_cv_func_ut_host_in_utmp=no
49034fi
49035rm -f core conftest.err conftest.$ac_objext \
49036    conftest$ac_exeext conftest.$ac_ext
49037fi
49038
49039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $su_cv_func_ut_host_in_utmp" >&5
49040$as_echo "$su_cv_func_ut_host_in_utmp" >&6; }
49041if test $su_cv_func_ut_host_in_utmp = yes; then
49042  have_ut_host=1
49043
49044$as_echo "#define HAVE_UT_HOST 1" >>confdefs.h
49045
49046fi
49047
49048if test -z "$have_ut_host"; then
49049  { $as_echo "$as_me:${as_lineno-$LINENO}: checking ut_host in struct utmpx" >&5
49050$as_echo_n "checking ut_host in struct utmpx... " >&6; }
49051  if test "${su_cv_func_ut_host_in_utmpx+set}" = set; then :
49052  $as_echo_n "(cached) " >&6
49053else
49054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49055/* end confdefs.h.  */
49056#include <sys/types.h>
49057#include <utmpx.h>
49058int
49059main ()
49060{
49061struct utmpx ut; return !sizeof ut.ut_host;
49062  ;
49063  return 0;
49064}
49065_ACEOF
49066if ac_fn_c_try_link "$LINENO"; then :
49067  su_cv_func_ut_host_in_utmpx=yes
49068else
49069  su_cv_func_ut_host_in_utmpx=no
49070fi
49071rm -f core conftest.err conftest.$ac_objext \
49072    conftest$ac_exeext conftest.$ac_ext
49073fi
49074
49075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $su_cv_func_ut_host_in_utmpx" >&5
49076$as_echo "$su_cv_func_ut_host_in_utmpx" >&6; }
49077  if test $su_cv_func_ut_host_in_utmpx = yes; then
49078
49079$as_echo "#define HAVE_UTMPX_H 1" >>confdefs.h
49080
49081
49082$as_echo "#define HAVE_UT_HOST 1" >>confdefs.h
49083
49084  fi
49085fi
49086
49087
49088  for ac_func in sysctl
49089do :
49090  ac_fn_c_check_func "$LINENO" "sysctl" "ac_cv_func_sysctl"
49091if test "x$ac_cv_func_sysctl" = x""yes; then :
49092  cat >>confdefs.h <<_ACEOF
49093#define HAVE_SYSCTL 1
49094_ACEOF
49095
49096fi
49097done
49098
49099
49100  for ac_header in sys/sysctl.h
49101do :
49102  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default
49103     #if HAVE_SYS_PARAM_H
49104       #include <sys/param.h>
49105      #endif
49106"
49107if test "x$ac_cv_header_sys_sysctl_h" = x""yes; then :
49108  cat >>confdefs.h <<_ACEOF
49109#define HAVE_SYS_SYSCTL_H 1
49110_ACEOF
49111
49112fi
49113
49114done
49115
49116
49117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can get the system boot time" >&5
49118$as_echo_n "checking whether we can get the system boot time... " >&6; }
49119if test "${gnulib_cv_have_boot_time+set}" = set; then :
49120  $as_echo_n "(cached) " >&6
49121else
49122
49123      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49124/* end confdefs.h.  */
49125$ac_includes_default
49126#if HAVE_SYSCTL && HAVE_SYS_SYSCTL_H
49127# if HAVE_SYS_PARAM_H
49128#  include <sys/param.h> /* needed for OpenBSD 3.0 */
49129# endif
49130# include <sys/sysctl.h>
49131#endif
49132#if HAVE_UTMPX_H
49133# include <utmpx.h>
49134#elif HAVE_UTMP_H
49135# include <utmp.h>
49136#endif
49137#if HAVE_OS_H
49138# include <OS.h>
49139#endif
49140
49141int
49142main ()
49143{
49144
49145#if defined BOOT_TIME || (defined CTL_KERN && defined KERN_BOOTTIME) || HAVE_OS_H
49146/* your system *does* have the infrastructure to determine boot time */
49147#else
49148please_tell_us_how_to_determine_boot_time_on_your_system
49149#endif
49150
49151  ;
49152  return 0;
49153}
49154_ACEOF
49155if ac_fn_c_try_compile "$LINENO"; then :
49156  gnulib_cv_have_boot_time=yes
49157else
49158  gnulib_cv_have_boot_time=no
49159fi
49160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49161
49162fi
49163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnulib_cv_have_boot_time" >&5
49164$as_echo "$gnulib_cv_have_boot_time" >&6; }
49165  if test $gnulib_cv_have_boot_time = yes; then :
49166  {
49167  if test -z "$optional_bin_progs"; then
49168    optional_bin_progs=uptime
49169  else
49170    optional_bin_progs="$optional_bin_progs uptime"
49171  fi
49172}
49173fi
49174
49175
49176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX termios" >&5
49177$as_echo_n "checking POSIX termios... " >&6; }
49178if test "${ac_cv_sys_posix_termios+set}" = set; then :
49179  $as_echo_n "(cached) " >&6
49180else
49181  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49182/* end confdefs.h.  */
49183#include <sys/types.h>
49184#include <unistd.h>
49185#include <termios.h>
49186
49187int
49188main ()
49189{
49190/* SunOS 4.0.3 has termios.h but not the library calls.  */
49191   tcgetattr(0, 0);
49192  ;
49193  return 0;
49194}
49195_ACEOF
49196if ac_fn_c_try_link "$LINENO"; then :
49197  ac_cv_sys_posix_termios=yes
49198else
49199  ac_cv_sys_posix_termios=no
49200fi
49201rm -f core conftest.err conftest.$ac_objext \
49202    conftest$ac_exeext conftest.$ac_ext
49203fi
49204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_posix_termios" >&5
49205$as_echo "$ac_cv_sys_posix_termios" >&6; }
49206
49207
49208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
49209$as_echo_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h... " >&6; }
49210if test "${gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}" = set; then :
49211  $as_echo_n "(cached) " >&6
49212else
49213  gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
49214
49215  if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no; then
49216    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49217/* end confdefs.h.  */
49218#include <sys/types.h>
49219#     include <sys/ioctl.h>
49220#     ifdef TIOCGWINSZ
49221        yes
49222#     endif
49223
49224_ACEOF
49225if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49226  $EGREP "yes" >/dev/null 2>&1; then :
49227  gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
49228fi
49229rm -f conftest*
49230
49231  fi
49232
49233fi
49234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h" >&5
49235$as_echo "$gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h" >&6; }
49236  if test $gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
49237
49238$as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
49239
49240  fi
49241
49242
49243if test $ac_cv_sys_posix_termios = yes; then
49244  {
49245  if test -z "$optional_bin_progs"; then
49246    optional_bin_progs=stty
49247  else
49248    optional_bin_progs="$optional_bin_progs stty"
49249  fi
49250}
49251
49252  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h needs _XOPEN_SOURCE" >&5
49253$as_echo_n "checking whether termios.h needs _XOPEN_SOURCE... " >&6; }
49254  if test "${su_cv_sys_termios_needs_xopen_source+set}" = set; then :
49255  $as_echo_n "(cached) " >&6
49256else
49257  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49258/* end confdefs.h.  */
49259#include <termios.h>
49260#ifdef IUCLC
49261yes
49262#endif
49263_ACEOF
49264if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49265  $EGREP "yes" >/dev/null 2>&1; then :
49266  su_cv_sys_termios_needs_xopen_source=no
49267else
49268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49269/* end confdefs.h.  */
49270#define _XOPEN_SOURCE
49271#include <termios.h>
49272#ifdef IUCLC
49273yes
49274#endif
49275_ACEOF
49276if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49277  $EGREP "yes" >/dev/null 2>&1; then :
49278  su_cv_sys_termios_needs_xopen_source=yes
49279else
49280  su_cv_sys_termios_needs_xopen_source=no
49281fi
49282rm -f conftest*
49283
49284fi
49285rm -f conftest*
49286
49287fi
49288
49289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $su_cv_sys_termios_needs_xopen_source" >&5
49290$as_echo "$su_cv_sys_termios_needs_xopen_source" >&6; }
49291  test $su_cv_sys_termios_needs_xopen_source = yes &&
49292
49293$as_echo "#define TERMIOS_NEEDS_XOPEN_SOURCE 1" >>confdefs.h
49294
49295
49296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking c_line in struct termios" >&5
49297$as_echo_n "checking c_line in struct termios... " >&6; }
49298  if test "${su_cv_sys_c_line_in_termios+set}" = set; then :
49299  $as_echo_n "(cached) " >&6
49300else
49301  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49302/* end confdefs.h.  */
49303#if TERMIOS_NEEDS_XOPEN_SOURCE
49304#define _XOPEN_SOURCE
49305#endif
49306#include <sys/types.h>
49307#include <termios.h>
49308int
49309main ()
49310{
49311struct termios t; return !sizeof t.c_line;
49312  ;
49313  return 0;
49314}
49315_ACEOF
49316if ac_fn_c_try_link "$LINENO"; then :
49317  su_cv_sys_c_line_in_termios=yes
49318else
49319  su_cv_sys_c_line_in_termios=no
49320fi
49321rm -f core conftest.err conftest.$ac_objext \
49322    conftest$ac_exeext conftest.$ac_ext
49323fi
49324
49325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $su_cv_sys_c_line_in_termios" >&5
49326$as_echo "$su_cv_sys_c_line_in_termios" >&6; }
49327  test $su_cv_sys_c_line_in_termios = yes \
49328    &&
49329$as_echo "#define HAVE_C_LINE 1" >>confdefs.h
49330
49331fi
49332
49333# FIXME: note that this macro appears above, too.
49334# I'm leaving it here for now.  This whole thing needs to be modernized...
49335
49336   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether use of struct winsize requires sys/ptem.h" >&5
49337$as_echo_n "checking whether use of struct winsize requires sys/ptem.h... " >&6; }
49338if test "${gl_cv_sys_struct_winsize_needs_sys_ptem_h+set}" = set; then :
49339  $as_echo_n "(cached) " >&6
49340else
49341  gl_cv_sys_struct_winsize_needs_sys_ptem_h=yes
49342      if test $ac_cv_sys_posix_termios = yes; then
49343        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49344/* end confdefs.h.  */
49345#include <termios.h>
49346int
49347main ()
49348{
49349struct winsize x;
49350            if (sizeof x > 0) return 0;
49351  ;
49352  return 0;
49353}
49354_ACEOF
49355if ac_fn_c_try_compile "$LINENO"; then :
49356  gl_cv_sys_struct_winsize_needs_sys_ptem_h=no
49357fi
49358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49359      fi
49360      if test $gl_cv_sys_struct_winsize_needs_sys_ptem_h = yes; then
49361        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49362/* end confdefs.h.  */
49363#include <sys/ptem.h>
49364int
49365main ()
49366{
49367struct winsize x;
49368            if (sizeof x > 0) return 0;
49369  ;
49370  return 0;
49371}
49372_ACEOF
49373if ac_fn_c_try_compile "$LINENO"; then :
49374
49375else
49376  gl_cv_sys_struct_winsize_needs_sys_ptem_h=no
49377fi
49378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49379      fi
49380fi
49381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_winsize_needs_sys_ptem_h" >&5
49382$as_echo "$gl_cv_sys_struct_winsize_needs_sys_ptem_h" >&6; }
49383   if test $gl_cv_sys_struct_winsize_needs_sys_ptem_h = yes; then
49384
49385$as_echo "#define WINSIZE_IN_PTEM 1" >>confdefs.h
49386
49387   fi
49388
49389
49390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether use of TIOCGWINSZ requires termios.h" >&5
49391$as_echo_n "checking whether use of TIOCGWINSZ requires termios.h... " >&6; }
49392if test "${gl_cv_sys_tiocgwinsz_needs_termios_h+set}" = set; then :
49393  $as_echo_n "(cached) " >&6
49394else
49395  gl_cv_sys_tiocgwinsz_needs_termios_h=no
49396
49397   if test $ac_cv_sys_posix_termios = yes; then
49398     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49399/* end confdefs.h.  */
49400#include <sys/types.h>
49401#      include <termios.h>
49402#      ifdef TIOCGWINSZ
49403         yes
49404#      endif
49405
49406_ACEOF
49407if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49408  $EGREP "yes" >/dev/null 2>&1; then :
49409  gl_cv_sys_tiocgwinsz_needs_termios_h=yes
49410fi
49411rm -f conftest*
49412
49413   fi
49414
49415fi
49416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_tiocgwinsz_needs_termios_h" >&5
49417$as_echo "$gl_cv_sys_tiocgwinsz_needs_termios_h" >&6; }
49418
49419
49420if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no && \
49421   test $gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h = no; then
49422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking TIOCGWINSZ in sys/pty.h" >&5
49423$as_echo_n "checking TIOCGWINSZ in sys/pty.h... " >&6; }
49424  if test "${su_cv_sys_tiocgwinsz_in_sys_pty_h+set}" = set; then :
49425  $as_echo_n "(cached) " >&6
49426else
49427  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49428/* end confdefs.h.  */
49429#include <sys/types.h>
49430#ifdef WINSIZE_IN_PTEM
49431# include <sys/stream.h>
49432# include <sys/ptem.h>
49433#endif
49434#include <sys/ioctl.h>
49435#include <sys/tty.h>
49436#include <sys/pty.h>
49437int
49438main ()
49439{
49440int x = TIOCGWINSZ;
49441  ;
49442  return 0;
49443}
49444_ACEOF
49445if ac_fn_c_try_link "$LINENO"; then :
49446  su_cv_sys_tiocgwinsz_in_sys_pty_h=yes
49447else
49448  su_cv_sys_tiocgwinsz_in_sys_pty_h=no
49449fi
49450rm -f core conftest.err conftest.$ac_objext \
49451    conftest$ac_exeext conftest.$ac_ext
49452fi
49453
49454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $su_cv_sys_tiocgwinsz_in_sys_pty_h" >&5
49455$as_echo "$su_cv_sys_tiocgwinsz_in_sys_pty_h" >&6; }
49456
49457  test $su_cv_sys_tiocgwinsz_in_sys_pty_h = yes \
49458      &&
49459$as_echo "#define GWINSZ_IN_SYS_PTY 1" >>confdefs.h
49460
49461fi
49462
49463# For src/kill.c.
49464ac_fn_c_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default
49465#include <signal.h>
49466"
49467if test "x$ac_cv_have_decl_strsignal" = x""yes; then :
49468  ac_have_decl=1
49469else
49470  ac_have_decl=0
49471fi
49472
49473cat >>confdefs.h <<_ACEOF
49474#define HAVE_DECL_STRSIGNAL $ac_have_decl
49475_ACEOF
49476ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default
49477#include <signal.h>
49478"
49479if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
49480  ac_have_decl=1
49481else
49482  ac_have_decl=0
49483fi
49484
49485cat >>confdefs.h <<_ACEOF
49486#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
49487_ACEOF
49488ac_fn_c_check_decl "$LINENO" "_sys_siglist" "ac_cv_have_decl__sys_siglist" "$ac_includes_default
49489#include <signal.h>
49490"
49491if test "x$ac_cv_have_decl__sys_siglist" = x""yes; then :
49492  ac_have_decl=1
49493else
49494  ac_have_decl=0
49495fi
49496
49497cat >>confdefs.h <<_ACEOF
49498#define HAVE_DECL__SYS_SIGLIST $ac_have_decl
49499_ACEOF
49500ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default
49501#include <signal.h>
49502"
49503if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
49504  ac_have_decl=1
49505else
49506  ac_have_decl=0
49507fi
49508
49509cat >>confdefs.h <<_ACEOF
49510#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
49511_ACEOF
49512
49513
49514
49515
49516  # Check for libypsec.a on Dolphin M88K machines.
49517  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lypsec" >&5
49518$as_echo_n "checking for main in -lypsec... " >&6; }
49519if test "${ac_cv_lib_ypsec_main+set}" = set; then :
49520  $as_echo_n "(cached) " >&6
49521else
49522  ac_check_lib_save_LIBS=$LIBS
49523LIBS="-lypsec  $LIBS"
49524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49525/* end confdefs.h.  */
49526
49527
49528int
49529main ()
49530{
49531return main ();
49532  ;
49533  return 0;
49534}
49535_ACEOF
49536if ac_fn_c_try_link "$LINENO"; then :
49537  ac_cv_lib_ypsec_main=yes
49538else
49539  ac_cv_lib_ypsec_main=no
49540fi
49541rm -f core conftest.err conftest.$ac_objext \
49542    conftest$ac_exeext conftest.$ac_ext
49543LIBS=$ac_check_lib_save_LIBS
49544fi
49545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ypsec_main" >&5
49546$as_echo "$ac_cv_lib_ypsec_main" >&6; }
49547if test "x$ac_cv_lib_ypsec_main" = x""yes; then :
49548  cat >>confdefs.h <<_ACEOF
49549#define HAVE_LIBYPSEC 1
49550_ACEOF
49551
49552  LIBS="-lypsec $LIBS"
49553
49554fi
49555
49556
49557  # m88k running dgux 5.4 needs this
49558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lldgc" >&5
49559$as_echo_n "checking for main in -lldgc... " >&6; }
49560if test "${ac_cv_lib_ldgc_main+set}" = set; then :
49561  $as_echo_n "(cached) " >&6
49562else
49563  ac_check_lib_save_LIBS=$LIBS
49564LIBS="-lldgc  $LIBS"
49565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49566/* end confdefs.h.  */
49567
49568
49569int
49570main ()
49571{
49572return main ();
49573  ;
49574  return 0;
49575}
49576_ACEOF
49577if ac_fn_c_try_link "$LINENO"; then :
49578  ac_cv_lib_ldgc_main=yes
49579else
49580  ac_cv_lib_ldgc_main=no
49581fi
49582rm -f core conftest.err conftest.$ac_objext \
49583    conftest$ac_exeext conftest.$ac_ext
49584LIBS=$ac_check_lib_save_LIBS
49585fi
49586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldgc_main" >&5
49587$as_echo "$ac_cv_lib_ldgc_main" >&6; }
49588if test "x$ac_cv_lib_ldgc_main" = x""yes; then :
49589  cat >>confdefs.h <<_ACEOF
49590#define HAVE_LIBLDGC 1
49591_ACEOF
49592
49593  LIBS="-lldgc $LIBS"
49594
49595fi
49596
49597
49598  # The -lsun library is required for YP support on Irix-4.0.5 systems.
49599  # m88k/svr3 DolphinOS systems using YP need -lypsec for id.
49600  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing yp_match" >&5
49601$as_echo_n "checking for library containing yp_match... " >&6; }
49602if test "${ac_cv_search_yp_match+set}" = set; then :
49603  $as_echo_n "(cached) " >&6
49604else
49605  ac_func_search_save_LIBS=$LIBS
49606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49607/* end confdefs.h.  */
49608
49609/* Override any GCC internal prototype to avoid an error.
49610   Use char because int might match the return type of a GCC
49611   builtin and then its argument prototype would still apply.  */
49612#ifdef __cplusplus
49613extern "C"
49614#endif
49615char yp_match ();
49616int
49617main ()
49618{
49619return yp_match ();
49620  ;
49621  return 0;
49622}
49623_ACEOF
49624for ac_lib in '' sun ypsec; do
49625  if test -z "$ac_lib"; then
49626    ac_res="none required"
49627  else
49628    ac_res=-l$ac_lib
49629    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
49630  fi
49631  if ac_fn_c_try_link "$LINENO"; then :
49632  ac_cv_search_yp_match=$ac_res
49633fi
49634rm -f core conftest.err conftest.$ac_objext \
49635    conftest$ac_exeext
49636  if test "${ac_cv_search_yp_match+set}" = set; then :
49637  break
49638fi
49639done
49640if test "${ac_cv_search_yp_match+set}" = set; then :
49641
49642else
49643  ac_cv_search_yp_match=no
49644fi
49645rm conftest.$ac_ext
49646LIBS=$ac_func_search_save_LIBS
49647fi
49648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yp_match" >&5
49649$as_echo "$ac_cv_search_yp_match" >&6; }
49650ac_res=$ac_cv_search_yp_match
49651if test "$ac_res" != no; then :
49652  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
49653
49654fi
49655
49656
49657  # SysV needs -lsec, older versions of Linux need -lshadow for
49658  # shadow passwords.  UnixWare 7 needs -lgen.
49659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getspnam" >&5
49660$as_echo_n "checking for library containing getspnam... " >&6; }
49661if test "${ac_cv_search_getspnam+set}" = set; then :
49662  $as_echo_n "(cached) " >&6
49663else
49664  ac_func_search_save_LIBS=$LIBS
49665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49666/* end confdefs.h.  */
49667
49668/* Override any GCC internal prototype to avoid an error.
49669   Use char because int might match the return type of a GCC
49670   builtin and then its argument prototype would still apply.  */
49671#ifdef __cplusplus
49672extern "C"
49673#endif
49674char getspnam ();
49675int
49676main ()
49677{
49678return getspnam ();
49679  ;
49680  return 0;
49681}
49682_ACEOF
49683for ac_lib in '' shadow sec gen; do
49684  if test -z "$ac_lib"; then
49685    ac_res="none required"
49686  else
49687    ac_res=-l$ac_lib
49688    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
49689  fi
49690  if ac_fn_c_try_link "$LINENO"; then :
49691  ac_cv_search_getspnam=$ac_res
49692fi
49693rm -f core conftest.err conftest.$ac_objext \
49694    conftest$ac_exeext
49695  if test "${ac_cv_search_getspnam+set}" = set; then :
49696  break
49697fi
49698done
49699if test "${ac_cv_search_getspnam+set}" = set; then :
49700
49701else
49702  ac_cv_search_getspnam=no
49703fi
49704rm conftest.$ac_ext
49705LIBS=$ac_func_search_save_LIBS
49706fi
49707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getspnam" >&5
49708$as_echo "$ac_cv_search_getspnam" >&6; }
49709ac_res=$ac_cv_search_getspnam
49710if test "$ac_res" != no; then :
49711  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
49712
49713fi
49714
49715
49716  for ac_header in shadow.h
49717do :
49718  ac_fn_c_check_header_mongrel "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default"
49719if test "x$ac_cv_header_shadow_h" = x""yes; then :
49720  cat >>confdefs.h <<_ACEOF
49721#define HAVE_SHADOW_H 1
49722_ACEOF
49723
49724fi
49725
49726done
49727
49728
49729  # Requirements for su.c.
49730  shadow_includes="\
49731$ac_includes_default
49732#if HAVE_SHADOW_H
49733# include <shadow.h>
49734#endif
49735"
49736  ac_fn_c_check_member "$LINENO" "struct spwd" "sp_pwdp" "ac_cv_member_struct_spwd_sp_pwdp" "$shadow_includes
49737"
49738if test "x$ac_cv_member_struct_spwd_sp_pwdp" = x""yes; then :
49739
49740cat >>confdefs.h <<_ACEOF
49741#define HAVE_STRUCT_SPWD_SP_PWDP 1
49742_ACEOF
49743
49744
49745fi
49746
49747  for ac_func in getspnam
49748do :
49749  ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
49750if test "x$ac_cv_func_getspnam" = x""yes; then :
49751  cat >>confdefs.h <<_ACEOF
49752#define HAVE_GETSPNAM 1
49753_ACEOF
49754
49755fi
49756done
49757
49758
49759  # SCO-ODT-3.0 is reported to need -lufc for crypt.
49760  # NetBSD needs -lcrypt for crypt.
49761  LIB_CRYPT=
49762  cu_saved_libs="$LIBS"
49763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
49764$as_echo_n "checking for library containing crypt... " >&6; }
49765if test "${ac_cv_search_crypt+set}" = set; then :
49766  $as_echo_n "(cached) " >&6
49767else
49768  ac_func_search_save_LIBS=$LIBS
49769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49770/* end confdefs.h.  */
49771
49772/* Override any GCC internal prototype to avoid an error.
49773   Use char because int might match the return type of a GCC
49774   builtin and then its argument prototype would still apply.  */
49775#ifdef __cplusplus
49776extern "C"
49777#endif
49778char crypt ();
49779int
49780main ()
49781{
49782return crypt ();
49783  ;
49784  return 0;
49785}
49786_ACEOF
49787for ac_lib in '' ufc crypt; do
49788  if test -z "$ac_lib"; then
49789    ac_res="none required"
49790  else
49791    ac_res=-l$ac_lib
49792    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
49793  fi
49794  if ac_fn_c_try_link "$LINENO"; then :
49795  ac_cv_search_crypt=$ac_res
49796fi
49797rm -f core conftest.err conftest.$ac_objext \
49798    conftest$ac_exeext
49799  if test "${ac_cv_search_crypt+set}" = set; then :
49800  break
49801fi
49802done
49803if test "${ac_cv_search_crypt+set}" = set; then :
49804
49805else
49806  ac_cv_search_crypt=no
49807fi
49808rm conftest.$ac_ext
49809LIBS=$ac_func_search_save_LIBS
49810fi
49811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
49812$as_echo "$ac_cv_search_crypt" >&6; }
49813ac_res=$ac_cv_search_crypt
49814if test "$ac_res" != no; then :
49815  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
49816  test "$ac_cv_search_crypt" = "none required" ||
49817                  LIB_CRYPT="$ac_cv_search_crypt"
49818fi
49819
49820  LIBS="$cu_saved_libs"
49821
49822
49823
49824  LIB_GMP=
49825
49826
49827
49828# Check whether --with-gmp was given.
49829if test "${with_gmp+set}" = set; then :
49830  withval=$with_gmp; cu_use_gmp=$withval
49831else
49832  cu_use_gmp=auto
49833fi
49834
49835
49836  if test $cu_use_gmp != no; then
49837    cu_saved_libs=$LIBS
49838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing __gmpz_init" >&5
49839$as_echo_n "checking for library containing __gmpz_init... " >&6; }
49840if test "${ac_cv_search___gmpz_init+set}" = set; then :
49841  $as_echo_n "(cached) " >&6
49842else
49843  ac_func_search_save_LIBS=$LIBS
49844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49845/* end confdefs.h.  */
49846
49847/* Override any GCC internal prototype to avoid an error.
49848   Use char because int might match the return type of a GCC
49849   builtin and then its argument prototype would still apply.  */
49850#ifdef __cplusplus
49851extern "C"
49852#endif
49853char __gmpz_init ();
49854int
49855main ()
49856{
49857return __gmpz_init ();
49858  ;
49859  return 0;
49860}
49861_ACEOF
49862for ac_lib in '' gmp; do
49863  if test -z "$ac_lib"; then
49864    ac_res="none required"
49865  else
49866    ac_res=-l$ac_lib
49867    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
49868  fi
49869  if ac_fn_c_try_link "$LINENO"; then :
49870  ac_cv_search___gmpz_init=$ac_res
49871fi
49872rm -f core conftest.err conftest.$ac_objext \
49873    conftest$ac_exeext
49874  if test "${ac_cv_search___gmpz_init+set}" = set; then :
49875  break
49876fi
49877done
49878if test "${ac_cv_search___gmpz_init+set}" = set; then :
49879
49880else
49881  ac_cv_search___gmpz_init=no
49882fi
49883rm conftest.$ac_ext
49884LIBS=$ac_func_search_save_LIBS
49885fi
49886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search___gmpz_init" >&5
49887$as_echo "$ac_cv_search___gmpz_init" >&6; }
49888ac_res=$ac_cv_search___gmpz_init
49889if test "$ac_res" != no; then :
49890  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
49891  test "$ac_cv_search___gmpz_init" = "none required" ||
49892       {
49893        LIB_GMP=$ac_cv_search___gmpz_init
49894
49895$as_echo "#define HAVE_GMP 1" >>confdefs.h
49896
49897       }
49898else
49899  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libgmp development library was not found or not usable." >&5
49900$as_echo "$as_me: WARNING: libgmp development library was not found or not usable." >&2;}
49901       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU coreutils will be built without GMP support." >&5
49902$as_echo "$as_me: WARNING: GNU coreutils will be built without GMP support." >&2;}
49903fi
49904
49905    LIBS=$cu_saved_libs
49906  fi
49907
49908
49909# Build df only if there's a point to it.
49910if test $gl_cv_list_mounted_fs = yes && test $gl_cv_fs_space = yes; then
49911  {
49912  if test -z "$optional_bin_progs"; then
49913    optional_bin_progs=df
49914  else
49915    optional_bin_progs="$optional_bin_progs df"
49916  fi
49917}
49918fi
49919
49920# Limit stdbuf to ELF systems with GCC
49921optional_pkglib_progs=
49922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is an ELF system" >&5
49923$as_echo_n "checking whether this is an ELF system... " >&6; }
49924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49925/* end confdefs.h.  */
49926#if __ELF__
49927yes
49928#endif
49929_ACEOF
49930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49931  $EGREP "yes" >/dev/null 2>&1; then :
49932  elf_sys=yes
49933else
49934  elf_sys=no
49935fi
49936rm -f conftest*
49937
49938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $elf_sys" >&5
49939$as_echo "$elf_sys" >&6; }
49940if test "$elf_sys" = "yes" && \
49941   test "$GCC" = "yes"; then
49942  {
49943  if test -z "$optional_bin_progs"; then
49944    optional_bin_progs=stdbuf
49945  else
49946    optional_bin_progs="$optional_bin_progs stdbuf"
49947  fi
49948}
49949  {
49950  if test -z "$optional_pkglib_progs"; then
49951    optional_pkglib_progs=libstdbuf.so
49952  else
49953    optional_pkglib_progs="$optional_pkglib_progs libstdbuf.so"
49954  fi
49955}
49956fi
49957
49958############################################################################
49959mk="$srcdir/src/Makefile.am"
49960# Extract all literal names from the definition of $(EXTRA_PROGRAMS)
49961# in $mk but don't expand the variable references.
49962# Append each literal name to $optional_bin_progs.
49963v=EXTRA_PROGRAMS
49964for gl_i in `sed -n '/^'$v' =/,/[^\]$/p' $mk \
49965    | sed 's/^  *//;/^\$.*/d;/^'$v' =/d' \
49966    | tr -s '\\015\\012\\\\' '   '`; do
49967  {
49968  if test -z "$optional_bin_progs"; then
49969    optional_bin_progs=$gl_i
49970  else
49971    optional_bin_progs="$optional_bin_progs $gl_i"
49972  fi
49973}
49974done
49975
49976# As above, extract literal names from the definition of $(no_install__progs)
49977# in $mk but don't expand the variable references.
49978v=no_install__progs
49979t=`sed -n '/^'$v' =/,/[^\]$/p' $mk \
49980    | sed 's/^  *//;/^\$.*/d;/^'$v' =/d' \
49981    | tr -s '\\015\\012\\\\' '   '`
49982# Remove any trailing space.
49983no_install_progs_default=`echo "$t"|sed 's/ $//'`
49984
49985# Unfortunately, due to the way autoconf's AS_HELP_STRING works, the list
49986# of default-not-installed programs, "arch hostname su", must appear in two
49987# places: in this file below, and in $mk.  Using "$no_install_progs_default"
49988# below cannot work.  And we can't substitute the names into $mk because
49989# automake needs the literals, too.
49990# The compromise is to ensure that the space-separated list extracted
49991# above matches the literal 2nd argument below.
49992c="$srcdir/configure.ac"
49993re='^g''l_INCLUDE_EXCLUDE_PROG(.* \[\(.*\)\])'
49994t=`sed -n '/'"$re"'/{s/'"$re"'/\1/;s/,/ /gp
49995}' $c`
49996case $t in
49997  $no_install_progs_default) ;;
49998  *) { as_fn_set_status 1
49999as_fn_error "internal error: g'l_INCLUDE_EXCLUDE_PROG's 2nd arg, $t,
50000                   does not match the list of default-not-installed programs
50001                   ($no_install_progs_default) also recorded in $mk" "$LINENO" 5; } ;;
50002esac
50003
50004# Given the name of a variable containing a space-separated list of
50005# install-by-default programs and the actual list do-not-install-by-default
50006# programs, modify the former variable to reflect any "do-install" and
50007# "don't-install" requests.
50008# I.e., add any program name specified via --enable-install-program=..., and
50009# remove any program name specified via --enable-no-install-program=...
50010# Note how the second argument below is a literal, with "," separators.
50011# That is required due to the way the macro works, and since the
50012# corresponding ./configure option argument is comma-separated on input.
50013{
50014  gl_no_install_progs_default=`echo 'arch,hostname,su'|sed 's/,/ /g'`
50015  # Check whether --enable-install-program was given.
50016if test "${enable_install_program+set}" = set; then :
50017  enableval=$enable_install_program; gl_do_install_prog=$enableval
50018else
50019  gl_do_install_prog=
50020
50021fi
50022
50023
50024  # If you want to refrain from installing programs A and B,
50025  # use --enable-no-install-program=A,B
50026  # Check whether --enable-no-install-program was given.
50027if test "${enable_no_install_program+set}" = set; then :
50028  enableval=$enable_no_install_program; gl_no_install_prog=$enableval
50029else
50030  gl_no_install_prog=
50031
50032fi
50033
50034
50035  # Convert to space separated lists.
50036  gl_do_install_prog=`echo "$gl_do_install_prog"|tr -s , ' '`
50037  gl_no_install_prog=`echo "$gl_no_install_prog"|tr -s , ' '`
50038
50039  # For each not-to-be-installed program name, ensure that it's a
50040  # valid name, remove it from the list of programs to build/install,
50041  # as well as from the list of man pages to install.
50042  for gl_i in $gl_no_install_prog; do
50043
50044    # Fail upon a request to install and not-install the same program.
50045    case " $gl_do_install_prog " in
50046      *" $gl_i "*) as_fn_error "'$gl_i' is both included and excluded" "$LINENO" 5 ;;
50047    esac
50048
50049    gl_msg=
50050    # Warn about a request not to install a program that is not being
50051    # built (which may be because the systems lacks a required interface).
50052    case " $optional_bin_progs " in
50053      *" $gl_i "*) {
50054  optional_bin_progs=`for gl_rem_i in $optional_bin_progs; do
50055        test "$gl_rem_i" = "$gl_i" || echo "$gl_rem_i"
50056      done | tr '\012' ' ' | sed 's/ $//'; echo`
50057} ;;
50058      *) gl_msg="'$gl_i' is already not being installed" ;;
50059    esac
50060
50061    if test "$gl_msg" = ''; then
50062      # Warn about a request not to install a program that is
50063      # already on the default-no-install list.
50064      case " $gl_no_install_progs_default " in
50065        *" $gl_i "*) gl_msg="by default, '$gl_i' is not installed" ;;
50066      esac
50067    fi
50068
50069    test "$gl_msg" != '' && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $gl_msg" >&5
50070$as_echo "$as_me: WARNING: $gl_msg" >&2;}
50071  done
50072
50073  for gl_i in $gl_do_install_prog; do
50074    case " $gl_no_install_progs_default " in
50075      *" $gl_i "*) {
50076  if test -z "$optional_bin_progs"; then
50077    optional_bin_progs=$gl_i
50078  else
50079    optional_bin_progs="$optional_bin_progs $gl_i"
50080  fi
50081} ;;
50082      *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$gl_i' is not an optionally-installable program" >&5
50083$as_echo "$as_me: WARNING: '$gl_i' is not an optionally-installable program" >&2;} ;;
50084    esac
50085  done
50086}
50087
50088# Set INSTALL_SU if su installation has been requested via
50089# --enable-install-program=su.
50090
50091case " $optional_bin_progs " in
50092  *' su '*) INSTALL_SU=yes ;;
50093  *)        INSTALL_SU=no ;;
50094esac
50095
50096MAN=`echo "$optional_bin_progs "|sed 's/ /.1 /g;s/ $//'|tr -d '\\015\\012'`
50097
50098# Change ginstall.1 to "install.h" in $MAN.
50099MAN=`for m in $MAN; do test $m = ginstall.1 && m=install.1; echo $m; done \
50100  | tr '\015\012' '  '; echo`
50101
50102# Remove [.1, since writing a portable rule for it in man/Makefile.am
50103# is not practical.  The sed LHS below uses the autoconf quadrigraph
50104# representing '['.
50105MAN=`echo "$MAN"|sed 's/\[\.1//'`
50106
50107OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'`
50108
50109OPTIONAL_PKGLIB_PROGS=`echo "$optional_pkglib_progs " | sed 's/ $//'`
50110
50111NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
50112
50113
50114 if test "$cross_compiling" = yes; then
50115  CROSS_COMPILING_TRUE=
50116  CROSS_COMPILING_FALSE='#'
50117else
50118  CROSS_COMPILING_TRUE='#'
50119  CROSS_COMPILING_FALSE=
50120fi
50121
50122
50123# Arrange to rerun configure whenever the file, src/Makefile.am,
50124# containing the list of program names changes.
50125CONFIG_STATUS_DEPENDENCIES='$(top_srcdir)/src/Makefile.am'
50126
50127############################################################################
50128
50129# As long as "grep 'PRI[diouxX]' po/*.pot" reports matches in
50130# translatable strings, we must use need-formatstring-macros here.
50131
50132  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
50133$as_echo_n "checking whether NLS is requested... " >&6; }
50134    # Check whether --enable-nls was given.
50135if test "${enable_nls+set}" = set; then :
50136  enableval=$enable_nls; USE_NLS=$enableval
50137else
50138  USE_NLS=yes
50139fi
50140
50141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
50142$as_echo "$USE_NLS" >&6; }
50143
50144
50145
50146
50147      GETTEXT_MACRO_VERSION=0.17
50148
50149
50150
50151
50152# Prepare PATH_SEPARATOR.
50153# The user is always right.
50154if test "${PATH_SEPARATOR+set}" != set; then
50155  echo "#! /bin/sh" >conf$$.sh
50156  echo  "exit 0"   >>conf$$.sh
50157  chmod +x conf$$.sh
50158  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
50159    PATH_SEPARATOR=';'
50160  else
50161    PATH_SEPARATOR=:
50162  fi
50163  rm -f conf$$.sh
50164fi
50165
50166# Find out how to test for executable files. Don't use a zero-byte file,
50167# as systems may use methods other than mode bits to determine executability.
50168cat >conf$$.file <<_ASEOF
50169#! /bin/sh
50170exit 0
50171_ASEOF
50172chmod +x conf$$.file
50173if test -x conf$$.file >/dev/null 2>&1; then
50174  ac_executable_p="test -x"
50175else
50176  ac_executable_p="test -f"
50177fi
50178rm -f conf$$.file
50179
50180# Extract the first word of "msgfmt", so it can be a program name with args.
50181set dummy msgfmt; ac_word=$2
50182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50183$as_echo_n "checking for $ac_word... " >&6; }
50184if test "${ac_cv_path_MSGFMT+set}" = set; then :
50185  $as_echo_n "(cached) " >&6
50186else
50187  case "$MSGFMT" in
50188  [\\/]* | ?:[\\/]*)
50189    ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
50190    ;;
50191  *)
50192    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
50193    for ac_dir in $PATH; do
50194      IFS="$ac_save_IFS"
50195      test -z "$ac_dir" && ac_dir=.
50196      for ac_exec_ext in '' $ac_executable_extensions; do
50197        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
50198          echo "$as_me: trying $ac_dir/$ac_word..." >&5
50199          if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
50200     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
50201            ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
50202            break 2
50203          fi
50204        fi
50205      done
50206    done
50207    IFS="$ac_save_IFS"
50208  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
50209    ;;
50210esac
50211fi
50212MSGFMT="$ac_cv_path_MSGFMT"
50213if test "$MSGFMT" != ":"; then
50214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
50215$as_echo "$MSGFMT" >&6; }
50216else
50217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50218$as_echo "no" >&6; }
50219fi
50220
50221  # Extract the first word of "gmsgfmt", so it can be a program name with args.
50222set dummy gmsgfmt; ac_word=$2
50223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50224$as_echo_n "checking for $ac_word... " >&6; }
50225if test "${ac_cv_path_GMSGFMT+set}" = set; then :
50226  $as_echo_n "(cached) " >&6
50227else
50228  case $GMSGFMT in
50229  [\\/]* | ?:[\\/]*)
50230  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
50231  ;;
50232  *)
50233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50234for as_dir in $PATH
50235do
50236  IFS=$as_save_IFS
50237  test -z "$as_dir" && as_dir=.
50238    for ac_exec_ext in '' $ac_executable_extensions; do
50239  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
50240    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
50241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50242    break 2
50243  fi
50244done
50245  done
50246IFS=$as_save_IFS
50247
50248  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
50249  ;;
50250esac
50251fi
50252GMSGFMT=$ac_cv_path_GMSGFMT
50253if test -n "$GMSGFMT"; then
50254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
50255$as_echo "$GMSGFMT" >&6; }
50256else
50257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50258$as_echo "no" >&6; }
50259fi
50260
50261
50262
50263    case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
50264    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
50265    *) MSGFMT_015=$MSGFMT ;;
50266  esac
50267
50268  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
50269    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
50270    *) GMSGFMT_015=$GMSGFMT ;;
50271  esac
50272
50273
50274
50275# Prepare PATH_SEPARATOR.
50276# The user is always right.
50277if test "${PATH_SEPARATOR+set}" != set; then
50278  echo "#! /bin/sh" >conf$$.sh
50279  echo  "exit 0"   >>conf$$.sh
50280  chmod +x conf$$.sh
50281  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
50282    PATH_SEPARATOR=';'
50283  else
50284    PATH_SEPARATOR=:
50285  fi
50286  rm -f conf$$.sh
50287fi
50288
50289# Find out how to test for executable files. Don't use a zero-byte file,
50290# as systems may use methods other than mode bits to determine executability.
50291cat >conf$$.file <<_ASEOF
50292#! /bin/sh
50293exit 0
50294_ASEOF
50295chmod +x conf$$.file
50296if test -x conf$$.file >/dev/null 2>&1; then
50297  ac_executable_p="test -x"
50298else
50299  ac_executable_p="test -f"
50300fi
50301rm -f conf$$.file
50302
50303# Extract the first word of "xgettext", so it can be a program name with args.
50304set dummy xgettext; ac_word=$2
50305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50306$as_echo_n "checking for $ac_word... " >&6; }
50307if test "${ac_cv_path_XGETTEXT+set}" = set; then :
50308  $as_echo_n "(cached) " >&6
50309else
50310  case "$XGETTEXT" in
50311  [\\/]* | ?:[\\/]*)
50312    ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
50313    ;;
50314  *)
50315    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
50316    for ac_dir in $PATH; do
50317      IFS="$ac_save_IFS"
50318      test -z "$ac_dir" && ac_dir=.
50319      for ac_exec_ext in '' $ac_executable_extensions; do
50320        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
50321          echo "$as_me: trying $ac_dir/$ac_word..." >&5
50322          if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
50323     (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
50324            ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
50325            break 2
50326          fi
50327        fi
50328      done
50329    done
50330    IFS="$ac_save_IFS"
50331  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
50332    ;;
50333esac
50334fi
50335XGETTEXT="$ac_cv_path_XGETTEXT"
50336if test "$XGETTEXT" != ":"; then
50337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
50338$as_echo "$XGETTEXT" >&6; }
50339else
50340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50341$as_echo "no" >&6; }
50342fi
50343
50344    rm -f messages.po
50345
50346    case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
50347    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
50348    *) XGETTEXT_015=$XGETTEXT ;;
50349  esac
50350
50351
50352
50353# Prepare PATH_SEPARATOR.
50354# The user is always right.
50355if test "${PATH_SEPARATOR+set}" != set; then
50356  echo "#! /bin/sh" >conf$$.sh
50357  echo  "exit 0"   >>conf$$.sh
50358  chmod +x conf$$.sh
50359  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
50360    PATH_SEPARATOR=';'
50361  else
50362    PATH_SEPARATOR=:
50363  fi
50364  rm -f conf$$.sh
50365fi
50366
50367# Find out how to test for executable files. Don't use a zero-byte file,
50368# as systems may use methods other than mode bits to determine executability.
50369cat >conf$$.file <<_ASEOF
50370#! /bin/sh
50371exit 0
50372_ASEOF
50373chmod +x conf$$.file
50374if test -x conf$$.file >/dev/null 2>&1; then
50375  ac_executable_p="test -x"
50376else
50377  ac_executable_p="test -f"
50378fi
50379rm -f conf$$.file
50380
50381# Extract the first word of "msgmerge", so it can be a program name with args.
50382set dummy msgmerge; ac_word=$2
50383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50384$as_echo_n "checking for $ac_word... " >&6; }
50385if test "${ac_cv_path_MSGMERGE+set}" = set; then :
50386  $as_echo_n "(cached) " >&6
50387else
50388  case "$MSGMERGE" in
50389  [\\/]* | ?:[\\/]*)
50390    ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
50391    ;;
50392  *)
50393    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
50394    for ac_dir in $PATH; do
50395      IFS="$ac_save_IFS"
50396      test -z "$ac_dir" && ac_dir=.
50397      for ac_exec_ext in '' $ac_executable_extensions; do
50398        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
50399          echo "$as_me: trying $ac_dir/$ac_word..." >&5
50400          if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
50401            ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
50402            break 2
50403          fi
50404        fi
50405      done
50406    done
50407    IFS="$ac_save_IFS"
50408  test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
50409    ;;
50410esac
50411fi
50412MSGMERGE="$ac_cv_path_MSGMERGE"
50413if test "$MSGMERGE" != ":"; then
50414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
50415$as_echo "$MSGMERGE" >&6; }
50416else
50417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50418$as_echo "no" >&6; }
50419fi
50420
50421
50422        test -n "$localedir" || localedir='${datadir}/locale'
50423
50424
50425    test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
50426
50427
50428  ac_config_commands="$ac_config_commands po-directories"
50429
50430
50431
50432
50433
50434
50435
50436
50437
50438
50439
50440
50441
50442
50443
50444
50445
50446
50447
50448
50449
50450
50451
50452
50453
50454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
50455$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
50456if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then :
50457  $as_echo_n "(cached) " >&6
50458else
50459  gt_save_LIBS="$LIBS"
50460     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
50461     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50462/* end confdefs.h.  */
50463#include <CoreFoundation/CFPreferences.h>
50464int
50465main ()
50466{
50467CFPreferencesCopyAppValue(NULL, NULL)
50468  ;
50469  return 0;
50470}
50471_ACEOF
50472if ac_fn_c_try_link "$LINENO"; then :
50473  gt_cv_func_CFPreferencesCopyAppValue=yes
50474else
50475  gt_cv_func_CFPreferencesCopyAppValue=no
50476fi
50477rm -f core conftest.err conftest.$ac_objext \
50478    conftest$ac_exeext conftest.$ac_ext
50479     LIBS="$gt_save_LIBS"
50480fi
50481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
50482$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
50483  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
50484
50485$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
50486
50487  fi
50488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
50489$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
50490if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then :
50491  $as_echo_n "(cached) " >&6
50492else
50493  gt_save_LIBS="$LIBS"
50494     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
50495     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50496/* end confdefs.h.  */
50497#include <CoreFoundation/CFLocale.h>
50498int
50499main ()
50500{
50501CFLocaleCopyCurrent();
50502  ;
50503  return 0;
50504}
50505_ACEOF
50506if ac_fn_c_try_link "$LINENO"; then :
50507  gt_cv_func_CFLocaleCopyCurrent=yes
50508else
50509  gt_cv_func_CFLocaleCopyCurrent=no
50510fi
50511rm -f core conftest.err conftest.$ac_objext \
50512    conftest$ac_exeext conftest.$ac_ext
50513     LIBS="$gt_save_LIBS"
50514fi
50515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
50516$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
50517  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
50518
50519$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
50520
50521  fi
50522  INTL_MACOSX_LIBS=
50523  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
50524    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
50525  fi
50526
50527
50528
50529
50530
50531
50532  LIBINTL=
50533  LTLIBINTL=
50534  POSUB=
50535
50536    case " $gt_needs " in
50537    *" need-formatstring-macros "*) gt_api_version=3 ;;
50538    *" need-ngettext "*) gt_api_version=2 ;;
50539    *) gt_api_version=1 ;;
50540  esac
50541  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
50542  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
50543
50544    if test "$USE_NLS" = "yes"; then
50545    gt_use_preinstalled_gnugettext=no
50546
50547
50548        if test $gt_api_version -ge 3; then
50549          gt_revision_test_code='
50550#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
50551#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
50552#endif
50553typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
50554'
50555        else
50556          gt_revision_test_code=
50557        fi
50558        if test $gt_api_version -ge 2; then
50559          gt_expression_test_code=' + * ngettext ("", "", 0)'
50560        else
50561          gt_expression_test_code=
50562        fi
50563
50564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
50565$as_echo_n "checking for GNU gettext in libc... " >&6; }
50566if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then :
50567  $as_echo_n "(cached) " >&6
50568else
50569  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50570/* end confdefs.h.  */
50571#include <libintl.h>
50572$gt_revision_test_code
50573extern int _nl_msg_cat_cntr;
50574extern int *_nl_domain_bindings;
50575int
50576main ()
50577{
50578bindtextdomain ("", "");
50579return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
50580  ;
50581  return 0;
50582}
50583_ACEOF
50584if ac_fn_c_try_link "$LINENO"; then :
50585  eval "$gt_func_gnugettext_libc=yes"
50586else
50587  eval "$gt_func_gnugettext_libc=no"
50588fi
50589rm -f core conftest.err conftest.$ac_objext \
50590    conftest$ac_exeext conftest.$ac_ext
50591fi
50592eval ac_res=\$$gt_func_gnugettext_libc
50593	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
50594$as_echo "$ac_res" >&6; }
50595
50596        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
50597
50598
50599
50600
50601
50602          am_save_CPPFLAGS="$CPPFLAGS"
50603
50604  for element in $INCICONV; do
50605    haveit=
50606    for x in $CPPFLAGS; do
50607
50608  acl_save_prefix="$prefix"
50609  prefix="$acl_final_prefix"
50610  acl_save_exec_prefix="$exec_prefix"
50611  exec_prefix="$acl_final_exec_prefix"
50612  eval x=\"$x\"
50613  exec_prefix="$acl_save_exec_prefix"
50614  prefix="$acl_save_prefix"
50615
50616      if test "X$x" = "X$element"; then
50617        haveit=yes
50618        break
50619      fi
50620    done
50621    if test -z "$haveit"; then
50622      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
50623    fi
50624  done
50625
50626
50627  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
50628$as_echo_n "checking for iconv... " >&6; }
50629if test "${am_cv_func_iconv+set}" = set; then :
50630  $as_echo_n "(cached) " >&6
50631else
50632
50633    am_cv_func_iconv="no, consider installing GNU libiconv"
50634    am_cv_lib_iconv=no
50635    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50636/* end confdefs.h.  */
50637#include <stdlib.h>
50638#include <iconv.h>
50639int
50640main ()
50641{
50642iconv_t cd = iconv_open("","");
50643       iconv(cd,NULL,NULL,NULL,NULL);
50644       iconv_close(cd);
50645  ;
50646  return 0;
50647}
50648_ACEOF
50649if ac_fn_c_try_link "$LINENO"; then :
50650  am_cv_func_iconv=yes
50651fi
50652rm -f core conftest.err conftest.$ac_objext \
50653    conftest$ac_exeext conftest.$ac_ext
50654    if test "$am_cv_func_iconv" != yes; then
50655      am_save_LIBS="$LIBS"
50656      LIBS="$LIBS $LIBICONV"
50657      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50658/* end confdefs.h.  */
50659#include <stdlib.h>
50660#include <iconv.h>
50661int
50662main ()
50663{
50664iconv_t cd = iconv_open("","");
50665         iconv(cd,NULL,NULL,NULL,NULL);
50666         iconv_close(cd);
50667  ;
50668  return 0;
50669}
50670_ACEOF
50671if ac_fn_c_try_link "$LINENO"; then :
50672  am_cv_lib_iconv=yes
50673        am_cv_func_iconv=yes
50674fi
50675rm -f core conftest.err conftest.$ac_objext \
50676    conftest$ac_exeext conftest.$ac_ext
50677      LIBS="$am_save_LIBS"
50678    fi
50679
50680fi
50681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
50682$as_echo "$am_cv_func_iconv" >&6; }
50683  if test "$am_cv_func_iconv" = yes; then
50684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
50685$as_echo_n "checking for working iconv... " >&6; }
50686if test "${am_cv_func_iconv_works+set}" = set; then :
50687  $as_echo_n "(cached) " >&6
50688else
50689
50690            am_save_LIBS="$LIBS"
50691      if test $am_cv_lib_iconv = yes; then
50692        LIBS="$LIBS $LIBICONV"
50693      fi
50694      if test "$cross_compiling" = yes; then :
50695  case "$host_os" in
50696           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
50697           *)            am_cv_func_iconv_works="guessing yes" ;;
50698         esac
50699else
50700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50701/* end confdefs.h.  */
50702
50703#include <iconv.h>
50704#include <string.h>
50705int main ()
50706{
50707  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
50708     returns.  */
50709  {
50710    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
50711    if (cd_utf8_to_88591 != (iconv_t)(-1))
50712      {
50713        static const char input[] = "\342\202\254"; /* EURO SIGN */
50714        char buf[10];
50715        const char *inptr = input;
50716        size_t inbytesleft = strlen (input);
50717        char *outptr = buf;
50718        size_t outbytesleft = sizeof (buf);
50719        size_t res = iconv (cd_utf8_to_88591,
50720                            (char **) &inptr, &inbytesleft,
50721                            &outptr, &outbytesleft);
50722        if (res == 0)
50723          return 1;
50724      }
50725  }
50726  /* Test against Solaris 10 bug: Failures are not distinguishable from
50727     successful returns.  */
50728  {
50729    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
50730    if (cd_ascii_to_88591 != (iconv_t)(-1))
50731      {
50732        static const char input[] = "\263";
50733        char buf[10];
50734        const char *inptr = input;
50735        size_t inbytesleft = strlen (input);
50736        char *outptr = buf;
50737        size_t outbytesleft = sizeof (buf);
50738        size_t res = iconv (cd_ascii_to_88591,
50739                            (char **) &inptr, &inbytesleft,
50740                            &outptr, &outbytesleft);
50741        if (res == 0)
50742          return 1;
50743      }
50744  }
50745#if 0 /* This bug could be worked around by the caller.  */
50746  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
50747  {
50748    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
50749    if (cd_88591_to_utf8 != (iconv_t)(-1))
50750      {
50751        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
50752        char buf[50];
50753        const char *inptr = input;
50754        size_t inbytesleft = strlen (input);
50755        char *outptr = buf;
50756        size_t outbytesleft = sizeof (buf);
50757        size_t res = iconv (cd_88591_to_utf8,
50758                            (char **) &inptr, &inbytesleft,
50759                            &outptr, &outbytesleft);
50760        if ((int)res > 0)
50761          return 1;
50762      }
50763  }
50764#endif
50765  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
50766     provided.  */
50767  if (/* Try standardized names.  */
50768      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
50769      /* Try IRIX, OSF/1 names.  */
50770      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
50771      /* Try AIX names.  */
50772      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
50773      /* Try HP-UX names.  */
50774      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
50775    return 1;
50776  return 0;
50777}
50778_ACEOF
50779if ac_fn_c_try_run "$LINENO"; then :
50780  am_cv_func_iconv_works=yes
50781else
50782  am_cv_func_iconv_works=no
50783fi
50784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50785  conftest.$ac_objext conftest.beam conftest.$ac_ext
50786fi
50787
50788      LIBS="$am_save_LIBS"
50789
50790fi
50791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
50792$as_echo "$am_cv_func_iconv_works" >&6; }
50793    case "$am_cv_func_iconv_works" in
50794      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
50795      *)   am_func_iconv=yes ;;
50796    esac
50797  else
50798    am_func_iconv=no am_cv_lib_iconv=no
50799  fi
50800  if test "$am_func_iconv" = yes; then
50801
50802$as_echo "#define HAVE_ICONV 1" >>confdefs.h
50803
50804  fi
50805  if test "$am_cv_lib_iconv" = yes; then
50806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
50807$as_echo_n "checking how to link with libiconv... " >&6; }
50808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
50809$as_echo "$LIBICONV" >&6; }
50810  else
50811            CPPFLAGS="$am_save_CPPFLAGS"
50812    LIBICONV=
50813    LTLIBICONV=
50814  fi
50815
50816
50817
50818
50819
50820
50821
50822
50823
50824
50825
50826    use_additional=yes
50827
50828  acl_save_prefix="$prefix"
50829  prefix="$acl_final_prefix"
50830  acl_save_exec_prefix="$exec_prefix"
50831  exec_prefix="$acl_final_exec_prefix"
50832
50833    eval additional_includedir=\"$includedir\"
50834    eval additional_libdir=\"$libdir\"
50835
50836  exec_prefix="$acl_save_exec_prefix"
50837  prefix="$acl_save_prefix"
50838
50839
50840# Check whether --with-libintl-prefix was given.
50841if test "${with_libintl_prefix+set}" = set; then :
50842  withval=$with_libintl_prefix;
50843    if test "X$withval" = "Xno"; then
50844      use_additional=no
50845    else
50846      if test "X$withval" = "X"; then
50847
50848  acl_save_prefix="$prefix"
50849  prefix="$acl_final_prefix"
50850  acl_save_exec_prefix="$exec_prefix"
50851  exec_prefix="$acl_final_exec_prefix"
50852
50853          eval additional_includedir=\"$includedir\"
50854          eval additional_libdir=\"$libdir\"
50855
50856  exec_prefix="$acl_save_exec_prefix"
50857  prefix="$acl_save_prefix"
50858
50859      else
50860        additional_includedir="$withval/include"
50861        additional_libdir="$withval/$acl_libdirstem"
50862        if test "$acl_libdirstem2" != "$acl_libdirstem" \
50863           && ! test -d "$withval/$acl_libdirstem"; then
50864          additional_libdir="$withval/$acl_libdirstem2"
50865        fi
50866      fi
50867    fi
50868
50869fi
50870
50871      LIBINTL=
50872  LTLIBINTL=
50873  INCINTL=
50874  LIBINTL_PREFIX=
50875      HAVE_LIBINTL=
50876  rpathdirs=
50877  ltrpathdirs=
50878  names_already_handled=
50879  names_next_round='intl '
50880  while test -n "$names_next_round"; do
50881    names_this_round="$names_next_round"
50882    names_next_round=
50883    for name in $names_this_round; do
50884      already_handled=
50885      for n in $names_already_handled; do
50886        if test "$n" = "$name"; then
50887          already_handled=yes
50888          break
50889        fi
50890      done
50891      if test -z "$already_handled"; then
50892        names_already_handled="$names_already_handled $name"
50893                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
50894        eval value=\"\$HAVE_LIB$uppername\"
50895        if test -n "$value"; then
50896          if test "$value" = yes; then
50897            eval value=\"\$LIB$uppername\"
50898            test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
50899            eval value=\"\$LTLIB$uppername\"
50900            test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
50901          else
50902                                    :
50903          fi
50904        else
50905                              found_dir=
50906          found_la=
50907          found_so=
50908          found_a=
50909          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
50910          if test -n "$acl_shlibext"; then
50911            shrext=".$acl_shlibext"             # typically: shrext=.so
50912          else
50913            shrext=
50914          fi
50915          if test $use_additional = yes; then
50916            dir="$additional_libdir"
50917                                    if test -n "$acl_shlibext"; then
50918              if test -f "$dir/$libname$shrext"; then
50919                found_dir="$dir"
50920                found_so="$dir/$libname$shrext"
50921              else
50922                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
50923                  ver=`(cd "$dir" && \
50924                        for f in "$libname$shrext".*; do echo "$f"; done \
50925                        | sed -e "s,^$libname$shrext\\\\.,," \
50926                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
50927                        | sed 1q ) 2>/dev/null`
50928                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
50929                    found_dir="$dir"
50930                    found_so="$dir/$libname$shrext.$ver"
50931                  fi
50932                else
50933                  eval library_names=\"$acl_library_names_spec\"
50934                  for f in $library_names; do
50935                    if test -f "$dir/$f"; then
50936                      found_dir="$dir"
50937                      found_so="$dir/$f"
50938                      break
50939                    fi
50940                  done
50941                fi
50942              fi
50943            fi
50944                        if test "X$found_dir" = "X"; then
50945              if test -f "$dir/$libname.$acl_libext"; then
50946                found_dir="$dir"
50947                found_a="$dir/$libname.$acl_libext"
50948              fi
50949            fi
50950            if test "X$found_dir" != "X"; then
50951              if test -f "$dir/$libname.la"; then
50952                found_la="$dir/$libname.la"
50953              fi
50954            fi
50955          fi
50956          if test "X$found_dir" = "X"; then
50957            for x in $LDFLAGS $LTLIBINTL; do
50958
50959  acl_save_prefix="$prefix"
50960  prefix="$acl_final_prefix"
50961  acl_save_exec_prefix="$exec_prefix"
50962  exec_prefix="$acl_final_exec_prefix"
50963  eval x=\"$x\"
50964  exec_prefix="$acl_save_exec_prefix"
50965  prefix="$acl_save_prefix"
50966
50967              case "$x" in
50968                -L*)
50969                  dir=`echo "X$x" | sed -e 's/^X-L//'`
50970                                    if test -n "$acl_shlibext"; then
50971                    if test -f "$dir/$libname$shrext"; then
50972                      found_dir="$dir"
50973                      found_so="$dir/$libname$shrext"
50974                    else
50975                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
50976                        ver=`(cd "$dir" && \
50977                              for f in "$libname$shrext".*; do echo "$f"; done \
50978                              | sed -e "s,^$libname$shrext\\\\.,," \
50979                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
50980                              | sed 1q ) 2>/dev/null`
50981                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
50982                          found_dir="$dir"
50983                          found_so="$dir/$libname$shrext.$ver"
50984                        fi
50985                      else
50986                        eval library_names=\"$acl_library_names_spec\"
50987                        for f in $library_names; do
50988                          if test -f "$dir/$f"; then
50989                            found_dir="$dir"
50990                            found_so="$dir/$f"
50991                            break
50992                          fi
50993                        done
50994                      fi
50995                    fi
50996                  fi
50997                                    if test "X$found_dir" = "X"; then
50998                    if test -f "$dir/$libname.$acl_libext"; then
50999                      found_dir="$dir"
51000                      found_a="$dir/$libname.$acl_libext"
51001                    fi
51002                  fi
51003                  if test "X$found_dir" != "X"; then
51004                    if test -f "$dir/$libname.la"; then
51005                      found_la="$dir/$libname.la"
51006                    fi
51007                  fi
51008                  ;;
51009              esac
51010              if test "X$found_dir" != "X"; then
51011                break
51012              fi
51013            done
51014          fi
51015          if test "X$found_dir" != "X"; then
51016                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
51017            if test "X$found_so" != "X"; then
51018                                                        if test "$enable_rpath" = no \
51019                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
51020                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
51021                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
51022              else
51023                                                                                haveit=
51024                for x in $ltrpathdirs; do
51025                  if test "X$x" = "X$found_dir"; then
51026                    haveit=yes
51027                    break
51028                  fi
51029                done
51030                if test -z "$haveit"; then
51031                  ltrpathdirs="$ltrpathdirs $found_dir"
51032                fi
51033                                if test "$acl_hardcode_direct" = yes; then
51034                                                      LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
51035                else
51036                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
51037                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
51038                                                            haveit=
51039                    for x in $rpathdirs; do
51040                      if test "X$x" = "X$found_dir"; then
51041                        haveit=yes
51042                        break
51043                      fi
51044                    done
51045                    if test -z "$haveit"; then
51046                      rpathdirs="$rpathdirs $found_dir"
51047                    fi
51048                  else
51049                                                                                haveit=
51050                    for x in $LDFLAGS $LIBINTL; do
51051
51052  acl_save_prefix="$prefix"
51053  prefix="$acl_final_prefix"
51054  acl_save_exec_prefix="$exec_prefix"
51055  exec_prefix="$acl_final_exec_prefix"
51056  eval x=\"$x\"
51057  exec_prefix="$acl_save_exec_prefix"
51058  prefix="$acl_save_prefix"
51059
51060                      if test "X$x" = "X-L$found_dir"; then
51061                        haveit=yes
51062                        break
51063                      fi
51064                    done
51065                    if test -z "$haveit"; then
51066                      LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
51067                    fi
51068                    if test "$acl_hardcode_minus_L" != no; then
51069                                                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
51070                    else
51071                                                                                                                                                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
51072                    fi
51073                  fi
51074                fi
51075              fi
51076            else
51077              if test "X$found_a" != "X"; then
51078                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
51079              else
51080                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
51081              fi
51082            fi
51083                        additional_includedir=
51084            case "$found_dir" in
51085              */$acl_libdirstem | */$acl_libdirstem/)
51086                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
51087                if test "$name" = 'intl'; then
51088                  LIBINTL_PREFIX="$basedir"
51089                fi
51090                additional_includedir="$basedir/include"
51091                ;;
51092              */$acl_libdirstem2 | */$acl_libdirstem2/)
51093                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
51094                if test "$name" = 'intl'; then
51095                  LIBINTL_PREFIX="$basedir"
51096                fi
51097                additional_includedir="$basedir/include"
51098                ;;
51099            esac
51100            if test "X$additional_includedir" != "X"; then
51101                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
51102                haveit=
51103                if test "X$additional_includedir" = "X/usr/local/include"; then
51104                  if test -n "$GCC"; then
51105                    case $host_os in
51106                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
51107                    esac
51108                  fi
51109                fi
51110                if test -z "$haveit"; then
51111                  for x in $CPPFLAGS $INCINTL; do
51112
51113  acl_save_prefix="$prefix"
51114  prefix="$acl_final_prefix"
51115  acl_save_exec_prefix="$exec_prefix"
51116  exec_prefix="$acl_final_exec_prefix"
51117  eval x=\"$x\"
51118  exec_prefix="$acl_save_exec_prefix"
51119  prefix="$acl_save_prefix"
51120
51121                    if test "X$x" = "X-I$additional_includedir"; then
51122                      haveit=yes
51123                      break
51124                    fi
51125                  done
51126                  if test -z "$haveit"; then
51127                    if test -d "$additional_includedir"; then
51128                                            INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
51129                    fi
51130                  fi
51131                fi
51132              fi
51133            fi
51134                        if test -n "$found_la"; then
51135                                                        save_libdir="$libdir"
51136              case "$found_la" in
51137                */* | *\\*) . "$found_la" ;;
51138                *) . "./$found_la" ;;
51139              esac
51140              libdir="$save_libdir"
51141                            for dep in $dependency_libs; do
51142                case "$dep" in
51143                  -L*)
51144                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
51145                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
51146                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
51147                      haveit=
51148                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
51149                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
51150                        if test -n "$GCC"; then
51151                          case $host_os in
51152                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
51153                          esac
51154                        fi
51155                      fi
51156                      if test -z "$haveit"; then
51157                        haveit=
51158                        for x in $LDFLAGS $LIBINTL; do
51159
51160  acl_save_prefix="$prefix"
51161  prefix="$acl_final_prefix"
51162  acl_save_exec_prefix="$exec_prefix"
51163  exec_prefix="$acl_final_exec_prefix"
51164  eval x=\"$x\"
51165  exec_prefix="$acl_save_exec_prefix"
51166  prefix="$acl_save_prefix"
51167
51168                          if test "X$x" = "X-L$additional_libdir"; then
51169                            haveit=yes
51170                            break
51171                          fi
51172                        done
51173                        if test -z "$haveit"; then
51174                          if test -d "$additional_libdir"; then
51175                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
51176                          fi
51177                        fi
51178                        haveit=
51179                        for x in $LDFLAGS $LTLIBINTL; do
51180
51181  acl_save_prefix="$prefix"
51182  prefix="$acl_final_prefix"
51183  acl_save_exec_prefix="$exec_prefix"
51184  exec_prefix="$acl_final_exec_prefix"
51185  eval x=\"$x\"
51186  exec_prefix="$acl_save_exec_prefix"
51187  prefix="$acl_save_prefix"
51188
51189                          if test "X$x" = "X-L$additional_libdir"; then
51190                            haveit=yes
51191                            break
51192                          fi
51193                        done
51194                        if test -z "$haveit"; then
51195                          if test -d "$additional_libdir"; then
51196                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
51197                          fi
51198                        fi
51199                      fi
51200                    fi
51201                    ;;
51202                  -R*)
51203                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
51204                    if test "$enable_rpath" != no; then
51205                                                                  haveit=
51206                      for x in $rpathdirs; do
51207                        if test "X$x" = "X$dir"; then
51208                          haveit=yes
51209                          break
51210                        fi
51211                      done
51212                      if test -z "$haveit"; then
51213                        rpathdirs="$rpathdirs $dir"
51214                      fi
51215                                                                  haveit=
51216                      for x in $ltrpathdirs; do
51217                        if test "X$x" = "X$dir"; then
51218                          haveit=yes
51219                          break
51220                        fi
51221                      done
51222                      if test -z "$haveit"; then
51223                        ltrpathdirs="$ltrpathdirs $dir"
51224                      fi
51225                    fi
51226                    ;;
51227                  -l*)
51228                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
51229                    ;;
51230                  *.la)
51231                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
51232                    ;;
51233                  *)
51234                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
51235                    LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
51236                    ;;
51237                esac
51238              done
51239            fi
51240          else
51241                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
51242            LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
51243          fi
51244        fi
51245      fi
51246    done
51247  done
51248  if test "X$rpathdirs" != "X"; then
51249    if test -n "$acl_hardcode_libdir_separator"; then
51250                        alldirs=
51251      for found_dir in $rpathdirs; do
51252        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
51253      done
51254            acl_save_libdir="$libdir"
51255      libdir="$alldirs"
51256      eval flag=\"$acl_hardcode_libdir_flag_spec\"
51257      libdir="$acl_save_libdir"
51258      LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
51259    else
51260            for found_dir in $rpathdirs; do
51261        acl_save_libdir="$libdir"
51262        libdir="$found_dir"
51263        eval flag=\"$acl_hardcode_libdir_flag_spec\"
51264        libdir="$acl_save_libdir"
51265        LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
51266      done
51267    fi
51268  fi
51269  if test "X$ltrpathdirs" != "X"; then
51270            for found_dir in $ltrpathdirs; do
51271      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
51272    done
51273  fi
51274
51275
51276
51277
51278
51279
51280          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
51281$as_echo_n "checking for GNU gettext in libintl... " >&6; }
51282if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then :
51283  $as_echo_n "(cached) " >&6
51284else
51285  gt_save_CPPFLAGS="$CPPFLAGS"
51286            CPPFLAGS="$CPPFLAGS $INCINTL"
51287            gt_save_LIBS="$LIBS"
51288            LIBS="$LIBS $LIBINTL"
51289                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51290/* end confdefs.h.  */
51291#include <libintl.h>
51292$gt_revision_test_code
51293extern int _nl_msg_cat_cntr;
51294extern
51295#ifdef __cplusplus
51296"C"
51297#endif
51298const char *_nl_expand_alias (const char *);
51299int
51300main ()
51301{
51302bindtextdomain ("", "");
51303return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
51304  ;
51305  return 0;
51306}
51307_ACEOF
51308if ac_fn_c_try_link "$LINENO"; then :
51309  eval "$gt_func_gnugettext_libintl=yes"
51310else
51311  eval "$gt_func_gnugettext_libintl=no"
51312fi
51313rm -f core conftest.err conftest.$ac_objext \
51314    conftest$ac_exeext conftest.$ac_ext
51315                        if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
51316              LIBS="$LIBS $LIBICONV"
51317              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51318/* end confdefs.h.  */
51319#include <libintl.h>
51320$gt_revision_test_code
51321extern int _nl_msg_cat_cntr;
51322extern
51323#ifdef __cplusplus
51324"C"
51325#endif
51326const char *_nl_expand_alias (const char *);
51327int
51328main ()
51329{
51330bindtextdomain ("", "");
51331return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
51332  ;
51333  return 0;
51334}
51335_ACEOF
51336if ac_fn_c_try_link "$LINENO"; then :
51337  LIBINTL="$LIBINTL $LIBICONV"
51338                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
51339                eval "$gt_func_gnugettext_libintl=yes"
51340
51341fi
51342rm -f core conftest.err conftest.$ac_objext \
51343    conftest$ac_exeext conftest.$ac_ext
51344            fi
51345            CPPFLAGS="$gt_save_CPPFLAGS"
51346            LIBS="$gt_save_LIBS"
51347fi
51348eval ac_res=\$$gt_func_gnugettext_libintl
51349	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
51350$as_echo "$ac_res" >&6; }
51351        fi
51352
51353                                        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
51354           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
51355                && test "$PACKAGE" != gettext-runtime \
51356                && test "$PACKAGE" != gettext-tools; }; then
51357          gt_use_preinstalled_gnugettext=yes
51358        else
51359                    LIBINTL=
51360          LTLIBINTL=
51361          INCINTL=
51362        fi
51363
51364
51365
51366    if test -n "$INTL_MACOSX_LIBS"; then
51367      if test "$gt_use_preinstalled_gnugettext" = "yes" \
51368         || test "$nls_cv_use_gnu_gettext" = "yes"; then
51369                LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
51370        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
51371      fi
51372    fi
51373
51374    if test "$gt_use_preinstalled_gnugettext" = "yes" \
51375       || test "$nls_cv_use_gnu_gettext" = "yes"; then
51376
51377$as_echo "#define ENABLE_NLS 1" >>confdefs.h
51378
51379    else
51380      USE_NLS=no
51381    fi
51382  fi
51383
51384  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
51385$as_echo_n "checking whether to use NLS... " >&6; }
51386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
51387$as_echo "$USE_NLS" >&6; }
51388  if test "$USE_NLS" = "yes"; then
51389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
51390$as_echo_n "checking where the gettext function comes from... " >&6; }
51391    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
51392      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
51393        gt_source="external libintl"
51394      else
51395        gt_source="libc"
51396      fi
51397    else
51398      gt_source="included intl directory"
51399    fi
51400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
51401$as_echo "$gt_source" >&6; }
51402  fi
51403
51404  if test "$USE_NLS" = "yes"; then
51405
51406    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
51407      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
51408        { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
51409$as_echo_n "checking how to link with libintl... " >&6; }
51410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
51411$as_echo "$LIBINTL" >&6; }
51412
51413  for element in $INCINTL; do
51414    haveit=
51415    for x in $CPPFLAGS; do
51416
51417  acl_save_prefix="$prefix"
51418  prefix="$acl_final_prefix"
51419  acl_save_exec_prefix="$exec_prefix"
51420  exec_prefix="$acl_final_exec_prefix"
51421  eval x=\"$x\"
51422  exec_prefix="$acl_save_exec_prefix"
51423  prefix="$acl_save_prefix"
51424
51425      if test "X$x" = "X$element"; then
51426        haveit=yes
51427        break
51428      fi
51429    done
51430    if test -z "$haveit"; then
51431      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
51432    fi
51433  done
51434
51435      fi
51436
51437
51438$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
51439
51440
51441$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
51442
51443    fi
51444
51445        POSUB=po
51446  fi
51447
51448
51449
51450    INTLLIBS="$LIBINTL"
51451
51452
51453
51454
51455
51456
51457
51458
51459# For a test of uniq: it uses the $LOCALE_FR envvar.
51460
51461
51462
51463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
51464$as_echo_n "checking for a traditional french locale... " >&6; }
51465if test "${gt_cv_locale_fr+set}" = set; then :
51466  $as_echo_n "(cached) " >&6
51467else
51468
51469    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51470/* end confdefs.h.  */
51471
51472#include <locale.h>
51473#include <time.h>
51474#if HAVE_LANGINFO_CODESET
51475# include <langinfo.h>
51476#endif
51477#include <stdlib.h>
51478#include <string.h>
51479struct tm t;
51480char buf[16];
51481int main () {
51482  /* Check whether the given locale name is recognized by the system.  */
51483  if (setlocale (LC_ALL, "") == NULL) return 1;
51484  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
51485     On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
51486     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
51487     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
51488     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
51489     some unit tests fail.  */
51490#if HAVE_LANGINFO_CODESET
51491  {
51492    const char *cs = nl_langinfo (CODESET);
51493    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
51494      return 1;
51495  }
51496#endif
51497#ifdef __CYGWIN__
51498  /* On Cygwin, avoid locale names without encoding suffix, because the
51499     locale_charset() function relies on the encoding suffix.  Note that
51500     LC_ALL is set on the command line.  */
51501  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
51502#endif
51503  /* Check whether in the abbreviation of the second month, the second
51504     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
51505     one byte long. This excludes the UTF-8 encoding.  */
51506  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
51507  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
51508  /* Check whether the decimal separator is a comma.
51509     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
51510     are nl_langinfo(RADIXCHAR) are both ".".  */
51511  if (localeconv () ->decimal_point[0] != ',') return 1;
51512  return 0;
51513}
51514
51515_ACEOF
51516    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
51517  (eval $ac_link) 2>&5
51518  ac_status=$?
51519  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51520  test $ac_status = 0; } && test -s conftest$ac_exeext; then
51521      # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
51522      # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
51523      # configure script would override the LC_ALL setting. Likewise for
51524      # LC_CTYPE, which is also set at the beginning of the configure script.
51525      # Test for the usual locale name.
51526      if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51527        gt_cv_locale_fr=fr_FR
51528      else
51529        # Test for the locale name with explicit encoding suffix.
51530        if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51531          gt_cv_locale_fr=fr_FR.ISO-8859-1
51532        else
51533          # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
51534          if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51535            gt_cv_locale_fr=fr_FR.ISO8859-1
51536          else
51537            # Test for the HP-UX locale name.
51538            if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51539              gt_cv_locale_fr=fr_FR.iso88591
51540            else
51541              # Test for the Solaris 7 locale name.
51542              if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
51543                gt_cv_locale_fr=fr
51544              else
51545                # None found.
51546                gt_cv_locale_fr=none
51547              fi
51548            fi
51549          fi
51550        fi
51551      fi
51552    fi
51553    rm -fr conftest*
51554
51555fi
51556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
51557$as_echo "$gt_cv_locale_fr" >&6; }
51558  LOCALE_FR=$gt_cv_locale_fr
51559
51560
51561
51562ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile man/Makefile po/Makefile.in src/Makefile tests/Makefile gnulib-tests/Makefile"
51563
51564cat >confcache <<\_ACEOF
51565# This file is a shell script that caches the results of configure
51566# tests run on this system so they can be shared between configure
51567# scripts and configure runs, see configure's option --config-cache.
51568# It is not useful on other systems.  If it contains results you don't
51569# want to keep, you may remove or edit it.
51570#
51571# config.status only pays attention to the cache file if you give it
51572# the --recheck option to rerun configure.
51573#
51574# `ac_cv_env_foo' variables (set or unset) will be overridden when
51575# loading this file, other *unset* `ac_cv_foo' will be assigned the
51576# following values.
51577
51578_ACEOF
51579
51580# The following way of writing the cache mishandles newlines in values,
51581# but we know of no workaround that is simple, portable, and efficient.
51582# So, we kill variables containing newlines.
51583# Ultrix sh set writes to stderr and can't be redirected directly,
51584# and sets the high bit in the cache file unless we assign to the vars.
51585(
51586  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51587    eval ac_val=\$$ac_var
51588    case $ac_val in #(
51589    *${as_nl}*)
51590      case $ac_var in #(
51591      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51592$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51593      esac
51594      case $ac_var in #(
51595      _ | IFS | as_nl) ;; #(
51596      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51597      *) { eval $ac_var=; unset $ac_var;} ;;
51598      esac ;;
51599    esac
51600  done
51601
51602  (set) 2>&1 |
51603    case $as_nl`(ac_space=' '; set) 2>&1` in #(
51604    *${as_nl}ac_space=\ *)
51605      # `set' does not quote correctly, so add quotes: double-quote
51606      # substitution turns \\\\ into \\, and sed turns \\ into \.
51607      sed -n \
51608	"s/'/'\\\\''/g;
51609	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51610      ;; #(
51611    *)
51612      # `set' quotes correctly as required by POSIX, so do not add quotes.
51613      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51614      ;;
51615    esac |
51616    sort
51617) |
51618  sed '
51619     /^ac_cv_env_/b end
51620     t clear
51621     :clear
51622     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51623     t end
51624     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51625     :end' >>confcache
51626if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51627  if test -w "$cache_file"; then
51628    test "x$cache_file" != "x/dev/null" &&
51629      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51630$as_echo "$as_me: updating cache $cache_file" >&6;}
51631    cat confcache >$cache_file
51632  else
51633    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51634$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51635  fi
51636fi
51637rm -f confcache
51638
51639test "x$prefix" = xNONE && prefix=$ac_default_prefix
51640# Let make expand exec_prefix.
51641test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51642
51643DEFS=-DHAVE_CONFIG_H
51644
51645ac_libobjs=
51646ac_ltlibobjs=
51647for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51648  # 1. Remove the extension, and $U if already installed.
51649  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51650  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51651  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51652  #    will be set to the directory where LIBOBJS objects are built.
51653  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51654  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51655done
51656LIBOBJS=$ac_libobjs
51657
51658LTLIBOBJS=$ac_ltlibobjs
51659
51660
51661 if test -n "$EXEEXT"; then
51662  am__EXEEXT_TRUE=
51663  am__EXEEXT_FALSE='#'
51664else
51665  am__EXEEXT_TRUE='#'
51666  am__EXEEXT_FALSE=
51667fi
51668
51669if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
51670  as_fn_error "conditional \"AMDEP\" was never defined.
51671Usually this means the macro was only invoked conditionally." "$LINENO" 5
51672fi
51673if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
51674  as_fn_error "conditional \"am__fastdepCC\" was never defined.
51675Usually this means the macro was only invoked conditionally." "$LINENO" 5
51676fi
51677if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
51678  as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
51679Usually this means the macro was only invoked conditionally." "$LINENO" 5
51680fi
51681test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
51682
51683if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
51684  as_fn_error "conditional \"GNU_MAKE\" was never defined.
51685Usually this means the macro was only invoked conditionally." "$LINENO" 5
51686fi
51687
51688
51689    gl_libobjs=
51690    gl_ltlibobjs=
51691    if test -n "$gl_LIBOBJS"; then
51692      # Remove the extension.
51693      sed_drop_objext='s/\.o$//;s/\.obj$//'
51694      for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
51695        gl_libobjs="$gl_libobjs $i.$ac_objext"
51696        gl_ltlibobjs="$gl_ltlibobjs $i.lo"
51697      done
51698    fi
51699    gl_LIBOBJS=$gl_libobjs
51700
51701    gl_LTLIBOBJS=$gl_ltlibobjs
51702
51703
51704
51705
51706
51707
51708    gltests_libobjs=
51709    gltests_ltlibobjs=
51710    if test -n "$gltests_LIBOBJS"; then
51711      # Remove the extension.
51712      sed_drop_objext='s/\.o$//;s/\.obj$//'
51713      for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
51714        gltests_libobjs="$gltests_libobjs $i.$ac_objext"
51715        gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
51716      done
51717    fi
51718    gltests_LIBOBJS=$gltests_libobjs
51719
51720    gltests_LTLIBOBJS=$gltests_ltlibobjs
51721
51722
51723if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then
51724  as_fn_error "conditional \"CROSS_COMPILING\" was never defined.
51725Usually this means the macro was only invoked conditionally." "$LINENO" 5
51726fi
51727
51728: ${CONFIG_STATUS=./config.status}
51729ac_write_fail=0
51730ac_clean_files_save=$ac_clean_files
51731ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51732{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51733$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51734as_write_fail=0
51735cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51736#! $SHELL
51737# Generated by $as_me.
51738# Run this file to recreate the current configuration.
51739# Compiler output produced by configure, useful for debugging
51740# configure, is in config.log if it exists.
51741
51742debug=false
51743ac_cs_recheck=false
51744ac_cs_silent=false
51745
51746SHELL=\${CONFIG_SHELL-$SHELL}
51747export SHELL
51748_ASEOF
51749cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51750## -------------------- ##
51751## M4sh Initialization. ##
51752## -------------------- ##
51753
51754# Be more Bourne compatible
51755DUALCASE=1; export DUALCASE # for MKS sh
51756if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51757  emulate sh
51758  NULLCMD=:
51759  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51760  # is contrary to our usage.  Disable this feature.
51761  alias -g '${1+"$@"}'='"$@"'
51762  setopt NO_GLOB_SUBST
51763else
51764  case `(set -o) 2>/dev/null` in #(
51765  *posix*) :
51766    set -o posix ;; #(
51767  *) :
51768     ;;
51769esac
51770fi
51771
51772
51773as_nl='
51774'
51775export as_nl
51776# Printing a long string crashes Solaris 7 /usr/bin/printf.
51777as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51778as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51779as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51780# Prefer a ksh shell builtin over an external printf program on Solaris,
51781# but without wasting forks for bash or zsh.
51782if test -z "$BASH_VERSION$ZSH_VERSION" \
51783    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51784  as_echo='print -r --'
51785  as_echo_n='print -rn --'
51786elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51787  as_echo='printf %s\n'
51788  as_echo_n='printf %s'
51789else
51790  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51791    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51792    as_echo_n='/usr/ucb/echo -n'
51793  else
51794    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51795    as_echo_n_body='eval
51796      arg=$1;
51797      case $arg in #(
51798      *"$as_nl"*)
51799	expr "X$arg" : "X\\(.*\\)$as_nl";
51800	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51801      esac;
51802      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51803    '
51804    export as_echo_n_body
51805    as_echo_n='sh -c $as_echo_n_body as_echo'
51806  fi
51807  export as_echo_body
51808  as_echo='sh -c $as_echo_body as_echo'
51809fi
51810
51811# The user is always right.
51812if test "${PATH_SEPARATOR+set}" != set; then
51813  PATH_SEPARATOR=:
51814  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51815    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51816      PATH_SEPARATOR=';'
51817  }
51818fi
51819
51820
51821# IFS
51822# We need space, tab and new line, in precisely that order.  Quoting is
51823# there to prevent editors from complaining about space-tab.
51824# (If _AS_PATH_WALK were called with IFS unset, it would disable word
51825# splitting by setting IFS to empty value.)
51826IFS=" ""	$as_nl"
51827
51828# Find who we are.  Look in the path if we contain no directory separator.
51829case $0 in #((
51830  *[\\/]* ) as_myself=$0 ;;
51831  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51832for as_dir in $PATH
51833do
51834  IFS=$as_save_IFS
51835  test -z "$as_dir" && as_dir=.
51836    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51837  done
51838IFS=$as_save_IFS
51839
51840     ;;
51841esac
51842# We did not find ourselves, most probably we were run as `sh COMMAND'
51843# in which case we are not to be found in the path.
51844if test "x$as_myself" = x; then
51845  as_myself=$0
51846fi
51847if test ! -f "$as_myself"; then
51848  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51849  exit 1
51850fi
51851
51852# Unset variables that we do not need and which cause bugs (e.g. in
51853# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51854# suppresses any "Segmentation fault" message there.  '((' could
51855# trigger a bug in pdksh 5.2.14.
51856for as_var in BASH_ENV ENV MAIL MAILPATH
51857do eval test x\${$as_var+set} = xset \
51858  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51859done
51860PS1='$ '
51861PS2='> '
51862PS4='+ '
51863
51864# NLS nuisances.
51865LC_ALL=C
51866export LC_ALL
51867LANGUAGE=C
51868export LANGUAGE
51869
51870# CDPATH.
51871(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51872
51873
51874# as_fn_error ERROR [LINENO LOG_FD]
51875# ---------------------------------
51876# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51877# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51878# script with status $?, using 1 if that was 0.
51879as_fn_error ()
51880{
51881  as_status=$?; test $as_status -eq 0 && as_status=1
51882  if test "$3"; then
51883    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51884    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
51885  fi
51886  $as_echo "$as_me: error: $1" >&2
51887  as_fn_exit $as_status
51888} # as_fn_error
51889
51890
51891# as_fn_set_status STATUS
51892# -----------------------
51893# Set $? to STATUS, without forking.
51894as_fn_set_status ()
51895{
51896  return $1
51897} # as_fn_set_status
51898
51899# as_fn_exit STATUS
51900# -----------------
51901# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51902as_fn_exit ()
51903{
51904  set +e
51905  as_fn_set_status $1
51906  exit $1
51907} # as_fn_exit
51908
51909# as_fn_unset VAR
51910# ---------------
51911# Portably unset VAR.
51912as_fn_unset ()
51913{
51914  { eval $1=; unset $1;}
51915}
51916as_unset=as_fn_unset
51917# as_fn_append VAR VALUE
51918# ----------------------
51919# Append the text in VALUE to the end of the definition contained in VAR. Take
51920# advantage of any shell optimizations that allow amortized linear growth over
51921# repeated appends, instead of the typical quadratic growth present in naive
51922# implementations.
51923if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51924  eval 'as_fn_append ()
51925  {
51926    eval $1+=\$2
51927  }'
51928else
51929  as_fn_append ()
51930  {
51931    eval $1=\$$1\$2
51932  }
51933fi # as_fn_append
51934
51935# as_fn_arith ARG...
51936# ------------------
51937# Perform arithmetic evaluation on the ARGs, and store the result in the
51938# global $as_val. Take advantage of shells that can avoid forks. The arguments
51939# must be portable across $(()) and expr.
51940if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51941  eval 'as_fn_arith ()
51942  {
51943    as_val=$(( $* ))
51944  }'
51945else
51946  as_fn_arith ()
51947  {
51948    as_val=`expr "$@" || test $? -eq 1`
51949  }
51950fi # as_fn_arith
51951
51952
51953if expr a : '\(a\)' >/dev/null 2>&1 &&
51954   test "X`expr 00001 : '.*\(...\)'`" = X001; then
51955  as_expr=expr
51956else
51957  as_expr=false
51958fi
51959
51960if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51961  as_basename=basename
51962else
51963  as_basename=false
51964fi
51965
51966if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51967  as_dirname=dirname
51968else
51969  as_dirname=false
51970fi
51971
51972as_me=`$as_basename -- "$0" ||
51973$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51974	 X"$0" : 'X\(//\)$' \| \
51975	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51976$as_echo X/"$0" |
51977    sed '/^.*\/\([^/][^/]*\)\/*$/{
51978	    s//\1/
51979	    q
51980	  }
51981	  /^X\/\(\/\/\)$/{
51982	    s//\1/
51983	    q
51984	  }
51985	  /^X\/\(\/\).*/{
51986	    s//\1/
51987	    q
51988	  }
51989	  s/.*/./; q'`
51990
51991# Avoid depending upon Character Ranges.
51992as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51993as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51994as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51995as_cr_digits='0123456789'
51996as_cr_alnum=$as_cr_Letters$as_cr_digits
51997
51998ECHO_C= ECHO_N= ECHO_T=
51999case `echo -n x` in #(((((
52000-n*)
52001  case `echo 'xy\c'` in
52002  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
52003  xy)  ECHO_C='\c';;
52004  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
52005       ECHO_T='	';;
52006  esac;;
52007*)
52008  ECHO_N='-n';;
52009esac
52010
52011rm -f conf$$ conf$$.exe conf$$.file
52012if test -d conf$$.dir; then
52013  rm -f conf$$.dir/conf$$.file
52014else
52015  rm -f conf$$.dir
52016  mkdir conf$$.dir 2>/dev/null
52017fi
52018if (echo >conf$$.file) 2>/dev/null; then
52019  if ln -s conf$$.file conf$$ 2>/dev/null; then
52020    as_ln_s='ln -s'
52021    # ... but there are two gotchas:
52022    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
52023    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
52024    # In both cases, we have to default to `cp -p'.
52025    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
52026      as_ln_s='cp -p'
52027  elif ln conf$$.file conf$$ 2>/dev/null; then
52028    as_ln_s=ln
52029  else
52030    as_ln_s='cp -p'
52031  fi
52032else
52033  as_ln_s='cp -p'
52034fi
52035rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
52036rmdir conf$$.dir 2>/dev/null
52037
52038
52039# as_fn_mkdir_p
52040# -------------
52041# Create "$as_dir" as a directory, including parents if necessary.
52042as_fn_mkdir_p ()
52043{
52044
52045  case $as_dir in #(
52046  -*) as_dir=./$as_dir;;
52047  esac
52048  test -d "$as_dir" || eval $as_mkdir_p || {
52049    as_dirs=
52050    while :; do
52051      case $as_dir in #(
52052      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
52053      *) as_qdir=$as_dir;;
52054      esac
52055      as_dirs="'$as_qdir' $as_dirs"
52056      as_dir=`$as_dirname -- "$as_dir" ||
52057$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52058	 X"$as_dir" : 'X\(//\)[^/]' \| \
52059	 X"$as_dir" : 'X\(//\)$' \| \
52060	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
52061$as_echo X"$as_dir" |
52062    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52063	    s//\1/
52064	    q
52065	  }
52066	  /^X\(\/\/\)[^/].*/{
52067	    s//\1/
52068	    q
52069	  }
52070	  /^X\(\/\/\)$/{
52071	    s//\1/
52072	    q
52073	  }
52074	  /^X\(\/\).*/{
52075	    s//\1/
52076	    q
52077	  }
52078	  s/.*/./; q'`
52079      test -d "$as_dir" && break
52080    done
52081    test -z "$as_dirs" || eval "mkdir $as_dirs"
52082  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
52083
52084
52085} # as_fn_mkdir_p
52086if mkdir -p . 2>/dev/null; then
52087  as_mkdir_p='mkdir -p "$as_dir"'
52088else
52089  test -d ./-p && rmdir ./-p
52090  as_mkdir_p=false
52091fi
52092
52093if test -x / >/dev/null 2>&1; then
52094  as_test_x='test -x'
52095else
52096  if ls -dL / >/dev/null 2>&1; then
52097    as_ls_L_option=L
52098  else
52099    as_ls_L_option=
52100  fi
52101  as_test_x='
52102    eval sh -c '\''
52103      if test -d "$1"; then
52104	test -d "$1/.";
52105      else
52106	case $1 in #(
52107	-*)set "./$1";;
52108	esac;
52109	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
52110	???[sx]*):;;*)false;;esac;fi
52111    '\'' sh
52112  '
52113fi
52114as_executable_p=$as_test_x
52115
52116# Sed expression to map a string onto a valid CPP name.
52117as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
52118
52119# Sed expression to map a string onto a valid variable name.
52120as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
52121
52122
52123exec 6>&1
52124## ----------------------------------- ##
52125## Main body of $CONFIG_STATUS script. ##
52126## ----------------------------------- ##
52127_ASEOF
52128test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
52129
52130cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52131# Save the log message, to keep $0 and so on meaningful, and to
52132# report actual input values of CONFIG_FILES etc. instead of their
52133# values after options handling.
52134ac_log="
52135This file was extended by GNU coreutils $as_me 8.4, which was
52136generated by GNU Autoconf 2.65.23-13e35.  Invocation command line was
52137
52138  CONFIG_FILES    = $CONFIG_FILES
52139  CONFIG_HEADERS  = $CONFIG_HEADERS
52140  CONFIG_LINKS    = $CONFIG_LINKS
52141  CONFIG_COMMANDS = $CONFIG_COMMANDS
52142  $ $0 $@
52143
52144on `(hostname || uname -n) 2>/dev/null | sed 1q`
52145"
52146
52147_ACEOF
52148
52149case $ac_config_files in *"
52150"*) set x $ac_config_files; shift; ac_config_files=$*;;
52151esac
52152
52153case $ac_config_headers in *"
52154"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
52155esac
52156
52157
52158cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52159# Files that config.status was made for.
52160config_files="$ac_config_files"
52161config_headers="$ac_config_headers"
52162config_links="$ac_config_links"
52163config_commands="$ac_config_commands"
52164
52165_ACEOF
52166
52167cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52168ac_cs_usage="\
52169\`$as_me' instantiates files and other configuration actions
52170from templates according to the current configuration.  Unless the files
52171and actions are specified as TAGs, all are instantiated by default.
52172
52173Usage: $0 [OPTION]... [TAG]...
52174
52175  -h, --help       print this help, then exit
52176  -V, --version    print version number and configuration settings, then exit
52177      --config     print configuration, then exit
52178  -q, --quiet, --silent
52179                   do not print progress messages
52180  -d, --debug      don't remove temporary files
52181      --recheck    update $as_me by reconfiguring in the same conditions
52182      --file=FILE[:TEMPLATE]
52183                   instantiate the configuration file FILE
52184      --header=FILE[:TEMPLATE]
52185                   instantiate the configuration header FILE
52186
52187Configuration files:
52188$config_files
52189
52190Configuration headers:
52191$config_headers
52192
52193Configuration links:
52194$config_links
52195
52196Configuration commands:
52197$config_commands
52198
52199Report bugs to <bug-coreutils@gnu.org>.
52200GNU coreutils home page: <http://www.gnu.org/software/coreutils/>.
52201General help using GNU software: <http://www.gnu.org/gethelp/>."
52202
52203_ACEOF
52204cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52205ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
52206ac_cs_version="\\
52207GNU coreutils config.status 8.4
52208configured by $0, generated by GNU Autoconf 2.65.23-13e35,
52209  with options \\"\$ac_cs_config\\"
52210
52211Copyright (C) 2010 Free Software Foundation, Inc.
52212This config.status script is free software; the Free Software Foundation
52213gives unlimited permission to copy, distribute and modify it."
52214
52215ac_pwd='$ac_pwd'
52216srcdir='$srcdir'
52217INSTALL='$INSTALL'
52218MKDIR_P='$MKDIR_P'
52219AWK='$AWK'
52220test -n "\$AWK" || AWK=awk
52221_ACEOF
52222
52223cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52224# The default lists apply if the user does not specify any file.
52225ac_need_defaults=:
52226while test $# != 0
52227do
52228  case $1 in
52229  --*=*)
52230    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52231    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
52232    ac_shift=:
52233    ;;
52234  *)
52235    ac_option=$1
52236    ac_optarg=$2
52237    ac_shift=shift
52238    ;;
52239  esac
52240
52241  case $ac_option in
52242  # Handling of the options.
52243  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
52244    ac_cs_recheck=: ;;
52245  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
52246    $as_echo "$ac_cs_version"; exit ;;
52247  --config | --confi | --conf | --con | --co | --c )
52248    $as_echo "$ac_cs_config"; exit ;;
52249  --debug | --debu | --deb | --de | --d | -d )
52250    debug=: ;;
52251  --file | --fil | --fi | --f )
52252    $ac_shift
52253    case $ac_optarg in
52254    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52255    esac
52256    as_fn_append CONFIG_FILES " '$ac_optarg'"
52257    ac_need_defaults=false;;
52258  --header | --heade | --head | --hea )
52259    $ac_shift
52260    case $ac_optarg in
52261    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52262    esac
52263    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
52264    ac_need_defaults=false;;
52265  --he | --h)
52266    # Conflict between --help and --header
52267    as_fn_error "ambiguous option: \`$1'
52268Try \`$0 --help' for more information.";;
52269  --help | --hel | -h )
52270    $as_echo "$ac_cs_usage"; exit ;;
52271  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
52272  | -silent | --silent | --silen | --sile | --sil | --si | --s)
52273    ac_cs_silent=: ;;
52274
52275  # This is an error.
52276  -*) as_fn_error "unrecognized option: \`$1'
52277Try \`$0 --help' for more information." ;;
52278
52279  *) as_fn_append ac_config_targets " $1"
52280     ac_need_defaults=false ;;
52281
52282  esac
52283  shift
52284done
52285
52286ac_configure_extra_args=
52287
52288if $ac_cs_silent; then
52289  exec 6>/dev/null
52290  ac_configure_extra_args="$ac_configure_extra_args --silent"
52291fi
52292
52293_ACEOF
52294cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52295if \$ac_cs_recheck; then
52296  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
52297  shift
52298  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
52299  CONFIG_SHELL='$SHELL'
52300  export CONFIG_SHELL
52301  exec "\$@"
52302fi
52303
52304_ACEOF
52305cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52306exec 5>>config.log
52307{
52308  echo
52309  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
52310## Running $as_me. ##
52311_ASBOX
52312  $as_echo "$ac_log"
52313} >&5
52314
52315_ACEOF
52316cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52317#
52318# INIT-COMMANDS
52319#
52320AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
52321GNUmakefile=$GNUmakefile
52322# Capture the value of obsolete ALL_LINGUAS because we need it to compute
52323    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
52324    # from automake < 1.5.
52325    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
52326    # Capture the value of LINGUAS because we need it to compute CATALOGS.
52327    LINGUAS="${LINGUAS-%UNSET%}"
52328
52329
52330_ACEOF
52331
52332cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52333
52334# Handling of arguments.
52335for ac_config_target in $ac_config_targets
52336do
52337  case $ac_config_target in
52338    "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
52339    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
52340    "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
52341    "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
52342    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
52343    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
52344    "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
52345    "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
52346    "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
52347    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
52348    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
52349    "gnulib-tests/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib-tests/Makefile" ;;
52350
52351  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
52352  esac
52353done
52354
52355
52356# If the user did not use the arguments to specify the items to instantiate,
52357# then the envvar interface is used.  Set only those that are not.
52358# We use the long form for the default assignment because of an extremely
52359# bizarre bug on SunOS 4.1.3.
52360if $ac_need_defaults; then
52361  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52362  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
52363  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
52364  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
52365fi
52366
52367# Have a temporary directory for convenience.  Make it in the build tree
52368# simply because there is no reason against having it here, and in addition,
52369# creating and moving files from /tmp can sometimes cause problems.
52370# Hook for its removal unless debugging.
52371# Note that there is a small window in which the directory will not be cleaned:
52372# after its creation but before its name has been assigned to `$tmp'.
52373$debug ||
52374{
52375  tmp=
52376  trap 'exit_status=$?
52377  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
52378' 0
52379  trap 'as_fn_exit 1' 1 2 13 15
52380}
52381# Create a (secure) tmp directory for tmp files.
52382
52383{
52384  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52385  test -n "$tmp" && test -d "$tmp"
52386}  ||
52387{
52388  tmp=./conf$$-$RANDOM
52389  (umask 077 && mkdir "$tmp")
52390} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
52391
52392# Set up the scripts for CONFIG_FILES section.
52393# No need to generate them if there are no CONFIG_FILES.
52394# This happens for instance with `./config.status config.h'.
52395if test -n "$CONFIG_FILES"; then
52396
52397
52398ac_cr=`echo X | tr X '\015'`
52399# On cygwin, bash can eat \r inside `` if the user requested igncr.
52400# But we know of no other shell where ac_cr would be empty at this
52401# point, so we can use a bashism as a fallback.
52402if test "x$ac_cr" = x; then
52403  eval ac_cr=\$\'\\r\'
52404fi
52405ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52406if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52407  ac_cs_awk_cr='\r'
52408else
52409  ac_cs_awk_cr=$ac_cr
52410fi
52411
52412echo 'BEGIN {' >"$tmp/subs1.awk" &&
52413_ACEOF
52414
52415
52416{
52417  echo "cat >conf$$subs.awk <<_ACEOF" &&
52418  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52419  echo "_ACEOF"
52420} >conf$$subs.sh ||
52421  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
52422ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
52423ac_delim='%!_!# '
52424for ac_last_try in false false false false false :; do
52425  . ./conf$$subs.sh ||
52426    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
52427
52428  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52429  if test $ac_delim_n = $ac_delim_num; then
52430    break
52431  elif $ac_last_try; then
52432    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
52433  else
52434    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52435  fi
52436done
52437rm -f conf$$subs.sh
52438
52439cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52440cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
52441_ACEOF
52442sed -n '
52443h
52444s/^/S["/; s/!.*/"]=/
52445p
52446g
52447s/^[^!]*!//
52448:repl
52449t repl
52450s/'"$ac_delim"'$//
52451t delim
52452:nl
52453h
52454s/\(.\{148\}\)..*/\1/
52455t more1
52456s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52457p
52458n
52459b repl
52460:more1
52461s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52462p
52463g
52464s/.\{148\}//
52465t nl
52466:delim
52467h
52468s/\(.\{148\}\)..*/\1/
52469t more2
52470s/["\\]/\\&/g; s/^/"/; s/$/"/
52471p
52472b
52473:more2
52474s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52475p
52476g
52477s/.\{148\}//
52478t delim
52479' <conf$$subs.awk | sed '
52480/^[^""]/{
52481  N
52482  s/\n//
52483}
52484' >>$CONFIG_STATUS || ac_write_fail=1
52485rm -f conf$$subs.awk
52486cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52487_ACAWK
52488cat >>"\$tmp/subs1.awk" <<_ACAWK &&
52489  for (key in S) S_is_set[key] = 1
52490  FS = ""
52491
52492}
52493{
52494  line = $ 0
52495  nfields = split(line, field, "@")
52496  substed = 0
52497  len = length(field[1])
52498  for (i = 2; i < nfields; i++) {
52499    key = field[i]
52500    keylen = length(key)
52501    if (S_is_set[key]) {
52502      value = S[key]
52503      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52504      len += length(value) + length(field[++i])
52505      substed = 1
52506    } else
52507      len += 1 + keylen
52508  }
52509
52510  print line
52511}
52512
52513_ACAWK
52514_ACEOF
52515cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52516if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52517  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52518else
52519  cat
52520fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
52521  || as_fn_error "could not setup config files machinery" "$LINENO" 5
52522_ACEOF
52523
52524# VPATH may cause trouble with some makes, so we remove $(srcdir),
52525# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
52526# trailing colons and then remove the whole line if VPATH becomes empty
52527# (actually we leave an empty line to preserve line numbers).
52528if test "x$srcdir" = x.; then
52529  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
52530s/:*\$(srcdir):*/:/
52531s/:*\${srcdir}:*/:/
52532s/:*@srcdir@:*/:/
52533s/^\([^=]*=[	 ]*\):*/\1/
52534s/:*$//
52535s/^[^=]*=[	 ]*$//
52536}'
52537fi
52538
52539cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52540fi # test -n "$CONFIG_FILES"
52541
52542# Set up the scripts for CONFIG_HEADERS section.
52543# No need to generate them if there are no CONFIG_HEADERS.
52544# This happens for instance with `./config.status Makefile'.
52545if test -n "$CONFIG_HEADERS"; then
52546cat >"$tmp/defines.awk" <<\_ACAWK ||
52547BEGIN {
52548_ACEOF
52549
52550# Transform confdefs.h into an awk script `defines.awk', embedded as
52551# here-document in config.status, that substitutes the proper values into
52552# config.h.in to produce config.h.
52553
52554# Create a delimiter string that does not exist in confdefs.h, to ease
52555# handling of long lines.
52556ac_delim='%!_!# '
52557for ac_last_try in false false :; do
52558  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
52559  if test -z "$ac_t"; then
52560    break
52561  elif $ac_last_try; then
52562    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
52563  else
52564    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52565  fi
52566done
52567
52568# For the awk script, D is an array of macro values keyed by name,
52569# likewise P contains macro parameters if any.  Preserve backslash
52570# newline sequences.
52571
52572ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
52573sed -n '
52574s/.\{148\}/&'"$ac_delim"'/g
52575t rset
52576:rset
52577s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
52578t def
52579d
52580:def
52581s/\\$//
52582t bsnl
52583s/["\\]/\\&/g
52584s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
52585D["\1"]=" \3"/p
52586s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
52587d
52588:bsnl
52589s/["\\]/\\&/g
52590s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
52591D["\1"]=" \3\\\\\\n"\\/p
52592t cont
52593s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
52594t cont
52595d
52596:cont
52597n
52598s/.\{148\}/&'"$ac_delim"'/g
52599t clear
52600:clear
52601s/\\$//
52602t bsnlc
52603s/["\\]/\\&/g; s/^/"/; s/$/"/p
52604d
52605:bsnlc
52606s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
52607b cont
52608' <confdefs.h | sed '
52609s/'"$ac_delim"'/"\\\
52610"/g' >>$CONFIG_STATUS || ac_write_fail=1
52611
52612cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52613  for (key in D) D_is_set[key] = 1
52614  FS = ""
52615}
52616/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
52617  line = \$ 0
52618  split(line, arg, " ")
52619  if (arg[1] == "#") {
52620    defundef = arg[2]
52621    mac1 = arg[3]
52622  } else {
52623    defundef = substr(arg[1], 2)
52624    mac1 = arg[2]
52625  }
52626  split(mac1, mac2, "(") #)
52627  macro = mac2[1]
52628  prefix = substr(line, 1, index(line, defundef) - 1)
52629  if (D_is_set[macro]) {
52630    # Preserve the white space surrounding the "#".
52631    print prefix "define", macro P[macro] D[macro]
52632    next
52633  } else {
52634    # Replace #undef with comments.  This is necessary, for example,
52635    # in the case of _POSIX_SOURCE, which is predefined and required
52636    # on some systems where configure will not decide to define it.
52637    if (defundef == "undef") {
52638      print "/*", prefix defundef, macro, "*/"
52639      next
52640    }
52641  }
52642}
52643{ print }
52644_ACAWK
52645_ACEOF
52646cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52647  as_fn_error "could not setup config headers machinery" "$LINENO" 5
52648fi # test -n "$CONFIG_HEADERS"
52649
52650
52651eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
52652shift
52653for ac_tag
52654do
52655  case $ac_tag in
52656  :[FHLC]) ac_mode=$ac_tag; continue;;
52657  esac
52658  case $ac_mode$ac_tag in
52659  :[FHL]*:*);;
52660  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
52661  :[FH]-) ac_tag=-:-;;
52662  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52663  esac
52664  ac_save_IFS=$IFS
52665  IFS=:
52666  set x $ac_tag
52667  IFS=$ac_save_IFS
52668  shift
52669  ac_file=$1
52670  shift
52671
52672  case $ac_mode in
52673  :L) ac_source=$1;;
52674  :[FH])
52675    ac_file_inputs=
52676    for ac_f
52677    do
52678      case $ac_f in
52679      -) ac_f="$tmp/stdin";;
52680      *) # Look for the file first in the build tree, then in the source tree
52681	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
52682	 # because $ac_f cannot contain `:'.
52683	 test -f "$ac_f" ||
52684	   case $ac_f in
52685	   [\\/$]*) false;;
52686	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52687	   esac ||
52688	   as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52689      esac
52690      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52691      as_fn_append ac_file_inputs " '$ac_f'"
52692    done
52693
52694    # Let's still pretend it is `configure' which instantiates (i.e., don't
52695    # use $as_me), people would be surprised to read:
52696    #    /* config.h.  Generated by config.status.  */
52697    configure_input='Generated from '`
52698	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52699	`' by configure.'
52700    if test x"$ac_file" != x-; then
52701      configure_input="$ac_file.  $configure_input"
52702      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52703$as_echo "$as_me: creating $ac_file" >&6;}
52704    fi
52705    # Neutralize special characters interpreted by sed in replacement strings.
52706    case $configure_input in #(
52707    *\&* | *\|* | *\\* )
52708       ac_sed_conf_input=`$as_echo "$configure_input" |
52709       sed 's/[\\\\&|]/\\\\&/g'`;; #(
52710    *) ac_sed_conf_input=$configure_input;;
52711    esac
52712
52713    case $ac_tag in
52714    *:-:* | *:-) cat >"$tmp/stdin" \
52715      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
52716    esac
52717    ;;
52718  esac
52719
52720  ac_dir=`$as_dirname -- "$ac_file" ||
52721$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52722	 X"$ac_file" : 'X\(//\)[^/]' \| \
52723	 X"$ac_file" : 'X\(//\)$' \| \
52724	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52725$as_echo X"$ac_file" |
52726    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52727	    s//\1/
52728	    q
52729	  }
52730	  /^X\(\/\/\)[^/].*/{
52731	    s//\1/
52732	    q
52733	  }
52734	  /^X\(\/\/\)$/{
52735	    s//\1/
52736	    q
52737	  }
52738	  /^X\(\/\).*/{
52739	    s//\1/
52740	    q
52741	  }
52742	  s/.*/./; q'`
52743  as_dir="$ac_dir"; as_fn_mkdir_p
52744  ac_builddir=.
52745
52746case "$ac_dir" in
52747.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52748*)
52749  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52750  # A ".." for each directory in $ac_dir_suffix.
52751  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52752  case $ac_top_builddir_sub in
52753  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52754  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52755  esac ;;
52756esac
52757ac_abs_top_builddir=$ac_pwd
52758ac_abs_builddir=$ac_pwd$ac_dir_suffix
52759# for backward compatibility:
52760ac_top_builddir=$ac_top_build_prefix
52761
52762case $srcdir in
52763  .)  # We are building in place.
52764    ac_srcdir=.
52765    ac_top_srcdir=$ac_top_builddir_sub
52766    ac_abs_top_srcdir=$ac_pwd ;;
52767  [\\/]* | ?:[\\/]* )  # Absolute name.
52768    ac_srcdir=$srcdir$ac_dir_suffix;
52769    ac_top_srcdir=$srcdir
52770    ac_abs_top_srcdir=$srcdir ;;
52771  *) # Relative name.
52772    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52773    ac_top_srcdir=$ac_top_build_prefix$srcdir
52774    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52775esac
52776ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52777
52778
52779  case $ac_mode in
52780  :F)
52781  #
52782  # CONFIG_FILE
52783  #
52784
52785  case $INSTALL in
52786  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
52787  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
52788  esac
52789  ac_MKDIR_P=$MKDIR_P
52790  case $MKDIR_P in
52791  [\\/$]* | ?:[\\/]* ) ;;
52792  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
52793  esac
52794_ACEOF
52795
52796cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52797# If the template does not know about datarootdir, expand it.
52798# FIXME: This hack should be removed a few years after 2.60.
52799ac_datarootdir_hack=; ac_datarootdir_seen=
52800ac_sed_dataroot='
52801/datarootdir/ {
52802  p
52803  q
52804}
52805/@datadir@/p
52806/@docdir@/p
52807/@infodir@/p
52808/@localedir@/p
52809/@mandir@/p'
52810case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52811*datarootdir*) ac_datarootdir_seen=yes;;
52812*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52813  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52814$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52815_ACEOF
52816cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52817  ac_datarootdir_hack='
52818  s&@datadir@&$datadir&g
52819  s&@docdir@&$docdir&g
52820  s&@infodir@&$infodir&g
52821  s&@localedir@&$localedir&g
52822  s&@mandir@&$mandir&g
52823  s&\\\${datarootdir}&$datarootdir&g' ;;
52824esac
52825_ACEOF
52826
52827# Neutralize VPATH when `$srcdir' = `.'.
52828# Shell code in configure.ac might set extrasub.
52829# FIXME: do we really want to maintain this feature?
52830cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52831ac_sed_extra="$ac_vpsub
52832$extrasub
52833_ACEOF
52834cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52835:t
52836/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52837s|@configure_input@|$ac_sed_conf_input|;t t
52838s&@top_builddir@&$ac_top_builddir_sub&;t t
52839s&@top_build_prefix@&$ac_top_build_prefix&;t t
52840s&@srcdir@&$ac_srcdir&;t t
52841s&@abs_srcdir@&$ac_abs_srcdir&;t t
52842s&@top_srcdir@&$ac_top_srcdir&;t t
52843s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52844s&@builddir@&$ac_builddir&;t t
52845s&@abs_builddir@&$ac_abs_builddir&;t t
52846s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52847s&@INSTALL@&$ac_INSTALL&;t t
52848s&@MKDIR_P@&$ac_MKDIR_P&;t t
52849$ac_datarootdir_hack
52850"
52851eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
52852  || as_fn_error "could not create $ac_file" "$LINENO" 5
52853
52854test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52855  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
52856  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
52857  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52858which seems to be undefined.  Please make sure it is defined." >&5
52859$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52860which seems to be undefined.  Please make sure it is defined." >&2;}
52861
52862  rm -f "$tmp/stdin"
52863  case $ac_file in
52864  -) cat "$tmp/out" && rm -f "$tmp/out";;
52865  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
52866  esac \
52867  || as_fn_error "could not create $ac_file" "$LINENO" 5
52868 ;;
52869  :H)
52870  #
52871  # CONFIG_HEADER
52872  #
52873  if test x"$ac_file" != x-; then
52874    {
52875      $as_echo "/* $configure_input  */" \
52876      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
52877    } >"$tmp/config.h" \
52878      || as_fn_error "could not create $ac_file" "$LINENO" 5
52879    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
52880      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
52881$as_echo "$as_me: $ac_file is unchanged" >&6;}
52882    else
52883      rm -f "$ac_file"
52884      mv "$tmp/config.h" "$ac_file" \
52885	|| as_fn_error "could not create $ac_file" "$LINENO" 5
52886    fi
52887  else
52888    $as_echo "/* $configure_input  */" \
52889      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
52890      || as_fn_error "could not create -" "$LINENO" 5
52891  fi
52892# Compute "$ac_file"'s index in $config_headers.
52893_am_arg="$ac_file"
52894_am_stamp_count=1
52895for _am_header in $config_headers :; do
52896  case $_am_header in
52897    $_am_arg | $_am_arg:* )
52898      break ;;
52899    * )
52900      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
52901  esac
52902done
52903echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
52904$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52905	 X"$_am_arg" : 'X\(//\)[^/]' \| \
52906	 X"$_am_arg" : 'X\(//\)$' \| \
52907	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
52908$as_echo X"$_am_arg" |
52909    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52910	    s//\1/
52911	    q
52912	  }
52913	  /^X\(\/\/\)[^/].*/{
52914	    s//\1/
52915	    q
52916	  }
52917	  /^X\(\/\/\)$/{
52918	    s//\1/
52919	    q
52920	  }
52921	  /^X\(\/\).*/{
52922	    s//\1/
52923	    q
52924	  }
52925	  s/.*/./; q'`/stamp-h$_am_stamp_count
52926 ;;
52927  :L)
52928  #
52929  # CONFIG_LINK
52930  #
52931
52932  if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
52933    :
52934  else
52935    # Prefer the file from the source tree if names are identical.
52936    if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
52937      ac_source=$srcdir/$ac_source
52938    fi
52939
52940    { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
52941$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
52942
52943    if test ! -r "$ac_source"; then
52944      as_fn_error "$ac_source: file not found" "$LINENO" 5
52945    fi
52946    rm -f "$ac_file"
52947
52948    # Try a relative symlink, then a hard link, then a copy.
52949    case $ac_source in
52950    [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
52951	*) ac_rel_source=$ac_top_build_prefix$ac_source ;;
52952    esac
52953    ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
52954      ln "$ac_source" "$ac_file" 2>/dev/null ||
52955      cp -p "$ac_source" "$ac_file" ||
52956      as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
52957  fi
52958 ;;
52959  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
52960$as_echo "$as_me: executing $ac_file commands" >&6;}
52961 ;;
52962  esac
52963
52964
52965  case $ac_file$ac_mode in
52966    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
52967  # Autoconf 2.62 quotes --file arguments for eval, but not when files
52968  # are listed without --file.  Let's play safe and only enable the eval
52969  # if we detect the quoting.
52970  case $CONFIG_FILES in
52971  *\'*) eval set x "$CONFIG_FILES" ;;
52972  *)   set x $CONFIG_FILES ;;
52973  esac
52974  shift
52975  for mf
52976  do
52977    # Strip MF so we end up with the name of the file.
52978    mf=`echo "$mf" | sed -e 's/:.*$//'`
52979    # Check whether this is an Automake generated Makefile or not.
52980    # We used to match only the files named `Makefile.in', but
52981    # some people rename them; so instead we look at the file content.
52982    # Grep'ing the first line is not enough: some people post-process
52983    # each Makefile.in and add a new line on top of each file to say so.
52984    # Grep'ing the whole file is not good either: AIX grep has a line
52985    # limit of 2048, but all sed's we know have understand at least 4000.
52986    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
52987      dirpart=`$as_dirname -- "$mf" ||
52988$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52989	 X"$mf" : 'X\(//\)[^/]' \| \
52990	 X"$mf" : 'X\(//\)$' \| \
52991	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
52992$as_echo X"$mf" |
52993    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52994	    s//\1/
52995	    q
52996	  }
52997	  /^X\(\/\/\)[^/].*/{
52998	    s//\1/
52999	    q
53000	  }
53001	  /^X\(\/\/\)$/{
53002	    s//\1/
53003	    q
53004	  }
53005	  /^X\(\/\).*/{
53006	    s//\1/
53007	    q
53008	  }
53009	  s/.*/./; q'`
53010    else
53011      continue
53012    fi
53013    # Extract the definition of DEPDIR, am__include, and am__quote
53014    # from the Makefile without running `make'.
53015    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
53016    test -z "$DEPDIR" && continue
53017    am__include=`sed -n 's/^am__include = //p' < "$mf"`
53018    test -z "am__include" && continue
53019    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
53020    # When using ansi2knr, U may be empty or an underscore; expand it
53021    U=`sed -n 's/^U = //p' < "$mf"`
53022    # Find all dependency output files, they are included files with
53023    # $(DEPDIR) in their names.  We invoke sed twice because it is the
53024    # simplest approach to changing $(DEPDIR) to its actual value in the
53025    # expansion.
53026    for file in `sed -n "
53027      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
53028	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
53029      # Make sure the directory exists.
53030      test -f "$dirpart/$file" && continue
53031      fdir=`$as_dirname -- "$file" ||
53032$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53033	 X"$file" : 'X\(//\)[^/]' \| \
53034	 X"$file" : 'X\(//\)$' \| \
53035	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
53036$as_echo X"$file" |
53037    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53038	    s//\1/
53039	    q
53040	  }
53041	  /^X\(\/\/\)[^/].*/{
53042	    s//\1/
53043	    q
53044	  }
53045	  /^X\(\/\/\)$/{
53046	    s//\1/
53047	    q
53048	  }
53049	  /^X\(\/\).*/{
53050	    s//\1/
53051	    q
53052	  }
53053	  s/.*/./; q'`
53054      as_dir=$dirpart/$fdir; as_fn_mkdir_p
53055      # echo "creating $dirpart/$file"
53056      echo '# dummy' > "$dirpart/$file"
53057    done
53058  done
53059}
53060 ;;
53061    "po-directories":C)
53062    for ac_file in $CONFIG_FILES; do
53063      # Support "outfile[:infile[:infile...]]"
53064      case "$ac_file" in
53065        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
53066      esac
53067      # PO directories have a Makefile.in generated from Makefile.in.in.
53068      case "$ac_file" in */Makefile.in)
53069        # Adjust a relative srcdir.
53070        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
53071        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
53072        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
53073        # In autoconf-2.13 it is called $ac_given_srcdir.
53074        # In autoconf-2.50 it is called $srcdir.
53075        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
53076        case "$ac_given_srcdir" in
53077          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
53078          /*) top_srcdir="$ac_given_srcdir" ;;
53079          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
53080        esac
53081        # Treat a directory as a PO directory if and only if it has a
53082        # POTFILES.in file. This allows packages to have multiple PO
53083        # directories under different names or in different locations.
53084        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
53085          rm -f "$ac_dir/POTFILES"
53086          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
53087          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
53088          POMAKEFILEDEPS="POTFILES.in"
53089          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
53090          # on $ac_dir but don't depend on user-specified configuration
53091          # parameters.
53092          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
53093            # The LINGUAS file contains the set of available languages.
53094            if test -n "$OBSOLETE_ALL_LINGUAS"; then
53095              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
53096            fi
53097            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
53098            # Hide the ALL_LINGUAS assigment from automake < 1.5.
53099            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
53100            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
53101          else
53102            # The set of available languages was given in configure.in.
53103            # Hide the ALL_LINGUAS assigment from automake < 1.5.
53104            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
53105          fi
53106          # Compute POFILES
53107          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
53108          # Compute UPDATEPOFILES
53109          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
53110          # Compute DUMMYPOFILES
53111          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
53112          # Compute GMOFILES
53113          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
53114          case "$ac_given_srcdir" in
53115            .) srcdirpre= ;;
53116            *) srcdirpre='$(srcdir)/' ;;
53117          esac
53118          POFILES=
53119          UPDATEPOFILES=
53120          DUMMYPOFILES=
53121          GMOFILES=
53122          for lang in $ALL_LINGUAS; do
53123            POFILES="$POFILES $srcdirpre$lang.po"
53124            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
53125            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
53126            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
53127          done
53128          # CATALOGS depends on both $ac_dir and the user's LINGUAS
53129          # environment variable.
53130          INST_LINGUAS=
53131          if test -n "$ALL_LINGUAS"; then
53132            for presentlang in $ALL_LINGUAS; do
53133              useit=no
53134              if test "%UNSET%" != "$LINGUAS"; then
53135                desiredlanguages="$LINGUAS"
53136              else
53137                desiredlanguages="$ALL_LINGUAS"
53138              fi
53139              for desiredlang in $desiredlanguages; do
53140                # Use the presentlang catalog if desiredlang is
53141                #   a. equal to presentlang, or
53142                #   b. a variant of presentlang (because in this case,
53143                #      presentlang can be used as a fallback for messages
53144                #      which are not translated in the desiredlang catalog).
53145                case "$desiredlang" in
53146                  "$presentlang"*) useit=yes;;
53147                esac
53148              done
53149              if test $useit = yes; then
53150                INST_LINGUAS="$INST_LINGUAS $presentlang"
53151              fi
53152            done
53153          fi
53154          CATALOGS=
53155          if test -n "$INST_LINGUAS"; then
53156            for lang in $INST_LINGUAS; do
53157              CATALOGS="$CATALOGS $lang.gmo"
53158            done
53159          fi
53160          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
53161          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"
53162          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
53163            if test -f "$f"; then
53164              case "$f" in
53165                *.orig | *.bak | *~) ;;
53166                *) cat "$f" >> "$ac_dir/Makefile" ;;
53167              esac
53168            fi
53169          done
53170        fi
53171        ;;
53172      esac
53173    done ;;
53174
53175  esac
53176done # for ac_tag
53177
53178
53179as_fn_exit 0
53180_ACEOF
53181ac_clean_files=$ac_clean_files_save
53182
53183test $ac_write_fail = 0 ||
53184  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
53185
53186
53187# configure is writing to config.log, and then calls config.status.
53188# config.status does its own redirection, appending to config.log.
53189# Unfortunately, on DOS this fails, as config.log is still kept open
53190# by configure, so config.status won't be able to write to it; its
53191# output is simply discarded.  So we exec the FD to /dev/null,
53192# effectively closing config.log, so it can be properly (re)opened and
53193# appended to by config.status.  When coming back to configure, we
53194# need to make the FD available again.
53195if test "$no_create" != yes; then
53196  ac_cs_success=:
53197  ac_config_status_args=
53198  test "$silent" = yes &&
53199    ac_config_status_args="$ac_config_status_args --quiet"
53200  exec 5>/dev/null
53201  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
53202  exec 5>>config.log
53203  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
53204  # would make configure fail if this is the last instruction.
53205  $ac_cs_success || as_fn_exit $?
53206fi
53207if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
53208  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
53209$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
53210fi
53211
53212