1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for gcal 4.1.
4#
5# Report bugs to <bug-gcal@gnu.org>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-gcal@gnu.org
270$0: about your system, including any error possibly output
271$0: before this message. Then install a modern shell, or
272$0: manually run the script under such a shell if you do
273$0: have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='gcal'
582PACKAGE_TARNAME='gcal'
583PACKAGE_VERSION='4.1'
584PACKAGE_STRING='gcal 4.1'
585PACKAGE_BUGREPORT='bug-gcal@gnu.org'
586PACKAGE_URL=''
587
588ac_unique_file="src/gcal.c"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
592#ifdef HAVE_SYS_TYPES_H
593# include <sys/types.h>
594#endif
595#ifdef HAVE_SYS_STAT_H
596# include <sys/stat.h>
597#endif
598#ifdef STDC_HEADERS
599# include <stdlib.h>
600# include <stddef.h>
601#else
602# ifdef HAVE_STDLIB_H
603#  include <stdlib.h>
604# endif
605#endif
606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
608#  include <memory.h>
609# endif
610# include <string.h>
611#endif
612#ifdef HAVE_STRINGS_H
613# include <strings.h>
614#endif
615#ifdef HAVE_INTTYPES_H
616# include <inttypes.h>
617#endif
618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
622# include <unistd.h>
623#endif"
624
625gl_use_threads_default=
626gt_needs=
627ac_func_list=
628gl_ceil_required=plain
629ac_header_list=
630gl_floor_required=plain
631gl_log_required=plain
632gl_log10_required=plain
633ac_subst_vars='gltests_LTLIBOBJS
634gltests_LIBOBJS
635gl_LTLIBOBJS
636gl_LIBOBJS
637CONFIG_INCLUDE
638am__EXEEXT_FALSE
639am__EXEEXT_TRUE
640LTLIBOBJS
641LIBOBJS
642LIBGNU_LTLIBDEPS
643LIBGNU_LIBDEPS
644gltests_WITNESS
645REPLACE_TOWLOWER
646REPLACE_ISWCNTRL
647HAVE_WCTYPE_H
648NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
649NEXT_WCTYPE_H
650HAVE_ISWCNTRL
651REPLACE_ISWBLANK
652HAVE_WCTRANS_T
653HAVE_WCTYPE_T
654HAVE_ISWBLANK
655GNULIB_TOWCTRANS
656GNULIB_WCTRANS
657GNULIB_ISWCTYPE
658GNULIB_WCTYPE
659GNULIB_ISWBLANK
660HAVE_WINT_T
661HAVE_FEATURES_H
662NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
663NEXT_WCHAR_H
664HAVE_UNISTD_H
665NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
666NEXT_UNISTD_H
667UNISTD_H_DEFINES_STRUCT_TIMESPEC
668PTHREAD_H_DEFINES_STRUCT_TIMESPEC
669SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
670TIME_H_DEFINES_STRUCT_TIMESPEC
671NEXT_AS_FIRST_DIRECTIVE_TIME_H
672NEXT_TIME_H
673REPLACE_LOCALTIME
674REPLACE_GMTIME
675REPLACE_TIMEGM
676REPLACE_NANOSLEEP
677REPLACE_MKTIME
678REPLACE_LOCALTIME_R
679HAVE_TIMEGM
680HAVE_STRPTIME
681HAVE_NANOSLEEP
682HAVE_DECL_LOCALTIME_R
683GNULIB_TIME_RZ
684GNULIB_TIME_R
685GNULIB_TIMEGM
686GNULIB_STRPTIME
687GNULIB_NANOSLEEP
688GNULIB_MKTIME
689TAN_LIBM
690NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
691NEXT_SYS_WAIT_H
692GNULIB_WAITPID
693HAVE_SYS_UIO_H
694NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
695NEXT_SYS_UIO_H
696NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
697NEXT_SYS_IOCTL_H
698HAVE_SYS_IOCTL_H
699HAVE_STRINGS_H
700NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
701NEXT_STRINGS_H
702HAVE_DECL_STRNCASECMP
703HAVE_STRCASECMP
704HAVE_FFS
705GNULIB_FFS
706NEXT_AS_FIRST_DIRECTIVE_STRING_H
707NEXT_STRING_H
708NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
709NEXT_STDLIB_H
710NEXT_AS_FIRST_DIRECTIVE_STDIO_H
711NEXT_STDIO_H
712GL_GENERATE_STDINT_H_FALSE
713GL_GENERATE_STDINT_H_TRUE
714STDINT_H
715HAVE_SYS_INTTYPES_H
716HAVE_SYS_BITYPES_H
717HAVE_C99_STDINT_H
718WINT_T_SUFFIX
719WCHAR_T_SUFFIX
720SIG_ATOMIC_T_SUFFIX
721SIZE_T_SUFFIX
722PTRDIFF_T_SUFFIX
723HAVE_SIGNED_WINT_T
724HAVE_SIGNED_WCHAR_T
725HAVE_SIGNED_SIG_ATOMIC_T
726BITSIZEOF_WINT_T
727BITSIZEOF_WCHAR_T
728BITSIZEOF_SIG_ATOMIC_T
729BITSIZEOF_SIZE_T
730BITSIZEOF_PTRDIFF_T
731HAVE_STDINT_H
732NEXT_AS_FIRST_DIRECTIVE_STDINT_H
733NEXT_STDINT_H
734HAVE_SYS_TYPES_H
735HAVE_INTTYPES_H
736HAVE_WCHAR_H
737HAVE_UNSIGNED_LONG_LONG_INT
738HAVE_LONG_LONG_INT
739GNULIB_OVERRIDES_WINT_T
740HAVE__BOOL
741GL_GENERATE_STDBOOL_H_FALSE
742GL_GENERATE_STDBOOL_H_TRUE
743STDBOOL_H
744GL_GENERATE_STDALIGN_H_FALSE
745GL_GENERATE_STDALIGN_H_TRUE
746STDALIGN_H
747SQRT_LIBM
748HAVE_SPAWN_H
749NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
750NEXT_SPAWN_H
751SIN_LIBM
752NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
753NEXT_SIGNAL_H
754GL_GENERATE_SCHED_H_FALSE
755GL_GENERATE_SCHED_H_TRUE
756SCHED_H
757HAVE_SYS_CDEFS_H
758HAVE_STRUCT_SCHED_PARAM
759HAVE_SCHED_H
760NEXT_AS_FIRST_DIRECTIVE_SCHED_H
761NEXT_SCHED_H
762REPLACE_RAISE
763REPLACE_PTHREAD_SIGMASK
764HAVE_SIGHANDLER_T
765HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
766HAVE_STRUCT_SIGACTION_SA_SIGACTION
767HAVE_SIGACTION
768HAVE_SIGINFO_T
769HAVE_SIGSET_T
770HAVE_RAISE
771HAVE_PTHREAD_SIGMASK
772HAVE_POSIX_SIGNALBLOCKING
773GNULIB_SIGACTION
774GNULIB_SIGPROCMASK
775GNULIB_SIGNAL_H_SIGPIPE
776GNULIB_RAISE
777GNULIB_PTHREAD_SIGMASK
778LIB_POSIX_SPAWN
779REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
780REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
781REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
782REPLACE_POSIX_SPAWN
783HAVE_POSIX_SPAWN_FILE_ACTIONS_T
784HAVE_POSIX_SPAWNATTR_T
785HAVE_POSIX_SPAWN
786GNULIB_POSIX_SPAWNATTR_DESTROY
787GNULIB_POSIX_SPAWNATTR_SETSIGMASK
788GNULIB_POSIX_SPAWNATTR_GETSIGMASK
789GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
790GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
791GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
792GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
793GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
794GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
795GNULIB_POSIX_SPAWNATTR_SETPGROUP
796GNULIB_POSIX_SPAWNATTR_GETPGROUP
797GNULIB_POSIX_SPAWNATTR_SETFLAGS
798GNULIB_POSIX_SPAWNATTR_GETFLAGS
799GNULIB_POSIX_SPAWNATTR_INIT
800GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
801GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
802GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
803GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
804GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
805GNULIB_POSIX_SPAWNP
806GNULIB_POSIX_SPAWN
807APPLE_UNIVERSAL_BUILD
808UNDEFINE_STRTOK_R
809REPLACE_STRTOK_R
810REPLACE_STRSIGNAL
811REPLACE_STRNLEN
812REPLACE_STRNDUP
813REPLACE_STRNCAT
814REPLACE_STRERROR_R
815REPLACE_STRERROR
816REPLACE_STRCHRNUL
817REPLACE_STRCASESTR
818REPLACE_STRSTR
819REPLACE_STRDUP
820REPLACE_STPNCPY
821REPLACE_MEMMEM
822REPLACE_MEMCHR
823HAVE_STRVERSCMP
824HAVE_DECL_STRSIGNAL
825HAVE_DECL_STRERROR_R
826HAVE_DECL_STRTOK_R
827HAVE_STRCASESTR
828HAVE_STRSEP
829HAVE_STRPBRK
830HAVE_DECL_STRNLEN
831HAVE_DECL_STRNDUP
832HAVE_DECL_STRDUP
833HAVE_STRCHRNUL
834HAVE_STPNCPY
835HAVE_STPCPY
836HAVE_RAWMEMCHR
837HAVE_DECL_MEMRCHR
838HAVE_MEMPCPY
839HAVE_DECL_MEMMEM
840HAVE_MEMCHR
841HAVE_FFSLL
842HAVE_FFSL
843HAVE_MBSLEN
844GNULIB_STRVERSCMP
845GNULIB_STRSIGNAL
846GNULIB_STRERROR_R
847GNULIB_STRERROR
848GNULIB_MBSTOK_R
849GNULIB_MBSSEP
850GNULIB_MBSSPN
851GNULIB_MBSPBRK
852GNULIB_MBSCSPN
853GNULIB_MBSCASESTR
854GNULIB_MBSPCASECMP
855GNULIB_MBSNCASECMP
856GNULIB_MBSCASECMP
857GNULIB_MBSSTR
858GNULIB_MBSRCHR
859GNULIB_MBSCHR
860GNULIB_MBSNLEN
861GNULIB_MBSLEN
862GNULIB_STRTOK_R
863GNULIB_STRCASESTR
864GNULIB_STRSTR
865GNULIB_STRSEP
866GNULIB_STRPBRK
867GNULIB_STRNLEN
868GNULIB_STRNDUP
869GNULIB_STRNCAT
870GNULIB_STRDUP
871GNULIB_STRCHRNUL
872GNULIB_STPNCPY
873GNULIB_STPCPY
874GNULIB_RAWMEMCHR
875GNULIB_MEMRCHR
876GNULIB_MEMPCPY
877GNULIB_MEMMEM
878GNULIB_MEMCHR
879GNULIB_FFSLL
880GNULIB_FFSL
881LOCALE_FR_UTF8
882LOCALE_ZH_CN
883LOCALE_JA
884NEXT_AS_FIRST_DIRECTIVE_MATH_H
885NEXT_MATH_H
886REPLACE_WCTOMB
887REPLACE_UNSETENV
888REPLACE_STRTOD
889REPLACE_SETENV
890REPLACE_REALPATH
891REPLACE_REALLOC
892REPLACE_RANDOM_R
893REPLACE_QSORT_R
894REPLACE_PUTENV
895REPLACE_PTSNAME_R
896REPLACE_PTSNAME
897REPLACE_MKSTEMP
898REPLACE_MBTOWC
899REPLACE_MALLOC
900REPLACE_CANONICALIZE_FILE_NAME
901REPLACE_CALLOC
902HAVE_DECL_UNSETENV
903HAVE_UNLOCKPT
904HAVE_SYS_LOADAVG_H
905HAVE_STRUCT_RANDOM_DATA
906HAVE_STRTOULL
907HAVE_STRTOLL
908HAVE_STRTOD
909HAVE_DECL_SETENV
910HAVE_SETENV
911HAVE_SECURE_GETENV
912HAVE_RPMATCH
913HAVE_REALPATH
914HAVE_RANDOM_R
915HAVE_RANDOM_H
916HAVE_RANDOM
917HAVE_QSORT_R
918HAVE_PTSNAME_R
919HAVE_PTSNAME
920HAVE_POSIX_OPENPT
921HAVE_MKSTEMPS
922HAVE_MKSTEMP
923HAVE_MKOSTEMPS
924HAVE_MKOSTEMP
925HAVE_MKDTEMP
926HAVE_GRANTPT
927HAVE_GETSUBOPT
928HAVE_DECL_GETLOADAVG
929HAVE_CANONICALIZE_FILE_NAME
930HAVE_ATOLL
931HAVE__EXIT
932GNULIB_WCTOMB
933GNULIB_UNSETENV
934GNULIB_UNLOCKPT
935GNULIB_SYSTEM_POSIX
936GNULIB_STRTOULL
937GNULIB_STRTOLL
938GNULIB_STRTOD
939GNULIB_SETENV
940GNULIB_SECURE_GETENV
941GNULIB_RPMATCH
942GNULIB_REALPATH
943GNULIB_REALLOC_POSIX
944GNULIB_RANDOM_R
945GNULIB_RANDOM
946GNULIB_QSORT_R
947GNULIB_PUTENV
948GNULIB_PTSNAME_R
949GNULIB_PTSNAME
950GNULIB_POSIX_OPENPT
951GNULIB_MKSTEMPS
952GNULIB_MKSTEMP
953GNULIB_MKOSTEMPS
954GNULIB_MKOSTEMP
955GNULIB_MKDTEMP
956GNULIB_MBTOWC
957GNULIB_MALLOC_POSIX
958GNULIB_GRANTPT
959GNULIB_GETSUBOPT
960GNULIB_GETLOADAVG
961GNULIB_CANONICALIZE_FILE_NAME
962GNULIB_CALLOC_POSIX
963GNULIB_ATOLL
964GNULIB__EXIT
965SED
966LOG10_LIBM
967LOG_LIBM
968NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
969NEXT_LOCALE_H
970HAVE_XLOCALE_H
971NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
972NEXT_STDDEF_H
973GL_GENERATE_STDDEF_H_FALSE
974GL_GENERATE_STDDEF_H_TRUE
975STDDEF_H
976HAVE_WCHAR_T
977HAVE_MAX_ALIGN_T
978REPLACE_NULL
979REPLACE_STRUCT_LCONV
980REPLACE_DUPLOCALE
981REPLACE_SETLOCALE
982REPLACE_LOCALECONV
983HAVE_DUPLOCALE
984GNULIB_DUPLOCALE
985GNULIB_SETLOCALE
986GNULIB_LOCALECONV
987LOCALCHARSET_TESTS_ENVIRONMENT
988GLIBC21
989GL_GENERATE_LIMITS_H_FALSE
990GL_GENERATE_LIMITS_H_TRUE
991LIMITS_H
992NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
993NEXT_LIMITS_H
994HAVE_LANGINFO_YESEXPR
995HAVE_LANGINFO_ERA
996HAVE_LANGINFO_T_FMT_AMPM
997HAVE_LANGINFO_CODESET
998HAVE_LANGINFO_H
999NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
1000NEXT_LANGINFO_H
1001REPLACE_NL_LANGINFO
1002HAVE_NL_LANGINFO
1003GNULIB_NL_LANGINFO
1004HAVE_WS2TCPIP_H
1005HAVE_SYS_SOCKET_H
1006NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
1007NEXT_SYS_SOCKET_H
1008HAVE_ACCEPT4
1009HAVE_SA_FAMILY_T
1010HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
1011HAVE_STRUCT_SOCKADDR_STORAGE
1012GNULIB_ACCEPT4
1013GNULIB_SHUTDOWN
1014GNULIB_SETSOCKOPT
1015GNULIB_SENDTO
1016GNULIB_RECVFROM
1017GNULIB_SEND
1018GNULIB_RECV
1019GNULIB_LISTEN
1020GNULIB_GETSOCKOPT
1021GNULIB_GETSOCKNAME
1022GNULIB_GETPEERNAME
1023GNULIB_BIND
1024GNULIB_ACCEPT
1025GNULIB_CONNECT
1026GNULIB_SOCKET
1027NEXT_AS_FIRST_DIRECTIVE_ICONV_H
1028NEXT_ICONV_H
1029GL_GENERATE_ICONV_H_FALSE
1030GL_GENERATE_ICONV_H_TRUE
1031ICONV_H
1032REPLACE_ICONV_UTF
1033REPLACE_ICONV_OPEN
1034REPLACE_ICONV
1035ICONV_CONST
1036GNULIB_ICONV
1037NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1038NEXT_SYS_TIME_H
1039REPLACE_STRUCT_TIMEVAL
1040REPLACE_GETTIMEOFDAY
1041HAVE_TIMEZONE_T
1042HAVE_SYS_TIME_H
1043HAVE_STRUCT_TIMEVAL
1044HAVE_GETTIMEOFDAY
1045GNULIB_GETTIMEOFDAY
1046WINDOWS_64_BIT_ST_SIZE
1047NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1048NEXT_SYS_STAT_H
1049REPLACE_UTIMENSAT
1050REPLACE_STAT
1051REPLACE_MKNOD
1052REPLACE_MKFIFO
1053REPLACE_MKDIR
1054REPLACE_LSTAT
1055REPLACE_FUTIMENS
1056REPLACE_FSTATAT
1057REPLACE_FSTAT
1058HAVE_UTIMENSAT
1059HAVE_MKNODAT
1060HAVE_MKNOD
1061HAVE_MKFIFOAT
1062HAVE_MKFIFO
1063HAVE_MKDIRAT
1064HAVE_LSTAT
1065HAVE_LCHMOD
1066HAVE_FUTIMENS
1067HAVE_FSTATAT
1068HAVE_FCHMODAT
1069GNULIB_UTIMENSAT
1070GNULIB_STAT
1071GNULIB_MKNODAT
1072GNULIB_MKNOD
1073GNULIB_MKFIFOAT
1074GNULIB_MKFIFO
1075GNULIB_MKDIRAT
1076GNULIB_LSTAT
1077GNULIB_LCHMOD
1078GNULIB_FUTIMENS
1079GNULIB_FSTATAT
1080GNULIB_FSTAT
1081GNULIB_FCHMODAT
1082WINDOWS_64_BIT_OFF_T
1083NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
1084NEXT_SYS_TYPES_H
1085FLOOR_LIBM
1086REPLACE_ITOLD
1087GL_GENERATE_FLOAT_H_FALSE
1088GL_GENERATE_FLOAT_H_TRUE
1089FLOAT_H
1090NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1091NEXT_FLOAT_H
1092NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1093NEXT_FCNTL_H
1094REPLACE_OPENAT
1095REPLACE_OPEN
1096REPLACE_FCNTL
1097HAVE_OPENAT
1098HAVE_FCNTL
1099GNULIB_OPENAT
1100GNULIB_OPEN
1101GNULIB_NONBLOCKING
1102GNULIB_FCNTL
1103REPLACE_VSPRINTF
1104REPLACE_VSNPRINTF
1105REPLACE_VPRINTF
1106REPLACE_VFPRINTF
1107REPLACE_VDPRINTF
1108REPLACE_VASPRINTF
1109REPLACE_TMPFILE
1110REPLACE_STDIO_WRITE_FUNCS
1111REPLACE_STDIO_READ_FUNCS
1112REPLACE_SPRINTF
1113REPLACE_SNPRINTF
1114REPLACE_RENAMEAT
1115REPLACE_RENAME
1116REPLACE_REMOVE
1117REPLACE_PRINTF
1118REPLACE_POPEN
1119REPLACE_PERROR
1120REPLACE_OBSTACK_PRINTF
1121REPLACE_GETLINE
1122REPLACE_GETDELIM
1123REPLACE_FTELLO
1124REPLACE_FTELL
1125REPLACE_FSEEKO
1126REPLACE_FSEEK
1127REPLACE_FREOPEN
1128REPLACE_FPURGE
1129REPLACE_FPRINTF
1130REPLACE_FOPEN
1131REPLACE_FFLUSH
1132REPLACE_FDOPEN
1133REPLACE_FCLOSE
1134REPLACE_DPRINTF
1135HAVE_VDPRINTF
1136HAVE_VASPRINTF
1137HAVE_RENAMEAT
1138HAVE_POPEN
1139HAVE_PCLOSE
1140HAVE_FTELLO
1141HAVE_FSEEKO
1142HAVE_DPRINTF
1143HAVE_DECL_VSNPRINTF
1144HAVE_DECL_SNPRINTF
1145HAVE_DECL_OBSTACK_PRINTF
1146HAVE_DECL_GETLINE
1147HAVE_DECL_GETDELIM
1148HAVE_DECL_FTELLO
1149HAVE_DECL_FSEEKO
1150HAVE_DECL_FPURGE
1151GNULIB_VSPRINTF_POSIX
1152GNULIB_VSNPRINTF
1153GNULIB_VPRINTF_POSIX
1154GNULIB_VPRINTF
1155GNULIB_VFPRINTF_POSIX
1156GNULIB_VFPRINTF
1157GNULIB_VDPRINTF
1158GNULIB_VSCANF
1159GNULIB_VFSCANF
1160GNULIB_VASPRINTF
1161GNULIB_TMPFILE
1162GNULIB_STDIO_H_SIGPIPE
1163GNULIB_STDIO_H_NONBLOCKING
1164GNULIB_SPRINTF_POSIX
1165GNULIB_SNPRINTF
1166GNULIB_SCANF
1167GNULIB_RENAMEAT
1168GNULIB_RENAME
1169GNULIB_REMOVE
1170GNULIB_PUTS
1171GNULIB_PUTCHAR
1172GNULIB_PUTC
1173GNULIB_PRINTF_POSIX
1174GNULIB_PRINTF
1175GNULIB_POPEN
1176GNULIB_PERROR
1177GNULIB_PCLOSE
1178GNULIB_OBSTACK_PRINTF_POSIX
1179GNULIB_OBSTACK_PRINTF
1180GNULIB_GETLINE
1181GNULIB_GETDELIM
1182GNULIB_GETCHAR
1183GNULIB_GETC
1184GNULIB_FWRITE
1185GNULIB_FTELLO
1186GNULIB_FTELL
1187GNULIB_FSEEKO
1188GNULIB_FSEEK
1189GNULIB_FSCANF
1190GNULIB_FREOPEN
1191GNULIB_FREAD
1192GNULIB_FPUTS
1193GNULIB_FPUTC
1194GNULIB_FPURGE
1195GNULIB_FPRINTF_POSIX
1196GNULIB_FPRINTF
1197GNULIB_FOPEN
1198GNULIB_FGETS
1199GNULIB_FGETC
1200GNULIB_FFLUSH
1201GNULIB_FDOPEN
1202GNULIB_FCLOSE
1203GNULIB_DPRINTF
1204EOVERFLOW_VALUE
1205EOVERFLOW_HIDDEN
1206ENOLINK_VALUE
1207ENOLINK_HIDDEN
1208EMULTIHOP_VALUE
1209EMULTIHOP_HIDDEN
1210GL_GENERATE_ERRNO_H_FALSE
1211GL_GENERATE_ERRNO_H_TRUE
1212ERRNO_H
1213NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1214NEXT_ERRNO_H
1215PRAGMA_COLUMNS
1216PRAGMA_SYSTEM_HEADER
1217INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1218INCLUDE_NEXT
1219COS_LIBM
1220pkglibexecdir
1221runstatedir
1222lispdir
1223LTLIBMULTITHREAD
1224LIBMULTITHREAD
1225LTLIBTHREAD
1226LIBTHREAD
1227LIBPTH_PREFIX
1228LTLIBPTH
1229LIBPTH
1230HAVE_WINSOCK2_H
1231REPLACE_IOCTL
1232SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1233SYS_IOCTL_H_HAVE_WINSOCK2_H
1234GNULIB_IOCTL
1235HAVE_MSVC_INVALID_PARAMETER_HANDLER
1236UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1237UNISTD_H_HAVE_WINSOCK2_H
1238REPLACE_WRITE
1239REPLACE_USLEEP
1240REPLACE_UNLINKAT
1241REPLACE_UNLINK
1242REPLACE_TTYNAME_R
1243REPLACE_SYMLINKAT
1244REPLACE_SYMLINK
1245REPLACE_SLEEP
1246REPLACE_RMDIR
1247REPLACE_READLINKAT
1248REPLACE_READLINK
1249REPLACE_READ
1250REPLACE_PWRITE
1251REPLACE_PREAD
1252REPLACE_LSEEK
1253REPLACE_LINKAT
1254REPLACE_LINK
1255REPLACE_LCHOWN
1256REPLACE_ISATTY
1257REPLACE_GETPAGESIZE
1258REPLACE_GETGROUPS
1259REPLACE_GETLOGIN_R
1260REPLACE_GETDTABLESIZE
1261REPLACE_GETDOMAINNAME
1262REPLACE_GETCWD
1263REPLACE_FTRUNCATE
1264REPLACE_FCHOWNAT
1265REPLACE_DUP2
1266REPLACE_DUP
1267REPLACE_CLOSE
1268REPLACE_CHOWN
1269HAVE_SYS_PARAM_H
1270HAVE_OS_H
1271HAVE_DECL_TTYNAME_R
1272HAVE_DECL_SETHOSTNAME
1273HAVE_DECL_GETUSERSHELL
1274HAVE_DECL_GETPAGESIZE
1275HAVE_DECL_GETLOGIN_R
1276HAVE_DECL_GETLOGIN
1277HAVE_DECL_GETDOMAINNAME
1278HAVE_DECL_FDATASYNC
1279HAVE_DECL_FCHDIR
1280HAVE_DECL_ENVIRON
1281HAVE_USLEEP
1282HAVE_UNLINKAT
1283HAVE_SYMLINKAT
1284HAVE_SYMLINK
1285HAVE_SLEEP
1286HAVE_SETHOSTNAME
1287HAVE_READLINKAT
1288HAVE_READLINK
1289HAVE_PWRITE
1290HAVE_PREAD
1291HAVE_PIPE2
1292HAVE_PIPE
1293HAVE_LINKAT
1294HAVE_LINK
1295HAVE_LCHOWN
1296HAVE_GROUP_MEMBER
1297HAVE_GETPAGESIZE
1298HAVE_GETLOGIN
1299HAVE_GETHOSTNAME
1300HAVE_GETGROUPS
1301HAVE_GETDTABLESIZE
1302HAVE_FTRUNCATE
1303HAVE_FSYNC
1304HAVE_FDATASYNC
1305HAVE_FCHOWNAT
1306HAVE_FCHDIR
1307HAVE_FACCESSAT
1308HAVE_EUIDACCESS
1309HAVE_DUP3
1310HAVE_DUP2
1311HAVE_CHOWN
1312GNULIB_WRITE
1313GNULIB_USLEEP
1314GNULIB_UNLINKAT
1315GNULIB_UNLINK
1316GNULIB_UNISTD_H_SIGPIPE
1317GNULIB_UNISTD_H_NONBLOCKING
1318GNULIB_TTYNAME_R
1319GNULIB_SYMLINKAT
1320GNULIB_SYMLINK
1321GNULIB_SLEEP
1322GNULIB_SETHOSTNAME
1323GNULIB_RMDIR
1324GNULIB_READLINKAT
1325GNULIB_READLINK
1326GNULIB_READ
1327GNULIB_PWRITE
1328GNULIB_PREAD
1329GNULIB_PIPE2
1330GNULIB_PIPE
1331GNULIB_LSEEK
1332GNULIB_LINKAT
1333GNULIB_LINK
1334GNULIB_LCHOWN
1335GNULIB_ISATTY
1336GNULIB_GROUP_MEMBER
1337GNULIB_GETUSERSHELL
1338GNULIB_GETPAGESIZE
1339GNULIB_GETLOGIN_R
1340GNULIB_GETLOGIN
1341GNULIB_GETHOSTNAME
1342GNULIB_GETGROUPS
1343GNULIB_GETDTABLESIZE
1344GNULIB_GETDOMAINNAME
1345GNULIB_GETCWD
1346GNULIB_FTRUNCATE
1347GNULIB_FSYNC
1348GNULIB_FDATASYNC
1349GNULIB_FCHOWNAT
1350GNULIB_FCHDIR
1351GNULIB_FACCESSAT
1352GNULIB_EUIDACCESS
1353GNULIB_ENVIRON
1354GNULIB_DUP3
1355GNULIB_DUP2
1356GNULIB_DUP
1357GNULIB_CLOSE
1358GNULIB_CHOWN
1359GNULIB_CHDIR
1360CEIL_LIBM
1361REPLACE_TRUNCL
1362REPLACE_TRUNCF
1363REPLACE_TRUNC
1364REPLACE_TANHF
1365REPLACE_TANF
1366REPLACE_SQRTL
1367REPLACE_SQRTF
1368REPLACE_SINHF
1369REPLACE_SINF
1370REPLACE_SIGNBIT_USING_GCC
1371REPLACE_SIGNBIT
1372REPLACE_ROUNDL
1373REPLACE_ROUNDF
1374REPLACE_ROUND
1375REPLACE_REMAINDERL
1376REPLACE_REMAINDERF
1377REPLACE_REMAINDER
1378REPLACE_NAN
1379REPLACE_MODFL
1380REPLACE_MODFF
1381REPLACE_MODF
1382REPLACE_LOGBL
1383REPLACE_LOGBF
1384REPLACE_LOGB
1385REPLACE_LOG2L
1386REPLACE_LOG2F
1387REPLACE_LOG2
1388REPLACE_LOG1PL
1389REPLACE_LOG1PF
1390REPLACE_LOG1P
1391REPLACE_LOG10L
1392REPLACE_LOG10F
1393REPLACE_LOG10
1394REPLACE_LOGL
1395REPLACE_LOGF
1396REPLACE_LOG
1397REPLACE_LDEXPL
1398REPLACE_ISNAN
1399REPLACE_ISINF
1400REPLACE_ISFINITE
1401REPLACE_ILOGBF
1402REPLACE_ILOGB
1403REPLACE_HYPOTL
1404REPLACE_HYPOTF
1405REPLACE_HYPOT
1406REPLACE_HUGE_VAL
1407REPLACE_FREXPL
1408REPLACE_FREXP
1409REPLACE_FREXPF
1410REPLACE_FMODL
1411REPLACE_FMODF
1412REPLACE_FMOD
1413REPLACE_FMAL
1414REPLACE_FMAF
1415REPLACE_FMA
1416REPLACE_FLOORL
1417REPLACE_FLOORF
1418REPLACE_FLOOR
1419REPLACE_FABSL
1420REPLACE_EXP2L
1421REPLACE_EXP2
1422REPLACE_EXPM1F
1423REPLACE_EXPM1
1424REPLACE_EXPF
1425REPLACE_COSHF
1426REPLACE_COSF
1427REPLACE_CEILL
1428REPLACE_CEILF
1429REPLACE_CEIL
1430REPLACE_CBRTL
1431REPLACE_CBRTF
1432REPLACE_ATAN2F
1433REPLACE_ATANF
1434REPLACE_ASINF
1435REPLACE_ACOSF
1436HAVE_DECL_TRUNCL
1437HAVE_DECL_TRUNCF
1438HAVE_DECL_TRUNC
1439HAVE_DECL_TANL
1440HAVE_DECL_SQRTL
1441HAVE_DECL_SINL
1442HAVE_DECL_ROUNDL
1443HAVE_DECL_ROUNDF
1444HAVE_DECL_ROUND
1445HAVE_DECL_RINTF
1446HAVE_DECL_REMAINDERL
1447HAVE_DECL_REMAINDER
1448HAVE_DECL_LOGB
1449HAVE_DECL_LOG2L
1450HAVE_DECL_LOG2F
1451HAVE_DECL_LOG2
1452HAVE_DECL_LOG10L
1453HAVE_DECL_LOGL
1454HAVE_DECL_LDEXPL
1455HAVE_DECL_FREXPL
1456HAVE_DECL_FLOORL
1457HAVE_DECL_FLOORF
1458HAVE_DECL_EXPM1L
1459HAVE_DECL_EXP2L
1460HAVE_DECL_EXP2F
1461HAVE_DECL_EXP2
1462HAVE_DECL_EXPL
1463HAVE_DECL_COSL
1464HAVE_DECL_COPYSIGNF
1465HAVE_DECL_CEILL
1466HAVE_DECL_CEILF
1467HAVE_DECL_CBRTL
1468HAVE_DECL_CBRTF
1469HAVE_DECL_ATANL
1470HAVE_DECL_ASINL
1471HAVE_DECL_ACOSL
1472HAVE_TANHF
1473HAVE_TANL
1474HAVE_TANF
1475HAVE_SQRTL
1476HAVE_SQRTF
1477HAVE_SINHF
1478HAVE_SINL
1479HAVE_SINF
1480HAVE_RINTL
1481HAVE_RINT
1482HAVE_REMAINDERF
1483HAVE_REMAINDER
1484HAVE_POWF
1485HAVE_MODFL
1486HAVE_MODFF
1487HAVE_LOGBL
1488HAVE_LOGBF
1489HAVE_LOG1PL
1490HAVE_LOG1PF
1491HAVE_LOG1P
1492HAVE_LOG10L
1493HAVE_LOG10F
1494HAVE_LOGL
1495HAVE_LOGF
1496HAVE_LDEXPF
1497HAVE_ISNANL
1498HAVE_ISNAND
1499HAVE_ISNANF
1500HAVE_ILOGBL
1501HAVE_ILOGBF
1502HAVE_ILOGB
1503HAVE_HYPOTL
1504HAVE_HYPOTF
1505HAVE_FREXPF
1506HAVE_FMODL
1507HAVE_FMODF
1508HAVE_FMAL
1509HAVE_FMAF
1510HAVE_FMA
1511HAVE_FABSL
1512HAVE_FABSF
1513HAVE_EXPM1F
1514HAVE_EXPM1
1515HAVE_EXPL
1516HAVE_EXPF
1517HAVE_COSHF
1518HAVE_COSL
1519HAVE_COSF
1520HAVE_COPYSIGNL
1521HAVE_COPYSIGN
1522HAVE_CBRTL
1523HAVE_CBRTF
1524HAVE_CBRT
1525HAVE_ATAN2F
1526HAVE_ATANL
1527HAVE_ATANF
1528HAVE_ASINL
1529HAVE_ASINF
1530HAVE_ACOSL
1531HAVE_ACOSF
1532GNULIB_TRUNCL
1533GNULIB_TRUNCF
1534GNULIB_TRUNC
1535GNULIB_TANHF
1536GNULIB_TANL
1537GNULIB_TANF
1538GNULIB_SQRTL
1539GNULIB_SQRTF
1540GNULIB_SINHF
1541GNULIB_SINL
1542GNULIB_SINF
1543GNULIB_SIGNBIT
1544GNULIB_ROUNDL
1545GNULIB_ROUNDF
1546GNULIB_ROUND
1547GNULIB_RINTL
1548GNULIB_RINTF
1549GNULIB_RINT
1550GNULIB_REMAINDERL
1551GNULIB_REMAINDERF
1552GNULIB_REMAINDER
1553GNULIB_POWF
1554GNULIB_MODFL
1555GNULIB_MODFF
1556GNULIB_MODF
1557GNULIB_LOGBL
1558GNULIB_LOGBF
1559GNULIB_LOGB
1560GNULIB_LOG2L
1561GNULIB_LOG2F
1562GNULIB_LOG2
1563GNULIB_LOG1PL
1564GNULIB_LOG1PF
1565GNULIB_LOG1P
1566GNULIB_LOG10L
1567GNULIB_LOG10F
1568GNULIB_LOG10
1569GNULIB_LOGL
1570GNULIB_LOGF
1571GNULIB_LOG
1572GNULIB_LDEXPL
1573GNULIB_LDEXPF
1574GNULIB_ISNANL
1575GNULIB_ISNAND
1576GNULIB_ISNANF
1577GNULIB_ISNAN
1578GNULIB_ISINF
1579GNULIB_ISFINITE
1580GNULIB_ILOGBL
1581GNULIB_ILOGBF
1582GNULIB_ILOGB
1583GNULIB_HYPOTL
1584GNULIB_HYPOTF
1585GNULIB_HYPOT
1586GNULIB_FREXPL
1587GNULIB_FREXP
1588GNULIB_FREXPF
1589GNULIB_FMODL
1590GNULIB_FMODF
1591GNULIB_FMOD
1592GNULIB_FMAL
1593GNULIB_FMAF
1594GNULIB_FMA
1595GNULIB_FLOORL
1596GNULIB_FLOORF
1597GNULIB_FLOOR
1598GNULIB_FABSL
1599GNULIB_FABSF
1600GNULIB_EXPM1L
1601GNULIB_EXPM1F
1602GNULIB_EXPM1
1603GNULIB_EXP2L
1604GNULIB_EXP2F
1605GNULIB_EXP2
1606GNULIB_EXPL
1607GNULIB_EXPF
1608GNULIB_COSHF
1609GNULIB_COSL
1610GNULIB_COSF
1611GNULIB_COPYSIGNL
1612GNULIB_COPYSIGNF
1613GNULIB_COPYSIGN
1614GNULIB_CEILL
1615GNULIB_CEILF
1616GNULIB_CEIL
1617GNULIB_CBRTL
1618GNULIB_CBRTF
1619GNULIB_CBRT
1620GNULIB_ATAN2F
1621GNULIB_ATANL
1622GNULIB_ATANF
1623GNULIB_ASINL
1624GNULIB_ASINF
1625GNULIB_ACOSL
1626GNULIB_ACOSF
1627LOCALE_FR
1628REPLACE_WCSWIDTH
1629REPLACE_WCWIDTH
1630REPLACE_WCSNRTOMBS
1631REPLACE_WCSRTOMBS
1632REPLACE_WCRTOMB
1633REPLACE_MBSNRTOWCS
1634REPLACE_MBSRTOWCS
1635REPLACE_MBRLEN
1636REPLACE_MBRTOWC
1637REPLACE_MBSINIT
1638REPLACE_WCTOB
1639REPLACE_BTOWC
1640REPLACE_MBSTATE_T
1641HAVE_DECL_WCWIDTH
1642HAVE_DECL_WCTOB
1643HAVE_WCSWIDTH
1644HAVE_WCSTOK
1645HAVE_WCSSTR
1646HAVE_WCSPBRK
1647HAVE_WCSSPN
1648HAVE_WCSCSPN
1649HAVE_WCSRCHR
1650HAVE_WCSCHR
1651HAVE_WCSDUP
1652HAVE_WCSXFRM
1653HAVE_WCSCOLL
1654HAVE_WCSNCASECMP
1655HAVE_WCSCASECMP
1656HAVE_WCSNCMP
1657HAVE_WCSCMP
1658HAVE_WCSNCAT
1659HAVE_WCSCAT
1660HAVE_WCPNCPY
1661HAVE_WCSNCPY
1662HAVE_WCPCPY
1663HAVE_WCSCPY
1664HAVE_WCSNLEN
1665HAVE_WCSLEN
1666HAVE_WMEMSET
1667HAVE_WMEMMOVE
1668HAVE_WMEMCPY
1669HAVE_WMEMCMP
1670HAVE_WMEMCHR
1671HAVE_WCSNRTOMBS
1672HAVE_WCSRTOMBS
1673HAVE_WCRTOMB
1674HAVE_MBSNRTOWCS
1675HAVE_MBSRTOWCS
1676HAVE_MBRLEN
1677HAVE_MBRTOWC
1678HAVE_MBSINIT
1679HAVE_BTOWC
1680GNULIB_WCSWIDTH
1681GNULIB_WCSTOK
1682GNULIB_WCSSTR
1683GNULIB_WCSPBRK
1684GNULIB_WCSSPN
1685GNULIB_WCSCSPN
1686GNULIB_WCSRCHR
1687GNULIB_WCSCHR
1688GNULIB_WCSDUP
1689GNULIB_WCSXFRM
1690GNULIB_WCSCOLL
1691GNULIB_WCSNCASECMP
1692GNULIB_WCSCASECMP
1693GNULIB_WCSNCMP
1694GNULIB_WCSCMP
1695GNULIB_WCSNCAT
1696GNULIB_WCSCAT
1697GNULIB_WCPNCPY
1698GNULIB_WCSNCPY
1699GNULIB_WCPCPY
1700GNULIB_WCSCPY
1701GNULIB_WCSNLEN
1702GNULIB_WCSLEN
1703GNULIB_WMEMSET
1704GNULIB_WMEMMOVE
1705GNULIB_WMEMCPY
1706GNULIB_WMEMCMP
1707GNULIB_WMEMCHR
1708GNULIB_WCWIDTH
1709GNULIB_WCSNRTOMBS
1710GNULIB_WCSRTOMBS
1711GNULIB_WCRTOMB
1712GNULIB_MBSNRTOWCS
1713GNULIB_MBSRTOWCS
1714GNULIB_MBRLEN
1715GNULIB_MBRTOWC
1716GNULIB_MBSINIT
1717GNULIB_WCTOB
1718GNULIB_BTOWC
1719ATAN2_LIBM
1720ATAN_LIBM
1721ASIN_LIBM
1722GL_GENERATE_ALLOCA_H_FALSE
1723GL_GENERATE_ALLOCA_H_TRUE
1724ALLOCA_H
1725ACOS_LIBM
1726POW_LIBM
1727GL_COND_LIBTOOL_FALSE
1728GL_COND_LIBTOOL_TRUE
1729POSUB
1730LTLIBINTL
1731LIBINTL
1732INTLLIBS
1733LTLIBICONV
1734LIBICONV
1735INTL_MACOSX_LIBS
1736XGETTEXT_EXTRA_OPTIONS
1737MSGMERGE
1738XGETTEXT_015
1739XGETTEXT
1740GMSGFMT_015
1741MSGFMT_015
1742GMSGFMT
1743MSGFMT
1744GETTEXT_MACRO_VERSION
1745USE_NLS
1746LIBM
1747LN_S
1748CP
1749PAGER3
1750PAGER2
1751PAGER1
1752ZDUMP
1753PERL
1754GCAL_RC_OBJS
1755GCAL_HD_OBJS
1756ALLOCA
1757host_os
1758host_vendor
1759host_cpu
1760host
1761build_os
1762build_vendor
1763build_cpu
1764build
1765ARFLAGS
1766ac_ct_AR
1767AR
1768RANLIB
1769EGREP
1770GREP
1771CPP
1772am__fastdepCC_FALSE
1773am__fastdepCC_TRUE
1774CCDEPMODE
1775am__nodep
1776AMDEPBACKSLASH
1777AMDEP_FALSE
1778AMDEP_TRUE
1779am__quote
1780am__include
1781DEPDIR
1782OBJEXT
1783EXEEXT
1784ac_ct_CC
1785CPPFLAGS
1786LDFLAGS
1787CFLAGS
1788CC
1789AM_BACKSLASH
1790AM_DEFAULT_VERBOSITY
1791AM_DEFAULT_V
1792AM_V
1793am__untar
1794am__tar
1795AMTAR
1796am__leading_dot
1797SET_MAKE
1798AWK
1799mkdir_p
1800MKDIR_P
1801INSTALL_STRIP_PROGRAM
1802STRIP
1803install_sh
1804MAKEINFO
1805AUTOHEADER
1806AUTOMAKE
1807AUTOCONF
1808ACLOCAL
1809VERSION
1810PACKAGE
1811CYGPATH_W
1812am__isrc
1813INSTALL_DATA
1814INSTALL_SCRIPT
1815INSTALL_PROGRAM
1816target_alias
1817host_alias
1818build_alias
1819LIBS
1820ECHO_T
1821ECHO_N
1822ECHO_C
1823DEFS
1824mandir
1825localedir
1826libdir
1827psdir
1828pdfdir
1829dvidir
1830htmldir
1831infodir
1832docdir
1833oldincludedir
1834includedir
1835localstatedir
1836sharedstatedir
1837sysconfdir
1838datadir
1839datarootdir
1840libexecdir
1841sbindir
1842bindir
1843program_transform_name
1844prefix
1845exec_prefix
1846PACKAGE_URL
1847PACKAGE_BUGREPORT
1848PACKAGE_STRING
1849PACKAGE_VERSION
1850PACKAGE_TARNAME
1851PACKAGE_NAME
1852PATH_SEPARATOR
1853SHELL'
1854ac_subst_files=''
1855ac_user_opts='
1856enable_option_checking
1857enable_silent_rules
1858enable_dependency_tracking
1859enable_largefile
1860enable_threads
1861enable_unicode
1862enable_easc
1863enable_cc_holidays
1864enable_hls
1865enable_pager
1866enable_rc
1867enable_term
1868enable_nls
1869with_gnu_ld
1870enable_rpath
1871with_libiconv_prefix
1872with_libintl_prefix
1873enable_assert
1874with_libpth_prefix
1875with_included_regex
1876'
1877      ac_precious_vars='build_alias
1878host_alias
1879target_alias
1880CC
1881CFLAGS
1882LDFLAGS
1883LIBS
1884CPPFLAGS
1885CPP'
1886
1887
1888# Initialize some variables set by options.
1889ac_init_help=
1890ac_init_version=false
1891ac_unrecognized_opts=
1892ac_unrecognized_sep=
1893# The variables have the same names as the options, with
1894# dashes changed to underlines.
1895cache_file=/dev/null
1896exec_prefix=NONE
1897no_create=
1898no_recursion=
1899prefix=NONE
1900program_prefix=NONE
1901program_suffix=NONE
1902program_transform_name=s,x,x,
1903silent=
1904site=
1905srcdir=
1906verbose=
1907x_includes=NONE
1908x_libraries=NONE
1909
1910# Installation directory options.
1911# These are left unexpanded so users can "make install exec_prefix=/foo"
1912# and all the variables that are supposed to be based on exec_prefix
1913# by default will actually change.
1914# Use braces instead of parens because sh, perl, etc. also accept them.
1915# (The list follows the same order as the GNU Coding Standards.)
1916bindir='${exec_prefix}/bin'
1917sbindir='${exec_prefix}/sbin'
1918libexecdir='${exec_prefix}/libexec'
1919datarootdir='${prefix}/share'
1920datadir='${datarootdir}'
1921sysconfdir='${prefix}/etc'
1922sharedstatedir='${prefix}/com'
1923localstatedir='${prefix}/var'
1924includedir='${prefix}/include'
1925oldincludedir='/usr/include'
1926docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1927infodir='${datarootdir}/info'
1928htmldir='${docdir}'
1929dvidir='${docdir}'
1930pdfdir='${docdir}'
1931psdir='${docdir}'
1932libdir='${exec_prefix}/lib'
1933localedir='${datarootdir}/locale'
1934mandir='${datarootdir}/man'
1935
1936ac_prev=
1937ac_dashdash=
1938for ac_option
1939do
1940  # If the previous option needs an argument, assign it.
1941  if test -n "$ac_prev"; then
1942    eval $ac_prev=\$ac_option
1943    ac_prev=
1944    continue
1945  fi
1946
1947  case $ac_option in
1948  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1949  *=)   ac_optarg= ;;
1950  *)    ac_optarg=yes ;;
1951  esac
1952
1953  # Accept the important Cygnus configure options, so we can diagnose typos.
1954
1955  case $ac_dashdash$ac_option in
1956  --)
1957    ac_dashdash=yes ;;
1958
1959  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1960    ac_prev=bindir ;;
1961  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1962    bindir=$ac_optarg ;;
1963
1964  -build | --build | --buil | --bui | --bu)
1965    ac_prev=build_alias ;;
1966  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1967    build_alias=$ac_optarg ;;
1968
1969  -cache-file | --cache-file | --cache-fil | --cache-fi \
1970  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1971    ac_prev=cache_file ;;
1972  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1973  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1974    cache_file=$ac_optarg ;;
1975
1976  --config-cache | -C)
1977    cache_file=config.cache ;;
1978
1979  -datadir | --datadir | --datadi | --datad)
1980    ac_prev=datadir ;;
1981  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1982    datadir=$ac_optarg ;;
1983
1984  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1985  | --dataroo | --dataro | --datar)
1986    ac_prev=datarootdir ;;
1987  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1988  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1989    datarootdir=$ac_optarg ;;
1990
1991  -disable-* | --disable-*)
1992    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1993    # Reject names that are not valid shell variable names.
1994    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1995      as_fn_error $? "invalid feature name: $ac_useropt"
1996    ac_useropt_orig=$ac_useropt
1997    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1998    case $ac_user_opts in
1999      *"
2000"enable_$ac_useropt"
2001"*) ;;
2002      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2003	 ac_unrecognized_sep=', ';;
2004    esac
2005    eval enable_$ac_useropt=no ;;
2006
2007  -docdir | --docdir | --docdi | --doc | --do)
2008    ac_prev=docdir ;;
2009  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2010    docdir=$ac_optarg ;;
2011
2012  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2013    ac_prev=dvidir ;;
2014  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2015    dvidir=$ac_optarg ;;
2016
2017  -enable-* | --enable-*)
2018    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2019    # Reject names that are not valid shell variable names.
2020    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2021      as_fn_error $? "invalid feature name: $ac_useropt"
2022    ac_useropt_orig=$ac_useropt
2023    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2024    case $ac_user_opts in
2025      *"
2026"enable_$ac_useropt"
2027"*) ;;
2028      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2029	 ac_unrecognized_sep=', ';;
2030    esac
2031    eval enable_$ac_useropt=\$ac_optarg ;;
2032
2033  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2034  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2035  | --exec | --exe | --ex)
2036    ac_prev=exec_prefix ;;
2037  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2038  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2039  | --exec=* | --exe=* | --ex=*)
2040    exec_prefix=$ac_optarg ;;
2041
2042  -gas | --gas | --ga | --g)
2043    # Obsolete; use --with-gas.
2044    with_gas=yes ;;
2045
2046  -help | --help | --hel | --he | -h)
2047    ac_init_help=long ;;
2048  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2049    ac_init_help=recursive ;;
2050  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2051    ac_init_help=short ;;
2052
2053  -host | --host | --hos | --ho)
2054    ac_prev=host_alias ;;
2055  -host=* | --host=* | --hos=* | --ho=*)
2056    host_alias=$ac_optarg ;;
2057
2058  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2059    ac_prev=htmldir ;;
2060  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2061  | --ht=*)
2062    htmldir=$ac_optarg ;;
2063
2064  -includedir | --includedir | --includedi | --included | --include \
2065  | --includ | --inclu | --incl | --inc)
2066    ac_prev=includedir ;;
2067  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2068  | --includ=* | --inclu=* | --incl=* | --inc=*)
2069    includedir=$ac_optarg ;;
2070
2071  -infodir | --infodir | --infodi | --infod | --info | --inf)
2072    ac_prev=infodir ;;
2073  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2074    infodir=$ac_optarg ;;
2075
2076  -libdir | --libdir | --libdi | --libd)
2077    ac_prev=libdir ;;
2078  -libdir=* | --libdir=* | --libdi=* | --libd=*)
2079    libdir=$ac_optarg ;;
2080
2081  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2082  | --libexe | --libex | --libe)
2083    ac_prev=libexecdir ;;
2084  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2085  | --libexe=* | --libex=* | --libe=*)
2086    libexecdir=$ac_optarg ;;
2087
2088  -localedir | --localedir | --localedi | --localed | --locale)
2089    ac_prev=localedir ;;
2090  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2091    localedir=$ac_optarg ;;
2092
2093  -localstatedir | --localstatedir | --localstatedi | --localstated \
2094  | --localstate | --localstat | --localsta | --localst | --locals)
2095    ac_prev=localstatedir ;;
2096  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2097  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2098    localstatedir=$ac_optarg ;;
2099
2100  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2101    ac_prev=mandir ;;
2102  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2103    mandir=$ac_optarg ;;
2104
2105  -nfp | --nfp | --nf)
2106    # Obsolete; use --without-fp.
2107    with_fp=no ;;
2108
2109  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2110  | --no-cr | --no-c | -n)
2111    no_create=yes ;;
2112
2113  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2114  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2115    no_recursion=yes ;;
2116
2117  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2118  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2119  | --oldin | --oldi | --old | --ol | --o)
2120    ac_prev=oldincludedir ;;
2121  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2122  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2123  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2124    oldincludedir=$ac_optarg ;;
2125
2126  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2127    ac_prev=prefix ;;
2128  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2129    prefix=$ac_optarg ;;
2130
2131  -program-prefix | --program-prefix | --program-prefi | --program-pref \
2132  | --program-pre | --program-pr | --program-p)
2133    ac_prev=program_prefix ;;
2134  -program-prefix=* | --program-prefix=* | --program-prefi=* \
2135  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2136    program_prefix=$ac_optarg ;;
2137
2138  -program-suffix | --program-suffix | --program-suffi | --program-suff \
2139  | --program-suf | --program-su | --program-s)
2140    ac_prev=program_suffix ;;
2141  -program-suffix=* | --program-suffix=* | --program-suffi=* \
2142  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2143    program_suffix=$ac_optarg ;;
2144
2145  -program-transform-name | --program-transform-name \
2146  | --program-transform-nam | --program-transform-na \
2147  | --program-transform-n | --program-transform- \
2148  | --program-transform | --program-transfor \
2149  | --program-transfo | --program-transf \
2150  | --program-trans | --program-tran \
2151  | --progr-tra | --program-tr | --program-t)
2152    ac_prev=program_transform_name ;;
2153  -program-transform-name=* | --program-transform-name=* \
2154  | --program-transform-nam=* | --program-transform-na=* \
2155  | --program-transform-n=* | --program-transform-=* \
2156  | --program-transform=* | --program-transfor=* \
2157  | --program-transfo=* | --program-transf=* \
2158  | --program-trans=* | --program-tran=* \
2159  | --progr-tra=* | --program-tr=* | --program-t=*)
2160    program_transform_name=$ac_optarg ;;
2161
2162  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2163    ac_prev=pdfdir ;;
2164  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2165    pdfdir=$ac_optarg ;;
2166
2167  -psdir | --psdir | --psdi | --psd | --ps)
2168    ac_prev=psdir ;;
2169  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2170    psdir=$ac_optarg ;;
2171
2172  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2173  | -silent | --silent | --silen | --sile | --sil)
2174    silent=yes ;;
2175
2176  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2177    ac_prev=sbindir ;;
2178  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2179  | --sbi=* | --sb=*)
2180    sbindir=$ac_optarg ;;
2181
2182  -sharedstatedir | --sharedstatedir | --sharedstatedi \
2183  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2184  | --sharedst | --shareds | --shared | --share | --shar \
2185  | --sha | --sh)
2186    ac_prev=sharedstatedir ;;
2187  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2188  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2189  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2190  | --sha=* | --sh=*)
2191    sharedstatedir=$ac_optarg ;;
2192
2193  -site | --site | --sit)
2194    ac_prev=site ;;
2195  -site=* | --site=* | --sit=*)
2196    site=$ac_optarg ;;
2197
2198  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2199    ac_prev=srcdir ;;
2200  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2201    srcdir=$ac_optarg ;;
2202
2203  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2204  | --syscon | --sysco | --sysc | --sys | --sy)
2205    ac_prev=sysconfdir ;;
2206  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2207  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2208    sysconfdir=$ac_optarg ;;
2209
2210  -target | --target | --targe | --targ | --tar | --ta | --t)
2211    ac_prev=target_alias ;;
2212  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2213    target_alias=$ac_optarg ;;
2214
2215  -v | -verbose | --verbose | --verbos | --verbo | --verb)
2216    verbose=yes ;;
2217
2218  -version | --version | --versio | --versi | --vers | -V)
2219    ac_init_version=: ;;
2220
2221  -with-* | --with-*)
2222    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2223    # Reject names that are not valid shell variable names.
2224    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2225      as_fn_error $? "invalid package name: $ac_useropt"
2226    ac_useropt_orig=$ac_useropt
2227    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2228    case $ac_user_opts in
2229      *"
2230"with_$ac_useropt"
2231"*) ;;
2232      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2233	 ac_unrecognized_sep=', ';;
2234    esac
2235    eval with_$ac_useropt=\$ac_optarg ;;
2236
2237  -without-* | --without-*)
2238    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2239    # Reject names that are not valid shell variable names.
2240    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2241      as_fn_error $? "invalid package name: $ac_useropt"
2242    ac_useropt_orig=$ac_useropt
2243    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2244    case $ac_user_opts in
2245      *"
2246"with_$ac_useropt"
2247"*) ;;
2248      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2249	 ac_unrecognized_sep=', ';;
2250    esac
2251    eval with_$ac_useropt=no ;;
2252
2253  --x)
2254    # Obsolete; use --with-x.
2255    with_x=yes ;;
2256
2257  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2258  | --x-incl | --x-inc | --x-in | --x-i)
2259    ac_prev=x_includes ;;
2260  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2261  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2262    x_includes=$ac_optarg ;;
2263
2264  -x-libraries | --x-libraries | --x-librarie | --x-librari \
2265  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2266    ac_prev=x_libraries ;;
2267  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2268  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2269    x_libraries=$ac_optarg ;;
2270
2271  -*) as_fn_error $? "unrecognized option: \`$ac_option'
2272Try \`$0 --help' for more information"
2273    ;;
2274
2275  *=*)
2276    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2277    # Reject names that are not valid shell variable names.
2278    case $ac_envvar in #(
2279      '' | [0-9]* | *[!_$as_cr_alnum]* )
2280      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2281    esac
2282    eval $ac_envvar=\$ac_optarg
2283    export $ac_envvar ;;
2284
2285  *)
2286    # FIXME: should be removed in autoconf 3.0.
2287    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2288    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2289      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2290    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2291    ;;
2292
2293  esac
2294done
2295
2296if test -n "$ac_prev"; then
2297  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2298  as_fn_error $? "missing argument to $ac_option"
2299fi
2300
2301if test -n "$ac_unrecognized_opts"; then
2302  case $enable_option_checking in
2303    no) ;;
2304    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2305    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2306  esac
2307fi
2308
2309# Check all directory arguments for consistency.
2310for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
2311		datadir sysconfdir sharedstatedir localstatedir includedir \
2312		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2313		libdir localedir mandir
2314do
2315  eval ac_val=\$$ac_var
2316  # Remove trailing slashes.
2317  case $ac_val in
2318    */ )
2319      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2320      eval $ac_var=\$ac_val;;
2321  esac
2322  # Be sure to have absolute directory names.
2323  case $ac_val in
2324    [\\/$]* | ?:[\\/]* )  continue;;
2325    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2326  esac
2327  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2328done
2329
2330# There might be people who depend on the old broken behavior: `$host'
2331# used to hold the argument of --host etc.
2332# FIXME: To remove some day.
2333build=$build_alias
2334host=$host_alias
2335target=$target_alias
2336
2337# FIXME: To remove some day.
2338if test "x$host_alias" != x; then
2339  if test "x$build_alias" = x; then
2340    cross_compiling=maybe
2341  elif test "x$build_alias" != "x$host_alias"; then
2342    cross_compiling=yes
2343  fi
2344fi
2345
2346ac_tool_prefix=
2347test -n "$host_alias" && ac_tool_prefix=$host_alias-
2348
2349test "$silent" = yes && exec 6>/dev/null
2350
2351
2352ac_pwd=`pwd` && test -n "$ac_pwd" &&
2353ac_ls_di=`ls -di .` &&
2354ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2355  as_fn_error $? "working directory cannot be determined"
2356test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2357  as_fn_error $? "pwd does not report name of working directory"
2358
2359
2360# Find the source files, if location was not specified.
2361if test -z "$srcdir"; then
2362  ac_srcdir_defaulted=yes
2363  # Try the directory containing this script, then the parent directory.
2364  ac_confdir=`$as_dirname -- "$as_myself" ||
2365$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2366	 X"$as_myself" : 'X\(//\)[^/]' \| \
2367	 X"$as_myself" : 'X\(//\)$' \| \
2368	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2369$as_echo X"$as_myself" |
2370    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2371	    s//\1/
2372	    q
2373	  }
2374	  /^X\(\/\/\)[^/].*/{
2375	    s//\1/
2376	    q
2377	  }
2378	  /^X\(\/\/\)$/{
2379	    s//\1/
2380	    q
2381	  }
2382	  /^X\(\/\).*/{
2383	    s//\1/
2384	    q
2385	  }
2386	  s/.*/./; q'`
2387  srcdir=$ac_confdir
2388  if test ! -r "$srcdir/$ac_unique_file"; then
2389    srcdir=..
2390  fi
2391else
2392  ac_srcdir_defaulted=no
2393fi
2394if test ! -r "$srcdir/$ac_unique_file"; then
2395  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2396  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2397fi
2398ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2399ac_abs_confdir=`(
2400	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2401	pwd)`
2402# When building in place, set srcdir=.
2403if test "$ac_abs_confdir" = "$ac_pwd"; then
2404  srcdir=.
2405fi
2406# Remove unnecessary trailing slashes from srcdir.
2407# Double slashes in file names in object file debugging info
2408# mess up M-x gdb in Emacs.
2409case $srcdir in
2410*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2411esac
2412for ac_var in $ac_precious_vars; do
2413  eval ac_env_${ac_var}_set=\${${ac_var}+set}
2414  eval ac_env_${ac_var}_value=\$${ac_var}
2415  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2416  eval ac_cv_env_${ac_var}_value=\$${ac_var}
2417done
2418
2419#
2420# Report the --help message.
2421#
2422if test "$ac_init_help" = "long"; then
2423  # Omit some internal or obsolete options to make the list less imposing.
2424  # This message is too long to be a string in the A/UX 3.1 sh.
2425  cat <<_ACEOF
2426\`configure' configures gcal 4.1 to adapt to many kinds of systems.
2427
2428Usage: $0 [OPTION]... [VAR=VALUE]...
2429
2430To assign environment variables (e.g., CC, CFLAGS...), specify them as
2431VAR=VALUE.  See below for descriptions of some of the useful variables.
2432
2433Defaults for the options are specified in brackets.
2434
2435Configuration:
2436  -h, --help              display this help and exit
2437      --help=short        display options specific to this package
2438      --help=recursive    display the short help of all the included packages
2439  -V, --version           display version information and exit
2440  -q, --quiet, --silent   do not print \`checking ...' messages
2441      --cache-file=FILE   cache test results in FILE [disabled]
2442  -C, --config-cache      alias for \`--cache-file=config.cache'
2443  -n, --no-create         do not create output files
2444      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
2445
2446Installation directories:
2447  --prefix=PREFIX         install architecture-independent files in PREFIX
2448                          [$ac_default_prefix]
2449  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
2450                          [PREFIX]
2451
2452By default, \`make install' will install all the files in
2453\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
2454an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2455for instance \`--prefix=\$HOME'.
2456
2457For better control, use the options below.
2458
2459Fine tuning of the installation directories:
2460  --bindir=DIR            user executables [EPREFIX/bin]
2461  --sbindir=DIR           system admin executables [EPREFIX/sbin]
2462  --libexecdir=DIR        program executables [EPREFIX/libexec]
2463  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
2464  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
2465  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
2466  --libdir=DIR            object code libraries [EPREFIX/lib]
2467  --includedir=DIR        C header files [PREFIX/include]
2468  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
2469  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
2470  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
2471  --infodir=DIR           info documentation [DATAROOTDIR/info]
2472  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
2473  --mandir=DIR            man documentation [DATAROOTDIR/man]
2474  --docdir=DIR            documentation root [DATAROOTDIR/doc/gcal]
2475  --htmldir=DIR           html documentation [DOCDIR]
2476  --dvidir=DIR            dvi documentation [DOCDIR]
2477  --pdfdir=DIR            pdf documentation [DOCDIR]
2478  --psdir=DIR             ps documentation [DOCDIR]
2479_ACEOF
2480
2481  cat <<\_ACEOF
2482
2483Program names:
2484  --program-prefix=PREFIX            prepend PREFIX to installed program names
2485  --program-suffix=SUFFIX            append SUFFIX to installed program names
2486  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
2487
2488System types:
2489  --build=BUILD     configure for building on BUILD [guessed]
2490  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
2491_ACEOF
2492fi
2493
2494if test -n "$ac_init_help"; then
2495  case $ac_init_help in
2496     short | recursive ) echo "Configuration of gcal 4.1:";;
2497   esac
2498  cat <<\_ACEOF
2499
2500Optional Features:
2501  --disable-option-checking  ignore unrecognized --enable/--with options
2502  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
2503  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
2504  --enable-silent-rules   less verbose build output (undo: "make V=1")
2505  --disable-silent-rules  verbose build output (undo: "make V=0")
2506  --enable-dependency-tracking
2507                          do not reject slow dependency extractors
2508  --disable-dependency-tracking
2509                          speeds up one-time build
2510  --disable-largefile     omit support for large files
2511  --enable-threads={posix|solaris|pth|windows}
2512                          specify multithreading API
2513  --disable-threads       build without multithread safety
2514  --enable-unicode        use unicode
2515  --enable-easc           use extended ASCII character set
2516  --disable-cc-holidays   do not use all available country specific holidays
2517  --disable-hls           do not use highlighting sequences
2518  --disable-pager         do not use external or simple internal pager feature
2519  --disable-rc            do not use fixed date feature
2520  --disable-term          do not use libncurses/libtermcap/libtermlib
2521  --disable-nls           do not use Native Language Support
2522  --disable-rpath         do not hardcode runtime library paths
2523  --disable-assert        turn off assertions
2524
2525Optional Packages:
2526  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2527  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2528  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
2529  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
2530  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
2531  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
2532  --without-libintl-prefix     don't search for libintl in includedir and libdir
2533  --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
2534  --without-libpth-prefix     don't search for libpth in includedir and libdir
2535  --without-included-regex
2536                          don't compile regex; this is the default on systems
2537                          with recent-enough versions of the GNU C Library
2538                          (use with caution on other systems).
2539
2540Some influential environment variables:
2541  CC          C compiler command
2542  CFLAGS      C compiler flags
2543  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2544              nonstandard directory <lib dir>
2545  LIBS        libraries to pass to the linker, e.g. -l<library>
2546  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2547              you have headers in a nonstandard directory <include dir>
2548  CPP         C preprocessor
2549
2550Use these variables to override the choices made by `configure' or to help
2551it to find libraries and programs with nonstandard names/locations.
2552
2553Report bugs to <bug-gcal@gnu.org>.
2554_ACEOF
2555ac_status=$?
2556fi
2557
2558if test "$ac_init_help" = "recursive"; then
2559  # If there are subdirs, report their specific --help.
2560  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2561    test -d "$ac_dir" ||
2562      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2563      continue
2564    ac_builddir=.
2565
2566case "$ac_dir" in
2567.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2568*)
2569  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2570  # A ".." for each directory in $ac_dir_suffix.
2571  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2572  case $ac_top_builddir_sub in
2573  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2574  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2575  esac ;;
2576esac
2577ac_abs_top_builddir=$ac_pwd
2578ac_abs_builddir=$ac_pwd$ac_dir_suffix
2579# for backward compatibility:
2580ac_top_builddir=$ac_top_build_prefix
2581
2582case $srcdir in
2583  .)  # We are building in place.
2584    ac_srcdir=.
2585    ac_top_srcdir=$ac_top_builddir_sub
2586    ac_abs_top_srcdir=$ac_pwd ;;
2587  [\\/]* | ?:[\\/]* )  # Absolute name.
2588    ac_srcdir=$srcdir$ac_dir_suffix;
2589    ac_top_srcdir=$srcdir
2590    ac_abs_top_srcdir=$srcdir ;;
2591  *) # Relative name.
2592    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2593    ac_top_srcdir=$ac_top_build_prefix$srcdir
2594    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2595esac
2596ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2597
2598    cd "$ac_dir" || { ac_status=$?; continue; }
2599    # Check for guested configure.
2600    if test -f "$ac_srcdir/configure.gnu"; then
2601      echo &&
2602      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2603    elif test -f "$ac_srcdir/configure"; then
2604      echo &&
2605      $SHELL "$ac_srcdir/configure" --help=recursive
2606    else
2607      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2608    fi || ac_status=$?
2609    cd "$ac_pwd" || { ac_status=$?; break; }
2610  done
2611fi
2612
2613test -n "$ac_init_help" && exit $ac_status
2614if $ac_init_version; then
2615  cat <<\_ACEOF
2616gcal configure 4.1
2617generated by GNU Autoconf 2.69
2618
2619Copyright (C) 2012 Free Software Foundation, Inc.
2620This configure script is free software; the Free Software Foundation
2621gives unlimited permission to copy, distribute and modify it.
2622_ACEOF
2623  exit
2624fi
2625
2626## ------------------------ ##
2627## Autoconf initialization. ##
2628## ------------------------ ##
2629
2630# ac_fn_c_try_compile LINENO
2631# --------------------------
2632# Try to compile conftest.$ac_ext, and return whether this succeeded.
2633ac_fn_c_try_compile ()
2634{
2635  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2636  rm -f conftest.$ac_objext
2637  if { { ac_try="$ac_compile"
2638case "(($ac_try" in
2639  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2640  *) ac_try_echo=$ac_try;;
2641esac
2642eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2643$as_echo "$ac_try_echo"; } >&5
2644  (eval "$ac_compile") 2>conftest.err
2645  ac_status=$?
2646  if test -s conftest.err; then
2647    grep -v '^ *+' conftest.err >conftest.er1
2648    cat conftest.er1 >&5
2649    mv -f conftest.er1 conftest.err
2650  fi
2651  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2652  test $ac_status = 0; } && {
2653	 test -z "$ac_c_werror_flag" ||
2654	 test ! -s conftest.err
2655       } && test -s conftest.$ac_objext; then :
2656  ac_retval=0
2657else
2658  $as_echo "$as_me: failed program was:" >&5
2659sed 's/^/| /' conftest.$ac_ext >&5
2660
2661	ac_retval=1
2662fi
2663  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2664  as_fn_set_status $ac_retval
2665
2666} # ac_fn_c_try_compile
2667
2668# ac_fn_c_try_cpp LINENO
2669# ----------------------
2670# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2671ac_fn_c_try_cpp ()
2672{
2673  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2674  if { { ac_try="$ac_cpp conftest.$ac_ext"
2675case "(($ac_try" in
2676  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2677  *) ac_try_echo=$ac_try;;
2678esac
2679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2680$as_echo "$ac_try_echo"; } >&5
2681  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2682  ac_status=$?
2683  if test -s conftest.err; then
2684    grep -v '^ *+' conftest.err >conftest.er1
2685    cat conftest.er1 >&5
2686    mv -f conftest.er1 conftest.err
2687  fi
2688  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2689  test $ac_status = 0; } > conftest.i && {
2690	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2691	 test ! -s conftest.err
2692       }; then :
2693  ac_retval=0
2694else
2695  $as_echo "$as_me: failed program was:" >&5
2696sed 's/^/| /' conftest.$ac_ext >&5
2697
2698    ac_retval=1
2699fi
2700  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2701  as_fn_set_status $ac_retval
2702
2703} # ac_fn_c_try_cpp
2704
2705# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2706# -------------------------------------------------------
2707# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2708# the include files in INCLUDES and setting the cache variable VAR
2709# accordingly.
2710ac_fn_c_check_header_mongrel ()
2711{
2712  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2713  if eval \${$3+:} false; then :
2714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2715$as_echo_n "checking for $2... " >&6; }
2716if eval \${$3+:} false; then :
2717  $as_echo_n "(cached) " >&6
2718fi
2719eval ac_res=\$$3
2720	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2721$as_echo "$ac_res" >&6; }
2722else
2723  # Is the header compilable?
2724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2725$as_echo_n "checking $2 usability... " >&6; }
2726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2727/* end confdefs.h.  */
2728$4
2729#include <$2>
2730_ACEOF
2731if ac_fn_c_try_compile "$LINENO"; then :
2732  ac_header_compiler=yes
2733else
2734  ac_header_compiler=no
2735fi
2736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2738$as_echo "$ac_header_compiler" >&6; }
2739
2740# Is the header present?
2741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2742$as_echo_n "checking $2 presence... " >&6; }
2743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2744/* end confdefs.h.  */
2745#include <$2>
2746_ACEOF
2747if ac_fn_c_try_cpp "$LINENO"; then :
2748  ac_header_preproc=yes
2749else
2750  ac_header_preproc=no
2751fi
2752rm -f conftest.err conftest.i conftest.$ac_ext
2753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2754$as_echo "$ac_header_preproc" >&6; }
2755
2756# So?  What about this header?
2757case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2758  yes:no: )
2759    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2760$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2761    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2762$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2763    ;;
2764  no:yes:* )
2765    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2766$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2767    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2768$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2769    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2770$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2771    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2772$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2773    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2774$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2775( $as_echo "## ------------------------------- ##
2776## Report this to bug-gcal@gnu.org ##
2777## ------------------------------- ##"
2778     ) | sed "s/^/$as_me: WARNING:     /" >&2
2779    ;;
2780esac
2781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2782$as_echo_n "checking for $2... " >&6; }
2783if eval \${$3+:} false; then :
2784  $as_echo_n "(cached) " >&6
2785else
2786  eval "$3=\$ac_header_compiler"
2787fi
2788eval ac_res=\$$3
2789	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2790$as_echo "$ac_res" >&6; }
2791fi
2792  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2793
2794} # ac_fn_c_check_header_mongrel
2795
2796# ac_fn_c_try_run LINENO
2797# ----------------------
2798# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2799# that executables *can* be run.
2800ac_fn_c_try_run ()
2801{
2802  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2803  if { { ac_try="$ac_link"
2804case "(($ac_try" in
2805  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2806  *) ac_try_echo=$ac_try;;
2807esac
2808eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2809$as_echo "$ac_try_echo"; } >&5
2810  (eval "$ac_link") 2>&5
2811  ac_status=$?
2812  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2813  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2814  { { case "(($ac_try" in
2815  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2816  *) ac_try_echo=$ac_try;;
2817esac
2818eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2819$as_echo "$ac_try_echo"; } >&5
2820  (eval "$ac_try") 2>&5
2821  ac_status=$?
2822  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2823  test $ac_status = 0; }; }; then :
2824  ac_retval=0
2825else
2826  $as_echo "$as_me: program exited with status $ac_status" >&5
2827       $as_echo "$as_me: failed program was:" >&5
2828sed 's/^/| /' conftest.$ac_ext >&5
2829
2830       ac_retval=$ac_status
2831fi
2832  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2833  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2834  as_fn_set_status $ac_retval
2835
2836} # ac_fn_c_try_run
2837
2838# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2839# -------------------------------------------------------
2840# Tests whether HEADER exists and can be compiled using the include files in
2841# INCLUDES, setting the cache variable VAR accordingly.
2842ac_fn_c_check_header_compile ()
2843{
2844  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2845  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2846$as_echo_n "checking for $2... " >&6; }
2847if eval \${$3+:} false; then :
2848  $as_echo_n "(cached) " >&6
2849else
2850  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2851/* end confdefs.h.  */
2852$4
2853#include <$2>
2854_ACEOF
2855if ac_fn_c_try_compile "$LINENO"; then :
2856  eval "$3=yes"
2857else
2858  eval "$3=no"
2859fi
2860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2861fi
2862eval ac_res=\$$3
2863	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2864$as_echo "$ac_res" >&6; }
2865  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2866
2867} # ac_fn_c_check_header_compile
2868
2869# ac_fn_c_try_link LINENO
2870# -----------------------
2871# Try to link conftest.$ac_ext, and return whether this succeeded.
2872ac_fn_c_try_link ()
2873{
2874  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2875  rm -f conftest.$ac_objext conftest$ac_exeext
2876  if { { ac_try="$ac_link"
2877case "(($ac_try" in
2878  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2879  *) ac_try_echo=$ac_try;;
2880esac
2881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2882$as_echo "$ac_try_echo"; } >&5
2883  (eval "$ac_link") 2>conftest.err
2884  ac_status=$?
2885  if test -s conftest.err; then
2886    grep -v '^ *+' conftest.err >conftest.er1
2887    cat conftest.er1 >&5
2888    mv -f conftest.er1 conftest.err
2889  fi
2890  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2891  test $ac_status = 0; } && {
2892	 test -z "$ac_c_werror_flag" ||
2893	 test ! -s conftest.err
2894       } && test -s conftest$ac_exeext && {
2895	 test "$cross_compiling" = yes ||
2896	 test -x conftest$ac_exeext
2897       }; then :
2898  ac_retval=0
2899else
2900  $as_echo "$as_me: failed program was:" >&5
2901sed 's/^/| /' conftest.$ac_ext >&5
2902
2903	ac_retval=1
2904fi
2905  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2906  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2907  # interfere with the next link command; also delete a directory that is
2908  # left behind by Apple's compiler.  We do this before executing the actions.
2909  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2910  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2911  as_fn_set_status $ac_retval
2912
2913} # ac_fn_c_try_link
2914
2915# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2916# -------------------------------------------
2917# Tests whether TYPE exists after having included INCLUDES, setting cache
2918# variable VAR accordingly.
2919ac_fn_c_check_type ()
2920{
2921  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2923$as_echo_n "checking for $2... " >&6; }
2924if eval \${$3+:} false; then :
2925  $as_echo_n "(cached) " >&6
2926else
2927  eval "$3=no"
2928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2929/* end confdefs.h.  */
2930$4
2931int
2932main ()
2933{
2934if (sizeof ($2))
2935	 return 0;
2936  ;
2937  return 0;
2938}
2939_ACEOF
2940if ac_fn_c_try_compile "$LINENO"; then :
2941  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2942/* end confdefs.h.  */
2943$4
2944int
2945main ()
2946{
2947if (sizeof (($2)))
2948	    return 0;
2949  ;
2950  return 0;
2951}
2952_ACEOF
2953if ac_fn_c_try_compile "$LINENO"; then :
2954
2955else
2956  eval "$3=yes"
2957fi
2958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2959fi
2960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2961fi
2962eval ac_res=\$$3
2963	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2964$as_echo "$ac_res" >&6; }
2965  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2966
2967} # ac_fn_c_check_type
2968
2969# ac_fn_c_check_func LINENO FUNC VAR
2970# ----------------------------------
2971# Tests whether FUNC exists, setting the cache variable VAR accordingly
2972ac_fn_c_check_func ()
2973{
2974  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2975  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2976$as_echo_n "checking for $2... " >&6; }
2977if eval \${$3+:} false; then :
2978  $as_echo_n "(cached) " >&6
2979else
2980  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2981/* end confdefs.h.  */
2982/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2983   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2984#define $2 innocuous_$2
2985
2986/* System header to define __stub macros and hopefully few prototypes,
2987    which can conflict with char $2 (); below.
2988    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2989    <limits.h> exists even on freestanding compilers.  */
2990
2991#ifdef __STDC__
2992# include <limits.h>
2993#else
2994# include <assert.h>
2995#endif
2996
2997#undef $2
2998
2999/* Override any GCC internal prototype to avoid an error.
3000   Use char because int might match the return type of a GCC
3001   builtin and then its argument prototype would still apply.  */
3002#ifdef __cplusplus
3003extern "C"
3004#endif
3005char $2 ();
3006/* The GNU C library defines this for functions which it implements
3007    to always fail with ENOSYS.  Some functions are actually named
3008    something starting with __ and the normal name is an alias.  */
3009#if defined __stub_$2 || defined __stub___$2
3010choke me
3011#endif
3012
3013int
3014main ()
3015{
3016return $2 ();
3017  ;
3018  return 0;
3019}
3020_ACEOF
3021if ac_fn_c_try_link "$LINENO"; then :
3022  eval "$3=yes"
3023else
3024  eval "$3=no"
3025fi
3026rm -f core conftest.err conftest.$ac_objext \
3027    conftest$ac_exeext conftest.$ac_ext
3028fi
3029eval ac_res=\$$3
3030	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3031$as_echo "$ac_res" >&6; }
3032  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3033
3034} # ac_fn_c_check_func
3035
3036# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3037# --------------------------------------------
3038# Tries to find the compile-time value of EXPR in a program that includes
3039# INCLUDES, setting VAR accordingly. Returns whether the value could be
3040# computed
3041ac_fn_c_compute_int ()
3042{
3043  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3044  if test "$cross_compiling" = yes; then
3045    # Depending upon the size, compute the lo and hi bounds.
3046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3047/* end confdefs.h.  */
3048$4
3049int
3050main ()
3051{
3052static int test_array [1 - 2 * !(($2) >= 0)];
3053test_array [0] = 0;
3054return test_array [0];
3055
3056  ;
3057  return 0;
3058}
3059_ACEOF
3060if ac_fn_c_try_compile "$LINENO"; then :
3061  ac_lo=0 ac_mid=0
3062  while :; do
3063    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3064/* end confdefs.h.  */
3065$4
3066int
3067main ()
3068{
3069static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3070test_array [0] = 0;
3071return test_array [0];
3072
3073  ;
3074  return 0;
3075}
3076_ACEOF
3077if ac_fn_c_try_compile "$LINENO"; then :
3078  ac_hi=$ac_mid; break
3079else
3080  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3081			if test $ac_lo -le $ac_mid; then
3082			  ac_lo= ac_hi=
3083			  break
3084			fi
3085			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3086fi
3087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3088  done
3089else
3090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3091/* end confdefs.h.  */
3092$4
3093int
3094main ()
3095{
3096static int test_array [1 - 2 * !(($2) < 0)];
3097test_array [0] = 0;
3098return test_array [0];
3099
3100  ;
3101  return 0;
3102}
3103_ACEOF
3104if ac_fn_c_try_compile "$LINENO"; then :
3105  ac_hi=-1 ac_mid=-1
3106  while :; do
3107    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3108/* end confdefs.h.  */
3109$4
3110int
3111main ()
3112{
3113static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3114test_array [0] = 0;
3115return test_array [0];
3116
3117  ;
3118  return 0;
3119}
3120_ACEOF
3121if ac_fn_c_try_compile "$LINENO"; then :
3122  ac_lo=$ac_mid; break
3123else
3124  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3125			if test $ac_mid -le $ac_hi; then
3126			  ac_lo= ac_hi=
3127			  break
3128			fi
3129			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3130fi
3131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3132  done
3133else
3134  ac_lo= ac_hi=
3135fi
3136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3137fi
3138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3139# Binary search between lo and hi bounds.
3140while test "x$ac_lo" != "x$ac_hi"; do
3141  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3142  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3143/* end confdefs.h.  */
3144$4
3145int
3146main ()
3147{
3148static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3149test_array [0] = 0;
3150return test_array [0];
3151
3152  ;
3153  return 0;
3154}
3155_ACEOF
3156if ac_fn_c_try_compile "$LINENO"; then :
3157  ac_hi=$ac_mid
3158else
3159  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3160fi
3161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3162done
3163case $ac_lo in #((
3164?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3165'') ac_retval=1 ;;
3166esac
3167  else
3168    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3169/* end confdefs.h.  */
3170$4
3171static long int longval () { return $2; }
3172static unsigned long int ulongval () { return $2; }
3173#include <stdio.h>
3174#include <stdlib.h>
3175int
3176main ()
3177{
3178
3179  FILE *f = fopen ("conftest.val", "w");
3180  if (! f)
3181    return 1;
3182  if (($2) < 0)
3183    {
3184      long int i = longval ();
3185      if (i != ($2))
3186	return 1;
3187      fprintf (f, "%ld", i);
3188    }
3189  else
3190    {
3191      unsigned long int i = ulongval ();
3192      if (i != ($2))
3193	return 1;
3194      fprintf (f, "%lu", i);
3195    }
3196  /* Do not output a trailing newline, as this causes \r\n confusion
3197     on some platforms.  */
3198  return ferror (f) || fclose (f) != 0;
3199
3200  ;
3201  return 0;
3202}
3203_ACEOF
3204if ac_fn_c_try_run "$LINENO"; then :
3205  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3206else
3207  ac_retval=1
3208fi
3209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3210  conftest.$ac_objext conftest.beam conftest.$ac_ext
3211rm -f conftest.val
3212
3213  fi
3214  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3215  as_fn_set_status $ac_retval
3216
3217} # ac_fn_c_compute_int
3218
3219# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3220# ---------------------------------------------
3221# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3222# accordingly.
3223ac_fn_c_check_decl ()
3224{
3225  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3226  as_decl_name=`echo $2|sed 's/ *(.*//'`
3227  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3228  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3229$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3230if eval \${$3+:} false; then :
3231  $as_echo_n "(cached) " >&6
3232else
3233  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3234/* end confdefs.h.  */
3235$4
3236int
3237main ()
3238{
3239#ifndef $as_decl_name
3240#ifdef __cplusplus
3241  (void) $as_decl_use;
3242#else
3243  (void) $as_decl_name;
3244#endif
3245#endif
3246
3247  ;
3248  return 0;
3249}
3250_ACEOF
3251if ac_fn_c_try_compile "$LINENO"; then :
3252  eval "$3=yes"
3253else
3254  eval "$3=no"
3255fi
3256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3257fi
3258eval ac_res=\$$3
3259	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3260$as_echo "$ac_res" >&6; }
3261  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3262
3263} # ac_fn_c_check_decl
3264
3265# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3266# ----------------------------------------------------
3267# Tries to find if the field MEMBER exists in type AGGR, after including
3268# INCLUDES, setting cache variable VAR accordingly.
3269ac_fn_c_check_member ()
3270{
3271  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3273$as_echo_n "checking for $2.$3... " >&6; }
3274if eval \${$4+:} false; then :
3275  $as_echo_n "(cached) " >&6
3276else
3277  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3278/* end confdefs.h.  */
3279$5
3280int
3281main ()
3282{
3283static $2 ac_aggr;
3284if (ac_aggr.$3)
3285return 0;
3286  ;
3287  return 0;
3288}
3289_ACEOF
3290if ac_fn_c_try_compile "$LINENO"; then :
3291  eval "$4=yes"
3292else
3293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3294/* end confdefs.h.  */
3295$5
3296int
3297main ()
3298{
3299static $2 ac_aggr;
3300if (sizeof ac_aggr.$3)
3301return 0;
3302  ;
3303  return 0;
3304}
3305_ACEOF
3306if ac_fn_c_try_compile "$LINENO"; then :
3307  eval "$4=yes"
3308else
3309  eval "$4=no"
3310fi
3311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3312fi
3313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3314fi
3315eval ac_res=\$$4
3316	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3317$as_echo "$ac_res" >&6; }
3318  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3319
3320} # ac_fn_c_check_member
3321cat >config.log <<_ACEOF
3322This file contains any messages produced by compilers while
3323running configure, to aid debugging if configure makes a mistake.
3324
3325It was created by gcal $as_me 4.1, which was
3326generated by GNU Autoconf 2.69.  Invocation command line was
3327
3328  $ $0 $@
3329
3330_ACEOF
3331exec 5>>config.log
3332{
3333cat <<_ASUNAME
3334## --------- ##
3335## Platform. ##
3336## --------- ##
3337
3338hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3339uname -m = `(uname -m) 2>/dev/null || echo unknown`
3340uname -r = `(uname -r) 2>/dev/null || echo unknown`
3341uname -s = `(uname -s) 2>/dev/null || echo unknown`
3342uname -v = `(uname -v) 2>/dev/null || echo unknown`
3343
3344/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3345/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3346
3347/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3348/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3349/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3350/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3351/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3352/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3353/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3354
3355_ASUNAME
3356
3357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3358for as_dir in $PATH
3359do
3360  IFS=$as_save_IFS
3361  test -z "$as_dir" && as_dir=.
3362    $as_echo "PATH: $as_dir"
3363  done
3364IFS=$as_save_IFS
3365
3366} >&5
3367
3368cat >&5 <<_ACEOF
3369
3370
3371## ----------- ##
3372## Core tests. ##
3373## ----------- ##
3374
3375_ACEOF
3376
3377
3378# Keep a trace of the command line.
3379# Strip out --no-create and --no-recursion so they do not pile up.
3380# Strip out --silent because we don't want to record it for future runs.
3381# Also quote any args containing shell meta-characters.
3382# Make two passes to allow for proper duplicate-argument suppression.
3383ac_configure_args=
3384ac_configure_args0=
3385ac_configure_args1=
3386ac_must_keep_next=false
3387for ac_pass in 1 2
3388do
3389  for ac_arg
3390  do
3391    case $ac_arg in
3392    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3393    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3394    | -silent | --silent | --silen | --sile | --sil)
3395      continue ;;
3396    *\'*)
3397      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3398    esac
3399    case $ac_pass in
3400    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3401    2)
3402      as_fn_append ac_configure_args1 " '$ac_arg'"
3403      if test $ac_must_keep_next = true; then
3404	ac_must_keep_next=false # Got value, back to normal.
3405      else
3406	case $ac_arg in
3407	  *=* | --config-cache | -C | -disable-* | --disable-* \
3408	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3409	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3410	  | -with-* | --with-* | -without-* | --without-* | --x)
3411	    case "$ac_configure_args0 " in
3412	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3413	    esac
3414	    ;;
3415	  -* ) ac_must_keep_next=true ;;
3416	esac
3417      fi
3418      as_fn_append ac_configure_args " '$ac_arg'"
3419      ;;
3420    esac
3421  done
3422done
3423{ ac_configure_args0=; unset ac_configure_args0;}
3424{ ac_configure_args1=; unset ac_configure_args1;}
3425
3426# When interrupted or exit'd, cleanup temporary files, and complete
3427# config.log.  We remove comments because anyway the quotes in there
3428# would cause problems or look ugly.
3429# WARNING: Use '\'' to represent an apostrophe within the trap.
3430# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3431trap 'exit_status=$?
3432  # Save into config.log some information that might help in debugging.
3433  {
3434    echo
3435
3436    $as_echo "## ---------------- ##
3437## Cache variables. ##
3438## ---------------- ##"
3439    echo
3440    # The following way of writing the cache mishandles newlines in values,
3441(
3442  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3443    eval ac_val=\$$ac_var
3444    case $ac_val in #(
3445    *${as_nl}*)
3446      case $ac_var in #(
3447      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3448$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3449      esac
3450      case $ac_var in #(
3451      _ | IFS | as_nl) ;; #(
3452      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3453      *) { eval $ac_var=; unset $ac_var;} ;;
3454      esac ;;
3455    esac
3456  done
3457  (set) 2>&1 |
3458    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3459    *${as_nl}ac_space=\ *)
3460      sed -n \
3461	"s/'\''/'\''\\\\'\'''\''/g;
3462	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3463      ;; #(
3464    *)
3465      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3466      ;;
3467    esac |
3468    sort
3469)
3470    echo
3471
3472    $as_echo "## ----------------- ##
3473## Output variables. ##
3474## ----------------- ##"
3475    echo
3476    for ac_var in $ac_subst_vars
3477    do
3478      eval ac_val=\$$ac_var
3479      case $ac_val in
3480      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3481      esac
3482      $as_echo "$ac_var='\''$ac_val'\''"
3483    done | sort
3484    echo
3485
3486    if test -n "$ac_subst_files"; then
3487      $as_echo "## ------------------- ##
3488## File substitutions. ##
3489## ------------------- ##"
3490      echo
3491      for ac_var in $ac_subst_files
3492      do
3493	eval ac_val=\$$ac_var
3494	case $ac_val in
3495	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3496	esac
3497	$as_echo "$ac_var='\''$ac_val'\''"
3498      done | sort
3499      echo
3500    fi
3501
3502    if test -s confdefs.h; then
3503      $as_echo "## ----------- ##
3504## confdefs.h. ##
3505## ----------- ##"
3506      echo
3507      cat confdefs.h
3508      echo
3509    fi
3510    test "$ac_signal" != 0 &&
3511      $as_echo "$as_me: caught signal $ac_signal"
3512    $as_echo "$as_me: exit $exit_status"
3513  } >&5
3514  rm -f core *.core core.conftest.* &&
3515    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3516    exit $exit_status
3517' 0
3518for ac_signal in 1 2 13 15; do
3519  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3520done
3521ac_signal=0
3522
3523# confdefs.h avoids OS command line length limits that DEFS can exceed.
3524rm -f -r conftest* confdefs.h
3525
3526$as_echo "/* confdefs.h */" > confdefs.h
3527
3528# Predefined preprocessor variables.
3529
3530cat >>confdefs.h <<_ACEOF
3531#define PACKAGE_NAME "$PACKAGE_NAME"
3532_ACEOF
3533
3534cat >>confdefs.h <<_ACEOF
3535#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3536_ACEOF
3537
3538cat >>confdefs.h <<_ACEOF
3539#define PACKAGE_VERSION "$PACKAGE_VERSION"
3540_ACEOF
3541
3542cat >>confdefs.h <<_ACEOF
3543#define PACKAGE_STRING "$PACKAGE_STRING"
3544_ACEOF
3545
3546cat >>confdefs.h <<_ACEOF
3547#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3548_ACEOF
3549
3550cat >>confdefs.h <<_ACEOF
3551#define PACKAGE_URL "$PACKAGE_URL"
3552_ACEOF
3553
3554
3555# Let the site file select an alternate cache file if it wants to.
3556# Prefer an explicitly selected file to automatically selected ones.
3557ac_site_file1=NONE
3558ac_site_file2=NONE
3559if test -n "$CONFIG_SITE"; then
3560  # We do not want a PATH search for config.site.
3561  case $CONFIG_SITE in #((
3562    -*)  ac_site_file1=./$CONFIG_SITE;;
3563    */*) ac_site_file1=$CONFIG_SITE;;
3564    *)   ac_site_file1=./$CONFIG_SITE;;
3565  esac
3566elif test "x$prefix" != xNONE; then
3567  ac_site_file1=$prefix/share/config.site
3568  ac_site_file2=$prefix/etc/config.site
3569else
3570  ac_site_file1=$ac_default_prefix/share/config.site
3571  ac_site_file2=$ac_default_prefix/etc/config.site
3572fi
3573for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3574do
3575  test "x$ac_site_file" = xNONE && continue
3576  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3577    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3578$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3579    sed 's/^/| /' "$ac_site_file" >&5
3580    . "$ac_site_file" \
3581      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3582$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3583as_fn_error $? "failed to load site script $ac_site_file
3584See \`config.log' for more details" "$LINENO" 5; }
3585  fi
3586done
3587
3588if test -r "$cache_file"; then
3589  # Some versions of bash will fail to source /dev/null (special files
3590  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3591  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3592    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3593$as_echo "$as_me: loading cache $cache_file" >&6;}
3594    case $cache_file in
3595      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3596      *)                      . "./$cache_file";;
3597    esac
3598  fi
3599else
3600  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3601$as_echo "$as_me: creating cache $cache_file" >&6;}
3602  >$cache_file
3603fi
3604
3605gt_needs="$gt_needs "
3606as_fn_append ac_func_list " btowc"
3607as_fn_append ac_func_list " _set_invalid_parameter_handler"
3608as_fn_append ac_header_list " sys/socket.h"
3609as_fn_append ac_header_list " unistd.h"
3610as_fn_append ac_func_list " fcntl"
3611as_fn_append ac_func_list " symlink"
3612as_fn_append ac_func_list " fpurge"
3613as_fn_append ac_func_list " __fpurge"
3614as_fn_append ac_func_list " __freading"
3615as_fn_append ac_header_list " sys/stat.h"
3616as_fn_append ac_func_list " getdtablesize"
3617as_fn_append ac_func_list " getprogname"
3618as_fn_append ac_func_list " getexecname"
3619as_fn_append ac_header_list " sys/time.h"
3620as_fn_append ac_func_list " gettimeofday"
3621as_fn_append ac_header_list " iconv.h"
3622as_fn_append ac_header_list " langinfo.h"
3623as_fn_append ac_header_list " limits.h"
3624as_fn_append ac_func_list " link"
3625as_fn_append ac_header_list " xlocale.h"
3626as_fn_append ac_func_list " lstat"
3627as_fn_append ac_header_list " math.h"
3628as_fn_append ac_func_list " mbsinit"
3629as_fn_append ac_func_list " mbrtowc"
3630as_fn_append ac_header_list " sys/mman.h"
3631as_fn_append ac_func_list " mprotect"
3632as_fn_append ac_func_list " mkostemp"
3633as_fn_append ac_func_list " nl_langinfo"
3634as_fn_append ac_header_list " sys/param.h"
3635as_fn_append ac_func_list " __xpg_strerror_r"
3636as_fn_append ac_func_list " pipe2"
3637as_fn_append ac_header_list " malloc.h"
3638as_fn_append ac_func_list " isblank"
3639as_fn_append ac_func_list " iswctype"
3640as_fn_append ac_header_list " sys/cdefs.h"
3641as_fn_append ac_func_list " secure_getenv"
3642as_fn_append ac_func_list " getuid"
3643as_fn_append ac_func_list " geteuid"
3644as_fn_append ac_func_list " getgid"
3645as_fn_append ac_func_list " getegid"
3646as_fn_append ac_func_list " sigaction"
3647as_fn_append ac_func_list " sigaltstack"
3648as_fn_append ac_func_list " siginterrupt"
3649as_fn_append ac_header_list " spawn.h"
3650as_fn_append ac_header_list " wchar.h"
3651as_fn_append ac_header_list " stdint.h"
3652as_fn_append ac_func_list " strdup"
3653as_fn_append ac_func_list " catgets"
3654as_fn_append ac_func_list " snprintf"
3655as_fn_append ac_header_list " strings.h"
3656as_fn_append ac_header_list " sys/ioctl.h"
3657as_fn_append ac_header_list " sys/uio.h"
3658as_fn_append ac_header_list " sys/wait.h"
3659as_fn_append ac_func_list " pipe"
3660as_fn_append ac_header_list " features.h"
3661as_fn_append ac_func_list " wcrtomb"
3662as_fn_append ac_func_list " iswcntrl"
3663as_fn_append ac_header_list " wctype.h"
3664# Check that the precious variables saved in the cache have kept the same
3665# value.
3666ac_cache_corrupted=false
3667for ac_var in $ac_precious_vars; do
3668  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3669  eval ac_new_set=\$ac_env_${ac_var}_set
3670  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3671  eval ac_new_val=\$ac_env_${ac_var}_value
3672  case $ac_old_set,$ac_new_set in
3673    set,)
3674      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3675$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3676      ac_cache_corrupted=: ;;
3677    ,set)
3678      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3679$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3680      ac_cache_corrupted=: ;;
3681    ,);;
3682    *)
3683      if test "x$ac_old_val" != "x$ac_new_val"; then
3684	# differences in whitespace do not lead to failure.
3685	ac_old_val_w=`echo x $ac_old_val`
3686	ac_new_val_w=`echo x $ac_new_val`
3687	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3688	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3689$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3690	  ac_cache_corrupted=:
3691	else
3692	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3693$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3694	  eval $ac_var=\$ac_old_val
3695	fi
3696	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3697$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3698	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3699$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3700      fi;;
3701  esac
3702  # Pass precious variables to config.status.
3703  if test "$ac_new_set" = set; then
3704    case $ac_new_val in
3705    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3706    *) ac_arg=$ac_var=$ac_new_val ;;
3707    esac
3708    case " $ac_configure_args " in
3709      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3710      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3711    esac
3712  fi
3713done
3714if $ac_cache_corrupted; then
3715  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3716$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3717  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3718$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3719  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3720fi
3721## -------------------- ##
3722## Main body of script. ##
3723## -------------------- ##
3724
3725ac_ext=c
3726ac_cpp='$CPP $CPPFLAGS'
3727ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3728ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3729ac_compiler_gnu=$ac_cv_c_compiler_gnu
3730
3731
3732
3733
3734
3735ac_aux_dir=
3736for ac_dir in build-aux "$srcdir"/build-aux; do
3737  if test -f "$ac_dir/install-sh"; then
3738    ac_aux_dir=$ac_dir
3739    ac_install_sh="$ac_aux_dir/install-sh -c"
3740    break
3741  elif test -f "$ac_dir/install.sh"; then
3742    ac_aux_dir=$ac_dir
3743    ac_install_sh="$ac_aux_dir/install.sh -c"
3744    break
3745  elif test -f "$ac_dir/shtool"; then
3746    ac_aux_dir=$ac_dir
3747    ac_install_sh="$ac_aux_dir/shtool install -c"
3748    break
3749  fi
3750done
3751if test -z "$ac_aux_dir"; then
3752  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3753fi
3754
3755# These three variables are undocumented and unsupported,
3756# and are intended to be withdrawn in a future Autoconf release.
3757# They can cause serious problems if a builder's source tree is in a directory
3758# whose full name contains unusual characters.
3759ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3760ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3761ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3762
3763
3764am__api_version='1.15'
3765
3766# Find a good install program.  We prefer a C program (faster),
3767# so one script is as good as another.  But avoid the broken or
3768# incompatible versions:
3769# SysV /etc/install, /usr/sbin/install
3770# SunOS /usr/etc/install
3771# IRIX /sbin/install
3772# AIX /bin/install
3773# AmigaOS /C/install, which installs bootblocks on floppy discs
3774# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3775# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3776# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3777# OS/2's system install, which has a completely different semantic
3778# ./install, which can be erroneously created by make from ./install.sh.
3779# Reject install programs that cannot install multiple files.
3780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3781$as_echo_n "checking for a BSD-compatible install... " >&6; }
3782if test -z "$INSTALL"; then
3783if ${ac_cv_path_install+:} false; then :
3784  $as_echo_n "(cached) " >&6
3785else
3786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3787for as_dir in $PATH
3788do
3789  IFS=$as_save_IFS
3790  test -z "$as_dir" && as_dir=.
3791    # Account for people who put trailing slashes in PATH elements.
3792case $as_dir/ in #((
3793  ./ | .// | /[cC]/* | \
3794  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3795  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3796  /usr/ucb/* ) ;;
3797  *)
3798    # OSF1 and SCO ODT 3.0 have their own names for install.
3799    # Don't use installbsd from OSF since it installs stuff as root
3800    # by default.
3801    for ac_prog in ginstall scoinst install; do
3802      for ac_exec_ext in '' $ac_executable_extensions; do
3803	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3804	  if test $ac_prog = install &&
3805	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3806	    # AIX install.  It has an incompatible calling convention.
3807	    :
3808	  elif test $ac_prog = install &&
3809	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3810	    # program-specific install script used by HP pwplus--don't use.
3811	    :
3812	  else
3813	    rm -rf conftest.one conftest.two conftest.dir
3814	    echo one > conftest.one
3815	    echo two > conftest.two
3816	    mkdir conftest.dir
3817	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3818	      test -s conftest.one && test -s conftest.two &&
3819	      test -s conftest.dir/conftest.one &&
3820	      test -s conftest.dir/conftest.two
3821	    then
3822	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3823	      break 3
3824	    fi
3825	  fi
3826	fi
3827      done
3828    done
3829    ;;
3830esac
3831
3832  done
3833IFS=$as_save_IFS
3834
3835rm -rf conftest.one conftest.two conftest.dir
3836
3837fi
3838  if test "${ac_cv_path_install+set}" = set; then
3839    INSTALL=$ac_cv_path_install
3840  else
3841    # As a last resort, use the slow shell script.  Don't cache a
3842    # value for INSTALL within a source directory, because that will
3843    # break other packages using the cache if that directory is
3844    # removed, or if the value is a relative name.
3845    INSTALL=$ac_install_sh
3846  fi
3847fi
3848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3849$as_echo "$INSTALL" >&6; }
3850
3851# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3852# It thinks the first close brace ends the variable substitution.
3853test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3854
3855test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3856
3857test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3858
3859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3860$as_echo_n "checking whether build environment is sane... " >&6; }
3861# Reject unsafe characters in $srcdir or the absolute working directory
3862# name.  Accept space and tab only in the latter.
3863am_lf='
3864'
3865case `pwd` in
3866  *[\\\"\#\$\&\'\`$am_lf]*)
3867    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3868esac
3869case $srcdir in
3870  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
3871    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3872esac
3873
3874# Do 'set' in a subshell so we don't clobber the current shell's
3875# arguments.  Must try -L first in case configure is actually a
3876# symlink; some systems play weird games with the mod time of symlinks
3877# (eg FreeBSD returns the mod time of the symlink's containing
3878# directory).
3879if (
3880   am_has_slept=no
3881   for am_try in 1 2; do
3882     echo "timestamp, slept: $am_has_slept" > conftest.file
3883     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3884     if test "$*" = "X"; then
3885	# -L didn't work.
3886	set X `ls -t "$srcdir/configure" conftest.file`
3887     fi
3888     if test "$*" != "X $srcdir/configure conftest.file" \
3889	&& test "$*" != "X conftest.file $srcdir/configure"; then
3890
3891	# If neither matched, then we have a broken ls.  This can happen
3892	# if, for instance, CONFIG_SHELL is bash and it inherits a
3893	# broken ls alias from the environment.  This has actually
3894	# happened.  Such a system could not be considered "sane".
3895	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3896  alias in your environment" "$LINENO" 5
3897     fi
3898     if test "$2" = conftest.file || test $am_try -eq 2; then
3899       break
3900     fi
3901     # Just in case.
3902     sleep 1
3903     am_has_slept=yes
3904   done
3905   test "$2" = conftest.file
3906   )
3907then
3908   # Ok.
3909   :
3910else
3911   as_fn_error $? "newly created file is older than distributed files!
3912Check your system clock" "$LINENO" 5
3913fi
3914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3915$as_echo "yes" >&6; }
3916# If we didn't sleep, we still need to ensure time stamps of config.status and
3917# generated files are strictly newer.
3918am_sleep_pid=
3919if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3920  ( sleep 1 ) &
3921  am_sleep_pid=$!
3922fi
3923
3924rm -f conftest.file
3925
3926test "$program_prefix" != NONE &&
3927  program_transform_name="s&^&$program_prefix&;$program_transform_name"
3928# Use a double $ so make ignores it.
3929test "$program_suffix" != NONE &&
3930  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3931# Double any \ or $.
3932# By default was `s,x,x', remove it if useless.
3933ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3934program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3935
3936# Expand $ac_aux_dir to an absolute path.
3937am_aux_dir=`cd "$ac_aux_dir" && pwd`
3938
3939if test x"${MISSING+set}" != xset; then
3940  case $am_aux_dir in
3941  *\ * | *\	*)
3942    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3943  *)
3944    MISSING="\${SHELL} $am_aux_dir/missing" ;;
3945  esac
3946fi
3947# Use eval to expand $SHELL
3948if eval "$MISSING --is-lightweight"; then
3949  am_missing_run="$MISSING "
3950else
3951  am_missing_run=
3952  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3953$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3954fi
3955
3956if test x"${install_sh+set}" != xset; then
3957  case $am_aux_dir in
3958  *\ * | *\	*)
3959    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3960  *)
3961    install_sh="\${SHELL} $am_aux_dir/install-sh"
3962  esac
3963fi
3964
3965# Installed binaries are usually stripped using 'strip' when the user
3966# run "make install-strip".  However 'strip' might not be the right
3967# tool to use in cross-compilation environments, therefore Automake
3968# will honor the 'STRIP' environment variable to overrule this program.
3969if test "$cross_compiling" != no; then
3970  if test -n "$ac_tool_prefix"; then
3971  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3972set dummy ${ac_tool_prefix}strip; ac_word=$2
3973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3974$as_echo_n "checking for $ac_word... " >&6; }
3975if ${ac_cv_prog_STRIP+:} false; then :
3976  $as_echo_n "(cached) " >&6
3977else
3978  if test -n "$STRIP"; then
3979  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3980else
3981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3982for as_dir in $PATH
3983do
3984  IFS=$as_save_IFS
3985  test -z "$as_dir" && as_dir=.
3986    for ac_exec_ext in '' $ac_executable_extensions; do
3987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3988    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3990    break 2
3991  fi
3992done
3993  done
3994IFS=$as_save_IFS
3995
3996fi
3997fi
3998STRIP=$ac_cv_prog_STRIP
3999if test -n "$STRIP"; then
4000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4001$as_echo "$STRIP" >&6; }
4002else
4003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4004$as_echo "no" >&6; }
4005fi
4006
4007
4008fi
4009if test -z "$ac_cv_prog_STRIP"; then
4010  ac_ct_STRIP=$STRIP
4011  # Extract the first word of "strip", so it can be a program name with args.
4012set dummy strip; ac_word=$2
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4014$as_echo_n "checking for $ac_word... " >&6; }
4015if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4016  $as_echo_n "(cached) " >&6
4017else
4018  if test -n "$ac_ct_STRIP"; then
4019  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4020else
4021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4022for as_dir in $PATH
4023do
4024  IFS=$as_save_IFS
4025  test -z "$as_dir" && as_dir=.
4026    for ac_exec_ext in '' $ac_executable_extensions; do
4027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4028    ac_cv_prog_ac_ct_STRIP="strip"
4029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4030    break 2
4031  fi
4032done
4033  done
4034IFS=$as_save_IFS
4035
4036fi
4037fi
4038ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4039if test -n "$ac_ct_STRIP"; then
4040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4041$as_echo "$ac_ct_STRIP" >&6; }
4042else
4043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4044$as_echo "no" >&6; }
4045fi
4046
4047  if test "x$ac_ct_STRIP" = x; then
4048    STRIP=":"
4049  else
4050    case $cross_compiling:$ac_tool_warned in
4051yes:)
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4053$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4054ac_tool_warned=yes ;;
4055esac
4056    STRIP=$ac_ct_STRIP
4057  fi
4058else
4059  STRIP="$ac_cv_prog_STRIP"
4060fi
4061
4062fi
4063INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4064
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
4066$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
4067if test -z "$MKDIR_P"; then
4068  if ${ac_cv_path_mkdir+:} false; then :
4069  $as_echo_n "(cached) " >&6
4070else
4071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4072for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4073do
4074  IFS=$as_save_IFS
4075  test -z "$as_dir" && as_dir=.
4076    for ac_prog in mkdir gmkdir; do
4077	 for ac_exec_ext in '' $ac_executable_extensions; do
4078	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
4079	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
4080	     'mkdir (GNU coreutils) '* | \
4081	     'mkdir (coreutils) '* | \
4082	     'mkdir (fileutils) '4.1*)
4083	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4084	       break 3;;
4085	   esac
4086	 done
4087       done
4088  done
4089IFS=$as_save_IFS
4090
4091fi
4092
4093  test -d ./--version && rmdir ./--version
4094  if test "${ac_cv_path_mkdir+set}" = set; then
4095    MKDIR_P="$ac_cv_path_mkdir -p"
4096  else
4097    # As a last resort, use the slow shell script.  Don't cache a
4098    # value for MKDIR_P within a source directory, because that will
4099    # break other packages using the cache if that directory is
4100    # removed, or if the value is a relative name.
4101    MKDIR_P="$ac_install_sh -d"
4102  fi
4103fi
4104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4105$as_echo "$MKDIR_P" >&6; }
4106
4107for ac_prog in gawk mawk nawk awk
4108do
4109  # Extract the first word of "$ac_prog", so it can be a program name with args.
4110set dummy $ac_prog; ac_word=$2
4111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4112$as_echo_n "checking for $ac_word... " >&6; }
4113if ${ac_cv_prog_AWK+:} false; then :
4114  $as_echo_n "(cached) " >&6
4115else
4116  if test -n "$AWK"; then
4117  ac_cv_prog_AWK="$AWK" # Let the user override the test.
4118else
4119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4120for as_dir in $PATH
4121do
4122  IFS=$as_save_IFS
4123  test -z "$as_dir" && as_dir=.
4124    for ac_exec_ext in '' $ac_executable_extensions; do
4125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4126    ac_cv_prog_AWK="$ac_prog"
4127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4128    break 2
4129  fi
4130done
4131  done
4132IFS=$as_save_IFS
4133
4134fi
4135fi
4136AWK=$ac_cv_prog_AWK
4137if test -n "$AWK"; then
4138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4139$as_echo "$AWK" >&6; }
4140else
4141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4142$as_echo "no" >&6; }
4143fi
4144
4145
4146  test -n "$AWK" && break
4147done
4148
4149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4150$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4151set x ${MAKE-make}
4152ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4153if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4154  $as_echo_n "(cached) " >&6
4155else
4156  cat >conftest.make <<\_ACEOF
4157SHELL = /bin/sh
4158all:
4159	@echo '@@@%%%=$(MAKE)=@@@%%%'
4160_ACEOF
4161# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4162case `${MAKE-make} -f conftest.make 2>/dev/null` in
4163  *@@@%%%=?*=@@@%%%*)
4164    eval ac_cv_prog_make_${ac_make}_set=yes;;
4165  *)
4166    eval ac_cv_prog_make_${ac_make}_set=no;;
4167esac
4168rm -f conftest.make
4169fi
4170if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4172$as_echo "yes" >&6; }
4173  SET_MAKE=
4174else
4175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4176$as_echo "no" >&6; }
4177  SET_MAKE="MAKE=${MAKE-make}"
4178fi
4179
4180rm -rf .tst 2>/dev/null
4181mkdir .tst 2>/dev/null
4182if test -d .tst; then
4183  am__leading_dot=.
4184else
4185  am__leading_dot=_
4186fi
4187rmdir .tst 2>/dev/null
4188
4189# Check whether --enable-silent-rules was given.
4190if test "${enable_silent_rules+set}" = set; then :
4191  enableval=$enable_silent_rules;
4192fi
4193
4194case $enable_silent_rules in # (((
4195  yes) AM_DEFAULT_VERBOSITY=0;;
4196   no) AM_DEFAULT_VERBOSITY=1;;
4197    *) AM_DEFAULT_VERBOSITY=1;;
4198esac
4199am_make=${MAKE-make}
4200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4201$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4202if ${am_cv_make_support_nested_variables+:} false; then :
4203  $as_echo_n "(cached) " >&6
4204else
4205  if $as_echo 'TRUE=$(BAR$(V))
4206BAR0=false
4207BAR1=true
4208V=1
4209am__doit:
4210	@$(TRUE)
4211.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4212  am_cv_make_support_nested_variables=yes
4213else
4214  am_cv_make_support_nested_variables=no
4215fi
4216fi
4217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4218$as_echo "$am_cv_make_support_nested_variables" >&6; }
4219if test $am_cv_make_support_nested_variables = yes; then
4220    AM_V='$(V)'
4221  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4222else
4223  AM_V=$AM_DEFAULT_VERBOSITY
4224  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4225fi
4226AM_BACKSLASH='\'
4227
4228if test "`cd $srcdir && pwd`" != "`pwd`"; then
4229  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4230  # is not polluted with repeated "-I."
4231  am__isrc=' -I$(srcdir)'
4232  # test to see if srcdir already configured
4233  if test -f $srcdir/config.status; then
4234    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4235  fi
4236fi
4237
4238# test whether we have cygpath
4239if test -z "$CYGPATH_W"; then
4240  if (cygpath --version) >/dev/null 2>/dev/null; then
4241    CYGPATH_W='cygpath -w'
4242  else
4243    CYGPATH_W=echo
4244  fi
4245fi
4246
4247
4248# Define the identity of the package.
4249 PACKAGE='gcal'
4250 VERSION='4.1'
4251
4252
4253cat >>confdefs.h <<_ACEOF
4254#define PACKAGE "$PACKAGE"
4255_ACEOF
4256
4257
4258cat >>confdefs.h <<_ACEOF
4259#define VERSION "$VERSION"
4260_ACEOF
4261
4262# Some tools Automake needs.
4263
4264ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4265
4266
4267AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4268
4269
4270AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4271
4272
4273AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4274
4275
4276MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4277
4278# For better backward compatibility.  To be removed once Automake 1.9.x
4279# dies out for good.  For more background, see:
4280# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4281# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4282mkdir_p='$(MKDIR_P)'
4283
4284# We need awk for the "check" target (and possibly the TAP driver).  The
4285# system "awk" is bad on some platforms.
4286# Always define AMTAR for backward compatibility.  Yes, it's still used
4287# in the wild :-(  We should find a proper way to deprecate it ...
4288AMTAR='$${TAR-tar}'
4289
4290
4291# We'll loop over all known methods to create a tar archive until one works.
4292_am_tools='gnutar  pax cpio none'
4293
4294am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4295
4296
4297
4298
4299
4300
4301# POSIX will say in a future version that running "rm -f" with no argument
4302# is OK; and we want to be able to make that assumption in our Makefile
4303# recipes.  So use an aggressive probe to check that the usage we want is
4304# actually supported "in the wild" to an acceptable degree.
4305# See automake bug#10828.
4306# To make any issue more visible, cause the running configure to be aborted
4307# by default if the 'rm' program in use doesn't match our expectations; the
4308# user can still override this though.
4309if rm -f && rm -fr && rm -rf; then : OK; else
4310  cat >&2 <<'END'
4311Oops!
4312
4313Your 'rm' program seems unable to run without file operands specified
4314on the command line, even when the '-f' option is present.  This is contrary
4315to the behaviour of most rm programs out there, and not conforming with
4316the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4317
4318Please tell bug-automake@gnu.org about your system, including the value
4319of your $PATH and any error possibly output before this message.  This
4320can help us improve future automake versions.
4321
4322END
4323  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4324    echo 'Configuration will proceed anyway, since you have set the' >&2
4325    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4326    echo >&2
4327  else
4328    cat >&2 <<'END'
4329Aborting the configuration process, to ensure you take notice of the issue.
4330
4331You can download and install GNU coreutils to get an 'rm' implementation
4332that behaves properly: <http://www.gnu.org/software/coreutils/>.
4333
4334If you want to complete the configuration process using your problematic
4335'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4336to "yes", and re-run configure.
4337
4338END
4339    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4340  fi
4341fi
4342
4343
4344
4345
4346# Check whether --enable-silent-rules was given.
4347if test "${enable_silent_rules+set}" = set; then :
4348  enableval=$enable_silent_rules;
4349fi
4350
4351case $enable_silent_rules in # (((
4352  yes) AM_DEFAULT_VERBOSITY=0;;
4353   no) AM_DEFAULT_VERBOSITY=1;;
4354    *) AM_DEFAULT_VERBOSITY=0;;
4355esac
4356am_make=${MAKE-make}
4357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4358$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4359if ${am_cv_make_support_nested_variables+:} false; then :
4360  $as_echo_n "(cached) " >&6
4361else
4362  if $as_echo 'TRUE=$(BAR$(V))
4363BAR0=false
4364BAR1=true
4365V=1
4366am__doit:
4367	@$(TRUE)
4368.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4369  am_cv_make_support_nested_variables=yes
4370else
4371  am_cv_make_support_nested_variables=no
4372fi
4373fi
4374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4375$as_echo "$am_cv_make_support_nested_variables" >&6; }
4376if test $am_cv_make_support_nested_variables = yes; then
4377    AM_V='$(V)'
4378  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4379else
4380  AM_V=$AM_DEFAULT_VERBOSITY
4381  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4382fi
4383AM_BACKSLASH='\'
4384
4385
4386DEPDIR="${am__leading_dot}deps"
4387
4388ac_config_commands="$ac_config_commands depfiles"
4389
4390
4391am_make=${MAKE-make}
4392cat > confinc << 'END'
4393am__doit:
4394	@echo this is the am__doit target
4395.PHONY: am__doit
4396END
4397# If we don't find an include directive, just comment out the code.
4398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4399$as_echo_n "checking for style of include used by $am_make... " >&6; }
4400am__include="#"
4401am__quote=
4402_am_result=none
4403# First try GNU make style include.
4404echo "include confinc" > confmf
4405# Ignore all kinds of additional output from 'make'.
4406case `$am_make -s -f confmf 2> /dev/null` in #(
4407*the\ am__doit\ target*)
4408  am__include=include
4409  am__quote=
4410  _am_result=GNU
4411  ;;
4412esac
4413# Now try BSD make style include.
4414if test "$am__include" = "#"; then
4415   echo '.include "confinc"' > confmf
4416   case `$am_make -s -f confmf 2> /dev/null` in #(
4417   *the\ am__doit\ target*)
4418     am__include=.include
4419     am__quote="\""
4420     _am_result=BSD
4421     ;;
4422   esac
4423fi
4424
4425
4426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4427$as_echo "$_am_result" >&6; }
4428rm -f confinc confmf
4429
4430# Check whether --enable-dependency-tracking was given.
4431if test "${enable_dependency_tracking+set}" = set; then :
4432  enableval=$enable_dependency_tracking;
4433fi
4434
4435if test "x$enable_dependency_tracking" != xno; then
4436  am_depcomp="$ac_aux_dir/depcomp"
4437  AMDEPBACKSLASH='\'
4438  am__nodep='_no'
4439fi
4440 if test "x$enable_dependency_tracking" != xno; then
4441  AMDEP_TRUE=
4442  AMDEP_FALSE='#'
4443else
4444  AMDEP_TRUE='#'
4445  AMDEP_FALSE=
4446fi
4447
4448
4449ac_ext=c
4450ac_cpp='$CPP $CPPFLAGS'
4451ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4452ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4453ac_compiler_gnu=$ac_cv_c_compiler_gnu
4454if test -n "$ac_tool_prefix"; then
4455  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4456set dummy ${ac_tool_prefix}gcc; ac_word=$2
4457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4458$as_echo_n "checking for $ac_word... " >&6; }
4459if ${ac_cv_prog_CC+:} false; then :
4460  $as_echo_n "(cached) " >&6
4461else
4462  if test -n "$CC"; then
4463  ac_cv_prog_CC="$CC" # Let the user override the test.
4464else
4465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4466for as_dir in $PATH
4467do
4468  IFS=$as_save_IFS
4469  test -z "$as_dir" && as_dir=.
4470    for ac_exec_ext in '' $ac_executable_extensions; do
4471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4472    ac_cv_prog_CC="${ac_tool_prefix}gcc"
4473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4474    break 2
4475  fi
4476done
4477  done
4478IFS=$as_save_IFS
4479
4480fi
4481fi
4482CC=$ac_cv_prog_CC
4483if test -n "$CC"; then
4484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4485$as_echo "$CC" >&6; }
4486else
4487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4488$as_echo "no" >&6; }
4489fi
4490
4491
4492fi
4493if test -z "$ac_cv_prog_CC"; then
4494  ac_ct_CC=$CC
4495  # Extract the first word of "gcc", so it can be a program name with args.
4496set dummy gcc; ac_word=$2
4497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4498$as_echo_n "checking for $ac_word... " >&6; }
4499if ${ac_cv_prog_ac_ct_CC+:} false; then :
4500  $as_echo_n "(cached) " >&6
4501else
4502  if test -n "$ac_ct_CC"; then
4503  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4504else
4505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4506for as_dir in $PATH
4507do
4508  IFS=$as_save_IFS
4509  test -z "$as_dir" && as_dir=.
4510    for ac_exec_ext in '' $ac_executable_extensions; do
4511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4512    ac_cv_prog_ac_ct_CC="gcc"
4513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4514    break 2
4515  fi
4516done
4517  done
4518IFS=$as_save_IFS
4519
4520fi
4521fi
4522ac_ct_CC=$ac_cv_prog_ac_ct_CC
4523if test -n "$ac_ct_CC"; then
4524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4525$as_echo "$ac_ct_CC" >&6; }
4526else
4527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4528$as_echo "no" >&6; }
4529fi
4530
4531  if test "x$ac_ct_CC" = x; then
4532    CC=""
4533  else
4534    case $cross_compiling:$ac_tool_warned in
4535yes:)
4536{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4537$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4538ac_tool_warned=yes ;;
4539esac
4540    CC=$ac_ct_CC
4541  fi
4542else
4543  CC="$ac_cv_prog_CC"
4544fi
4545
4546if test -z "$CC"; then
4547          if test -n "$ac_tool_prefix"; then
4548    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4549set dummy ${ac_tool_prefix}cc; ac_word=$2
4550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4551$as_echo_n "checking for $ac_word... " >&6; }
4552if ${ac_cv_prog_CC+:} false; then :
4553  $as_echo_n "(cached) " >&6
4554else
4555  if test -n "$CC"; then
4556  ac_cv_prog_CC="$CC" # Let the user override the test.
4557else
4558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4559for as_dir in $PATH
4560do
4561  IFS=$as_save_IFS
4562  test -z "$as_dir" && as_dir=.
4563    for ac_exec_ext in '' $ac_executable_extensions; do
4564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4565    ac_cv_prog_CC="${ac_tool_prefix}cc"
4566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4567    break 2
4568  fi
4569done
4570  done
4571IFS=$as_save_IFS
4572
4573fi
4574fi
4575CC=$ac_cv_prog_CC
4576if test -n "$CC"; then
4577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4578$as_echo "$CC" >&6; }
4579else
4580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4581$as_echo "no" >&6; }
4582fi
4583
4584
4585  fi
4586fi
4587if test -z "$CC"; then
4588  # Extract the first word of "cc", so it can be a program name with args.
4589set dummy cc; ac_word=$2
4590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4591$as_echo_n "checking for $ac_word... " >&6; }
4592if ${ac_cv_prog_CC+:} false; then :
4593  $as_echo_n "(cached) " >&6
4594else
4595  if test -n "$CC"; then
4596  ac_cv_prog_CC="$CC" # Let the user override the test.
4597else
4598  ac_prog_rejected=no
4599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4600for as_dir in $PATH
4601do
4602  IFS=$as_save_IFS
4603  test -z "$as_dir" && as_dir=.
4604    for ac_exec_ext in '' $ac_executable_extensions; do
4605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4606    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4607       ac_prog_rejected=yes
4608       continue
4609     fi
4610    ac_cv_prog_CC="cc"
4611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4612    break 2
4613  fi
4614done
4615  done
4616IFS=$as_save_IFS
4617
4618if test $ac_prog_rejected = yes; then
4619  # We found a bogon in the path, so make sure we never use it.
4620  set dummy $ac_cv_prog_CC
4621  shift
4622  if test $# != 0; then
4623    # We chose a different compiler from the bogus one.
4624    # However, it has the same basename, so the bogon will be chosen
4625    # first if we set CC to just the basename; use the full file name.
4626    shift
4627    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4628  fi
4629fi
4630fi
4631fi
4632CC=$ac_cv_prog_CC
4633if test -n "$CC"; then
4634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4635$as_echo "$CC" >&6; }
4636else
4637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4638$as_echo "no" >&6; }
4639fi
4640
4641
4642fi
4643if test -z "$CC"; then
4644  if test -n "$ac_tool_prefix"; then
4645  for ac_prog in cl.exe
4646  do
4647    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4648set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4650$as_echo_n "checking for $ac_word... " >&6; }
4651if ${ac_cv_prog_CC+:} false; then :
4652  $as_echo_n "(cached) " >&6
4653else
4654  if test -n "$CC"; then
4655  ac_cv_prog_CC="$CC" # Let the user override the test.
4656else
4657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658for as_dir in $PATH
4659do
4660  IFS=$as_save_IFS
4661  test -z "$as_dir" && as_dir=.
4662    for ac_exec_ext in '' $ac_executable_extensions; do
4663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4664    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666    break 2
4667  fi
4668done
4669  done
4670IFS=$as_save_IFS
4671
4672fi
4673fi
4674CC=$ac_cv_prog_CC
4675if test -n "$CC"; then
4676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4677$as_echo "$CC" >&6; }
4678else
4679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4680$as_echo "no" >&6; }
4681fi
4682
4683
4684    test -n "$CC" && break
4685  done
4686fi
4687if test -z "$CC"; then
4688  ac_ct_CC=$CC
4689  for ac_prog in cl.exe
4690do
4691  # Extract the first word of "$ac_prog", so it can be a program name with args.
4692set dummy $ac_prog; ac_word=$2
4693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4694$as_echo_n "checking for $ac_word... " >&6; }
4695if ${ac_cv_prog_ac_ct_CC+:} false; then :
4696  $as_echo_n "(cached) " >&6
4697else
4698  if test -n "$ac_ct_CC"; then
4699  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4700else
4701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4702for as_dir in $PATH
4703do
4704  IFS=$as_save_IFS
4705  test -z "$as_dir" && as_dir=.
4706    for ac_exec_ext in '' $ac_executable_extensions; do
4707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4708    ac_cv_prog_ac_ct_CC="$ac_prog"
4709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4710    break 2
4711  fi
4712done
4713  done
4714IFS=$as_save_IFS
4715
4716fi
4717fi
4718ac_ct_CC=$ac_cv_prog_ac_ct_CC
4719if test -n "$ac_ct_CC"; then
4720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4721$as_echo "$ac_ct_CC" >&6; }
4722else
4723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4724$as_echo "no" >&6; }
4725fi
4726
4727
4728  test -n "$ac_ct_CC" && break
4729done
4730
4731  if test "x$ac_ct_CC" = x; then
4732    CC=""
4733  else
4734    case $cross_compiling:$ac_tool_warned in
4735yes:)
4736{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4737$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4738ac_tool_warned=yes ;;
4739esac
4740    CC=$ac_ct_CC
4741  fi
4742fi
4743
4744fi
4745
4746
4747test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4749as_fn_error $? "no acceptable C compiler found in \$PATH
4750See \`config.log' for more details" "$LINENO" 5; }
4751
4752# Provide some information about the compiler.
4753$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4754set X $ac_compile
4755ac_compiler=$2
4756for ac_option in --version -v -V -qversion; do
4757  { { ac_try="$ac_compiler $ac_option >&5"
4758case "(($ac_try" in
4759  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4760  *) ac_try_echo=$ac_try;;
4761esac
4762eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4763$as_echo "$ac_try_echo"; } >&5
4764  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4765  ac_status=$?
4766  if test -s conftest.err; then
4767    sed '10a\
4768... rest of stderr output deleted ...
4769         10q' conftest.err >conftest.er1
4770    cat conftest.er1 >&5
4771  fi
4772  rm -f conftest.er1 conftest.err
4773  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4774  test $ac_status = 0; }
4775done
4776
4777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4778/* end confdefs.h.  */
4779
4780int
4781main ()
4782{
4783
4784  ;
4785  return 0;
4786}
4787_ACEOF
4788ac_clean_files_save=$ac_clean_files
4789ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4790# Try to create an executable without -o first, disregard a.out.
4791# It will help us diagnose broken compilers, and finding out an intuition
4792# of exeext.
4793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4794$as_echo_n "checking whether the C compiler works... " >&6; }
4795ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4796
4797# The possible output files:
4798ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4799
4800ac_rmfiles=
4801for ac_file in $ac_files
4802do
4803  case $ac_file in
4804    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4805    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4806  esac
4807done
4808rm -f $ac_rmfiles
4809
4810if { { ac_try="$ac_link_default"
4811case "(($ac_try" in
4812  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4813  *) ac_try_echo=$ac_try;;
4814esac
4815eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4816$as_echo "$ac_try_echo"; } >&5
4817  (eval "$ac_link_default") 2>&5
4818  ac_status=$?
4819  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4820  test $ac_status = 0; }; then :
4821  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4822# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4823# in a Makefile.  We should not override ac_cv_exeext if it was cached,
4824# so that the user can short-circuit this test for compilers unknown to
4825# Autoconf.
4826for ac_file in $ac_files ''
4827do
4828  test -f "$ac_file" || continue
4829  case $ac_file in
4830    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4831	;;
4832    [ab].out )
4833	# We found the default executable, but exeext='' is most
4834	# certainly right.
4835	break;;
4836    *.* )
4837	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4838	then :; else
4839	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4840	fi
4841	# We set ac_cv_exeext here because the later test for it is not
4842	# safe: cross compilers may not add the suffix if given an `-o'
4843	# argument, so we may need to know it at that point already.
4844	# Even if this section looks crufty: it has the advantage of
4845	# actually working.
4846	break;;
4847    * )
4848	break;;
4849  esac
4850done
4851test "$ac_cv_exeext" = no && ac_cv_exeext=
4852
4853else
4854  ac_file=''
4855fi
4856if test -z "$ac_file"; then :
4857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4858$as_echo "no" >&6; }
4859$as_echo "$as_me: failed program was:" >&5
4860sed 's/^/| /' conftest.$ac_ext >&5
4861
4862{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4864as_fn_error 77 "C compiler cannot create executables
4865See \`config.log' for more details" "$LINENO" 5; }
4866else
4867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4868$as_echo "yes" >&6; }
4869fi
4870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4871$as_echo_n "checking for C compiler default output file name... " >&6; }
4872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4873$as_echo "$ac_file" >&6; }
4874ac_exeext=$ac_cv_exeext
4875
4876rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4877ac_clean_files=$ac_clean_files_save
4878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4879$as_echo_n "checking for suffix of executables... " >&6; }
4880if { { ac_try="$ac_link"
4881case "(($ac_try" in
4882  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4883  *) ac_try_echo=$ac_try;;
4884esac
4885eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4886$as_echo "$ac_try_echo"; } >&5
4887  (eval "$ac_link") 2>&5
4888  ac_status=$?
4889  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4890  test $ac_status = 0; }; then :
4891  # If both `conftest.exe' and `conftest' are `present' (well, observable)
4892# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4893# work properly (i.e., refer to `conftest.exe'), while it won't with
4894# `rm'.
4895for ac_file in conftest.exe conftest conftest.*; do
4896  test -f "$ac_file" || continue
4897  case $ac_file in
4898    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4899    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4900	  break;;
4901    * ) break;;
4902  esac
4903done
4904else
4905  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4907as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4908See \`config.log' for more details" "$LINENO" 5; }
4909fi
4910rm -f conftest conftest$ac_cv_exeext
4911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4912$as_echo "$ac_cv_exeext" >&6; }
4913
4914rm -f conftest.$ac_ext
4915EXEEXT=$ac_cv_exeext
4916ac_exeext=$EXEEXT
4917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4918/* end confdefs.h.  */
4919#include <stdio.h>
4920int
4921main ()
4922{
4923FILE *f = fopen ("conftest.out", "w");
4924 return ferror (f) || fclose (f) != 0;
4925
4926  ;
4927  return 0;
4928}
4929_ACEOF
4930ac_clean_files="$ac_clean_files conftest.out"
4931# Check that the compiler produces executables we can run.  If not, either
4932# the compiler is broken, or we cross compile.
4933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4934$as_echo_n "checking whether we are cross compiling... " >&6; }
4935if test "$cross_compiling" != yes; then
4936  { { ac_try="$ac_link"
4937case "(($ac_try" in
4938  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4939  *) ac_try_echo=$ac_try;;
4940esac
4941eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4942$as_echo "$ac_try_echo"; } >&5
4943  (eval "$ac_link") 2>&5
4944  ac_status=$?
4945  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4946  test $ac_status = 0; }
4947  if { ac_try='./conftest$ac_cv_exeext'
4948  { { case "(($ac_try" in
4949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4950  *) ac_try_echo=$ac_try;;
4951esac
4952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4953$as_echo "$ac_try_echo"; } >&5
4954  (eval "$ac_try") 2>&5
4955  ac_status=$?
4956  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4957  test $ac_status = 0; }; }; then
4958    cross_compiling=no
4959  else
4960    if test "$cross_compiling" = maybe; then
4961	cross_compiling=yes
4962    else
4963	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4965as_fn_error $? "cannot run C compiled programs.
4966If you meant to cross compile, use \`--host'.
4967See \`config.log' for more details" "$LINENO" 5; }
4968    fi
4969  fi
4970fi
4971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4972$as_echo "$cross_compiling" >&6; }
4973
4974rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4975ac_clean_files=$ac_clean_files_save
4976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4977$as_echo_n "checking for suffix of object files... " >&6; }
4978if ${ac_cv_objext+:} false; then :
4979  $as_echo_n "(cached) " >&6
4980else
4981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4982/* end confdefs.h.  */
4983
4984int
4985main ()
4986{
4987
4988  ;
4989  return 0;
4990}
4991_ACEOF
4992rm -f conftest.o conftest.obj
4993if { { ac_try="$ac_compile"
4994case "(($ac_try" in
4995  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4996  *) ac_try_echo=$ac_try;;
4997esac
4998eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4999$as_echo "$ac_try_echo"; } >&5
5000  (eval "$ac_compile") 2>&5
5001  ac_status=$?
5002  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5003  test $ac_status = 0; }; then :
5004  for ac_file in conftest.o conftest.obj conftest.*; do
5005  test -f "$ac_file" || continue;
5006  case $ac_file in
5007    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5008    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5009       break;;
5010  esac
5011done
5012else
5013  $as_echo "$as_me: failed program was:" >&5
5014sed 's/^/| /' conftest.$ac_ext >&5
5015
5016{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5018as_fn_error $? "cannot compute suffix of object files: cannot compile
5019See \`config.log' for more details" "$LINENO" 5; }
5020fi
5021rm -f conftest.$ac_cv_objext conftest.$ac_ext
5022fi
5023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5024$as_echo "$ac_cv_objext" >&6; }
5025OBJEXT=$ac_cv_objext
5026ac_objext=$OBJEXT
5027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5028$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5029if ${ac_cv_c_compiler_gnu+:} false; then :
5030  $as_echo_n "(cached) " >&6
5031else
5032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5033/* end confdefs.h.  */
5034
5035int
5036main ()
5037{
5038#ifndef __GNUC__
5039       choke me
5040#endif
5041
5042  ;
5043  return 0;
5044}
5045_ACEOF
5046if ac_fn_c_try_compile "$LINENO"; then :
5047  ac_compiler_gnu=yes
5048else
5049  ac_compiler_gnu=no
5050fi
5051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5052ac_cv_c_compiler_gnu=$ac_compiler_gnu
5053
5054fi
5055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5056$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5057if test $ac_compiler_gnu = yes; then
5058  GCC=yes
5059else
5060  GCC=
5061fi
5062ac_test_CFLAGS=${CFLAGS+set}
5063ac_save_CFLAGS=$CFLAGS
5064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5065$as_echo_n "checking whether $CC accepts -g... " >&6; }
5066if ${ac_cv_prog_cc_g+:} false; then :
5067  $as_echo_n "(cached) " >&6
5068else
5069  ac_save_c_werror_flag=$ac_c_werror_flag
5070   ac_c_werror_flag=yes
5071   ac_cv_prog_cc_g=no
5072   CFLAGS="-g"
5073   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5074/* end confdefs.h.  */
5075
5076int
5077main ()
5078{
5079
5080  ;
5081  return 0;
5082}
5083_ACEOF
5084if ac_fn_c_try_compile "$LINENO"; then :
5085  ac_cv_prog_cc_g=yes
5086else
5087  CFLAGS=""
5088      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5089/* end confdefs.h.  */
5090
5091int
5092main ()
5093{
5094
5095  ;
5096  return 0;
5097}
5098_ACEOF
5099if ac_fn_c_try_compile "$LINENO"; then :
5100
5101else
5102  ac_c_werror_flag=$ac_save_c_werror_flag
5103	 CFLAGS="-g"
5104	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5105/* end confdefs.h.  */
5106
5107int
5108main ()
5109{
5110
5111  ;
5112  return 0;
5113}
5114_ACEOF
5115if ac_fn_c_try_compile "$LINENO"; then :
5116  ac_cv_prog_cc_g=yes
5117fi
5118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5119fi
5120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5121fi
5122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5123   ac_c_werror_flag=$ac_save_c_werror_flag
5124fi
5125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5126$as_echo "$ac_cv_prog_cc_g" >&6; }
5127if test "$ac_test_CFLAGS" = set; then
5128  CFLAGS=$ac_save_CFLAGS
5129elif test $ac_cv_prog_cc_g = yes; then
5130  if test "$GCC" = yes; then
5131    CFLAGS="-g -O2"
5132  else
5133    CFLAGS="-g"
5134  fi
5135else
5136  if test "$GCC" = yes; then
5137    CFLAGS="-O2"
5138  else
5139    CFLAGS=
5140  fi
5141fi
5142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5143$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5144if ${ac_cv_prog_cc_c89+:} false; then :
5145  $as_echo_n "(cached) " >&6
5146else
5147  ac_cv_prog_cc_c89=no
5148ac_save_CC=$CC
5149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5150/* end confdefs.h.  */
5151#include <stdarg.h>
5152#include <stdio.h>
5153struct stat;
5154/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5155struct buf { int x; };
5156FILE * (*rcsopen) (struct buf *, struct stat *, int);
5157static char *e (p, i)
5158     char **p;
5159     int i;
5160{
5161  return p[i];
5162}
5163static char *f (char * (*g) (char **, int), char **p, ...)
5164{
5165  char *s;
5166  va_list v;
5167  va_start (v,p);
5168  s = g (p, va_arg (v,int));
5169  va_end (v);
5170  return s;
5171}
5172
5173/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5174   function prototypes and stuff, but not '\xHH' hex character constants.
5175   These don't provoke an error unfortunately, instead are silently treated
5176   as 'x'.  The following induces an error, until -std is added to get
5177   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5178   array size at least.  It's necessary to write '\x00'==0 to get something
5179   that's true only with -std.  */
5180int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5181
5182/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5183   inside strings and character constants.  */
5184#define FOO(x) 'x'
5185int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5186
5187int test (int i, double x);
5188struct s1 {int (*f) (int a);};
5189struct s2 {int (*f) (double a);};
5190int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5191int argc;
5192char **argv;
5193int
5194main ()
5195{
5196return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5197  ;
5198  return 0;
5199}
5200_ACEOF
5201for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5202	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5203do
5204  CC="$ac_save_CC $ac_arg"
5205  if ac_fn_c_try_compile "$LINENO"; then :
5206  ac_cv_prog_cc_c89=$ac_arg
5207fi
5208rm -f core conftest.err conftest.$ac_objext
5209  test "x$ac_cv_prog_cc_c89" != "xno" && break
5210done
5211rm -f conftest.$ac_ext
5212CC=$ac_save_CC
5213
5214fi
5215# AC_CACHE_VAL
5216case "x$ac_cv_prog_cc_c89" in
5217  x)
5218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5219$as_echo "none needed" >&6; } ;;
5220  xno)
5221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5222$as_echo "unsupported" >&6; } ;;
5223  *)
5224    CC="$CC $ac_cv_prog_cc_c89"
5225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5226$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5227esac
5228if test "x$ac_cv_prog_cc_c89" != xno; then :
5229
5230fi
5231
5232ac_ext=c
5233ac_cpp='$CPP $CPPFLAGS'
5234ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5235ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5236ac_compiler_gnu=$ac_cv_c_compiler_gnu
5237
5238ac_ext=c
5239ac_cpp='$CPP $CPPFLAGS'
5240ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5241ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5242ac_compiler_gnu=$ac_cv_c_compiler_gnu
5243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5244$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
5245if ${am_cv_prog_cc_c_o+:} false; then :
5246  $as_echo_n "(cached) " >&6
5247else
5248  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5249/* end confdefs.h.  */
5250
5251int
5252main ()
5253{
5254
5255  ;
5256  return 0;
5257}
5258_ACEOF
5259  # Make sure it works both with $CC and with simple cc.
5260  # Following AC_PROG_CC_C_O, we do the test twice because some
5261  # compilers refuse to overwrite an existing .o file with -o,
5262  # though they will create one.
5263  am_cv_prog_cc_c_o=yes
5264  for am_i in 1 2; do
5265    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5266   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5267   ac_status=$?
5268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5269   (exit $ac_status); } \
5270         && test -f conftest2.$ac_objext; then
5271      : OK
5272    else
5273      am_cv_prog_cc_c_o=no
5274      break
5275    fi
5276  done
5277  rm -f core conftest*
5278  unset am_i
5279fi
5280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5281$as_echo "$am_cv_prog_cc_c_o" >&6; }
5282if test "$am_cv_prog_cc_c_o" != yes; then
5283   # Losing compiler, so override with the script.
5284   # FIXME: It is wrong to rewrite CC.
5285   # But if we don't then we get into trouble of one sort or another.
5286   # A longer-term fix would be to have automake use am__CC in this case,
5287   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5288   CC="$am_aux_dir/compile $CC"
5289fi
5290ac_ext=c
5291ac_cpp='$CPP $CPPFLAGS'
5292ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5293ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5294ac_compiler_gnu=$ac_cv_c_compiler_gnu
5295
5296
5297depcc="$CC"   am_compiler_list=
5298
5299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5300$as_echo_n "checking dependency style of $depcc... " >&6; }
5301if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5302  $as_echo_n "(cached) " >&6
5303else
5304  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5305  # We make a subdir and do the tests there.  Otherwise we can end up
5306  # making bogus files that we don't know about and never remove.  For
5307  # instance it was reported that on HP-UX the gcc test will end up
5308  # making a dummy file named 'D' -- because '-MD' means "put the output
5309  # in D".
5310  rm -rf conftest.dir
5311  mkdir conftest.dir
5312  # Copy depcomp to subdir because otherwise we won't find it if we're
5313  # using a relative directory.
5314  cp "$am_depcomp" conftest.dir
5315  cd conftest.dir
5316  # We will build objects and dependencies in a subdirectory because
5317  # it helps to detect inapplicable dependency modes.  For instance
5318  # both Tru64's cc and ICC support -MD to output dependencies as a
5319  # side effect of compilation, but ICC will put the dependencies in
5320  # the current directory while Tru64 will put them in the object
5321  # directory.
5322  mkdir sub
5323
5324  am_cv_CC_dependencies_compiler_type=none
5325  if test "$am_compiler_list" = ""; then
5326     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5327  fi
5328  am__universal=false
5329  case " $depcc " in #(
5330     *\ -arch\ *\ -arch\ *) am__universal=true ;;
5331     esac
5332
5333  for depmode in $am_compiler_list; do
5334    # Setup a source with many dependencies, because some compilers
5335    # like to wrap large dependency lists on column 80 (with \), and
5336    # we should not choose a depcomp mode which is confused by this.
5337    #
5338    # We need to recreate these files for each test, as the compiler may
5339    # overwrite some of them when testing with obscure command lines.
5340    # This happens at least with the AIX C compiler.
5341    : > sub/conftest.c
5342    for i in 1 2 3 4 5 6; do
5343      echo '#include "conftst'$i'.h"' >> sub/conftest.c
5344      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5345      # Solaris 10 /bin/sh.
5346      echo '/* dummy */' > sub/conftst$i.h
5347    done
5348    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5349
5350    # We check with '-c' and '-o' for the sake of the "dashmstdout"
5351    # mode.  It turns out that the SunPro C++ compiler does not properly
5352    # handle '-M -o', and we need to detect this.  Also, some Intel
5353    # versions had trouble with output in subdirs.
5354    am__obj=sub/conftest.${OBJEXT-o}
5355    am__minus_obj="-o $am__obj"
5356    case $depmode in
5357    gcc)
5358      # This depmode causes a compiler race in universal mode.
5359      test "$am__universal" = false || continue
5360      ;;
5361    nosideeffect)
5362      # After this tag, mechanisms are not by side-effect, so they'll
5363      # only be used when explicitly requested.
5364      if test "x$enable_dependency_tracking" = xyes; then
5365	continue
5366      else
5367	break
5368      fi
5369      ;;
5370    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5371      # This compiler won't grok '-c -o', but also, the minuso test has
5372      # not run yet.  These depmodes are late enough in the game, and
5373      # so weak that their functioning should not be impacted.
5374      am__obj=conftest.${OBJEXT-o}
5375      am__minus_obj=
5376      ;;
5377    none) break ;;
5378    esac
5379    if depmode=$depmode \
5380       source=sub/conftest.c object=$am__obj \
5381       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5382       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5383         >/dev/null 2>conftest.err &&
5384       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5385       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5386       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5387       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5388      # icc doesn't choke on unknown options, it will just issue warnings
5389      # or remarks (even with -Werror).  So we grep stderr for any message
5390      # that says an option was ignored or not supported.
5391      # When given -MP, icc 7.0 and 7.1 complain thusly:
5392      #   icc: Command line warning: ignoring option '-M'; no argument required
5393      # The diagnosis changed in icc 8.0:
5394      #   icc: Command line remark: option '-MP' not supported
5395      if (grep 'ignoring option' conftest.err ||
5396          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5397        am_cv_CC_dependencies_compiler_type=$depmode
5398        break
5399      fi
5400    fi
5401  done
5402
5403  cd ..
5404  rm -rf conftest.dir
5405else
5406  am_cv_CC_dependencies_compiler_type=none
5407fi
5408
5409fi
5410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5411$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5412CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5413
5414 if
5415  test "x$enable_dependency_tracking" != xno \
5416  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5417  am__fastdepCC_TRUE=
5418  am__fastdepCC_FALSE='#'
5419else
5420  am__fastdepCC_TRUE='#'
5421  am__fastdepCC_FALSE=
5422fi
5423
5424
5425
5426ac_ext=c
5427ac_cpp='$CPP $CPPFLAGS'
5428ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5429ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5430ac_compiler_gnu=$ac_cv_c_compiler_gnu
5431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5432$as_echo_n "checking how to run the C preprocessor... " >&6; }
5433# On Suns, sometimes $CPP names a directory.
5434if test -n "$CPP" && test -d "$CPP"; then
5435  CPP=
5436fi
5437if test -z "$CPP"; then
5438  if ${ac_cv_prog_CPP+:} false; then :
5439  $as_echo_n "(cached) " >&6
5440else
5441      # Double quotes because CPP needs to be expanded
5442    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5443    do
5444      ac_preproc_ok=false
5445for ac_c_preproc_warn_flag in '' yes
5446do
5447  # Use a header file that comes with gcc, so configuring glibc
5448  # with a fresh cross-compiler works.
5449  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5450  # <limits.h> exists even on freestanding compilers.
5451  # On the NeXT, cc -E runs the code through the compiler's parser,
5452  # not just through cpp. "Syntax error" is here to catch this case.
5453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5454/* end confdefs.h.  */
5455#ifdef __STDC__
5456# include <limits.h>
5457#else
5458# include <assert.h>
5459#endif
5460		     Syntax error
5461_ACEOF
5462if ac_fn_c_try_cpp "$LINENO"; then :
5463
5464else
5465  # Broken: fails on valid input.
5466continue
5467fi
5468rm -f conftest.err conftest.i conftest.$ac_ext
5469
5470  # OK, works on sane cases.  Now check whether nonexistent headers
5471  # can be detected and how.
5472  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5473/* end confdefs.h.  */
5474#include <ac_nonexistent.h>
5475_ACEOF
5476if ac_fn_c_try_cpp "$LINENO"; then :
5477  # Broken: success on invalid input.
5478continue
5479else
5480  # Passes both tests.
5481ac_preproc_ok=:
5482break
5483fi
5484rm -f conftest.err conftest.i conftest.$ac_ext
5485
5486done
5487# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5488rm -f conftest.i conftest.err conftest.$ac_ext
5489if $ac_preproc_ok; then :
5490  break
5491fi
5492
5493    done
5494    ac_cv_prog_CPP=$CPP
5495
5496fi
5497  CPP=$ac_cv_prog_CPP
5498else
5499  ac_cv_prog_CPP=$CPP
5500fi
5501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5502$as_echo "$CPP" >&6; }
5503ac_preproc_ok=false
5504for ac_c_preproc_warn_flag in '' yes
5505do
5506  # Use a header file that comes with gcc, so configuring glibc
5507  # with a fresh cross-compiler works.
5508  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5509  # <limits.h> exists even on freestanding compilers.
5510  # On the NeXT, cc -E runs the code through the compiler's parser,
5511  # not just through cpp. "Syntax error" is here to catch this case.
5512  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5513/* end confdefs.h.  */
5514#ifdef __STDC__
5515# include <limits.h>
5516#else
5517# include <assert.h>
5518#endif
5519		     Syntax error
5520_ACEOF
5521if ac_fn_c_try_cpp "$LINENO"; then :
5522
5523else
5524  # Broken: fails on valid input.
5525continue
5526fi
5527rm -f conftest.err conftest.i conftest.$ac_ext
5528
5529  # OK, works on sane cases.  Now check whether nonexistent headers
5530  # can be detected and how.
5531  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5532/* end confdefs.h.  */
5533#include <ac_nonexistent.h>
5534_ACEOF
5535if ac_fn_c_try_cpp "$LINENO"; then :
5536  # Broken: success on invalid input.
5537continue
5538else
5539  # Passes both tests.
5540ac_preproc_ok=:
5541break
5542fi
5543rm -f conftest.err conftest.i conftest.$ac_ext
5544
5545done
5546# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5547rm -f conftest.i conftest.err conftest.$ac_ext
5548if $ac_preproc_ok; then :
5549
5550else
5551  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5552$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5553as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5554See \`config.log' for more details" "$LINENO" 5; }
5555fi
5556
5557ac_ext=c
5558ac_cpp='$CPP $CPPFLAGS'
5559ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5560ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5561ac_compiler_gnu=$ac_cv_c_compiler_gnu
5562
5563
5564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5565$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5566if ${ac_cv_path_GREP+:} false; then :
5567  $as_echo_n "(cached) " >&6
5568else
5569  if test -z "$GREP"; then
5570  ac_path_GREP_found=false
5571  # Loop through the user's path and test for each of PROGNAME-LIST
5572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5573for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5574do
5575  IFS=$as_save_IFS
5576  test -z "$as_dir" && as_dir=.
5577    for ac_prog in grep ggrep; do
5578    for ac_exec_ext in '' $ac_executable_extensions; do
5579      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5580      as_fn_executable_p "$ac_path_GREP" || continue
5581# Check for GNU ac_path_GREP and select it if it is found.
5582  # Check for GNU $ac_path_GREP
5583case `"$ac_path_GREP" --version 2>&1` in
5584*GNU*)
5585  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5586*)
5587  ac_count=0
5588  $as_echo_n 0123456789 >"conftest.in"
5589  while :
5590  do
5591    cat "conftest.in" "conftest.in" >"conftest.tmp"
5592    mv "conftest.tmp" "conftest.in"
5593    cp "conftest.in" "conftest.nl"
5594    $as_echo 'GREP' >> "conftest.nl"
5595    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5596    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5597    as_fn_arith $ac_count + 1 && ac_count=$as_val
5598    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5599      # Best one so far, save it but keep looking for a better one
5600      ac_cv_path_GREP="$ac_path_GREP"
5601      ac_path_GREP_max=$ac_count
5602    fi
5603    # 10*(2^10) chars as input seems more than enough
5604    test $ac_count -gt 10 && break
5605  done
5606  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5607esac
5608
5609      $ac_path_GREP_found && break 3
5610    done
5611  done
5612  done
5613IFS=$as_save_IFS
5614  if test -z "$ac_cv_path_GREP"; then
5615    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5616  fi
5617else
5618  ac_cv_path_GREP=$GREP
5619fi
5620
5621fi
5622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5623$as_echo "$ac_cv_path_GREP" >&6; }
5624 GREP="$ac_cv_path_GREP"
5625
5626
5627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5628$as_echo_n "checking for egrep... " >&6; }
5629if ${ac_cv_path_EGREP+:} false; then :
5630  $as_echo_n "(cached) " >&6
5631else
5632  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5633   then ac_cv_path_EGREP="$GREP -E"
5634   else
5635     if test -z "$EGREP"; then
5636  ac_path_EGREP_found=false
5637  # Loop through the user's path and test for each of PROGNAME-LIST
5638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5639for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5640do
5641  IFS=$as_save_IFS
5642  test -z "$as_dir" && as_dir=.
5643    for ac_prog in egrep; do
5644    for ac_exec_ext in '' $ac_executable_extensions; do
5645      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5646      as_fn_executable_p "$ac_path_EGREP" || continue
5647# Check for GNU ac_path_EGREP and select it if it is found.
5648  # Check for GNU $ac_path_EGREP
5649case `"$ac_path_EGREP" --version 2>&1` in
5650*GNU*)
5651  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5652*)
5653  ac_count=0
5654  $as_echo_n 0123456789 >"conftest.in"
5655  while :
5656  do
5657    cat "conftest.in" "conftest.in" >"conftest.tmp"
5658    mv "conftest.tmp" "conftest.in"
5659    cp "conftest.in" "conftest.nl"
5660    $as_echo 'EGREP' >> "conftest.nl"
5661    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5662    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5663    as_fn_arith $ac_count + 1 && ac_count=$as_val
5664    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5665      # Best one so far, save it but keep looking for a better one
5666      ac_cv_path_EGREP="$ac_path_EGREP"
5667      ac_path_EGREP_max=$ac_count
5668    fi
5669    # 10*(2^10) chars as input seems more than enough
5670    test $ac_count -gt 10 && break
5671  done
5672  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5673esac
5674
5675      $ac_path_EGREP_found && break 3
5676    done
5677  done
5678  done
5679IFS=$as_save_IFS
5680  if test -z "$ac_cv_path_EGREP"; then
5681    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5682  fi
5683else
5684  ac_cv_path_EGREP=$EGREP
5685fi
5686
5687   fi
5688fi
5689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5690$as_echo "$ac_cv_path_EGREP" >&6; }
5691 EGREP="$ac_cv_path_EGREP"
5692
5693
5694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5695$as_echo_n "checking for ANSI C header files... " >&6; }
5696if ${ac_cv_header_stdc+:} false; then :
5697  $as_echo_n "(cached) " >&6
5698else
5699  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5700/* end confdefs.h.  */
5701#include <stdlib.h>
5702#include <stdarg.h>
5703#include <string.h>
5704#include <float.h>
5705
5706int
5707main ()
5708{
5709
5710  ;
5711  return 0;
5712}
5713_ACEOF
5714if ac_fn_c_try_compile "$LINENO"; then :
5715  ac_cv_header_stdc=yes
5716else
5717  ac_cv_header_stdc=no
5718fi
5719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5720
5721if test $ac_cv_header_stdc = yes; then
5722  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5724/* end confdefs.h.  */
5725#include <string.h>
5726
5727_ACEOF
5728if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5729  $EGREP "memchr" >/dev/null 2>&1; then :
5730
5731else
5732  ac_cv_header_stdc=no
5733fi
5734rm -f conftest*
5735
5736fi
5737
5738if test $ac_cv_header_stdc = yes; then
5739  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5740  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5741/* end confdefs.h.  */
5742#include <stdlib.h>
5743
5744_ACEOF
5745if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5746  $EGREP "free" >/dev/null 2>&1; then :
5747
5748else
5749  ac_cv_header_stdc=no
5750fi
5751rm -f conftest*
5752
5753fi
5754
5755if test $ac_cv_header_stdc = yes; then
5756  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5757  if test "$cross_compiling" = yes; then :
5758  :
5759else
5760  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5761/* end confdefs.h.  */
5762#include <ctype.h>
5763#include <stdlib.h>
5764#if ((' ' & 0x0FF) == 0x020)
5765# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5766# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5767#else
5768# define ISLOWER(c) \
5769		   (('a' <= (c) && (c) <= 'i') \
5770		     || ('j' <= (c) && (c) <= 'r') \
5771		     || ('s' <= (c) && (c) <= 'z'))
5772# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5773#endif
5774
5775#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5776int
5777main ()
5778{
5779  int i;
5780  for (i = 0; i < 256; i++)
5781    if (XOR (islower (i), ISLOWER (i))
5782	|| toupper (i) != TOUPPER (i))
5783      return 2;
5784  return 0;
5785}
5786_ACEOF
5787if ac_fn_c_try_run "$LINENO"; then :
5788
5789else
5790  ac_cv_header_stdc=no
5791fi
5792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5793  conftest.$ac_objext conftest.beam conftest.$ac_ext
5794fi
5795
5796fi
5797fi
5798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5799$as_echo "$ac_cv_header_stdc" >&6; }
5800if test $ac_cv_header_stdc = yes; then
5801
5802$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5803
5804fi
5805
5806# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5807for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5808		  inttypes.h stdint.h unistd.h
5809do :
5810  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5811ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5812"
5813if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5814  cat >>confdefs.h <<_ACEOF
5815#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5816_ACEOF
5817
5818fi
5819
5820done
5821
5822
5823
5824  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5825if test "x$ac_cv_header_minix_config_h" = xyes; then :
5826  MINIX=yes
5827else
5828  MINIX=
5829fi
5830
5831
5832  if test "$MINIX" = yes; then
5833
5834$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5835
5836
5837$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5838
5839
5840$as_echo "#define _MINIX 1" >>confdefs.h
5841
5842
5843$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
5844
5845  fi
5846
5847
5848  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5849$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5850if ${ac_cv_safe_to_define___extensions__+:} false; then :
5851  $as_echo_n "(cached) " >&6
5852else
5853  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5854/* end confdefs.h.  */
5855
5856#         define __EXTENSIONS__ 1
5857          $ac_includes_default
5858int
5859main ()
5860{
5861
5862  ;
5863  return 0;
5864}
5865_ACEOF
5866if ac_fn_c_try_compile "$LINENO"; then :
5867  ac_cv_safe_to_define___extensions__=yes
5868else
5869  ac_cv_safe_to_define___extensions__=no
5870fi
5871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5872fi
5873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5874$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5875  test $ac_cv_safe_to_define___extensions__ = yes &&
5876    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5877
5878  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5879
5880  $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5881
5882  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5883
5884  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5885
5886  $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5887
5888  $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5889
5890  $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5891
5892  $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5893
5894  $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5895
5896  $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5897
5898  $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5899
5900  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5901
5902  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5903$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5904if ${ac_cv_should_define__xopen_source+:} false; then :
5905  $as_echo_n "(cached) " >&6
5906else
5907  ac_cv_should_define__xopen_source=no
5908     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5909/* end confdefs.h.  */
5910
5911          #include <wchar.h>
5912          mbstate_t x;
5913int
5914main ()
5915{
5916
5917  ;
5918  return 0;
5919}
5920_ACEOF
5921if ac_fn_c_try_compile "$LINENO"; then :
5922
5923else
5924  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5925/* end confdefs.h.  */
5926
5927             #define _XOPEN_SOURCE 500
5928             #include <wchar.h>
5929             mbstate_t x;
5930int
5931main ()
5932{
5933
5934  ;
5935  return 0;
5936}
5937_ACEOF
5938if ac_fn_c_try_compile "$LINENO"; then :
5939  ac_cv_should_define__xopen_source=yes
5940fi
5941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5942fi
5943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5944fi
5945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5946$as_echo "$ac_cv_should_define__xopen_source" >&6; }
5947  test $ac_cv_should_define__xopen_source = yes &&
5948    $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5949
5950
5951
5952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
5953$as_echo "" >&6; }
5954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: this is the automatical configuration step of $PACKAGE-$VERSION" >&5
5955$as_echo "this is the automatical configuration step of $PACKAGE-$VERSION" >&6; }
5956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
5957$as_echo "" >&6; }
5958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: please wait..." >&5
5959$as_echo "please wait..." >&6; }
5960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
5961$as_echo "" >&6; }
5962
5963
5964if test -z "$CFLAGS"; then
5965  gcal_possibly_adjust_cflags=yes
5966fi
5967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
5968$as_echo "" >&6; }
5969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler..." >&5
5970$as_echo "$as_me: checking for C compiler..." >&6;}
5971ac_ext=c
5972ac_cpp='$CPP $CPPFLAGS'
5973ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5974ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5975ac_compiler_gnu=$ac_cv_c_compiler_gnu
5976if test -n "$ac_tool_prefix"; then
5977  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5978set dummy ${ac_tool_prefix}gcc; ac_word=$2
5979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5980$as_echo_n "checking for $ac_word... " >&6; }
5981if ${ac_cv_prog_CC+:} false; then :
5982  $as_echo_n "(cached) " >&6
5983else
5984  if test -n "$CC"; then
5985  ac_cv_prog_CC="$CC" # Let the user override the test.
5986else
5987as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5988for as_dir in $PATH
5989do
5990  IFS=$as_save_IFS
5991  test -z "$as_dir" && as_dir=.
5992    for ac_exec_ext in '' $ac_executable_extensions; do
5993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5994    ac_cv_prog_CC="${ac_tool_prefix}gcc"
5995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5996    break 2
5997  fi
5998done
5999  done
6000IFS=$as_save_IFS
6001
6002fi
6003fi
6004CC=$ac_cv_prog_CC
6005if test -n "$CC"; then
6006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6007$as_echo "$CC" >&6; }
6008else
6009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6010$as_echo "no" >&6; }
6011fi
6012
6013
6014fi
6015if test -z "$ac_cv_prog_CC"; then
6016  ac_ct_CC=$CC
6017  # Extract the first word of "gcc", so it can be a program name with args.
6018set dummy gcc; ac_word=$2
6019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6020$as_echo_n "checking for $ac_word... " >&6; }
6021if ${ac_cv_prog_ac_ct_CC+:} false; then :
6022  $as_echo_n "(cached) " >&6
6023else
6024  if test -n "$ac_ct_CC"; then
6025  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6026else
6027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6028for as_dir in $PATH
6029do
6030  IFS=$as_save_IFS
6031  test -z "$as_dir" && as_dir=.
6032    for ac_exec_ext in '' $ac_executable_extensions; do
6033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6034    ac_cv_prog_ac_ct_CC="gcc"
6035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6036    break 2
6037  fi
6038done
6039  done
6040IFS=$as_save_IFS
6041
6042fi
6043fi
6044ac_ct_CC=$ac_cv_prog_ac_ct_CC
6045if test -n "$ac_ct_CC"; then
6046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6047$as_echo "$ac_ct_CC" >&6; }
6048else
6049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6050$as_echo "no" >&6; }
6051fi
6052
6053  if test "x$ac_ct_CC" = x; then
6054    CC=""
6055  else
6056    case $cross_compiling:$ac_tool_warned in
6057yes:)
6058{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6059$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6060ac_tool_warned=yes ;;
6061esac
6062    CC=$ac_ct_CC
6063  fi
6064else
6065  CC="$ac_cv_prog_CC"
6066fi
6067
6068if test -z "$CC"; then
6069          if test -n "$ac_tool_prefix"; then
6070    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
6071set dummy ${ac_tool_prefix}cc; ac_word=$2
6072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6073$as_echo_n "checking for $ac_word... " >&6; }
6074if ${ac_cv_prog_CC+:} false; then :
6075  $as_echo_n "(cached) " >&6
6076else
6077  if test -n "$CC"; then
6078  ac_cv_prog_CC="$CC" # Let the user override the test.
6079else
6080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6081for as_dir in $PATH
6082do
6083  IFS=$as_save_IFS
6084  test -z "$as_dir" && as_dir=.
6085    for ac_exec_ext in '' $ac_executable_extensions; do
6086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6087    ac_cv_prog_CC="${ac_tool_prefix}cc"
6088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6089    break 2
6090  fi
6091done
6092  done
6093IFS=$as_save_IFS
6094
6095fi
6096fi
6097CC=$ac_cv_prog_CC
6098if test -n "$CC"; then
6099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6100$as_echo "$CC" >&6; }
6101else
6102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6103$as_echo "no" >&6; }
6104fi
6105
6106
6107  fi
6108fi
6109if test -z "$CC"; then
6110  # Extract the first word of "cc", so it can be a program name with args.
6111set dummy cc; ac_word=$2
6112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6113$as_echo_n "checking for $ac_word... " >&6; }
6114if ${ac_cv_prog_CC+:} false; then :
6115  $as_echo_n "(cached) " >&6
6116else
6117  if test -n "$CC"; then
6118  ac_cv_prog_CC="$CC" # Let the user override the test.
6119else
6120  ac_prog_rejected=no
6121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6122for as_dir in $PATH
6123do
6124  IFS=$as_save_IFS
6125  test -z "$as_dir" && as_dir=.
6126    for ac_exec_ext in '' $ac_executable_extensions; do
6127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6128    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
6129       ac_prog_rejected=yes
6130       continue
6131     fi
6132    ac_cv_prog_CC="cc"
6133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6134    break 2
6135  fi
6136done
6137  done
6138IFS=$as_save_IFS
6139
6140if test $ac_prog_rejected = yes; then
6141  # We found a bogon in the path, so make sure we never use it.
6142  set dummy $ac_cv_prog_CC
6143  shift
6144  if test $# != 0; then
6145    # We chose a different compiler from the bogus one.
6146    # However, it has the same basename, so the bogon will be chosen
6147    # first if we set CC to just the basename; use the full file name.
6148    shift
6149    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
6150  fi
6151fi
6152fi
6153fi
6154CC=$ac_cv_prog_CC
6155if test -n "$CC"; then
6156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6157$as_echo "$CC" >&6; }
6158else
6159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6160$as_echo "no" >&6; }
6161fi
6162
6163
6164fi
6165if test -z "$CC"; then
6166  if test -n "$ac_tool_prefix"; then
6167  for ac_prog in cl.exe
6168  do
6169    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6170set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6172$as_echo_n "checking for $ac_word... " >&6; }
6173if ${ac_cv_prog_CC+:} false; then :
6174  $as_echo_n "(cached) " >&6
6175else
6176  if test -n "$CC"; then
6177  ac_cv_prog_CC="$CC" # Let the user override the test.
6178else
6179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6180for as_dir in $PATH
6181do
6182  IFS=$as_save_IFS
6183  test -z "$as_dir" && as_dir=.
6184    for ac_exec_ext in '' $ac_executable_extensions; do
6185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6186    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6188    break 2
6189  fi
6190done
6191  done
6192IFS=$as_save_IFS
6193
6194fi
6195fi
6196CC=$ac_cv_prog_CC
6197if test -n "$CC"; then
6198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6199$as_echo "$CC" >&6; }
6200else
6201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6202$as_echo "no" >&6; }
6203fi
6204
6205
6206    test -n "$CC" && break
6207  done
6208fi
6209if test -z "$CC"; then
6210  ac_ct_CC=$CC
6211  for ac_prog in cl.exe
6212do
6213  # Extract the first word of "$ac_prog", so it can be a program name with args.
6214set dummy $ac_prog; ac_word=$2
6215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6216$as_echo_n "checking for $ac_word... " >&6; }
6217if ${ac_cv_prog_ac_ct_CC+:} false; then :
6218  $as_echo_n "(cached) " >&6
6219else
6220  if test -n "$ac_ct_CC"; then
6221  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6222else
6223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6224for as_dir in $PATH
6225do
6226  IFS=$as_save_IFS
6227  test -z "$as_dir" && as_dir=.
6228    for ac_exec_ext in '' $ac_executable_extensions; do
6229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6230    ac_cv_prog_ac_ct_CC="$ac_prog"
6231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6232    break 2
6233  fi
6234done
6235  done
6236IFS=$as_save_IFS
6237
6238fi
6239fi
6240ac_ct_CC=$ac_cv_prog_ac_ct_CC
6241if test -n "$ac_ct_CC"; then
6242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6243$as_echo "$ac_ct_CC" >&6; }
6244else
6245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6246$as_echo "no" >&6; }
6247fi
6248
6249
6250  test -n "$ac_ct_CC" && break
6251done
6252
6253  if test "x$ac_ct_CC" = x; then
6254    CC=""
6255  else
6256    case $cross_compiling:$ac_tool_warned in
6257yes:)
6258{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6259$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6260ac_tool_warned=yes ;;
6261esac
6262    CC=$ac_ct_CC
6263  fi
6264fi
6265
6266fi
6267
6268
6269test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6270$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6271as_fn_error $? "no acceptable C compiler found in \$PATH
6272See \`config.log' for more details" "$LINENO" 5; }
6273
6274# Provide some information about the compiler.
6275$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
6276set X $ac_compile
6277ac_compiler=$2
6278for ac_option in --version -v -V -qversion; do
6279  { { ac_try="$ac_compiler $ac_option >&5"
6280case "(($ac_try" in
6281  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6282  *) ac_try_echo=$ac_try;;
6283esac
6284eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6285$as_echo "$ac_try_echo"; } >&5
6286  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6287  ac_status=$?
6288  if test -s conftest.err; then
6289    sed '10a\
6290... rest of stderr output deleted ...
6291         10q' conftest.err >conftest.er1
6292    cat conftest.er1 >&5
6293  fi
6294  rm -f conftest.er1 conftest.err
6295  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6296  test $ac_status = 0; }
6297done
6298
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6300$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
6301if ${ac_cv_c_compiler_gnu+:} false; then :
6302  $as_echo_n "(cached) " >&6
6303else
6304  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6305/* end confdefs.h.  */
6306
6307int
6308main ()
6309{
6310#ifndef __GNUC__
6311       choke me
6312#endif
6313
6314  ;
6315  return 0;
6316}
6317_ACEOF
6318if ac_fn_c_try_compile "$LINENO"; then :
6319  ac_compiler_gnu=yes
6320else
6321  ac_compiler_gnu=no
6322fi
6323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6324ac_cv_c_compiler_gnu=$ac_compiler_gnu
6325
6326fi
6327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6328$as_echo "$ac_cv_c_compiler_gnu" >&6; }
6329if test $ac_compiler_gnu = yes; then
6330  GCC=yes
6331else
6332  GCC=
6333fi
6334ac_test_CFLAGS=${CFLAGS+set}
6335ac_save_CFLAGS=$CFLAGS
6336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6337$as_echo_n "checking whether $CC accepts -g... " >&6; }
6338if ${ac_cv_prog_cc_g+:} false; then :
6339  $as_echo_n "(cached) " >&6
6340else
6341  ac_save_c_werror_flag=$ac_c_werror_flag
6342   ac_c_werror_flag=yes
6343   ac_cv_prog_cc_g=no
6344   CFLAGS="-g"
6345   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6346/* end confdefs.h.  */
6347
6348int
6349main ()
6350{
6351
6352  ;
6353  return 0;
6354}
6355_ACEOF
6356if ac_fn_c_try_compile "$LINENO"; then :
6357  ac_cv_prog_cc_g=yes
6358else
6359  CFLAGS=""
6360      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6361/* end confdefs.h.  */
6362
6363int
6364main ()
6365{
6366
6367  ;
6368  return 0;
6369}
6370_ACEOF
6371if ac_fn_c_try_compile "$LINENO"; then :
6372
6373else
6374  ac_c_werror_flag=$ac_save_c_werror_flag
6375	 CFLAGS="-g"
6376	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6377/* end confdefs.h.  */
6378
6379int
6380main ()
6381{
6382
6383  ;
6384  return 0;
6385}
6386_ACEOF
6387if ac_fn_c_try_compile "$LINENO"; then :
6388  ac_cv_prog_cc_g=yes
6389fi
6390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6391fi
6392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6393fi
6394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6395   ac_c_werror_flag=$ac_save_c_werror_flag
6396fi
6397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6398$as_echo "$ac_cv_prog_cc_g" >&6; }
6399if test "$ac_test_CFLAGS" = set; then
6400  CFLAGS=$ac_save_CFLAGS
6401elif test $ac_cv_prog_cc_g = yes; then
6402  if test "$GCC" = yes; then
6403    CFLAGS="-g -O2"
6404  else
6405    CFLAGS="-g"
6406  fi
6407else
6408  if test "$GCC" = yes; then
6409    CFLAGS="-O2"
6410  else
6411    CFLAGS=
6412  fi
6413fi
6414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6415$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6416if ${ac_cv_prog_cc_c89+:} false; then :
6417  $as_echo_n "(cached) " >&6
6418else
6419  ac_cv_prog_cc_c89=no
6420ac_save_CC=$CC
6421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6422/* end confdefs.h.  */
6423#include <stdarg.h>
6424#include <stdio.h>
6425struct stat;
6426/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
6427struct buf { int x; };
6428FILE * (*rcsopen) (struct buf *, struct stat *, int);
6429static char *e (p, i)
6430     char **p;
6431     int i;
6432{
6433  return p[i];
6434}
6435static char *f (char * (*g) (char **, int), char **p, ...)
6436{
6437  char *s;
6438  va_list v;
6439  va_start (v,p);
6440  s = g (p, va_arg (v,int));
6441  va_end (v);
6442  return s;
6443}
6444
6445/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6446   function prototypes and stuff, but not '\xHH' hex character constants.
6447   These don't provoke an error unfortunately, instead are silently treated
6448   as 'x'.  The following induces an error, until -std is added to get
6449   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6450   array size at least.  It's necessary to write '\x00'==0 to get something
6451   that's true only with -std.  */
6452int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6453
6454/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6455   inside strings and character constants.  */
6456#define FOO(x) 'x'
6457int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6458
6459int test (int i, double x);
6460struct s1 {int (*f) (int a);};
6461struct s2 {int (*f) (double a);};
6462int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6463int argc;
6464char **argv;
6465int
6466main ()
6467{
6468return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6469  ;
6470  return 0;
6471}
6472_ACEOF
6473for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6474	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6475do
6476  CC="$ac_save_CC $ac_arg"
6477  if ac_fn_c_try_compile "$LINENO"; then :
6478  ac_cv_prog_cc_c89=$ac_arg
6479fi
6480rm -f core conftest.err conftest.$ac_objext
6481  test "x$ac_cv_prog_cc_c89" != "xno" && break
6482done
6483rm -f conftest.$ac_ext
6484CC=$ac_save_CC
6485
6486fi
6487# AC_CACHE_VAL
6488case "x$ac_cv_prog_cc_c89" in
6489  x)
6490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6491$as_echo "none needed" >&6; } ;;
6492  xno)
6493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6494$as_echo "unsupported" >&6; } ;;
6495  *)
6496    CC="$CC $ac_cv_prog_cc_c89"
6497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6498$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6499esac
6500if test "x$ac_cv_prog_cc_c89" != xno; then :
6501
6502fi
6503
6504ac_ext=c
6505ac_cpp='$CPP $CPPFLAGS'
6506ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6507ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6508ac_compiler_gnu=$ac_cv_c_compiler_gnu
6509
6510ac_ext=c
6511ac_cpp='$CPP $CPPFLAGS'
6512ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6513ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6514ac_compiler_gnu=$ac_cv_c_compiler_gnu
6515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6516$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
6517if ${am_cv_prog_cc_c_o+:} false; then :
6518  $as_echo_n "(cached) " >&6
6519else
6520  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6521/* end confdefs.h.  */
6522
6523int
6524main ()
6525{
6526
6527  ;
6528  return 0;
6529}
6530_ACEOF
6531  # Make sure it works both with $CC and with simple cc.
6532  # Following AC_PROG_CC_C_O, we do the test twice because some
6533  # compilers refuse to overwrite an existing .o file with -o,
6534  # though they will create one.
6535  am_cv_prog_cc_c_o=yes
6536  for am_i in 1 2; do
6537    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6538   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6539   ac_status=$?
6540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6541   (exit $ac_status); } \
6542         && test -f conftest2.$ac_objext; then
6543      : OK
6544    else
6545      am_cv_prog_cc_c_o=no
6546      break
6547    fi
6548  done
6549  rm -f core conftest*
6550  unset am_i
6551fi
6552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6553$as_echo "$am_cv_prog_cc_c_o" >&6; }
6554if test "$am_cv_prog_cc_c_o" != yes; then
6555   # Losing compiler, so override with the script.
6556   # FIXME: It is wrong to rewrite CC.
6557   # But if we don't then we get into trouble of one sort or another.
6558   # A longer-term fix would be to have automake use am__CC in this case,
6559   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6560   CC="$am_aux_dir/compile $CC"
6561fi
6562ac_ext=c
6563ac_cpp='$CPP $CPPFLAGS'
6564ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6565ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6566ac_compiler_gnu=$ac_cv_c_compiler_gnu
6567
6568
6569depcc="$CC"   am_compiler_list=
6570
6571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6572$as_echo_n "checking dependency style of $depcc... " >&6; }
6573if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6574  $as_echo_n "(cached) " >&6
6575else
6576  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6577  # We make a subdir and do the tests there.  Otherwise we can end up
6578  # making bogus files that we don't know about and never remove.  For
6579  # instance it was reported that on HP-UX the gcc test will end up
6580  # making a dummy file named 'D' -- because '-MD' means "put the output
6581  # in D".
6582  rm -rf conftest.dir
6583  mkdir conftest.dir
6584  # Copy depcomp to subdir because otherwise we won't find it if we're
6585  # using a relative directory.
6586  cp "$am_depcomp" conftest.dir
6587  cd conftest.dir
6588  # We will build objects and dependencies in a subdirectory because
6589  # it helps to detect inapplicable dependency modes.  For instance
6590  # both Tru64's cc and ICC support -MD to output dependencies as a
6591  # side effect of compilation, but ICC will put the dependencies in
6592  # the current directory while Tru64 will put them in the object
6593  # directory.
6594  mkdir sub
6595
6596  am_cv_CC_dependencies_compiler_type=none
6597  if test "$am_compiler_list" = ""; then
6598     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6599  fi
6600  am__universal=false
6601  case " $depcc " in #(
6602     *\ -arch\ *\ -arch\ *) am__universal=true ;;
6603     esac
6604
6605  for depmode in $am_compiler_list; do
6606    # Setup a source with many dependencies, because some compilers
6607    # like to wrap large dependency lists on column 80 (with \), and
6608    # we should not choose a depcomp mode which is confused by this.
6609    #
6610    # We need to recreate these files for each test, as the compiler may
6611    # overwrite some of them when testing with obscure command lines.
6612    # This happens at least with the AIX C compiler.
6613    : > sub/conftest.c
6614    for i in 1 2 3 4 5 6; do
6615      echo '#include "conftst'$i'.h"' >> sub/conftest.c
6616      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6617      # Solaris 10 /bin/sh.
6618      echo '/* dummy */' > sub/conftst$i.h
6619    done
6620    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6621
6622    # We check with '-c' and '-o' for the sake of the "dashmstdout"
6623    # mode.  It turns out that the SunPro C++ compiler does not properly
6624    # handle '-M -o', and we need to detect this.  Also, some Intel
6625    # versions had trouble with output in subdirs.
6626    am__obj=sub/conftest.${OBJEXT-o}
6627    am__minus_obj="-o $am__obj"
6628    case $depmode in
6629    gcc)
6630      # This depmode causes a compiler race in universal mode.
6631      test "$am__universal" = false || continue
6632      ;;
6633    nosideeffect)
6634      # After this tag, mechanisms are not by side-effect, so they'll
6635      # only be used when explicitly requested.
6636      if test "x$enable_dependency_tracking" = xyes; then
6637	continue
6638      else
6639	break
6640      fi
6641      ;;
6642    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6643      # This compiler won't grok '-c -o', but also, the minuso test has
6644      # not run yet.  These depmodes are late enough in the game, and
6645      # so weak that their functioning should not be impacted.
6646      am__obj=conftest.${OBJEXT-o}
6647      am__minus_obj=
6648      ;;
6649    none) break ;;
6650    esac
6651    if depmode=$depmode \
6652       source=sub/conftest.c object=$am__obj \
6653       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6654       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6655         >/dev/null 2>conftest.err &&
6656       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6657       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6658       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6659       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6660      # icc doesn't choke on unknown options, it will just issue warnings
6661      # or remarks (even with -Werror).  So we grep stderr for any message
6662      # that says an option was ignored or not supported.
6663      # When given -MP, icc 7.0 and 7.1 complain thusly:
6664      #   icc: Command line warning: ignoring option '-M'; no argument required
6665      # The diagnosis changed in icc 8.0:
6666      #   icc: Command line remark: option '-MP' not supported
6667      if (grep 'ignoring option' conftest.err ||
6668          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6669        am_cv_CC_dependencies_compiler_type=$depmode
6670        break
6671      fi
6672    fi
6673  done
6674
6675  cd ..
6676  rm -rf conftest.dir
6677else
6678  am_cv_CC_dependencies_compiler_type=none
6679fi
6680
6681fi
6682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6683$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6684CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6685
6686 if
6687  test "x$enable_dependency_tracking" != xno \
6688  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6689  am__fastdepCC_TRUE=
6690  am__fastdepCC_FALSE='#'
6691else
6692  am__fastdepCC_TRUE='#'
6693  am__fastdepCC_FALSE=
6694fi
6695
6696
6697
6698if test -n "$ac_tool_prefix"; then
6699  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6700set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6702$as_echo_n "checking for $ac_word... " >&6; }
6703if ${ac_cv_prog_RANLIB+:} false; then :
6704  $as_echo_n "(cached) " >&6
6705else
6706  if test -n "$RANLIB"; then
6707  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6708else
6709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6710for as_dir in $PATH
6711do
6712  IFS=$as_save_IFS
6713  test -z "$as_dir" && as_dir=.
6714    for ac_exec_ext in '' $ac_executable_extensions; do
6715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6716    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6718    break 2
6719  fi
6720done
6721  done
6722IFS=$as_save_IFS
6723
6724fi
6725fi
6726RANLIB=$ac_cv_prog_RANLIB
6727if test -n "$RANLIB"; then
6728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6729$as_echo "$RANLIB" >&6; }
6730else
6731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6732$as_echo "no" >&6; }
6733fi
6734
6735
6736fi
6737if test -z "$ac_cv_prog_RANLIB"; then
6738  ac_ct_RANLIB=$RANLIB
6739  # Extract the first word of "ranlib", so it can be a program name with args.
6740set dummy ranlib; ac_word=$2
6741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6742$as_echo_n "checking for $ac_word... " >&6; }
6743if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6744  $as_echo_n "(cached) " >&6
6745else
6746  if test -n "$ac_ct_RANLIB"; then
6747  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6748else
6749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6750for as_dir in $PATH
6751do
6752  IFS=$as_save_IFS
6753  test -z "$as_dir" && as_dir=.
6754    for ac_exec_ext in '' $ac_executable_extensions; do
6755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6756    ac_cv_prog_ac_ct_RANLIB="ranlib"
6757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6758    break 2
6759  fi
6760done
6761  done
6762IFS=$as_save_IFS
6763
6764fi
6765fi
6766ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6767if test -n "$ac_ct_RANLIB"; then
6768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6769$as_echo "$ac_ct_RANLIB" >&6; }
6770else
6771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6772$as_echo "no" >&6; }
6773fi
6774
6775  if test "x$ac_ct_RANLIB" = x; then
6776    RANLIB=":"
6777  else
6778    case $cross_compiling:$ac_tool_warned in
6779yes:)
6780{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6781$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6782ac_tool_warned=yes ;;
6783esac
6784    RANLIB=$ac_ct_RANLIB
6785  fi
6786else
6787  RANLIB="$ac_cv_prog_RANLIB"
6788fi
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6801$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6802if ${gl_cv_c_amsterdam_compiler+:} false; then :
6803  $as_echo_n "(cached) " >&6
6804else
6805
6806      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6807/* end confdefs.h.  */
6808
6809#ifdef __ACK__
6810Amsterdam
6811#endif
6812
6813_ACEOF
6814if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6815  $EGREP "Amsterdam" >/dev/null 2>&1; then :
6816  gl_cv_c_amsterdam_compiler=yes
6817else
6818  gl_cv_c_amsterdam_compiler=no
6819fi
6820rm -f conftest*
6821
6822
6823fi
6824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6825$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6826
6827      if test $gl_cv_c_amsterdam_compiler = yes; then
6828    if test -z "$AR"; then
6829      AR='cc -c.a'
6830    fi
6831    if test -z "$ARFLAGS"; then
6832      ARFLAGS='-o'
6833    fi
6834  else
6835                                        if test -n "$ac_tool_prefix"; then
6836  for ac_prog in ar lib "link -lib"
6837  do
6838    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6839set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6841$as_echo_n "checking for $ac_word... " >&6; }
6842if ${ac_cv_prog_AR+:} false; then :
6843  $as_echo_n "(cached) " >&6
6844else
6845  if test -n "$AR"; then
6846  ac_cv_prog_AR="$AR" # Let the user override the test.
6847else
6848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6849for as_dir in $PATH
6850do
6851  IFS=$as_save_IFS
6852  test -z "$as_dir" && as_dir=.
6853    for ac_exec_ext in '' $ac_executable_extensions; do
6854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6855    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6857    break 2
6858  fi
6859done
6860  done
6861IFS=$as_save_IFS
6862
6863fi
6864fi
6865AR=$ac_cv_prog_AR
6866if test -n "$AR"; then
6867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6868$as_echo "$AR" >&6; }
6869else
6870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6871$as_echo "no" >&6; }
6872fi
6873
6874
6875    test -n "$AR" && break
6876  done
6877fi
6878if test -z "$AR"; then
6879  ac_ct_AR=$AR
6880  for ac_prog in ar lib "link -lib"
6881do
6882  # Extract the first word of "$ac_prog", so it can be a program name with args.
6883set dummy $ac_prog; ac_word=$2
6884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6885$as_echo_n "checking for $ac_word... " >&6; }
6886if ${ac_cv_prog_ac_ct_AR+:} false; then :
6887  $as_echo_n "(cached) " >&6
6888else
6889  if test -n "$ac_ct_AR"; then
6890  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6891else
6892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6893for as_dir in $PATH
6894do
6895  IFS=$as_save_IFS
6896  test -z "$as_dir" && as_dir=.
6897    for ac_exec_ext in '' $ac_executable_extensions; do
6898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6899    ac_cv_prog_ac_ct_AR="$ac_prog"
6900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6901    break 2
6902  fi
6903done
6904  done
6905IFS=$as_save_IFS
6906
6907fi
6908fi
6909ac_ct_AR=$ac_cv_prog_ac_ct_AR
6910if test -n "$ac_ct_AR"; then
6911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6912$as_echo "$ac_ct_AR" >&6; }
6913else
6914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6915$as_echo "no" >&6; }
6916fi
6917
6918
6919  test -n "$ac_ct_AR" && break
6920done
6921
6922  if test "x$ac_ct_AR" = x; then
6923    AR="false"
6924  else
6925    case $cross_compiling:$ac_tool_warned in
6926yes:)
6927{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6928$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6929ac_tool_warned=yes ;;
6930esac
6931    AR=$ac_ct_AR
6932  fi
6933fi
6934
6935: ${AR=ar}
6936
6937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
6938$as_echo_n "checking the archiver ($AR) interface... " >&6; }
6939if ${am_cv_ar_interface+:} false; then :
6940  $as_echo_n "(cached) " >&6
6941else
6942  ac_ext=c
6943ac_cpp='$CPP $CPPFLAGS'
6944ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6945ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6946ac_compiler_gnu=$ac_cv_c_compiler_gnu
6947
6948   am_cv_ar_interface=ar
6949   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6950/* end confdefs.h.  */
6951int some_variable = 0;
6952_ACEOF
6953if ac_fn_c_try_compile "$LINENO"; then :
6954  am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
6955      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6956  (eval $am_ar_try) 2>&5
6957  ac_status=$?
6958  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6959  test $ac_status = 0; }
6960      if test "$ac_status" -eq 0; then
6961        am_cv_ar_interface=ar
6962      else
6963        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
6964        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6965  (eval $am_ar_try) 2>&5
6966  ac_status=$?
6967  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6968  test $ac_status = 0; }
6969        if test "$ac_status" -eq 0; then
6970          am_cv_ar_interface=lib
6971        else
6972          am_cv_ar_interface=unknown
6973        fi
6974      fi
6975      rm -f conftest.lib libconftest.a
6976
6977fi
6978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6979   ac_ext=c
6980ac_cpp='$CPP $CPPFLAGS'
6981ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6982ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6983ac_compiler_gnu=$ac_cv_c_compiler_gnu
6984
6985fi
6986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
6987$as_echo "$am_cv_ar_interface" >&6; }
6988
6989case $am_cv_ar_interface in
6990ar)
6991  ;;
6992lib)
6993  # Microsoft lib, so override with the ar-lib wrapper script.
6994  # FIXME: It is wrong to rewrite AR.
6995  # But if we don't then we get into trouble of one sort or another.
6996  # A longer-term fix would be to have automake use am__AR in this case,
6997  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
6998  # similar.
6999  AR="$am_aux_dir/ar-lib $AR"
7000  ;;
7001unknown)
7002  as_fn_error $? "could not determine $AR interface" "$LINENO" 5
7003  ;;
7004esac
7005
7006  fi
7007
7008        if test -n "$ac_tool_prefix"; then
7009  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7010set dummy ${ac_tool_prefix}ar; ac_word=$2
7011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7012$as_echo_n "checking for $ac_word... " >&6; }
7013if ${ac_cv_prog_AR+:} false; then :
7014  $as_echo_n "(cached) " >&6
7015else
7016  if test -n "$AR"; then
7017  ac_cv_prog_AR="$AR" # Let the user override the test.
7018else
7019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7020for as_dir in $PATH
7021do
7022  IFS=$as_save_IFS
7023  test -z "$as_dir" && as_dir=.
7024    for ac_exec_ext in '' $ac_executable_extensions; do
7025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7026    ac_cv_prog_AR="${ac_tool_prefix}ar"
7027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7028    break 2
7029  fi
7030done
7031  done
7032IFS=$as_save_IFS
7033
7034fi
7035fi
7036AR=$ac_cv_prog_AR
7037if test -n "$AR"; then
7038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7039$as_echo "$AR" >&6; }
7040else
7041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7042$as_echo "no" >&6; }
7043fi
7044
7045
7046fi
7047if test -z "$ac_cv_prog_AR"; then
7048  ac_ct_AR=$AR
7049  # Extract the first word of "ar", so it can be a program name with args.
7050set dummy ar; ac_word=$2
7051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7052$as_echo_n "checking for $ac_word... " >&6; }
7053if ${ac_cv_prog_ac_ct_AR+:} false; then :
7054  $as_echo_n "(cached) " >&6
7055else
7056  if test -n "$ac_ct_AR"; then
7057  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7058else
7059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7060for as_dir in $PATH
7061do
7062  IFS=$as_save_IFS
7063  test -z "$as_dir" && as_dir=.
7064    for ac_exec_ext in '' $ac_executable_extensions; do
7065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7066    ac_cv_prog_ac_ct_AR="ar"
7067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7068    break 2
7069  fi
7070done
7071  done
7072IFS=$as_save_IFS
7073
7074fi
7075fi
7076ac_ct_AR=$ac_cv_prog_ac_ct_AR
7077if test -n "$ac_ct_AR"; then
7078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7079$as_echo "$ac_ct_AR" >&6; }
7080else
7081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7082$as_echo "no" >&6; }
7083fi
7084
7085  if test "x$ac_ct_AR" = x; then
7086    AR="ar"
7087  else
7088    case $cross_compiling:$ac_tool_warned in
7089yes:)
7090{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7091$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7092ac_tool_warned=yes ;;
7093esac
7094    AR=$ac_ct_AR
7095  fi
7096else
7097  AR="$ac_cv_prog_AR"
7098fi
7099
7100  if test -z "$ARFLAGS"; then
7101    ARFLAGS='cr'
7102  fi
7103
7104
7105
7106  if test -z "$RANLIB"; then
7107    if test $gl_cv_c_amsterdam_compiler = yes; then
7108      RANLIB=':'
7109    else
7110            if test -n "$ac_tool_prefix"; then
7111  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7112set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7114$as_echo_n "checking for $ac_word... " >&6; }
7115if ${ac_cv_prog_RANLIB+:} false; then :
7116  $as_echo_n "(cached) " >&6
7117else
7118  if test -n "$RANLIB"; then
7119  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7120else
7121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7122for as_dir in $PATH
7123do
7124  IFS=$as_save_IFS
7125  test -z "$as_dir" && as_dir=.
7126    for ac_exec_ext in '' $ac_executable_extensions; do
7127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7128    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7130    break 2
7131  fi
7132done
7133  done
7134IFS=$as_save_IFS
7135
7136fi
7137fi
7138RANLIB=$ac_cv_prog_RANLIB
7139if test -n "$RANLIB"; then
7140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7141$as_echo "$RANLIB" >&6; }
7142else
7143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7144$as_echo "no" >&6; }
7145fi
7146
7147
7148fi
7149if test -z "$ac_cv_prog_RANLIB"; then
7150  ac_ct_RANLIB=$RANLIB
7151  # Extract the first word of "ranlib", so it can be a program name with args.
7152set dummy ranlib; ac_word=$2
7153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7154$as_echo_n "checking for $ac_word... " >&6; }
7155if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7156  $as_echo_n "(cached) " >&6
7157else
7158  if test -n "$ac_ct_RANLIB"; then
7159  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7160else
7161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7162for as_dir in $PATH
7163do
7164  IFS=$as_save_IFS
7165  test -z "$as_dir" && as_dir=.
7166    for ac_exec_ext in '' $ac_executable_extensions; do
7167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7168    ac_cv_prog_ac_ct_RANLIB="ranlib"
7169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7170    break 2
7171  fi
7172done
7173  done
7174IFS=$as_save_IFS
7175
7176fi
7177fi
7178ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7179if test -n "$ac_ct_RANLIB"; then
7180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7181$as_echo "$ac_ct_RANLIB" >&6; }
7182else
7183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7184$as_echo "no" >&6; }
7185fi
7186
7187  if test "x$ac_ct_RANLIB" = x; then
7188    RANLIB=":"
7189  else
7190    case $cross_compiling:$ac_tool_warned in
7191yes:)
7192{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7193$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7194ac_tool_warned=yes ;;
7195esac
7196    RANLIB=$ac_ct_RANLIB
7197  fi
7198else
7199  RANLIB="$ac_cv_prog_RANLIB"
7200fi
7201
7202    fi
7203  fi
7204
7205
7206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7207$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
7208if ${ac_cv_sys_largefile_source+:} false; then :
7209  $as_echo_n "(cached) " >&6
7210else
7211  while :; do
7212  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7213/* end confdefs.h.  */
7214#include <sys/types.h> /* for off_t */
7215     #include <stdio.h>
7216int
7217main ()
7218{
7219int (*fp) (FILE *, off_t, int) = fseeko;
7220     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
7221  ;
7222  return 0;
7223}
7224_ACEOF
7225if ac_fn_c_try_link "$LINENO"; then :
7226  ac_cv_sys_largefile_source=no; break
7227fi
7228rm -f core conftest.err conftest.$ac_objext \
7229    conftest$ac_exeext conftest.$ac_ext
7230  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7231/* end confdefs.h.  */
7232#define _LARGEFILE_SOURCE 1
7233#include <sys/types.h> /* for off_t */
7234     #include <stdio.h>
7235int
7236main ()
7237{
7238int (*fp) (FILE *, off_t, int) = fseeko;
7239     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
7240  ;
7241  return 0;
7242}
7243_ACEOF
7244if ac_fn_c_try_link "$LINENO"; then :
7245  ac_cv_sys_largefile_source=1; break
7246fi
7247rm -f core conftest.err conftest.$ac_objext \
7248    conftest$ac_exeext conftest.$ac_ext
7249  ac_cv_sys_largefile_source=unknown
7250  break
7251done
7252fi
7253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
7254$as_echo "$ac_cv_sys_largefile_source" >&6; }
7255case $ac_cv_sys_largefile_source in #(
7256  no | unknown) ;;
7257  *)
7258cat >>confdefs.h <<_ACEOF
7259#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7260_ACEOF
7261;;
7262esac
7263rm -rf conftest*
7264
7265# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7266# in glibc 2.1.3, but that breaks too many other things.
7267# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7268if test $ac_cv_sys_largefile_source != unknown; then
7269
7270$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
7271
7272fi
7273
7274# Check whether --enable-largefile was given.
7275if test "${enable_largefile+set}" = set; then :
7276  enableval=$enable_largefile;
7277fi
7278
7279if test "$enable_largefile" != no; then
7280
7281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7282$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7283if ${ac_cv_sys_largefile_CC+:} false; then :
7284  $as_echo_n "(cached) " >&6
7285else
7286  ac_cv_sys_largefile_CC=no
7287     if test "$GCC" != yes; then
7288       ac_save_CC=$CC
7289       while :; do
7290         # IRIX 6.2 and later do not support large files by default,
7291         # so use the C compiler's -n32 option if that helps.
7292         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7293/* end confdefs.h.  */
7294#include <sys/types.h>
7295 /* Check that off_t can represent 2**63 - 1 correctly.
7296    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7297    since some C++ compilers masquerading as C compilers
7298    incorrectly reject 9223372036854775807.  */
7299#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7300  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7301                       && LARGE_OFF_T % 2147483647 == 1)
7302                      ? 1 : -1];
7303int
7304main ()
7305{
7306
7307  ;
7308  return 0;
7309}
7310_ACEOF
7311         if ac_fn_c_try_compile "$LINENO"; then :
7312  break
7313fi
7314rm -f core conftest.err conftest.$ac_objext
7315         CC="$CC -n32"
7316         if ac_fn_c_try_compile "$LINENO"; then :
7317  ac_cv_sys_largefile_CC=' -n32'; break
7318fi
7319rm -f core conftest.err conftest.$ac_objext
7320         break
7321       done
7322       CC=$ac_save_CC
7323       rm -f conftest.$ac_ext
7324    fi
7325fi
7326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7327$as_echo "$ac_cv_sys_largefile_CC" >&6; }
7328  if test "$ac_cv_sys_largefile_CC" != no; then
7329    CC=$CC$ac_cv_sys_largefile_CC
7330  fi
7331
7332  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7333$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7334if ${ac_cv_sys_file_offset_bits+:} false; then :
7335  $as_echo_n "(cached) " >&6
7336else
7337  while :; do
7338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7339/* end confdefs.h.  */
7340#include <sys/types.h>
7341 /* Check that off_t can represent 2**63 - 1 correctly.
7342    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7343    since some C++ compilers masquerading as C compilers
7344    incorrectly reject 9223372036854775807.  */
7345#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7346  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7347                       && LARGE_OFF_T % 2147483647 == 1)
7348                      ? 1 : -1];
7349int
7350main ()
7351{
7352
7353  ;
7354  return 0;
7355}
7356_ACEOF
7357if ac_fn_c_try_compile "$LINENO"; then :
7358  ac_cv_sys_file_offset_bits=no; break
7359fi
7360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7361  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7362/* end confdefs.h.  */
7363#define _FILE_OFFSET_BITS 64
7364#include <sys/types.h>
7365 /* Check that off_t can represent 2**63 - 1 correctly.
7366    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7367    since some C++ compilers masquerading as C compilers
7368    incorrectly reject 9223372036854775807.  */
7369#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7370  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7371                       && LARGE_OFF_T % 2147483647 == 1)
7372                      ? 1 : -1];
7373int
7374main ()
7375{
7376
7377  ;
7378  return 0;
7379}
7380_ACEOF
7381if ac_fn_c_try_compile "$LINENO"; then :
7382  ac_cv_sys_file_offset_bits=64; break
7383fi
7384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7385  ac_cv_sys_file_offset_bits=unknown
7386  break
7387done
7388fi
7389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7390$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7391case $ac_cv_sys_file_offset_bits in #(
7392  no | unknown) ;;
7393  *)
7394cat >>confdefs.h <<_ACEOF
7395#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7396_ACEOF
7397;;
7398esac
7399rm -rf conftest*
7400  if test $ac_cv_sys_file_offset_bits = unknown; then
7401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7402$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
7403if ${ac_cv_sys_large_files+:} false; then :
7404  $as_echo_n "(cached) " >&6
7405else
7406  while :; do
7407  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7408/* end confdefs.h.  */
7409#include <sys/types.h>
7410 /* Check that off_t can represent 2**63 - 1 correctly.
7411    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7412    since some C++ compilers masquerading as C compilers
7413    incorrectly reject 9223372036854775807.  */
7414#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7415  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7416                       && LARGE_OFF_T % 2147483647 == 1)
7417                      ? 1 : -1];
7418int
7419main ()
7420{
7421
7422  ;
7423  return 0;
7424}
7425_ACEOF
7426if ac_fn_c_try_compile "$LINENO"; then :
7427  ac_cv_sys_large_files=no; break
7428fi
7429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7431/* end confdefs.h.  */
7432#define _LARGE_FILES 1
7433#include <sys/types.h>
7434 /* Check that off_t can represent 2**63 - 1 correctly.
7435    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7436    since some C++ compilers masquerading as C compilers
7437    incorrectly reject 9223372036854775807.  */
7438#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7439  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7440                       && LARGE_OFF_T % 2147483647 == 1)
7441                      ? 1 : -1];
7442int
7443main ()
7444{
7445
7446  ;
7447  return 0;
7448}
7449_ACEOF
7450if ac_fn_c_try_compile "$LINENO"; then :
7451  ac_cv_sys_large_files=1; break
7452fi
7453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7454  ac_cv_sys_large_files=unknown
7455  break
7456done
7457fi
7458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7459$as_echo "$ac_cv_sys_large_files" >&6; }
7460case $ac_cv_sys_large_files in #(
7461  no | unknown) ;;
7462  *)
7463cat >>confdefs.h <<_ACEOF
7464#define _LARGE_FILES $ac_cv_sys_large_files
7465_ACEOF
7466;;
7467esac
7468rm -rf conftest*
7469  fi
7470
7471
7472$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7473
7474fi
7475
7476# Make sure we can run config.sub.
7477$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
7478  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
7479
7480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
7481$as_echo_n "checking build system type... " >&6; }
7482if ${ac_cv_build+:} false; then :
7483  $as_echo_n "(cached) " >&6
7484else
7485  ac_build_alias=$build_alias
7486test "x$ac_build_alias" = x &&
7487  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
7488test "x$ac_build_alias" = x &&
7489  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
7490ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
7491  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
7492
7493fi
7494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
7495$as_echo "$ac_cv_build" >&6; }
7496case $ac_cv_build in
7497*-*-*) ;;
7498*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
7499esac
7500build=$ac_cv_build
7501ac_save_IFS=$IFS; IFS='-'
7502set x $ac_cv_build
7503shift
7504build_cpu=$1
7505build_vendor=$2
7506shift; shift
7507# Remember, the first character of IFS is used to create $*,
7508# except with old shells:
7509build_os=$*
7510IFS=$ac_save_IFS
7511case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
7512
7513
7514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
7515$as_echo_n "checking host system type... " >&6; }
7516if ${ac_cv_host+:} false; then :
7517  $as_echo_n "(cached) " >&6
7518else
7519  if test "x$host_alias" = x; then
7520  ac_cv_host=$ac_cv_build
7521else
7522  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
7523    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
7524fi
7525
7526fi
7527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
7528$as_echo "$ac_cv_host" >&6; }
7529case $ac_cv_host in
7530*-*-*) ;;
7531*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
7532esac
7533host=$ac_cv_host
7534ac_save_IFS=$IFS; IFS='-'
7535set x $ac_cv_host
7536shift
7537host_cpu=$1
7538host_vendor=$2
7539shift; shift
7540# Remember, the first character of IFS is used to create $*,
7541# except with old shells:
7542host_os=$*
7543IFS=$ac_save_IFS
7544case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
7545
7546
7547
7548
7549
7550
7551
7552  # Check whether --enable-threads was given.
7553if test "${enable_threads+set}" = set; then :
7554  enableval=$enable_threads; gl_use_threads=$enableval
7555else
7556  if test -n "$gl_use_threads_default"; then
7557       gl_use_threads="$gl_use_threads_default"
7558     else
7559       case "$host_os" in
7560                                                               osf*) gl_use_threads=no ;;
7561         cygwin*)
7562               case `uname -r` in
7563                 1.[0-5].*) gl_use_threads=no ;;
7564                 *)         gl_use_threads=yes ;;
7565               esac
7566               ;;
7567         *)    gl_use_threads=yes ;;
7568       esac
7569     fi
7570
7571fi
7572
7573  if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
7574    # For using <pthread.h>:
7575    case "$host_os" in
7576      osf*)
7577        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7578        # groks <pthread.h>. cc also understands the flag -pthread, but
7579        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7580        # 2. putting a flag into CPPFLAGS that has an effect on the linker
7581        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7582        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7583        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7584        ;;
7585    esac
7586    # Some systems optimize for single-threaded programs by default, and
7587    # need special flags to disable these optimizations. For example, the
7588    # definition of 'errno' in <errno.h>.
7589    case "$host_os" in
7590      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7591      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7592    esac
7593  fi
7594
7595
7596
7597  # Pre-early section.
7598
7599
7600
7601
7602  # Code from module absolute-header:
7603  # Code from module acos:
7604  # Code from module alloca:
7605  # Code from module alloca-opt:
7606  # Code from module asin:
7607  # Code from module assert:
7608  # Code from module atan:
7609  # Code from module atan2:
7610  # Code from module binary-io:
7611  # Code from module btowc:
7612  # Code from module builtin-expect:
7613  # Code from module ceil:
7614  # Code from module cloexec:
7615  # Code from module close:
7616  # Code from module cond:
7617  # Code from module configmake:
7618  # Code from module cos:
7619  # Code from module dirname-lgpl:
7620  # Code from module dosname:
7621  # Code from module double-slash-root:
7622  # Code from module dup2:
7623  # Code from module environ:
7624  # Code from module errno:
7625  # Code from module error:
7626  # Code from module exitfail:
7627  # Code from module extensions:
7628  # Code from module extern-inline:
7629  # Code from module fatal-signal:
7630  # Code from module fclose:
7631  # Code from module fcntl:
7632  # Code from module fcntl-h:
7633  # Code from module fd-hook:
7634  # Code from module fd-safer-flag:
7635  # Code from module fflush:
7636
7637  # Code from module filename:
7638  # Code from module float:
7639  # Code from module floor:
7640  # Code from module fopen:
7641  # Code from module fpurge:
7642  # Code from module freading:
7643  # Code from module free:
7644  # Code from module fseek:
7645  # Code from module fseeko:
7646
7647  # Code from module fstat:
7648  # Code from module ftell:
7649  # Code from module ftello:
7650
7651  # Code from module getdtablesize:
7652  # Code from module getprogname:
7653  # Code from module gettext-h:
7654  # Code from module gettimeofday:
7655  # Code from module git-version-gen:
7656  # Code from module gnumakefile:
7657  # Code from module hard-locale:
7658  # Code from module havelib:
7659  # Code from module iconv:
7660  # Code from module iconv-h:
7661  # Code from module include_next:
7662  # Code from module intprops:
7663  # Code from module ioctl:
7664  # Code from module langinfo:
7665  # Code from module largefile:
7666
7667  # Code from module limits-h:
7668  # Code from module link:
7669  # Code from module list:
7670  # Code from module localcharset:
7671  # Code from module locale:
7672  # Code from module localeconv:
7673  # Code from module lock:
7674  # Code from module log:
7675  # Code from module log10:
7676  # Code from module lseek:
7677  # Code from module lstat:
7678  # Code from module maintainer-makefile:
7679  # Code from module malloc:
7680  # Code from module malloc-gnu:
7681  # Code from module malloc-posix:
7682  # Code from module math:
7683  # Code from module mbrtowc:
7684  # Code from module mbsinit:
7685  # Code from module mbtowc:
7686  # Code from module memchr:
7687  # Code from module mkostemp:
7688  # Code from module msvc-inval:
7689  # Code from module msvc-nothrow:
7690  # Code from module multiarch:
7691  # Code from module nl_langinfo:
7692  # Code from module open:
7693  # Code from module pathmax:
7694  # Code from module perror:
7695  # Code from module pipe:
7696  # Code from module pipe2:
7697  # Code from module pipe2-safer:
7698  # Code from module posix_spawn-internal:
7699  # Code from module posix_spawn_file_actions_addclose:
7700  # Code from module posix_spawn_file_actions_adddup2:
7701  # Code from module posix_spawn_file_actions_addopen:
7702  # Code from module posix_spawn_file_actions_destroy:
7703  # Code from module posix_spawn_file_actions_init:
7704  # Code from module posix_spawnattr_destroy:
7705  # Code from module posix_spawnattr_init:
7706  # Code from module posix_spawnattr_setflags:
7707  # Code from module posix_spawnattr_setsigmask:
7708  # Code from module posix_spawnp:
7709  # Code from module putenv:
7710  # Code from module raise:
7711  # Code from module rawmemchr:
7712  # Code from module realloc:
7713  # Code from module realloc-gnu:
7714  # Code from module realloc-posix:
7715  # Code from module regex:
7716  # Code from module sched:
7717  # Code from module secure_getenv:
7718  # Code from module sigaction:
7719  # Code from module signal:
7720  # Code from module signal-h:
7721  # Code from module sigprocmask:
7722  # Code from module sin:
7723  # Code from module snippet/_Noreturn:
7724  # Code from module snippet/arg-nonnull:
7725  # Code from module snippet/c++defs:
7726  # Code from module snippet/unused-parameter:
7727  # Code from module snippet/warn-on-use:
7728  # Code from module socklen:
7729  # Code from module spawn:
7730  # Code from module spawn-pipe:
7731  # Code from module sqrt:
7732  # Code from module ssize_t:
7733  # Code from module stat:
7734  # Code from module stdalign:
7735  # Code from module stdbool:
7736  # Code from module stddef:
7737  # Code from module stdint:
7738  # Code from module stdio:
7739  # Code from module stdlib:
7740  # Code from module strchrnul:
7741  # Code from module strcspn:
7742  # Code from module strdup-posix:
7743  # Code from module streq:
7744  # Code from module strerror:
7745  # Code from module strerror-override:
7746  # Code from module strerror_r-posix:
7747  # Code from module string:
7748  # Code from module strings:
7749  # Code from module strstr:
7750  # Code from module strstr-simple:
7751  # Code from module strtol:
7752  # Code from module sys_ioctl:
7753  # Code from module sys_socket:
7754  # Code from module sys_stat:
7755  # Code from module sys_time:
7756  # Code from module sys_types:
7757  # Code from module sys_uio:
7758  # Code from module sys_wait:
7759  # Code from module tan:
7760  # Code from module tempname:
7761  # Code from module threadlib:
7762
7763
7764
7765  # Code from module time:
7766  # Code from module tmpdir:
7767  # Code from module unistd:
7768  # Code from module unistd-safer:
7769  # Code from module unlink:
7770  # Code from module useless-if-before-free:
7771  # Code from module vc-list-files:
7772  # Code from module verify:
7773  # Code from module wait-process:
7774  # Code from module waitpid:
7775  # Code from module wchar:
7776  # Code from module wcrtomb:
7777  # Code from module wctype-h:
7778  # Code from module write:
7779  # Code from module xalloc:
7780  # Code from module xalloc-die:
7781  # Code from module xalloc-oversized:
7782
7783
7784ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7785if test "x$ac_cv_type_size_t" = xyes; then :
7786
7787else
7788
7789cat >>confdefs.h <<_ACEOF
7790#define size_t unsigned int
7791_ACEOF
7792
7793fi
7794
7795# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7796# for constant arguments.  Useless!
7797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7798$as_echo_n "checking for working alloca.h... " >&6; }
7799if ${ac_cv_working_alloca_h+:} false; then :
7800  $as_echo_n "(cached) " >&6
7801else
7802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7803/* end confdefs.h.  */
7804#include <alloca.h>
7805int
7806main ()
7807{
7808char *p = (char *) alloca (2 * sizeof (int));
7809			  if (p) return 0;
7810  ;
7811  return 0;
7812}
7813_ACEOF
7814if ac_fn_c_try_link "$LINENO"; then :
7815  ac_cv_working_alloca_h=yes
7816else
7817  ac_cv_working_alloca_h=no
7818fi
7819rm -f core conftest.err conftest.$ac_objext \
7820    conftest$ac_exeext conftest.$ac_ext
7821fi
7822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7823$as_echo "$ac_cv_working_alloca_h" >&6; }
7824if test $ac_cv_working_alloca_h = yes; then
7825
7826$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7827
7828fi
7829
7830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7831$as_echo_n "checking for alloca... " >&6; }
7832if ${ac_cv_func_alloca_works+:} false; then :
7833  $as_echo_n "(cached) " >&6
7834else
7835  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7836/* end confdefs.h.  */
7837#ifdef __GNUC__
7838# define alloca __builtin_alloca
7839#else
7840# ifdef _MSC_VER
7841#  include <malloc.h>
7842#  define alloca _alloca
7843# else
7844#  ifdef HAVE_ALLOCA_H
7845#   include <alloca.h>
7846#  else
7847#   ifdef _AIX
7848 #pragma alloca
7849#   else
7850#    ifndef alloca /* predefined by HP cc +Olibcalls */
7851void *alloca (size_t);
7852#    endif
7853#   endif
7854#  endif
7855# endif
7856#endif
7857
7858int
7859main ()
7860{
7861char *p = (char *) alloca (1);
7862				    if (p) return 0;
7863  ;
7864  return 0;
7865}
7866_ACEOF
7867if ac_fn_c_try_link "$LINENO"; then :
7868  ac_cv_func_alloca_works=yes
7869else
7870  ac_cv_func_alloca_works=no
7871fi
7872rm -f core conftest.err conftest.$ac_objext \
7873    conftest$ac_exeext conftest.$ac_ext
7874fi
7875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7876$as_echo "$ac_cv_func_alloca_works" >&6; }
7877
7878if test $ac_cv_func_alloca_works = yes; then
7879
7880$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7881
7882else
7883  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7884# that cause trouble.  Some versions do not even contain alloca or
7885# contain a buggy version.  If you still want to use their alloca,
7886# use ar to extract alloca.o from them instead of compiling alloca.c.
7887
7888ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7889
7890$as_echo "#define C_ALLOCA 1" >>confdefs.h
7891
7892
7893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7894$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7895if ${ac_cv_os_cray+:} false; then :
7896  $as_echo_n "(cached) " >&6
7897else
7898  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7899/* end confdefs.h.  */
7900#if defined CRAY && ! defined CRAY2
7901webecray
7902#else
7903wenotbecray
7904#endif
7905
7906_ACEOF
7907if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7908  $EGREP "webecray" >/dev/null 2>&1; then :
7909  ac_cv_os_cray=yes
7910else
7911  ac_cv_os_cray=no
7912fi
7913rm -f conftest*
7914
7915fi
7916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7917$as_echo "$ac_cv_os_cray" >&6; }
7918if test $ac_cv_os_cray = yes; then
7919  for ac_func in _getb67 GETB67 getb67; do
7920    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7921ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7922if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7923
7924cat >>confdefs.h <<_ACEOF
7925#define CRAY_STACKSEG_END $ac_func
7926_ACEOF
7927
7928    break
7929fi
7930
7931  done
7932fi
7933
7934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7935$as_echo_n "checking stack direction for C alloca... " >&6; }
7936if ${ac_cv_c_stack_direction+:} false; then :
7937  $as_echo_n "(cached) " >&6
7938else
7939  if test "$cross_compiling" = yes; then :
7940  ac_cv_c_stack_direction=0
7941else
7942  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7943/* end confdefs.h.  */
7944$ac_includes_default
7945int
7946find_stack_direction (int *addr, int depth)
7947{
7948  int dir, dummy = 0;
7949  if (! addr)
7950    addr = &dummy;
7951  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7952  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7953  return dir + dummy;
7954}
7955
7956int
7957main (int argc, char **argv)
7958{
7959  return find_stack_direction (0, argc + !argv + 20) < 0;
7960}
7961_ACEOF
7962if ac_fn_c_try_run "$LINENO"; then :
7963  ac_cv_c_stack_direction=1
7964else
7965  ac_cv_c_stack_direction=-1
7966fi
7967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7968  conftest.$ac_objext conftest.beam conftest.$ac_ext
7969fi
7970
7971fi
7972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7973$as_echo "$ac_cv_c_stack_direction" >&6; }
7974cat >>confdefs.h <<_ACEOF
7975#define STACK_DIRECTION $ac_cv_c_stack_direction
7976_ACEOF
7977
7978
7979fi
7980
7981
7982
7983
7984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
7985$as_echo_n "checking whether build environment is sane... " >&6; }
7986# Reject unsafe characters in $srcdir or the absolute working directory
7987# name.  Accept space and tab only in the latter.
7988am_lf='
7989'
7990case `pwd` in
7991  *[\\\"\#\$\&\'\`$am_lf]*)
7992    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
7993esac
7994case $srcdir in
7995  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
7996    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
7997esac
7998
7999# Do 'set' in a subshell so we don't clobber the current shell's
8000# arguments.  Must try -L first in case configure is actually a
8001# symlink; some systems play weird games with the mod time of symlinks
8002# (eg FreeBSD returns the mod time of the symlink's containing
8003# directory).
8004if (
8005   am_has_slept=no
8006   for am_try in 1 2; do
8007     echo "timestamp, slept: $am_has_slept" > conftest.file
8008     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
8009     if test "$*" = "X"; then
8010	# -L didn't work.
8011	set X `ls -t "$srcdir/configure" conftest.file`
8012     fi
8013     if test "$*" != "X $srcdir/configure conftest.file" \
8014	&& test "$*" != "X conftest.file $srcdir/configure"; then
8015
8016	# If neither matched, then we have a broken ls.  This can happen
8017	# if, for instance, CONFIG_SHELL is bash and it inherits a
8018	# broken ls alias from the environment.  This has actually
8019	# happened.  Such a system could not be considered "sane".
8020	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
8021  alias in your environment" "$LINENO" 5
8022     fi
8023     if test "$2" = conftest.file || test $am_try -eq 2; then
8024       break
8025     fi
8026     # Just in case.
8027     sleep 1
8028     am_has_slept=yes
8029   done
8030   test "$2" = conftest.file
8031   )
8032then
8033   # Ok.
8034   :
8035else
8036   as_fn_error $? "newly created file is older than distributed files!
8037Check your system clock" "$LINENO" 5
8038fi
8039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8040$as_echo "yes" >&6; }
8041# If we didn't sleep, we still need to ensure time stamps of config.status and
8042# generated files are strictly newer.
8043am_sleep_pid=
8044if grep 'slept: no' conftest.file >/dev/null 2>&1; then
8045  ( sleep 1 ) &
8046  am_sleep_pid=$!
8047fi
8048
8049rm -f conftest.file
8050
8051
8052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
8053$as_echo "" >&6; }
8054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PACKAGE specific package options..." >&5
8055$as_echo "$as_me: checking for $PACKAGE specific package options..." >&6;}
8056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unicode support is required" >&5
8057$as_echo_n "checking whether unicode support is required... " >&6; }
8058# Check whether --enable-unicode was given.
8059if test "${enable_unicode+set}" = set; then :
8060  enableval=$enable_unicode; gcal_cv_use_unicode=$enableval
8061else
8062  gcal_cv_use_unicode=no
8063fi
8064
8065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcal_cv_use_unicode" >&5
8066$as_echo "$gcal_cv_use_unicode" >&6; }
8067if test "$gcal_cv_use_unicode" = yes; then
8068
8069$as_echo "#define USE_UNICODE 1" >>confdefs.h
8070
8071fi
8072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether extended ASCII character set is required" >&5
8073$as_echo_n "checking whether extended ASCII character set is required... " >&6; }
8074# Check whether --enable-easc was given.
8075if test "${enable_easc+set}" = set; then :
8076  enableval=$enable_easc; gcal_cv_use_easc=$enableval
8077else
8078  gcal_cv_use_easc=no
8079fi
8080
8081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcal_cv_use_easc" >&5
8082$as_echo "$gcal_cv_use_easc" >&6; }
8083if test "$gcal_cv_use_easc" = yes; then
8084
8085$as_echo "#define USE_EASC 1" >>confdefs.h
8086
8087fi
8088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether all available country specific holidays are required" >&5
8089$as_echo_n "checking whether all available country specific holidays are required... " >&6; }
8090# Check whether --enable-cc-holidays was given.
8091if test "${enable_cc_holidays+set}" = set; then :
8092  enableval=$enable_cc_holidays; gcal_cv_use_cc_holidays=$enableval
8093else
8094  gcal_cv_use_cc_holidays=yes
8095fi
8096
8097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcal_cv_use_cc_holidays" >&5
8098$as_echo "$gcal_cv_use_cc_holidays" >&6; }
8099if test "$gcal_cv_use_cc_holidays" = yes; then
8100  GCAL_HD_OBJS="\$(GCAL_HD_OBJS)"
8101else
8102
8103$as_echo "#define HD_TOP20CC 1" >>confdefs.h
8104
8105fi
8106
8107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether highlighting sequences are required" >&5
8108$as_echo_n "checking whether highlighting sequences are required... " >&6; }
8109# Check whether --enable-hls was given.
8110if test "${enable_hls+set}" = set; then :
8111  enableval=$enable_hls; gcal_cv_use_hls=$enableval
8112else
8113  gcal_cv_use_hls=yes
8114fi
8115
8116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcal_cv_use_hls" >&5
8117$as_echo "$gcal_cv_use_hls" >&6; }
8118if test "$gcal_cv_use_hls" = yes; then
8119
8120$as_echo "#define USE_HLS 1" >>confdefs.h
8121
8122fi
8123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pager feature is required" >&5
8124$as_echo_n "checking whether pager feature is required... " >&6; }
8125# Check whether --enable-pager was given.
8126if test "${enable_pager+set}" = set; then :
8127  enableval=$enable_pager; gcal_cv_use_pager=$enableval
8128else
8129  gcal_cv_use_pager=yes
8130fi
8131
8132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcal_cv_use_pager" >&5
8133$as_echo "$gcal_cv_use_pager" >&6; }
8134if test "$gcal_cv_use_pager" = yes; then
8135
8136$as_echo "#define USE_PAGER 1" >>confdefs.h
8137
8138fi
8139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fixed date feature is required" >&5
8140$as_echo_n "checking whether fixed date feature is required... " >&6; }
8141# Check whether --enable-rc was given.
8142if test "${enable_rc+set}" = set; then :
8143  enableval=$enable_rc; gcal_cv_use_rc=$enableval
8144else
8145  gcal_cv_use_rc=yes
8146fi
8147
8148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcal_cv_use_rc" >&5
8149$as_echo "$gcal_cv_use_rc" >&6; }
8150if test "$gcal_cv_use_rc" = yes; then
8151  GCAL_RC_OBJS="\$(GCAL_RC_OBJS)"
8152
8153$as_echo "#define USE_RC 1" >>confdefs.h
8154
8155fi
8156
8157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether terminal libraries are required" >&5
8158$as_echo_n "checking whether terminal libraries are required... " >&6; }
8159# Check whether --enable-term was given.
8160if test "${enable_term+set}" = set; then :
8161  enableval=$enable_term; gcal_cv_use_term=$enableval
8162else
8163  gcal_cv_use_term=yes
8164fi
8165
8166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcal_cv_use_term" >&5
8167$as_echo "$gcal_cv_use_term" >&6; }
8168
8169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
8170$as_echo "" >&6; }
8171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for programs..." >&5
8172$as_echo "$as_me: checking for programs..." >&6;}
8173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8174$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
8175set x ${MAKE-make}
8176ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
8177if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
8178  $as_echo_n "(cached) " >&6
8179else
8180  cat >conftest.make <<\_ACEOF
8181SHELL = /bin/sh
8182all:
8183	@echo '@@@%%%=$(MAKE)=@@@%%%'
8184_ACEOF
8185# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
8186case `${MAKE-make} -f conftest.make 2>/dev/null` in
8187  *@@@%%%=?*=@@@%%%*)
8188    eval ac_cv_prog_make_${ac_make}_set=yes;;
8189  *)
8190    eval ac_cv_prog_make_${ac_make}_set=no;;
8191esac
8192rm -f conftest.make
8193fi
8194if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
8195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8196$as_echo "yes" >&6; }
8197  SET_MAKE=
8198else
8199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8200$as_echo "no" >&6; }
8201  SET_MAKE="MAKE=${MAKE-make}"
8202fi
8203
8204# Extract the first word of "perl", so it can be a program name with args.
8205set dummy perl; ac_word=$2
8206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8207$as_echo_n "checking for $ac_word... " >&6; }
8208if ${ac_cv_prog_PERL+:} false; then :
8209  $as_echo_n "(cached) " >&6
8210else
8211  if test -n "$PERL"; then
8212  ac_cv_prog_PERL="$PERL" # Let the user override the test.
8213else
8214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8215for as_dir in $PATH
8216do
8217  IFS=$as_save_IFS
8218  test -z "$as_dir" && as_dir=.
8219    for ac_exec_ext in '' $ac_executable_extensions; do
8220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8221    ac_cv_prog_PERL="perl"
8222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8223    break 2
8224  fi
8225done
8226  done
8227IFS=$as_save_IFS
8228
8229fi
8230fi
8231PERL=$ac_cv_prog_PERL
8232if test -n "$PERL"; then
8233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
8234$as_echo "$PERL" >&6; }
8235else
8236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8237$as_echo "no" >&6; }
8238fi
8239
8240
8241
8242for ac_prog in gawk mawk nawk awk
8243do
8244  # Extract the first word of "$ac_prog", so it can be a program name with args.
8245set dummy $ac_prog; ac_word=$2
8246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8247$as_echo_n "checking for $ac_word... " >&6; }
8248if ${ac_cv_prog_AWK+:} false; then :
8249  $as_echo_n "(cached) " >&6
8250else
8251  if test -n "$AWK"; then
8252  ac_cv_prog_AWK="$AWK" # Let the user override the test.
8253else
8254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8255for as_dir in $PATH
8256do
8257  IFS=$as_save_IFS
8258  test -z "$as_dir" && as_dir=.
8259    for ac_exec_ext in '' $ac_executable_extensions; do
8260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8261    ac_cv_prog_AWK="$ac_prog"
8262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8263    break 2
8264  fi
8265done
8266  done
8267IFS=$as_save_IFS
8268
8269fi
8270fi
8271AWK=$ac_cv_prog_AWK
8272if test -n "$AWK"; then
8273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8274$as_echo "$AWK" >&6; }
8275else
8276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8277$as_echo "no" >&6; }
8278fi
8279
8280
8281  test -n "$AWK" && break
8282done
8283
8284if test -z "$ac_cv_prog_AWK"; then
8285        # Extract the first word of "gnuawk", so it can be a program name with args.
8286set dummy gnuawk; ac_word=$2
8287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8288$as_echo_n "checking for $ac_word... " >&6; }
8289if ${ac_cv_prog_AWK+:} false; then :
8290  $as_echo_n "(cached) " >&6
8291else
8292  if test -n "$AWK"; then
8293  ac_cv_prog_AWK="$AWK" # Let the user override the test.
8294else
8295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8296for as_dir in $PATH
8297do
8298  IFS=$as_save_IFS
8299  test -z "$as_dir" && as_dir=.
8300    for ac_exec_ext in '' $ac_executable_extensions; do
8301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8302    ac_cv_prog_AWK="gnuawk"
8303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8304    break 2
8305  fi
8306done
8307  done
8308IFS=$as_save_IFS
8309
8310fi
8311fi
8312AWK=$ac_cv_prog_AWK
8313if test -n "$AWK"; then
8314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
8315$as_echo "$AWK" >&6; }
8316else
8317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8318$as_echo "no" >&6; }
8319fi
8320
8321
8322  if test -z "$ac_cv_prog_AWK"; then
8323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
8324$as_echo "" >&6; }
8325    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no automatic installation of dates files!" >&5
8326$as_echo "$as_me: WARNING: no automatic installation of dates files!" >&2;}
8327    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Makefile target *installdates* will never be executed" >&5
8328$as_echo "$as_me: WARNING: Makefile target *installdates* will never be executed" >&2;}
8329    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: and some other targets will create useless script files." >&5
8330$as_echo "$as_me: WARNING: and some other targets will create useless script files." >&2;}
8331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
8332$as_echo "" >&6; }
8333  fi
8334fi
8335# Extract the first word of "zdump", so it can be a program name with args.
8336set dummy zdump; ac_word=$2
8337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8338$as_echo_n "checking for $ac_word... " >&6; }
8339if ${ac_cv_path_ZDUMP+:} false; then :
8340  $as_echo_n "(cached) " >&6
8341else
8342  case $ZDUMP in
8343  [\\/]* | ?:[\\/]*)
8344  ac_cv_path_ZDUMP="$ZDUMP" # Let the user override the test with a path.
8345  ;;
8346  *)
8347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8348as_dummy="$PATH:\
8349/sbin:\
8350/usr/sbin:\
8351/usr/local/sbin:\
8352/usr/etc:\
8353/usr/etc/zoneinfo:\
8354/usr/lib:\
8355/usr/lib/zoneinfo:\
8356/usr/share:\
8357/usr/share/zoneinfo:\
8358/usr/share/lib:\
8359/usr/share/lib/zoneinfo:\
8360/usr/share/etc:\
8361/usr/share/etc/zoneinfo:\
8362/usr/local/etc:\
8363/usr/local/etc/zoneinfo:\
8364/usr/local/lib:\
8365/usr/local/lib/zoneinfo:\
8366/usr/local/share:\
8367/usr/local/share/zoneinfo:\
8368/usr/local/share/lib:\
8369/usr/local/share/lib/zoneinfo:\
8370/usr/local/share/etc:\
8371/usr/local/share/etc/zoneinfo:\
8372/opt/gnu/sbin:\
8373/opt/gnu/usr/sbin:\
8374/opt/gnu/usr/local/sbin:\
8375/opt/gnu/etc:\
8376/opt/gnu/etc/zoneinfo:\
8377/opt/gnu/lib:\
8378/opt/gnu/lib/zoneinfo:\
8379/opt/gnu/share:\
8380/opt/gnu/share/zoneinfo:\
8381/opt/gnu/share/lib:\
8382/opt/gnu/share/lib/zoneinfo:\
8383/opt/gnu/share/etc:\
8384/opt/gnu/share/etc/zoneinfo"
8385for as_dir in $as_dummy
8386do
8387  IFS=$as_save_IFS
8388  test -z "$as_dir" && as_dir=.
8389    for ac_exec_ext in '' $ac_executable_extensions; do
8390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8391    ac_cv_path_ZDUMP="$as_dir/$ac_word$ac_exec_ext"
8392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8393    break 2
8394  fi
8395done
8396  done
8397IFS=$as_save_IFS
8398
8399  ;;
8400esac
8401fi
8402ZDUMP=$ac_cv_path_ZDUMP
8403if test -n "$ZDUMP"; then
8404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZDUMP" >&5
8405$as_echo "$ZDUMP" >&6; }
8406else
8407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8408$as_echo "no" >&6; }
8409fi
8410
8411
8412if test -z "$ac_cv_path_ZDUMP"; then
8413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
8414$as_echo "" >&6; }
8415  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ask your sysadmin for the ZONEINFO time zone dumping program!" >&5
8416$as_echo "$as_me: WARNING: Ask your sysadmin for the ZONEINFO time zone dumping program!" >&2;}
8417  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Makefile target *dst* will produce a useless script file." >&5
8418$as_echo "$as_me: WARNING: Makefile target *dst* will produce a useless script file." >&2;}
8419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
8420$as_echo "" >&6; }
8421fi
8422if test "$gcal_cv_use_pager" = yes; then
8423        # Extract the first word of "less", so it can be a program name with args.
8424set dummy less; ac_word=$2
8425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8426$as_echo_n "checking for $ac_word... " >&6; }
8427if ${ac_cv_prog_PAGER1+:} false; then :
8428  $as_echo_n "(cached) " >&6
8429else
8430  if test -n "$PAGER1"; then
8431  ac_cv_prog_PAGER1="$PAGER1" # Let the user override the test.
8432else
8433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8434for as_dir in $PATH
8435do
8436  IFS=$as_save_IFS
8437  test -z "$as_dir" && as_dir=.
8438    for ac_exec_ext in '' $ac_executable_extensions; do
8439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8440    ac_cv_prog_PAGER1="less"
8441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8442    break 2
8443  fi
8444done
8445  done
8446IFS=$as_save_IFS
8447
8448fi
8449fi
8450PAGER1=$ac_cv_prog_PAGER1
8451if test -n "$PAGER1"; then
8452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAGER1" >&5
8453$as_echo "$PAGER1" >&6; }
8454else
8455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8456$as_echo "no" >&6; }
8457fi
8458
8459
8460
8461cat >>confdefs.h <<_ACEOF
8462#define PAGER1_PROG "$PAGER1"
8463_ACEOF
8464
8465  # Extract the first word of "more", so it can be a program name with args.
8466set dummy more; ac_word=$2
8467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8468$as_echo_n "checking for $ac_word... " >&6; }
8469if ${ac_cv_prog_PAGER2+:} false; then :
8470  $as_echo_n "(cached) " >&6
8471else
8472  if test -n "$PAGER2"; then
8473  ac_cv_prog_PAGER2="$PAGER2" # Let the user override the test.
8474else
8475as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8476for as_dir in $PATH
8477do
8478  IFS=$as_save_IFS
8479  test -z "$as_dir" && as_dir=.
8480    for ac_exec_ext in '' $ac_executable_extensions; do
8481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8482    ac_cv_prog_PAGER2="more"
8483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8484    break 2
8485  fi
8486done
8487  done
8488IFS=$as_save_IFS
8489
8490fi
8491fi
8492PAGER2=$ac_cv_prog_PAGER2
8493if test -n "$PAGER2"; then
8494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAGER2" >&5
8495$as_echo "$PAGER2" >&6; }
8496else
8497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8498$as_echo "no" >&6; }
8499fi
8500
8501
8502
8503cat >>confdefs.h <<_ACEOF
8504#define PAGER2_PROG "$PAGER2"
8505_ACEOF
8506
8507  # Extract the first word of "pg", so it can be a program name with args.
8508set dummy pg; ac_word=$2
8509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8510$as_echo_n "checking for $ac_word... " >&6; }
8511if ${ac_cv_prog_PAGER3+:} false; then :
8512  $as_echo_n "(cached) " >&6
8513else
8514  if test -n "$PAGER3"; then
8515  ac_cv_prog_PAGER3="$PAGER3" # Let the user override the test.
8516else
8517as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8518for as_dir in $PATH
8519do
8520  IFS=$as_save_IFS
8521  test -z "$as_dir" && as_dir=.
8522    for ac_exec_ext in '' $ac_executable_extensions; do
8523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8524    ac_cv_prog_PAGER3="pg"
8525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8526    break 2
8527  fi
8528done
8529  done
8530IFS=$as_save_IFS
8531
8532fi
8533fi
8534PAGER3=$ac_cv_prog_PAGER3
8535if test -n "$PAGER3"; then
8536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAGER3" >&5
8537$as_echo "$PAGER3" >&6; }
8538else
8539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8540$as_echo "no" >&6; }
8541fi
8542
8543
8544
8545cat >>confdefs.h <<_ACEOF
8546#define PAGER3_PROG "$PAGER3"
8547_ACEOF
8548
8549fi
8550for ac_prog in cp copy
8551do
8552  # Extract the first word of "$ac_prog", so it can be a program name with args.
8553set dummy $ac_prog; ac_word=$2
8554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8555$as_echo_n "checking for $ac_word... " >&6; }
8556if ${ac_cv_prog_CP+:} false; then :
8557  $as_echo_n "(cached) " >&6
8558else
8559  if test -n "$CP"; then
8560  ac_cv_prog_CP="$CP" # Let the user override the test.
8561else
8562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8563for as_dir in $PATH
8564do
8565  IFS=$as_save_IFS
8566  test -z "$as_dir" && as_dir=.
8567    for ac_exec_ext in '' $ac_executable_extensions; do
8568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8569    ac_cv_prog_CP="$ac_prog"
8570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8571    break 2
8572  fi
8573done
8574  done
8575IFS=$as_save_IFS
8576
8577fi
8578fi
8579CP=$ac_cv_prog_CP
8580if test -n "$CP"; then
8581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
8582$as_echo "$CP" >&6; }
8583else
8584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8585$as_echo "no" >&6; }
8586fi
8587
8588
8589  test -n "$CP" && break
8590done
8591
8592if test -n "$ac_cv_prog_CP"; then
8593  if test "$ac_cv_prog_CP" = cp; then
8594    CP="cp -p"
8595  else
8596    if test "$ac_cv_prog_CP" != "cp -p"; then
8597      if test "$ac_cv_prog_CP" != "copy -m"; then
8598                                CP="copy -m"
8599      fi
8600    fi
8601  fi
8602
8603fi
8604
8605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8606$as_echo_n "checking whether ln -s works... " >&6; }
8607LN_S=$as_ln_s
8608if test "$LN_S" = "ln -s"; then
8609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8610$as_echo "yes" >&6; }
8611else
8612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8613$as_echo "no, using $LN_S" >&6; }
8614fi
8615
8616
8617
8618if test $ac_cv_c_compiler_gnu = yes; then
8619    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
8620$as_echo_n "checking whether $CC needs -traditional... " >&6; }
8621if ${ac_cv_prog_gcc_traditional+:} false; then :
8622  $as_echo_n "(cached) " >&6
8623else
8624    ac_pattern="Autoconf.*'x'"
8625  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8626/* end confdefs.h.  */
8627#include <sgtty.h>
8628Autoconf TIOCGETP
8629_ACEOF
8630if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8631  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
8632  ac_cv_prog_gcc_traditional=yes
8633else
8634  ac_cv_prog_gcc_traditional=no
8635fi
8636rm -f conftest*
8637
8638
8639  if test $ac_cv_prog_gcc_traditional = no; then
8640    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8641/* end confdefs.h.  */
8642#include <termio.h>
8643Autoconf TCGETA
8644_ACEOF
8645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8646  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
8647  ac_cv_prog_gcc_traditional=yes
8648fi
8649rm -f conftest*
8650
8651  fi
8652fi
8653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
8654$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
8655  if test $ac_cv_prog_gcc_traditional = yes; then
8656    CC="$CC -traditional"
8657  fi
8658fi
8659
8660if test "$gcal_possibly_adjust_cflags" = yes && test -n "$GCC"; then
8661  CFLAGS="$CFLAGS -Wall"
8662fi
8663
8664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
8665$as_echo "" >&6; }
8666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for operating system variants..." >&5
8667$as_echo "$as_me: checking for operating system variants..." >&6;}
8668
8669
8670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
8671$as_echo_n "checking for library containing strerror... " >&6; }
8672if ${ac_cv_search_strerror+:} false; then :
8673  $as_echo_n "(cached) " >&6
8674else
8675  ac_func_search_save_LIBS=$LIBS
8676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8677/* end confdefs.h.  */
8678
8679/* Override any GCC internal prototype to avoid an error.
8680   Use char because int might match the return type of a GCC
8681   builtin and then its argument prototype would still apply.  */
8682#ifdef __cplusplus
8683extern "C"
8684#endif
8685char strerror ();
8686int
8687main ()
8688{
8689return strerror ();
8690  ;
8691  return 0;
8692}
8693_ACEOF
8694for ac_lib in '' cposix; do
8695  if test -z "$ac_lib"; then
8696    ac_res="none required"
8697  else
8698    ac_res=-l$ac_lib
8699    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8700  fi
8701  if ac_fn_c_try_link "$LINENO"; then :
8702  ac_cv_search_strerror=$ac_res
8703fi
8704rm -f core conftest.err conftest.$ac_objext \
8705    conftest$ac_exeext
8706  if ${ac_cv_search_strerror+:} false; then :
8707  break
8708fi
8709done
8710if ${ac_cv_search_strerror+:} false; then :
8711
8712else
8713  ac_cv_search_strerror=no
8714fi
8715rm conftest.$ac_ext
8716LIBS=$ac_func_search_save_LIBS
8717fi
8718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
8719$as_echo "$ac_cv_search_strerror" >&6; }
8720ac_res=$ac_cv_search_strerror
8721if test "$ac_res" != no; then :
8722  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8723
8724fi
8725
8726
8727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
8728$as_echo "" >&6; }
8729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libraries..." >&5
8730$as_echo "$as_me: checking for libraries..." >&6;}
8731if test "$gcal_cv_use_term" = yes; then
8732  gcal_ttylibs_ok=no
8733  gcal_libtermlib_ok=no
8734  TTYLIBS=
8735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncurses" >&5
8736$as_echo_n "checking for initscr in -lncurses... " >&6; }
8737if ${ac_cv_lib_ncurses_initscr+:} false; then :
8738  $as_echo_n "(cached) " >&6
8739else
8740  ac_check_lib_save_LIBS=$LIBS
8741LIBS="-lncurses  $LIBS"
8742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8743/* end confdefs.h.  */
8744
8745/* Override any GCC internal prototype to avoid an error.
8746   Use char because int might match the return type of a GCC
8747   builtin and then its argument prototype would still apply.  */
8748#ifdef __cplusplus
8749extern "C"
8750#endif
8751char initscr ();
8752int
8753main ()
8754{
8755return initscr ();
8756  ;
8757  return 0;
8758}
8759_ACEOF
8760if ac_fn_c_try_link "$LINENO"; then :
8761  ac_cv_lib_ncurses_initscr=yes
8762else
8763  ac_cv_lib_ncurses_initscr=no
8764fi
8765rm -f core conftest.err conftest.$ac_objext \
8766    conftest$ac_exeext conftest.$ac_ext
8767LIBS=$ac_check_lib_save_LIBS
8768fi
8769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5
8770$as_echo "$ac_cv_lib_ncurses_initscr" >&6; }
8771if test "x$ac_cv_lib_ncurses_initscr" = xyes; then :
8772  TTYLIBS="-lncurses"
8773fi
8774
8775  if test -z "$TTYLIBS"; then
8776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
8777$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
8778if ${ac_cv_lib_termcap_tgetent+:} false; then :
8779  $as_echo_n "(cached) " >&6
8780else
8781  ac_check_lib_save_LIBS=$LIBS
8782LIBS="-ltermcap  $LIBS"
8783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8784/* end confdefs.h.  */
8785
8786/* Override any GCC internal prototype to avoid an error.
8787   Use char because int might match the return type of a GCC
8788   builtin and then its argument prototype would still apply.  */
8789#ifdef __cplusplus
8790extern "C"
8791#endif
8792char tgetent ();
8793int
8794main ()
8795{
8796return tgetent ();
8797  ;
8798  return 0;
8799}
8800_ACEOF
8801if ac_fn_c_try_link "$LINENO"; then :
8802  ac_cv_lib_termcap_tgetent=yes
8803else
8804  ac_cv_lib_termcap_tgetent=no
8805fi
8806rm -f core conftest.err conftest.$ac_objext \
8807    conftest$ac_exeext conftest.$ac_ext
8808LIBS=$ac_check_lib_save_LIBS
8809fi
8810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
8811$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
8812if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
8813  TTYLIBS="-ltermcap"
8814fi
8815
8816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermlib" >&5
8817$as_echo_n "checking for tgetent in -ltermlib... " >&6; }
8818if ${ac_cv_lib_termlib_tgetent+:} false; then :
8819  $as_echo_n "(cached) " >&6
8820else
8821  ac_check_lib_save_LIBS=$LIBS
8822LIBS="-ltermlib  $LIBS"
8823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8824/* end confdefs.h.  */
8825
8826/* Override any GCC internal prototype to avoid an error.
8827   Use char because int might match the return type of a GCC
8828   builtin and then its argument prototype would still apply.  */
8829#ifdef __cplusplus
8830extern "C"
8831#endif
8832char tgetent ();
8833int
8834main ()
8835{
8836return tgetent ();
8837  ;
8838  return 0;
8839}
8840_ACEOF
8841if ac_fn_c_try_link "$LINENO"; then :
8842  ac_cv_lib_termlib_tgetent=yes
8843else
8844  ac_cv_lib_termlib_tgetent=no
8845fi
8846rm -f core conftest.err conftest.$ac_objext \
8847    conftest$ac_exeext conftest.$ac_ext
8848LIBS=$ac_check_lib_save_LIBS
8849fi
8850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termlib_tgetent" >&5
8851$as_echo "$ac_cv_lib_termlib_tgetent" >&6; }
8852if test "x$ac_cv_lib_termlib_tgetent" = xyes; then :
8853  have_libtermlib=yes
8854else
8855  have_libtermlib=no
8856fi
8857
8858  fi
8859          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working terminal libraries" >&5
8860$as_echo_n "checking for working terminal libraries... " >&6; }
8861  SAVE_LIBS=$LIBS
8862  LIBS="$LIBS $TTYLIBS"
8863  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8864/* end confdefs.h.  */
8865
8866int
8867main ()
8868{
8869tgetent(0); tgetflag(0); tgetnum(0); tgetstr(0);
8870  ;
8871  return 0;
8872}
8873_ACEOF
8874if ac_fn_c_try_link "$LINENO"; then :
8875  gcal_ttylibs_ok=yes
8876fi
8877rm -f core conftest.err conftest.$ac_objext \
8878    conftest$ac_exeext conftest.$ac_ext
8879  if test "$gcal_ttylibs_ok" = yes; then
8880
8881$as_echo "#define HAVE_TTYLIBS 1" >>confdefs.h
8882
8883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $TTYLIBS" >&5
8884$as_echo "using $TTYLIBS" >&6; }
8885  else
8886    if test "$TTYLIBS" = "-lncurses"; then
8887      { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $TTYLIBS fails" >&5
8888$as_echo "using $TTYLIBS fails" >&6; }
8889      LIBS="$SAVE_LIBS"
8890      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
8891$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
8892if ${ac_cv_lib_termcap_tgetent+:} false; then :
8893  $as_echo_n "(cached) " >&6
8894else
8895  ac_check_lib_save_LIBS=$LIBS
8896LIBS="-ltermcap  $LIBS"
8897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8898/* end confdefs.h.  */
8899
8900/* Override any GCC internal prototype to avoid an error.
8901   Use char because int might match the return type of a GCC
8902   builtin and then its argument prototype would still apply.  */
8903#ifdef __cplusplus
8904extern "C"
8905#endif
8906char tgetent ();
8907int
8908main ()
8909{
8910return tgetent ();
8911  ;
8912  return 0;
8913}
8914_ACEOF
8915if ac_fn_c_try_link "$LINENO"; then :
8916  ac_cv_lib_termcap_tgetent=yes
8917else
8918  ac_cv_lib_termcap_tgetent=no
8919fi
8920rm -f core conftest.err conftest.$ac_objext \
8921    conftest$ac_exeext conftest.$ac_ext
8922LIBS=$ac_check_lib_save_LIBS
8923fi
8924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
8925$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
8926if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
8927  TTYLIBS="-ltermcap"
8928fi
8929
8930      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working terminal libraries again" >&5
8931$as_echo_n "checking for working terminal libraries again... " >&6; }
8932      LIBS="$LIBS $TTYLIBS"
8933      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8934/* end confdefs.h.  */
8935
8936int
8937main ()
8938{
8939tgetent(0); tgetflag(0); tgetnum(0); tgetstr(0);
8940  ;
8941  return 0;
8942}
8943_ACEOF
8944if ac_fn_c_try_link "$LINENO"; then :
8945  gcal_ttylibs_ok=yes
8946fi
8947rm -f core conftest.err conftest.$ac_objext \
8948    conftest$ac_exeext conftest.$ac_ext
8949      if test "$gcal_ttylibs_ok" = yes; then
8950
8951$as_echo "#define HAVE_TTYLIBS 1" >>confdefs.h
8952
8953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $TTYLIBS" >&5
8954$as_echo "using $TTYLIBS" >&6; }
8955      else
8956        { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $TTYLIBS fails" >&5
8957$as_echo "using $TTYLIBS fails" >&6; }
8958        LIBS="$SAVE_LIBS"
8959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermlib" >&5
8960$as_echo_n "checking for tgetent in -ltermlib... " >&6; }
8961if ${ac_cv_lib_termlib_tgetent+:} false; then :
8962  $as_echo_n "(cached) " >&6
8963else
8964  ac_check_lib_save_LIBS=$LIBS
8965LIBS="-ltermlib  $LIBS"
8966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8967/* end confdefs.h.  */
8968
8969/* Override any GCC internal prototype to avoid an error.
8970   Use char because int might match the return type of a GCC
8971   builtin and then its argument prototype would still apply.  */
8972#ifdef __cplusplus
8973extern "C"
8974#endif
8975char tgetent ();
8976int
8977main ()
8978{
8979return tgetent ();
8980  ;
8981  return 0;
8982}
8983_ACEOF
8984if ac_fn_c_try_link "$LINENO"; then :
8985  ac_cv_lib_termlib_tgetent=yes
8986else
8987  ac_cv_lib_termlib_tgetent=no
8988fi
8989rm -f core conftest.err conftest.$ac_objext \
8990    conftest$ac_exeext conftest.$ac_ext
8991LIBS=$ac_check_lib_save_LIBS
8992fi
8993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termlib_tgetent" >&5
8994$as_echo "$ac_cv_lib_termlib_tgetent" >&6; }
8995if test "x$ac_cv_lib_termlib_tgetent" = xyes; then :
8996  have_libtermlib=yes
8997else
8998  have_libtermlib=no
8999fi
9000
9001        TTYLIBS="-ltermlib"
9002        LIBS="$LIBS $TTYLIBS"
9003        if test "$have_libtermlib" = yes; then
9004          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working terminal libraries again" >&5
9005$as_echo_n "checking for working terminal libraries again... " >&6; }
9006          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9007/* end confdefs.h.  */
9008
9009int
9010main ()
9011{
9012tgetent(0); tgetflag(0); tgetnum(0); tgetstr(0);
9013  ;
9014  return 0;
9015}
9016_ACEOF
9017if ac_fn_c_try_link "$LINENO"; then :
9018  gcal_libtermlib_ok=yes
9019fi
9020rm -f core conftest.err conftest.$ac_objext \
9021    conftest$ac_exeext conftest.$ac_ext
9022          if test "$gcal_libtermlib_ok" = yes; then
9023
9024$as_echo "#define HAVE_TTYLIBS 1" >>confdefs.h
9025
9026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $TTYLIBS" >&5
9027$as_echo "using $TTYLIBS" >&6; }
9028          fi
9029        fi
9030      fi
9031    else
9032      if test "$have_libtermlib" = yes; then
9033        TTYLIBS="-ltermlib"
9034        LIBS="$SAVE_LIBS $TTYLIBS"
9035        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9036/* end confdefs.h.  */
9037
9038int
9039main ()
9040{
9041tgetent(0); tgetflag(0); tgetnum(0); tgetstr(0);
9042  ;
9043  return 0;
9044}
9045_ACEOF
9046if ac_fn_c_try_link "$LINENO"; then :
9047  gcal_libtermlib_ok=yes
9048fi
9049rm -f core conftest.err conftest.$ac_objext \
9050    conftest$ac_exeext conftest.$ac_ext
9051        if test "$gcal_libtermlib_ok" = yes; then
9052
9053$as_echo "#define HAVE_TTYLIBS 1" >>confdefs.h
9054
9055          { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $TTYLIBS" >&5
9056$as_echo "using $TTYLIBS" >&6; }
9057        fi
9058      fi
9059    fi
9060  fi
9061  if test "$gcal_ttylibs_ok" = no && test "$gcal_libtermlib_ok" = no; then
9062    LIBS="$SAVE_LIBS"
9063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: hmm... whats this??" >&5
9064$as_echo "hmm... whats this??" >&6; }
9065    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
9066$as_echo "" >&6; }
9067    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no terminal libraries available" >&5
9068$as_echo "$as_me: WARNING: no terminal libraries available" >&2;}
9069    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: " >&5
9070$as_echo "$as_me: WARNING: " >&2;}
9071    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: this means $PACKAGE-$VERSION will use its defaults now" >&5
9072$as_echo "$as_me: WARNING: this means $PACKAGE-$VERSION will use its defaults now" >&2;}
9073    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: and is unable to support several terminal types!" >&5
9074$as_echo "$as_me: WARNING: and is unable to support several terminal types!" >&2;}
9075    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: note: $PACKAGE-$VERSION would work more flexible if libncurses.a" >&5
9076$as_echo "$as_me: WARNING: note: $PACKAGE-$VERSION would work more flexible if libncurses.a" >&2;}
9077    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libtermcap.a or libtermlib.a are installed." >&5
9078$as_echo "$as_me: WARNING: libtermcap.a or libtermlib.a are installed." >&2;}
9079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
9080$as_echo "" >&6; }
9081  fi
9082fi
9083
9084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
9085$as_echo_n "checking for cos in -lm... " >&6; }
9086if ${ac_cv_lib_m_cos+:} false; then :
9087  $as_echo_n "(cached) " >&6
9088else
9089  ac_check_lib_save_LIBS=$LIBS
9090LIBS="-lm  $LIBS"
9091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9092/* end confdefs.h.  */
9093
9094/* Override any GCC internal prototype to avoid an error.
9095   Use char because int might match the return type of a GCC
9096   builtin and then its argument prototype would still apply.  */
9097#ifdef __cplusplus
9098extern "C"
9099#endif
9100char cos ();
9101int
9102main ()
9103{
9104return cos ();
9105  ;
9106  return 0;
9107}
9108_ACEOF
9109if ac_fn_c_try_link "$LINENO"; then :
9110  ac_cv_lib_m_cos=yes
9111else
9112  ac_cv_lib_m_cos=no
9113fi
9114rm -f core conftest.err conftest.$ac_objext \
9115    conftest$ac_exeext conftest.$ac_ext
9116LIBS=$ac_check_lib_save_LIBS
9117fi
9118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
9119$as_echo "$ac_cv_lib_m_cos" >&6; }
9120if test "x$ac_cv_lib_m_cos" = xyes; then :
9121  LIBM="-lm"
9122
9123$as_echo "#define HAVE_LIBM 1" >>confdefs.h
9124
9125   have_libm=yes
9126else
9127  have_libm=no
9128fi
9129
9130
9131
9132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
9133$as_echo "" >&6; }
9134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for header files..." >&5
9135$as_echo "$as_me: checking for header files..." >&6;}
9136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9137$as_echo_n "checking for ANSI C header files... " >&6; }
9138if ${ac_cv_header_stdc+:} false; then :
9139  $as_echo_n "(cached) " >&6
9140else
9141  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9142/* end confdefs.h.  */
9143#include <stdlib.h>
9144#include <stdarg.h>
9145#include <string.h>
9146#include <float.h>
9147
9148int
9149main ()
9150{
9151
9152  ;
9153  return 0;
9154}
9155_ACEOF
9156if ac_fn_c_try_compile "$LINENO"; then :
9157  ac_cv_header_stdc=yes
9158else
9159  ac_cv_header_stdc=no
9160fi
9161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9162
9163if test $ac_cv_header_stdc = yes; then
9164  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9165  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9166/* end confdefs.h.  */
9167#include <string.h>
9168
9169_ACEOF
9170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9171  $EGREP "memchr" >/dev/null 2>&1; then :
9172
9173else
9174  ac_cv_header_stdc=no
9175fi
9176rm -f conftest*
9177
9178fi
9179
9180if test $ac_cv_header_stdc = yes; then
9181  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9182  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9183/* end confdefs.h.  */
9184#include <stdlib.h>
9185
9186_ACEOF
9187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9188  $EGREP "free" >/dev/null 2>&1; then :
9189
9190else
9191  ac_cv_header_stdc=no
9192fi
9193rm -f conftest*
9194
9195fi
9196
9197if test $ac_cv_header_stdc = yes; then
9198  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9199  if test "$cross_compiling" = yes; then :
9200  :
9201else
9202  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9203/* end confdefs.h.  */
9204#include <ctype.h>
9205#include <stdlib.h>
9206#if ((' ' & 0x0FF) == 0x020)
9207# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9208# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9209#else
9210# define ISLOWER(c) \
9211		   (('a' <= (c) && (c) <= 'i') \
9212		     || ('j' <= (c) && (c) <= 'r') \
9213		     || ('s' <= (c) && (c) <= 'z'))
9214# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9215#endif
9216
9217#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9218int
9219main ()
9220{
9221  int i;
9222  for (i = 0; i < 256; i++)
9223    if (XOR (islower (i), ISLOWER (i))
9224	|| toupper (i) != TOUPPER (i))
9225      return 2;
9226  return 0;
9227}
9228_ACEOF
9229if ac_fn_c_try_run "$LINENO"; then :
9230
9231else
9232  ac_cv_header_stdc=no
9233fi
9234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9235  conftest.$ac_objext conftest.beam conftest.$ac_ext
9236fi
9237
9238fi
9239fi
9240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9241$as_echo "$ac_cv_header_stdc" >&6; }
9242if test $ac_cv_header_stdc = yes; then
9243
9244$as_echo "#define STDC_HEADERS 1" >>confdefs.h
9245
9246fi
9247
9248for ac_header in stdio.h stdlib.h string.h unistd.h ctype.h errno.h limits.h
9249do :
9250  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9251ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9252if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9253  cat >>confdefs.h <<_ACEOF
9254#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9255_ACEOF
9256
9257fi
9258
9259done
9260
9261for ac_header in assert.h signal.h termio.h termios.h sgtty.h langinfo.h
9262do :
9263  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9264ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9265if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9266  cat >>confdefs.h <<_ACEOF
9267#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9268_ACEOF
9269
9270fi
9271
9272done
9273
9274
9275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _NL_TIME_FIRST_WEEKDAY" >&5
9276$as_echo_n "checking for _NL_TIME_FIRST_WEEKDAY... " >&6; }
9277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9278/* end confdefs.h.  */
9279#include <langinfo.h>
9280int
9281main ()
9282{
9283
9284char c;
9285c = *((unsigned char *) nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
9286
9287  ;
9288  return 0;
9289}
9290_ACEOF
9291if ac_fn_c_try_link "$LINENO"; then :
9292  nl_res=yes
9293else
9294  nl_res=no
9295fi
9296rm -f core conftest.err conftest.$ac_objext \
9297    conftest$ac_exeext conftest.$ac_ext
9298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nl_res" >&5
9299$as_echo "$nl_res" >&6; }
9300if test "$nl_res" = "yes"; then
9301
9302$as_echo "#define HAVE__NL_TIME_FIRST_WEEKDAY 1" >>confdefs.h
9303
9304fi
9305
9306if test "$gcal_cv_use_term" = yes; then
9307  if test "$gcal_ttylibs_ok" = yes || test "$gcal_libtermlib_ok" = yes; then
9308    for ac_header in termcap.h
9309do :
9310  ac_fn_c_check_header_mongrel "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default"
9311if test "x$ac_cv_header_termcap_h" = xyes; then :
9312  cat >>confdefs.h <<_ACEOF
9313#define HAVE_TERMCAP_H 1
9314_ACEOF
9315
9316fi
9317
9318done
9319
9320  fi
9321fi
9322if test "$have_libm" = yes; then
9323  for ac_header in math.h
9324do :
9325  ac_fn_c_check_header_mongrel "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
9326if test "x$ac_cv_header_math_h" = xyes; then :
9327  cat >>confdefs.h <<_ACEOF
9328#define HAVE_MATH_H 1
9329_ACEOF
9330
9331fi
9332
9333done
9334
9335fi
9336if test "$gcal_cv_use_included_regexps" = no; then
9337  for ac_header in regex.h
9338do :
9339  ac_fn_c_check_header_mongrel "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default"
9340if test "x$ac_cv_header_regex_h" = xyes; then :
9341  cat >>confdefs.h <<_ACEOF
9342#define HAVE_REGEX_H 1
9343_ACEOF
9344
9345fi
9346
9347done
9348
9349fi
9350if test "$gcal_cv_use_pager" = yes; then
9351  for ac_header in fcntl.h
9352do :
9353  ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
9354if test "x$ac_cv_header_fcntl_h" = xyes; then :
9355  cat >>confdefs.h <<_ACEOF
9356#define HAVE_FCNTL_H 1
9357_ACEOF
9358
9359fi
9360
9361done
9362
9363  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
9364$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
9365if ${ac_cv_header_sys_wait_h+:} false; then :
9366  $as_echo_n "(cached) " >&6
9367else
9368  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9369/* end confdefs.h.  */
9370#include <sys/types.h>
9371#include <sys/wait.h>
9372#ifndef WEXITSTATUS
9373# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
9374#endif
9375#ifndef WIFEXITED
9376# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9377#endif
9378
9379int
9380main ()
9381{
9382  int s;
9383  wait (&s);
9384  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9385  ;
9386  return 0;
9387}
9388_ACEOF
9389if ac_fn_c_try_compile "$LINENO"; then :
9390  ac_cv_header_sys_wait_h=yes
9391else
9392  ac_cv_header_sys_wait_h=no
9393fi
9394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9395fi
9396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9397$as_echo "$ac_cv_header_sys_wait_h" >&6; }
9398if test $ac_cv_header_sys_wait_h = yes; then
9399
9400$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
9401
9402fi
9403
9404fi
9405for ac_header in sys/ioctl.h sys/stream.h sys/ptem.h sys/stat.h sys/types.h sys/time.h
9406do :
9407  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9408ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9409if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9410  cat >>confdefs.h <<_ACEOF
9411#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9412_ACEOF
9413
9414fi
9415
9416done
9417
9418
9419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
9420$as_echo "" >&6; }
9421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typedefs and structures..." >&5
9422$as_echo "$as_me: checking for typedefs and structures..." >&6;}
9423if test "$gcal_cv_use_pager" = yes; then
9424  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9425if test "x$ac_cv_type_pid_t" = xyes; then :
9426
9427else
9428
9429cat >>confdefs.h <<_ACEOF
9430#define pid_t int
9431_ACEOF
9432
9433fi
9434
9435fi
9436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
9437$as_echo_n "checking return type of signal handlers... " >&6; }
9438if ${ac_cv_type_signal+:} false; then :
9439  $as_echo_n "(cached) " >&6
9440else
9441  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9442/* end confdefs.h.  */
9443#include <sys/types.h>
9444#include <signal.h>
9445
9446int
9447main ()
9448{
9449return *(signal (0, 0)) (0) == 1;
9450  ;
9451  return 0;
9452}
9453_ACEOF
9454if ac_fn_c_try_compile "$LINENO"; then :
9455  ac_cv_type_signal=int
9456else
9457  ac_cv_type_signal=void
9458fi
9459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9460fi
9461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
9462$as_echo "$ac_cv_type_signal" >&6; }
9463
9464cat >>confdefs.h <<_ACEOF
9465#define RETSIGTYPE $ac_cv_type_signal
9466_ACEOF
9467
9468
9469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9470$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9471if ${ac_cv_header_time+:} false; then :
9472  $as_echo_n "(cached) " >&6
9473else
9474  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9475/* end confdefs.h.  */
9476#include <sys/types.h>
9477#include <sys/time.h>
9478#include <time.h>
9479
9480int
9481main ()
9482{
9483if ((struct tm *) 0)
9484return 0;
9485  ;
9486  return 0;
9487}
9488_ACEOF
9489if ac_fn_c_try_compile "$LINENO"; then :
9490  ac_cv_header_time=yes
9491else
9492  ac_cv_header_time=no
9493fi
9494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9495fi
9496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9497$as_echo "$ac_cv_header_time" >&6; }
9498if test $ac_cv_header_time = yes; then
9499
9500$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9501
9502fi
9503
9504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time_t" >&5
9505$as_echo_n "checking for time_t... " >&6; }
9506if ${gcal_cv_type_time_t+:} false; then :
9507  $as_echo_n "(cached) " >&6
9508else
9509  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9510/* end confdefs.h.  */
9511
9512#    if TIME_WITH_SYS_TIME
9513#      include <sys/time.h>
9514#      include <time.h>
9515#    else
9516#      if HAVE_SYS_TIME_H
9517#        include <sys/time.h>
9518#      else
9519#        include <time.h>
9520#      endif
9521#    endif
9522int
9523main ()
9524{
9525time_t t = 0;
9526  ;
9527  return 0;
9528}
9529_ACEOF
9530if ac_fn_c_try_compile "$LINENO"; then :
9531  gcal_cv_type_time_t=yes
9532else
9533  gcal_cv_type_time_t=no
9534fi
9535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9536fi
9537
9538if test "$gcal_cv_type_time_t" = yes; then
9539
9540$as_echo "#define HAVE_TIME_T 1" >>confdefs.h
9541
9542fi
9543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcal_cv_type_time_t" >&5
9544$as_echo "$gcal_cv_type_time_t" >&6; }
9545
9546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
9547$as_echo "" >&6; }
9548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler characteristics..." >&5
9549$as_echo "$as_me: checking for compiler characteristics..." >&6;}
9550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
9551$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
9552if ${ac_cv_c_const+:} false; then :
9553  $as_echo_n "(cached) " >&6
9554else
9555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9556/* end confdefs.h.  */
9557
9558int
9559main ()
9560{
9561
9562#ifndef __cplusplus
9563  /* Ultrix mips cc rejects this sort of thing.  */
9564  typedef int charset[2];
9565  const charset cs = { 0, 0 };
9566  /* SunOS 4.1.1 cc rejects this.  */
9567  char const *const *pcpcc;
9568  char **ppc;
9569  /* NEC SVR4.0.2 mips cc rejects this.  */
9570  struct point {int x, y;};
9571  static struct point const zero = {0,0};
9572  /* AIX XL C 1.02.0.0 rejects this.
9573     It does not let you subtract one const X* pointer from another in
9574     an arm of an if-expression whose if-part is not a constant
9575     expression */
9576  const char *g = "string";
9577  pcpcc = &g + (g ? g-g : 0);
9578  /* HPUX 7.0 cc rejects these. */
9579  ++pcpcc;
9580  ppc = (char**) pcpcc;
9581  pcpcc = (char const *const *) ppc;
9582  { /* SCO 3.2v4 cc rejects this sort of thing.  */
9583    char tx;
9584    char *t = &tx;
9585    char const *s = 0 ? (char *) 0 : (char const *) 0;
9586
9587    *t++ = 0;
9588    if (s) return 0;
9589  }
9590  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9591    int x[] = {25, 17};
9592    const int *foo = &x[0];
9593    ++foo;
9594  }
9595  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9596    typedef const int *iptr;
9597    iptr p = 0;
9598    ++p;
9599  }
9600  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
9601       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9602    struct s { int j; const int *ap[3]; } bx;
9603    struct s *b = &bx; b->j = 5;
9604  }
9605  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9606    const int foo = 10;
9607    if (!foo) return 0;
9608  }
9609  return !cs[0] && !zero.x;
9610#endif
9611
9612  ;
9613  return 0;
9614}
9615_ACEOF
9616if ac_fn_c_try_compile "$LINENO"; then :
9617  ac_cv_c_const=yes
9618else
9619  ac_cv_c_const=no
9620fi
9621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9622fi
9623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
9624$as_echo "$ac_cv_c_const" >&6; }
9625if test $ac_cv_c_const = no; then
9626
9627$as_echo "#define const /**/" >>confdefs.h
9628
9629fi
9630
9631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for void" >&5
9632$as_echo_n "checking for void... " >&6; }
9633if ${gcal_cv_c_void+:} false; then :
9634  $as_echo_n "(cached) " >&6
9635else
9636  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9637/* end confdefs.h.  */
9638
9639int
9640main ()
9641{
9642void *foo = 0;
9643  ;
9644  return 0;
9645}
9646_ACEOF
9647if ac_fn_c_try_compile "$LINENO"; then :
9648  gcal_cv_c_void=yes
9649else
9650  gcal_cv_c_void=no
9651fi
9652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9653fi
9654
9655if test "$gcal_cv_c_void" = yes; then
9656
9657$as_echo "#define HAVE_VOID 1" >>confdefs.h
9658
9659fi
9660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcal_cv_c_void" >&5
9661$as_echo "$gcal_cv_c_void" >&6; }
9662
9663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
9664$as_echo "" >&6; }
9665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library functions..." >&5
9666$as_echo "$as_me: checking for library functions..." >&6;}
9667if test "$gcal_cv_use_pager" = yes; then
9668  for ac_func in dup dup2
9669do :
9670  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9671ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9672if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9673  cat >>confdefs.h <<_ACEOF
9674#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9675_ACEOF
9676
9677fi
9678done
9679
9680fi
9681for ac_func in signal strtol strstr strchr strrchr strcspn strcasecmp strncasecmp setlocale
9682do :
9683  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9684ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9685if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9686  cat >>confdefs.h <<_ACEOF
9687#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9688_ACEOF
9689
9690fi
9691done
9692
9693ac_fn_c_check_func "$LINENO" "tcgetattr" "ac_cv_func_tcgetattr"
9694if test "x$ac_cv_func_tcgetattr" = xyes; then :
9695
9696$as_echo "#define HAVE_TERMIOS_FUNCS 1" >>confdefs.h
9697
9698fi
9699
9700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working system function" >&5
9701$as_echo_n "checking for working system function... " >&6; }
9702if ${gcal_cv_func_system_ok+:} false; then :
9703  $as_echo_n "(cached) " >&6
9704else
9705  if test "$cross_compiling" = yes; then :
9706  gcal_cv_func_system_ok=no
9707else
9708  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9709/* end confdefs.h.  */
9710
9711#    if STDC_HEADERS
9712#      include <stdlib.h>
9713#    endif
9714    int main()
9715    {
9716      int i;
9717      i = system(NULL);
9718      if (!i)
9719        exit(1);
9720      exit(0);
9721    }
9722_ACEOF
9723if ac_fn_c_try_run "$LINENO"; then :
9724  gcal_cv_func_system_ok=yes
9725else
9726  gcal_cv_func_system_ok=no
9727fi
9728rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9729  conftest.$ac_objext conftest.beam conftest.$ac_ext
9730fi
9731
9732fi
9733
9734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcal_cv_func_system_ok" >&5
9735$as_echo "$gcal_cv_func_system_ok" >&6; }
9736if test "$gcal_cv_func_system_ok" = yes; then
9737
9738$as_echo "#define HAVE_SYSTEM 1" >>confdefs.h
9739
9740fi
9741if test "$gcal_cv_use_included_regexps" = no; then
9742        have_regexp=no
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
9744$as_echo "" >&6; }
9745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regular expression functions..." >&5
9746$as_echo "$as_me: checking for regular expression functions..." >&6;}
9747        ac_fn_c_check_func "$LINENO" "re_compile_pattern" "ac_cv_func_re_compile_pattern"
9748if test "x$ac_cv_func_re_compile_pattern" = xyes; then :
9749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: using GNU re_compile_pattern" >&5
9750$as_echo "using GNU re_compile_pattern" >&6; }
9751
9752$as_echo "#define HAVE_GNU_RE_COMPILE_PATTERN 1" >>confdefs.h
9753
9754    have_regexp=yes
9755fi
9756
9757  if test "$have_regexp" = no; then
9758    have_posix_regexp=unknown
9759                    if test "$cross_compiling" = yes; then :
9760  have_posix_regexp=unknown
9761else
9762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9763/* end confdefs.h.  */
9764
9765#      if HAVE_SYS_TYPES_H
9766#        include <sys/types.h>
9767#      endif
9768#      if HAVE_REGEX_H
9769#        include <regex.h>
9770#      endif
9771      int main()
9772      {
9773        regex_t r;
9774        regmatch_t rm;
9775        if (regcomp(&r, "abc", 0))
9776          exit(1);
9777        if (regexec(&r, "xabcy", 1, &rm, 0))
9778          exit(1);
9779        exit(0);
9780      }
9781_ACEOF
9782if ac_fn_c_try_run "$LINENO"; then :
9783  have_posix_regexp=yes
9784else
9785  have_posix_regexp=no
9786fi
9787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9788  conftest.$ac_objext conftest.beam conftest.$ac_ext
9789fi
9790
9791    if test "$have_posix_regexp" = yes; then
9792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: using POSIX regcomp" >&5
9793$as_echo "using POSIX regcomp" >&6; }
9794
9795$as_echo "#define HAVE_POSIX_REGCOMP 1" >>confdefs.h
9796
9797      have_regexp=yes
9798    else
9799      if test "$have_posix_regexp" = unknown; then
9800        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9801/* end confdefs.h.  */
9802
9803#          if HAVE_SYS_TYPES_H
9804#            include <sys/types.h>
9805#          endif
9806#          if HAVE_REGEX_H
9807#            include <regex.h>
9808#          endif
9809int
9810main ()
9811{
9812regex_t *r;
9813           regfree(r);
9814  ;
9815  return 0;
9816}
9817_ACEOF
9818if ac_fn_c_try_link "$LINENO"; then :
9819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: using POSIX regcomp" >&5
9820$as_echo "using POSIX regcomp" >&6; }
9821
9822$as_echo "#define HAVE_POSIX_REGCOMP 1" >>confdefs.h
9823
9824          have_regexp=yes
9825fi
9826rm -f core conftest.err conftest.$ac_objext \
9827    conftest$ac_exeext conftest.$ac_ext
9828      fi
9829    fi
9830    if test "$have_regexp" = no; then
9831      ac_fn_c_check_func "$LINENO" "re_comp" "ac_cv_func_re_comp"
9832if test "x$ac_cv_func_re_comp" = xyes; then :
9833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: using BSD re_comp" >&5
9834$as_echo "using BSD re_comp" >&6; }
9835
9836$as_echo "#define HAVE_RE_COMP 1" >>confdefs.h
9837
9838        have_regexp=yes
9839fi
9840
9841    fi
9842  fi
9843fi
9844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
9845$as_echo "" >&6; }
9846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctype library functions..." >&5
9847$as_echo "$as_me: checking for ctype library functions..." >&6;}
9848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for upper/lower" >&5
9849$as_echo_n "checking for upper/lower... " >&6; }
9850if ${gcal_cv_func_upper_lower+:} false; then :
9851  $as_echo_n "(cached) " >&6
9852else
9853  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9854/* end confdefs.h.  */
9855
9856#    if HAVE_CTYPE_H
9857#      include <ctype.h>
9858#    endif
9859int
9860main ()
9861{
9862static int x; x = tolower(x); x = toupper(x); x = islower(x); x = isupper(x);
9863  ;
9864  return 0;
9865}
9866_ACEOF
9867if ac_fn_c_try_link "$LINENO"; then :
9868  gcal_cv_func_upper_lower=yes
9869else
9870  gcal_cv_func_upper_lower=no
9871fi
9872rm -f core conftest.err conftest.$ac_objext \
9873    conftest$ac_exeext conftest.$ac_ext
9874fi
9875
9876if test "$gcal_cv_func_upper_lower" = yes; then
9877
9878$as_echo "#define HAVE_UPPER_LOWER 1" >>confdefs.h
9879
9880fi
9881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcal_cv_func_upper_lower" >&5
9882$as_echo "$gcal_cv_func_upper_lower" >&6; }
9883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isdigit" >&5
9884$as_echo_n "checking for isdigit... " >&6; }
9885if ${gcal_cv_func_isdigit+:} false; then :
9886  $as_echo_n "(cached) " >&6
9887else
9888  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9889/* end confdefs.h.  */
9890
9891#    if HAVE_CTYPE_H
9892#      include <ctype.h>
9893#    endif
9894int
9895main ()
9896{
9897static int x; x = isdigit(x);
9898  ;
9899  return 0;
9900}
9901_ACEOF
9902if ac_fn_c_try_link "$LINENO"; then :
9903  gcal_cv_func_isdigit=yes
9904else
9905  gcal_cv_func_isdigit=no
9906fi
9907rm -f core conftest.err conftest.$ac_objext \
9908    conftest$ac_exeext conftest.$ac_ext
9909fi
9910
9911if test "$gcal_cv_func_isdigit" = yes; then
9912
9913$as_echo "#define HAVE_ISDIGIT 1" >>confdefs.h
9914
9915fi
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcal_cv_func_isdigit" >&5
9917$as_echo "$gcal_cv_func_isdigit" >&6; }
9918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isalpha" >&5
9919$as_echo_n "checking for isalpha... " >&6; }
9920if ${gcal_cv_func_isalpha+:} false; then :
9921  $as_echo_n "(cached) " >&6
9922else
9923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9924/* end confdefs.h.  */
9925
9926#    if HAVE_CTYPE_H
9927#      include <ctype.h>
9928#    endif
9929int
9930main ()
9931{
9932static int x; x = isalpha(x);
9933  ;
9934  return 0;
9935}
9936_ACEOF
9937if ac_fn_c_try_link "$LINENO"; then :
9938  gcal_cv_func_isalpha=yes
9939else
9940  gcal_cv_func_isalpha=no
9941fi
9942rm -f core conftest.err conftest.$ac_objext \
9943    conftest$ac_exeext conftest.$ac_ext
9944fi
9945
9946if test "$gcal_cv_func_isalpha" = yes; then
9947
9948$as_echo "#define HAVE_ISALPHA 1" >>confdefs.h
9949
9950fi
9951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcal_cv_func_isalpha" >&5
9952$as_echo "$gcal_cv_func_isalpha" >&6; }
9953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isalnum" >&5
9954$as_echo_n "checking for isalnum... " >&6; }
9955if ${gcal_cv_func_isalnum+:} false; then :
9956  $as_echo_n "(cached) " >&6
9957else
9958  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9959/* end confdefs.h.  */
9960
9961#    if HAVE_CTYPE_H
9962#      include <ctype.h>
9963#    endif
9964int
9965main ()
9966{
9967static int x; x = isalnum(x);
9968  ;
9969  return 0;
9970}
9971_ACEOF
9972if ac_fn_c_try_link "$LINENO"; then :
9973  gcal_cv_func_isalnum=yes
9974else
9975  gcal_cv_func_isalnum=no
9976fi
9977rm -f core conftest.err conftest.$ac_objext \
9978    conftest$ac_exeext conftest.$ac_ext
9979fi
9980
9981if test "$gcal_cv_func_isalnum" = yes; then
9982
9983$as_echo "#define HAVE_ISALNUM 1" >>confdefs.h
9984
9985fi
9986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcal_cv_func_isalnum" >&5
9987$as_echo "$gcal_cv_func_isalnum" >&6; }
9988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isspace" >&5
9989$as_echo_n "checking for isspace... " >&6; }
9990if ${gcal_cv_func_isspace+:} false; then :
9991  $as_echo_n "(cached) " >&6
9992else
9993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9994/* end confdefs.h.  */
9995
9996#    if HAVE_CTYPE_H
9997#      include <ctype.h>
9998#    endif
9999int
10000main ()
10001{
10002static int x; x = isspace(x);
10003  ;
10004  return 0;
10005}
10006_ACEOF
10007if ac_fn_c_try_link "$LINENO"; then :
10008  gcal_cv_func_isspace=yes
10009else
10010  gcal_cv_func_isspace=no
10011fi
10012rm -f core conftest.err conftest.$ac_objext \
10013    conftest$ac_exeext conftest.$ac_ext
10014fi
10015
10016if test "$gcal_cv_func_isspace" = yes; then
10017
10018$as_echo "#define HAVE_ISSPACE 1" >>confdefs.h
10019
10020fi
10021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcal_cv_func_isspace" >&5
10022$as_echo "$gcal_cv_func_isspace" >&6; }
10023
10024if test "$gcal_cv_use_term" = yes; then
10025  if test "$gcal_ttylibs_ok" = yes || test "$gcal_libtermlib_ok" = yes; then
10026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
10027$as_echo "" >&6; }
10028    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for external variables..." >&5
10029$as_echo "$as_me: checking for external variables..." >&6;}
10030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking terminal library for ospeed" >&5
10031$as_echo_n "checking terminal library for ospeed... " >&6; }
10032    if ${gcal_cv_var_ospeed_test_1+:} false; then :
10033  $as_echo_n "(cached) " >&6
10034else
10035  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10036/* end confdefs.h.  */
10037
10038#        if HAVE_SYS_TYPES_H
10039#          include <sys/types.h>
10040#        endif
10041#        if HAVE_TERMIOS_H
10042#          include <termios.h>
10043#        endif
10044#        if HAVE_TERMCAP_H
10045#          include <termcap.h>
10046#        endif
10047int
10048main ()
10049{
10050ospeed = 0;
10051  ;
10052  return 0;
10053}
10054_ACEOF
10055if ac_fn_c_try_link "$LINENO"; then :
10056  gcal_cv_var_ospeed_test_1=yes
10057else
10058  gcal_cv_var_ospeed_test_1=no
10059fi
10060rm -f core conftest.err conftest.$ac_objext \
10061    conftest$ac_exeext conftest.$ac_ext
10062fi
10063
10064    if test "$gcal_cv_var_ospeed_test_1" = no; then
10065      if ${gcal_cv_var_ospeed_test_2+:} false; then :
10066  $as_echo_n "(cached) " >&6
10067else
10068  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10069/* end confdefs.h.  */
10070
10071int
10072main ()
10073{
10074extern short ospeed; ospeed = 0;
10075  ;
10076  return 0;
10077}
10078_ACEOF
10079if ac_fn_c_try_link "$LINENO"; then :
10080  gcal_cv_var_ospeed_test_2=yes
10081else
10082  gcal_cv_var_ospeed_test_2=no
10083fi
10084rm -f core conftest.err conftest.$ac_objext \
10085    conftest$ac_exeext conftest.$ac_ext
10086fi
10087
10088    fi
10089    if test "$gcal_cv_var_ospeed_test_1" = yes || test "$gcal_cv_var_ospeed_test_2" = yes; then
10090
10091$as_echo "#define HAVE_OSPEED 1" >>confdefs.h
10092
10093      if test "$gcal_cv_var_ospeed_test_2" = yes; then
10094
10095$as_echo "#define MUST_DCL_OSPEED 1" >>confdefs.h
10096
10097      fi
10098      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10099$as_echo "yes" >&6; }
10100    else
10101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10102$as_echo "no" >&6; }
10103    fi
10104  fi
10105fi
10106
10107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
10108$as_echo "" >&6; }
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for system services..." >&5
10110$as_echo "$as_me: checking for system services..." >&6;}
10111
10112
10113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5
10114$as_echo_n "checking whether #! works in shell scripts... " >&6; }
10115if ${ac_cv_sys_interpreter+:} false; then :
10116  $as_echo_n "(cached) " >&6
10117else
10118  echo '#! /bin/cat
10119exit 69
10120' >conftest
10121chmod u+x conftest
10122(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1)
10123if test $? -ne 69; then
10124   ac_cv_sys_interpreter=yes
10125else
10126   ac_cv_sys_interpreter=no
10127fi
10128rm -f conftest
10129fi
10130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5
10131$as_echo "$ac_cv_sys_interpreter" >&6; }
10132interpval=$ac_cv_sys_interpreter
10133
10134if test "$ac_cv_sys_interpreter" = yes; then
10135
10136$as_echo "#define HAVE_SYS_INTERPRETER 1" >>confdefs.h
10137
10138fi
10139
10140
10141
10142mkdir_p="$MKDIR_P"
10143case $mkdir_p in
10144  [\\/$]* | ?:[\\/]*) ;;
10145  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
10146esac
10147
10148
10149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
10150$as_echo_n "checking whether NLS is requested... " >&6; }
10151    # Check whether --enable-nls was given.
10152if test "${enable_nls+set}" = set; then :
10153  enableval=$enable_nls; USE_NLS=$enableval
10154else
10155  USE_NLS=yes
10156fi
10157
10158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
10159$as_echo "$USE_NLS" >&6; }
10160
10161
10162
10163
10164      GETTEXT_MACRO_VERSION=0.17
10165
10166
10167
10168
10169# Prepare PATH_SEPARATOR.
10170# The user is always right.
10171if test "${PATH_SEPARATOR+set}" != set; then
10172  echo "#! /bin/sh" >conf$$.sh
10173  echo  "exit 0"   >>conf$$.sh
10174  chmod +x conf$$.sh
10175  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10176    PATH_SEPARATOR=';'
10177  else
10178    PATH_SEPARATOR=:
10179  fi
10180  rm -f conf$$.sh
10181fi
10182
10183# Find out how to test for executable files. Don't use a zero-byte file,
10184# as systems may use methods other than mode bits to determine executability.
10185cat >conf$$.file <<_ASEOF
10186#! /bin/sh
10187exit 0
10188_ASEOF
10189chmod +x conf$$.file
10190if test -x conf$$.file >/dev/null 2>&1; then
10191  ac_executable_p="test -x"
10192else
10193  ac_executable_p="test -f"
10194fi
10195rm -f conf$$.file
10196
10197# Extract the first word of "msgfmt", so it can be a program name with args.
10198set dummy msgfmt; ac_word=$2
10199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10200$as_echo_n "checking for $ac_word... " >&6; }
10201if ${ac_cv_path_MSGFMT+:} false; then :
10202  $as_echo_n "(cached) " >&6
10203else
10204  case "$MSGFMT" in
10205  [\\/]* | ?:[\\/]*)
10206    ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
10207    ;;
10208  *)
10209    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
10210    for ac_dir in $PATH; do
10211      IFS="$ac_save_IFS"
10212      test -z "$ac_dir" && ac_dir=.
10213      for ac_exec_ext in '' $ac_executable_extensions; do
10214        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
10215          echo "$as_me: trying $ac_dir/$ac_word..." >&5
10216          if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
10217     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
10218            ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
10219            break 2
10220          fi
10221        fi
10222      done
10223    done
10224    IFS="$ac_save_IFS"
10225  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
10226    ;;
10227esac
10228fi
10229MSGFMT="$ac_cv_path_MSGFMT"
10230if test "$MSGFMT" != ":"; then
10231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
10232$as_echo "$MSGFMT" >&6; }
10233else
10234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10235$as_echo "no" >&6; }
10236fi
10237
10238  # Extract the first word of "gmsgfmt", so it can be a program name with args.
10239set dummy gmsgfmt; ac_word=$2
10240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10241$as_echo_n "checking for $ac_word... " >&6; }
10242if ${ac_cv_path_GMSGFMT+:} false; then :
10243  $as_echo_n "(cached) " >&6
10244else
10245  case $GMSGFMT in
10246  [\\/]* | ?:[\\/]*)
10247  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
10248  ;;
10249  *)
10250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10251for as_dir in $PATH
10252do
10253  IFS=$as_save_IFS
10254  test -z "$as_dir" && as_dir=.
10255    for ac_exec_ext in '' $ac_executable_extensions; do
10256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10257    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
10258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10259    break 2
10260  fi
10261done
10262  done
10263IFS=$as_save_IFS
10264
10265  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
10266  ;;
10267esac
10268fi
10269GMSGFMT=$ac_cv_path_GMSGFMT
10270if test -n "$GMSGFMT"; then
10271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
10272$as_echo "$GMSGFMT" >&6; }
10273else
10274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10275$as_echo "no" >&6; }
10276fi
10277
10278
10279
10280    case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
10281    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
10282    *) MSGFMT_015=$MSGFMT ;;
10283  esac
10284
10285  case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
10286    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
10287    *) GMSGFMT_015=$GMSGFMT ;;
10288  esac
10289
10290
10291
10292# Prepare PATH_SEPARATOR.
10293# The user is always right.
10294if test "${PATH_SEPARATOR+set}" != set; then
10295  echo "#! /bin/sh" >conf$$.sh
10296  echo  "exit 0"   >>conf$$.sh
10297  chmod +x conf$$.sh
10298  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10299    PATH_SEPARATOR=';'
10300  else
10301    PATH_SEPARATOR=:
10302  fi
10303  rm -f conf$$.sh
10304fi
10305
10306# Find out how to test for executable files. Don't use a zero-byte file,
10307# as systems may use methods other than mode bits to determine executability.
10308cat >conf$$.file <<_ASEOF
10309#! /bin/sh
10310exit 0
10311_ASEOF
10312chmod +x conf$$.file
10313if test -x conf$$.file >/dev/null 2>&1; then
10314  ac_executable_p="test -x"
10315else
10316  ac_executable_p="test -f"
10317fi
10318rm -f conf$$.file
10319
10320# Extract the first word of "xgettext", so it can be a program name with args.
10321set dummy xgettext; ac_word=$2
10322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10323$as_echo_n "checking for $ac_word... " >&6; }
10324if ${ac_cv_path_XGETTEXT+:} false; then :
10325  $as_echo_n "(cached) " >&6
10326else
10327  case "$XGETTEXT" in
10328  [\\/]* | ?:[\\/]*)
10329    ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
10330    ;;
10331  *)
10332    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
10333    for ac_dir in $PATH; do
10334      IFS="$ac_save_IFS"
10335      test -z "$ac_dir" && ac_dir=.
10336      for ac_exec_ext in '' $ac_executable_extensions; do
10337        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
10338          echo "$as_me: trying $ac_dir/$ac_word..." >&5
10339          if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
10340     (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
10341            ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
10342            break 2
10343          fi
10344        fi
10345      done
10346    done
10347    IFS="$ac_save_IFS"
10348  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
10349    ;;
10350esac
10351fi
10352XGETTEXT="$ac_cv_path_XGETTEXT"
10353if test "$XGETTEXT" != ":"; then
10354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
10355$as_echo "$XGETTEXT" >&6; }
10356else
10357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10358$as_echo "no" >&6; }
10359fi
10360
10361    rm -f messages.po
10362
10363    case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
10364    '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
10365    *) XGETTEXT_015=$XGETTEXT ;;
10366  esac
10367
10368
10369
10370# Prepare PATH_SEPARATOR.
10371# The user is always right.
10372if test "${PATH_SEPARATOR+set}" != set; then
10373  echo "#! /bin/sh" >conf$$.sh
10374  echo  "exit 0"   >>conf$$.sh
10375  chmod +x conf$$.sh
10376  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10377    PATH_SEPARATOR=';'
10378  else
10379    PATH_SEPARATOR=:
10380  fi
10381  rm -f conf$$.sh
10382fi
10383
10384# Find out how to test for executable files. Don't use a zero-byte file,
10385# as systems may use methods other than mode bits to determine executability.
10386cat >conf$$.file <<_ASEOF
10387#! /bin/sh
10388exit 0
10389_ASEOF
10390chmod +x conf$$.file
10391if test -x conf$$.file >/dev/null 2>&1; then
10392  ac_executable_p="test -x"
10393else
10394  ac_executable_p="test -f"
10395fi
10396rm -f conf$$.file
10397
10398# Extract the first word of "msgmerge", so it can be a program name with args.
10399set dummy msgmerge; ac_word=$2
10400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10401$as_echo_n "checking for $ac_word... " >&6; }
10402if ${ac_cv_path_MSGMERGE+:} false; then :
10403  $as_echo_n "(cached) " >&6
10404else
10405  case "$MSGMERGE" in
10406  [\\/]* | ?:[\\/]*)
10407    ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
10408    ;;
10409  *)
10410    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
10411    for ac_dir in $PATH; do
10412      IFS="$ac_save_IFS"
10413      test -z "$ac_dir" && ac_dir=.
10414      for ac_exec_ext in '' $ac_executable_extensions; do
10415        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
10416          echo "$as_me: trying $ac_dir/$ac_word..." >&5
10417          if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
10418            ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
10419            break 2
10420          fi
10421        fi
10422      done
10423    done
10424    IFS="$ac_save_IFS"
10425  test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
10426    ;;
10427esac
10428fi
10429MSGMERGE="$ac_cv_path_MSGMERGE"
10430if test "$MSGMERGE" != ":"; then
10431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
10432$as_echo "$MSGMERGE" >&6; }
10433else
10434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10435$as_echo "no" >&6; }
10436fi
10437
10438
10439        test -n "$localedir" || localedir='${datadir}/locale'
10440
10441
10442    test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
10443
10444
10445  ac_config_commands="$ac_config_commands po-directories"
10446
10447
10448
10449      if test "X$prefix" = "XNONE"; then
10450    acl_final_prefix="$ac_default_prefix"
10451  else
10452    acl_final_prefix="$prefix"
10453  fi
10454  if test "X$exec_prefix" = "XNONE"; then
10455    acl_final_exec_prefix='${prefix}'
10456  else
10457    acl_final_exec_prefix="$exec_prefix"
10458  fi
10459  acl_save_prefix="$prefix"
10460  prefix="$acl_final_prefix"
10461  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
10462  prefix="$acl_save_prefix"
10463
10464
10465
10466# Check whether --with-gnu-ld was given.
10467if test "${with_gnu_ld+set}" = set; then :
10468  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
10469else
10470  with_gnu_ld=no
10471fi
10472
10473# Prepare PATH_SEPARATOR.
10474# The user is always right.
10475if test "${PATH_SEPARATOR+set}" != set; then
10476  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
10477  # contains only /bin. Note that ksh looks also at the FPATH variable,
10478  # so we have to set that as well for the test.
10479  PATH_SEPARATOR=:
10480  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
10481    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
10482           || PATH_SEPARATOR=';'
10483       }
10484fi
10485
10486ac_prog=ld
10487if test "$GCC" = yes; then
10488  # Check if gcc -print-prog-name=ld gives a path.
10489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
10490$as_echo_n "checking for ld used by $CC... " >&6; }
10491  case $host in
10492  *-*-mingw*)
10493    # gcc leaves a trailing carriage return which upsets mingw
10494    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10495  *)
10496    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10497  esac
10498  case $ac_prog in
10499    # Accept absolute paths.
10500    [\\/]* | ?:[\\/]*)
10501      re_direlt='/[^/][^/]*/\.\./'
10502      # Canonicalize the pathname of ld
10503      ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
10504      while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
10505        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
10506      done
10507      test -z "$LD" && LD="$ac_prog"
10508      ;;
10509  "")
10510    # If it fails, then pretend we aren't using GCC.
10511    ac_prog=ld
10512    ;;
10513  *)
10514    # If it is relative, then search for the first ld in PATH.
10515    with_gnu_ld=unknown
10516    ;;
10517  esac
10518elif test "$with_gnu_ld" = yes; then
10519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
10520$as_echo_n "checking for GNU ld... " >&6; }
10521else
10522  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
10523$as_echo_n "checking for non-GNU ld... " >&6; }
10524fi
10525if ${acl_cv_path_LD+:} false; then :
10526  $as_echo_n "(cached) " >&6
10527else
10528  if test -z "$LD"; then
10529  acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
10530  for ac_dir in $PATH; do
10531    IFS="$acl_save_ifs"
10532    test -z "$ac_dir" && ac_dir=.
10533    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10534      acl_cv_path_LD="$ac_dir/$ac_prog"
10535      # Check to see if the program is GNU ld.  I'd rather use --version,
10536      # but apparently some variants of GNU ld only accept -v.
10537      # Break only if it was the GNU/non-GNU ld that we prefer.
10538      case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
10539      *GNU* | *'with BFD'*)
10540        test "$with_gnu_ld" != no && break
10541        ;;
10542      *)
10543        test "$with_gnu_ld" != yes && break
10544        ;;
10545      esac
10546    fi
10547  done
10548  IFS="$acl_save_ifs"
10549else
10550  acl_cv_path_LD="$LD" # Let the user override the test with a path.
10551fi
10552fi
10553
10554LD="$acl_cv_path_LD"
10555if test -n "$LD"; then
10556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
10557$as_echo "$LD" >&6; }
10558else
10559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10560$as_echo "no" >&6; }
10561fi
10562test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
10563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
10564$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
10565if ${acl_cv_prog_gnu_ld+:} false; then :
10566  $as_echo_n "(cached) " >&6
10567else
10568  # I'd rather use --version here, but apparently some GNU lds only accept -v.
10569case `$LD -v 2>&1 </dev/null` in
10570*GNU* | *'with BFD'*)
10571  acl_cv_prog_gnu_ld=yes
10572  ;;
10573*)
10574  acl_cv_prog_gnu_ld=no
10575  ;;
10576esac
10577fi
10578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
10579$as_echo "$acl_cv_prog_gnu_ld" >&6; }
10580with_gnu_ld=$acl_cv_prog_gnu_ld
10581
10582
10583
10584
10585                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
10586$as_echo_n "checking for shared library run path origin... " >&6; }
10587if ${acl_cv_rpath+:} false; then :
10588  $as_echo_n "(cached) " >&6
10589else
10590
10591    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
10592    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
10593    . ./conftest.sh
10594    rm -f ./conftest.sh
10595    acl_cv_rpath=done
10596
10597fi
10598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
10599$as_echo "$acl_cv_rpath" >&6; }
10600  wl="$acl_cv_wl"
10601  acl_libext="$acl_cv_libext"
10602  acl_shlibext="$acl_cv_shlibext"
10603  acl_libname_spec="$acl_cv_libname_spec"
10604  acl_library_names_spec="$acl_cv_library_names_spec"
10605  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
10606  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
10607  acl_hardcode_direct="$acl_cv_hardcode_direct"
10608  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
10609    # Check whether --enable-rpath was given.
10610if test "${enable_rpath+set}" = set; then :
10611  enableval=$enable_rpath; :
10612else
10613  enable_rpath=yes
10614fi
10615
10616
10617
10618
10619  acl_libdirstem=lib
10620  acl_libdirstem2=
10621  case "$host_os" in
10622    solaris*)
10623                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
10624$as_echo_n "checking for 64-bit host... " >&6; }
10625if ${gl_cv_solaris_64bit+:} false; then :
10626  $as_echo_n "(cached) " >&6
10627else
10628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10629/* end confdefs.h.  */
10630
10631#ifdef _LP64
10632sixtyfour bits
10633#endif
10634
10635_ACEOF
10636if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10637  $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
10638  gl_cv_solaris_64bit=yes
10639else
10640  gl_cv_solaris_64bit=no
10641fi
10642rm -f conftest*
10643
10644
10645fi
10646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
10647$as_echo "$gl_cv_solaris_64bit" >&6; }
10648      if test $gl_cv_solaris_64bit = yes; then
10649        acl_libdirstem=lib/64
10650        case "$host_cpu" in
10651          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
10652          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
10653        esac
10654      fi
10655      ;;
10656    *)
10657      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
10658      if test -n "$searchpath"; then
10659        acl_save_IFS="${IFS= 	}"; IFS=":"
10660        for searchdir in $searchpath; do
10661          if test -d "$searchdir"; then
10662            case "$searchdir" in
10663              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
10664              */../ | */.. )
10665                # Better ignore directories of this form. They are misleading.
10666                ;;
10667              *) searchdir=`cd "$searchdir" && pwd`
10668                 case "$searchdir" in
10669                   */lib64 ) acl_libdirstem=lib64 ;;
10670                 esac ;;
10671            esac
10672          fi
10673        done
10674        IFS="$acl_save_IFS"
10675      fi
10676      ;;
10677  esac
10678  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691    use_additional=yes
10692
10693  acl_save_prefix="$prefix"
10694  prefix="$acl_final_prefix"
10695  acl_save_exec_prefix="$exec_prefix"
10696  exec_prefix="$acl_final_exec_prefix"
10697
10698    eval additional_includedir=\"$includedir\"
10699    eval additional_libdir=\"$libdir\"
10700
10701  exec_prefix="$acl_save_exec_prefix"
10702  prefix="$acl_save_prefix"
10703
10704
10705# Check whether --with-libiconv-prefix was given.
10706if test "${with_libiconv_prefix+set}" = set; then :
10707  withval=$with_libiconv_prefix;
10708    if test "X$withval" = "Xno"; then
10709      use_additional=no
10710    else
10711      if test "X$withval" = "X"; then
10712
10713  acl_save_prefix="$prefix"
10714  prefix="$acl_final_prefix"
10715  acl_save_exec_prefix="$exec_prefix"
10716  exec_prefix="$acl_final_exec_prefix"
10717
10718          eval additional_includedir=\"$includedir\"
10719          eval additional_libdir=\"$libdir\"
10720
10721  exec_prefix="$acl_save_exec_prefix"
10722  prefix="$acl_save_prefix"
10723
10724      else
10725        additional_includedir="$withval/include"
10726        additional_libdir="$withval/$acl_libdirstem"
10727        if test "$acl_libdirstem2" != "$acl_libdirstem" \
10728           && ! test -d "$withval/$acl_libdirstem"; then
10729          additional_libdir="$withval/$acl_libdirstem2"
10730        fi
10731      fi
10732    fi
10733
10734fi
10735
10736      LIBICONV=
10737  LTLIBICONV=
10738  INCICONV=
10739  LIBICONV_PREFIX=
10740      HAVE_LIBICONV=
10741  rpathdirs=
10742  ltrpathdirs=
10743  names_already_handled=
10744  names_next_round='iconv '
10745  while test -n "$names_next_round"; do
10746    names_this_round="$names_next_round"
10747    names_next_round=
10748    for name in $names_this_round; do
10749      already_handled=
10750      for n in $names_already_handled; do
10751        if test "$n" = "$name"; then
10752          already_handled=yes
10753          break
10754        fi
10755      done
10756      if test -z "$already_handled"; then
10757        names_already_handled="$names_already_handled $name"
10758                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
10759        eval value=\"\$HAVE_LIB$uppername\"
10760        if test -n "$value"; then
10761          if test "$value" = yes; then
10762            eval value=\"\$LIB$uppername\"
10763            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
10764            eval value=\"\$LTLIB$uppername\"
10765            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
10766          else
10767                                    :
10768          fi
10769        else
10770                              found_dir=
10771          found_la=
10772          found_so=
10773          found_a=
10774          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
10775          if test -n "$acl_shlibext"; then
10776            shrext=".$acl_shlibext"             # typically: shrext=.so
10777          else
10778            shrext=
10779          fi
10780          if test $use_additional = yes; then
10781            dir="$additional_libdir"
10782                                    if test -n "$acl_shlibext"; then
10783              if test -f "$dir/$libname$shrext"; then
10784                found_dir="$dir"
10785                found_so="$dir/$libname$shrext"
10786              else
10787                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
10788                  ver=`(cd "$dir" && \
10789                        for f in "$libname$shrext".*; do echo "$f"; done \
10790                        | sed -e "s,^$libname$shrext\\\\.,," \
10791                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
10792                        | sed 1q ) 2>/dev/null`
10793                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
10794                    found_dir="$dir"
10795                    found_so="$dir/$libname$shrext.$ver"
10796                  fi
10797                else
10798                  eval library_names=\"$acl_library_names_spec\"
10799                  for f in $library_names; do
10800                    if test -f "$dir/$f"; then
10801                      found_dir="$dir"
10802                      found_so="$dir/$f"
10803                      break
10804                    fi
10805                  done
10806                fi
10807              fi
10808            fi
10809                        if test "X$found_dir" = "X"; then
10810              if test -f "$dir/$libname.$acl_libext"; then
10811                found_dir="$dir"
10812                found_a="$dir/$libname.$acl_libext"
10813              fi
10814            fi
10815            if test "X$found_dir" != "X"; then
10816              if test -f "$dir/$libname.la"; then
10817                found_la="$dir/$libname.la"
10818              fi
10819            fi
10820          fi
10821          if test "X$found_dir" = "X"; then
10822            for x in $LDFLAGS $LTLIBICONV; do
10823
10824  acl_save_prefix="$prefix"
10825  prefix="$acl_final_prefix"
10826  acl_save_exec_prefix="$exec_prefix"
10827  exec_prefix="$acl_final_exec_prefix"
10828  eval x=\"$x\"
10829  exec_prefix="$acl_save_exec_prefix"
10830  prefix="$acl_save_prefix"
10831
10832              case "$x" in
10833                -L*)
10834                  dir=`echo "X$x" | sed -e 's/^X-L//'`
10835                                    if test -n "$acl_shlibext"; then
10836                    if test -f "$dir/$libname$shrext"; then
10837                      found_dir="$dir"
10838                      found_so="$dir/$libname$shrext"
10839                    else
10840                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
10841                        ver=`(cd "$dir" && \
10842                              for f in "$libname$shrext".*; do echo "$f"; done \
10843                              | sed -e "s,^$libname$shrext\\\\.,," \
10844                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
10845                              | sed 1q ) 2>/dev/null`
10846                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
10847                          found_dir="$dir"
10848                          found_so="$dir/$libname$shrext.$ver"
10849                        fi
10850                      else
10851                        eval library_names=\"$acl_library_names_spec\"
10852                        for f in $library_names; do
10853                          if test -f "$dir/$f"; then
10854                            found_dir="$dir"
10855                            found_so="$dir/$f"
10856                            break
10857                          fi
10858                        done
10859                      fi
10860                    fi
10861                  fi
10862                                    if test "X$found_dir" = "X"; then
10863                    if test -f "$dir/$libname.$acl_libext"; then
10864                      found_dir="$dir"
10865                      found_a="$dir/$libname.$acl_libext"
10866                    fi
10867                  fi
10868                  if test "X$found_dir" != "X"; then
10869                    if test -f "$dir/$libname.la"; then
10870                      found_la="$dir/$libname.la"
10871                    fi
10872                  fi
10873                  ;;
10874              esac
10875              if test "X$found_dir" != "X"; then
10876                break
10877              fi
10878            done
10879          fi
10880          if test "X$found_dir" != "X"; then
10881                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
10882            if test "X$found_so" != "X"; then
10883                                                        if test "$enable_rpath" = no \
10884                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
10885                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
10886                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10887              else
10888                                                                                haveit=
10889                for x in $ltrpathdirs; do
10890                  if test "X$x" = "X$found_dir"; then
10891                    haveit=yes
10892                    break
10893                  fi
10894                done
10895                if test -z "$haveit"; then
10896                  ltrpathdirs="$ltrpathdirs $found_dir"
10897                fi
10898                                if test "$acl_hardcode_direct" = yes; then
10899                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10900                else
10901                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
10902                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10903                                                            haveit=
10904                    for x in $rpathdirs; do
10905                      if test "X$x" = "X$found_dir"; then
10906                        haveit=yes
10907                        break
10908                      fi
10909                    done
10910                    if test -z "$haveit"; then
10911                      rpathdirs="$rpathdirs $found_dir"
10912                    fi
10913                  else
10914                                                                                haveit=
10915                    for x in $LDFLAGS $LIBICONV; do
10916
10917  acl_save_prefix="$prefix"
10918  prefix="$acl_final_prefix"
10919  acl_save_exec_prefix="$exec_prefix"
10920  exec_prefix="$acl_final_exec_prefix"
10921  eval x=\"$x\"
10922  exec_prefix="$acl_save_exec_prefix"
10923  prefix="$acl_save_prefix"
10924
10925                      if test "X$x" = "X-L$found_dir"; then
10926                        haveit=yes
10927                        break
10928                      fi
10929                    done
10930                    if test -z "$haveit"; then
10931                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
10932                    fi
10933                    if test "$acl_hardcode_minus_L" != no; then
10934                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
10935                    else
10936                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
10937                    fi
10938                  fi
10939                fi
10940              fi
10941            else
10942              if test "X$found_a" != "X"; then
10943                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
10944              else
10945                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
10946              fi
10947            fi
10948                        additional_includedir=
10949            case "$found_dir" in
10950              */$acl_libdirstem | */$acl_libdirstem/)
10951                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
10952                if test "$name" = 'iconv'; then
10953                  LIBICONV_PREFIX="$basedir"
10954                fi
10955                additional_includedir="$basedir/include"
10956                ;;
10957              */$acl_libdirstem2 | */$acl_libdirstem2/)
10958                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
10959                if test "$name" = 'iconv'; then
10960                  LIBICONV_PREFIX="$basedir"
10961                fi
10962                additional_includedir="$basedir/include"
10963                ;;
10964            esac
10965            if test "X$additional_includedir" != "X"; then
10966                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
10967                haveit=
10968                if test "X$additional_includedir" = "X/usr/local/include"; then
10969                  if test -n "$GCC"; then
10970                    case $host_os in
10971                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
10972                    esac
10973                  fi
10974                fi
10975                if test -z "$haveit"; then
10976                  for x in $CPPFLAGS $INCICONV; do
10977
10978  acl_save_prefix="$prefix"
10979  prefix="$acl_final_prefix"
10980  acl_save_exec_prefix="$exec_prefix"
10981  exec_prefix="$acl_final_exec_prefix"
10982  eval x=\"$x\"
10983  exec_prefix="$acl_save_exec_prefix"
10984  prefix="$acl_save_prefix"
10985
10986                    if test "X$x" = "X-I$additional_includedir"; then
10987                      haveit=yes
10988                      break
10989                    fi
10990                  done
10991                  if test -z "$haveit"; then
10992                    if test -d "$additional_includedir"; then
10993                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
10994                    fi
10995                  fi
10996                fi
10997              fi
10998            fi
10999                        if test -n "$found_la"; then
11000                                                        save_libdir="$libdir"
11001              case "$found_la" in
11002                */* | *\\*) . "$found_la" ;;
11003                *) . "./$found_la" ;;
11004              esac
11005              libdir="$save_libdir"
11006                            for dep in $dependency_libs; do
11007                case "$dep" in
11008                  -L*)
11009                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11010                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
11011                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
11012                      haveit=
11013                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
11014                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
11015                        if test -n "$GCC"; then
11016                          case $host_os in
11017                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
11018                          esac
11019                        fi
11020                      fi
11021                      if test -z "$haveit"; then
11022                        haveit=
11023                        for x in $LDFLAGS $LIBICONV; do
11024
11025  acl_save_prefix="$prefix"
11026  prefix="$acl_final_prefix"
11027  acl_save_exec_prefix="$exec_prefix"
11028  exec_prefix="$acl_final_exec_prefix"
11029  eval x=\"$x\"
11030  exec_prefix="$acl_save_exec_prefix"
11031  prefix="$acl_save_prefix"
11032
11033                          if test "X$x" = "X-L$additional_libdir"; then
11034                            haveit=yes
11035                            break
11036                          fi
11037                        done
11038                        if test -z "$haveit"; then
11039                          if test -d "$additional_libdir"; then
11040                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
11041                          fi
11042                        fi
11043                        haveit=
11044                        for x in $LDFLAGS $LTLIBICONV; do
11045
11046  acl_save_prefix="$prefix"
11047  prefix="$acl_final_prefix"
11048  acl_save_exec_prefix="$exec_prefix"
11049  exec_prefix="$acl_final_exec_prefix"
11050  eval x=\"$x\"
11051  exec_prefix="$acl_save_exec_prefix"
11052  prefix="$acl_save_prefix"
11053
11054                          if test "X$x" = "X-L$additional_libdir"; then
11055                            haveit=yes
11056                            break
11057                          fi
11058                        done
11059                        if test -z "$haveit"; then
11060                          if test -d "$additional_libdir"; then
11061                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
11062                          fi
11063                        fi
11064                      fi
11065                    fi
11066                    ;;
11067                  -R*)
11068                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
11069                    if test "$enable_rpath" != no; then
11070                                                                  haveit=
11071                      for x in $rpathdirs; do
11072                        if test "X$x" = "X$dir"; then
11073                          haveit=yes
11074                          break
11075                        fi
11076                      done
11077                      if test -z "$haveit"; then
11078                        rpathdirs="$rpathdirs $dir"
11079                      fi
11080                                                                  haveit=
11081                      for x in $ltrpathdirs; do
11082                        if test "X$x" = "X$dir"; then
11083                          haveit=yes
11084                          break
11085                        fi
11086                      done
11087                      if test -z "$haveit"; then
11088                        ltrpathdirs="$ltrpathdirs $dir"
11089                      fi
11090                    fi
11091                    ;;
11092                  -l*)
11093                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11094                    ;;
11095                  *.la)
11096                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11097                    ;;
11098                  *)
11099                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
11100                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
11101                    ;;
11102                esac
11103              done
11104            fi
11105          else
11106                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
11107            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
11108          fi
11109        fi
11110      fi
11111    done
11112  done
11113  if test "X$rpathdirs" != "X"; then
11114    if test -n "$acl_hardcode_libdir_separator"; then
11115                        alldirs=
11116      for found_dir in $rpathdirs; do
11117        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
11118      done
11119            acl_save_libdir="$libdir"
11120      libdir="$alldirs"
11121      eval flag=\"$acl_hardcode_libdir_flag_spec\"
11122      libdir="$acl_save_libdir"
11123      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11124    else
11125            for found_dir in $rpathdirs; do
11126        acl_save_libdir="$libdir"
11127        libdir="$found_dir"
11128        eval flag=\"$acl_hardcode_libdir_flag_spec\"
11129        libdir="$acl_save_libdir"
11130        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
11131      done
11132    fi
11133  fi
11134  if test "X$ltrpathdirs" != "X"; then
11135            for found_dir in $ltrpathdirs; do
11136      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
11137    done
11138  fi
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
11170$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
11171if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
11172  $as_echo_n "(cached) " >&6
11173else
11174  gt_save_LIBS="$LIBS"
11175     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
11176     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11177/* end confdefs.h.  */
11178#include <CoreFoundation/CFPreferences.h>
11179int
11180main ()
11181{
11182CFPreferencesCopyAppValue(NULL, NULL)
11183  ;
11184  return 0;
11185}
11186_ACEOF
11187if ac_fn_c_try_link "$LINENO"; then :
11188  gt_cv_func_CFPreferencesCopyAppValue=yes
11189else
11190  gt_cv_func_CFPreferencesCopyAppValue=no
11191fi
11192rm -f core conftest.err conftest.$ac_objext \
11193    conftest$ac_exeext conftest.$ac_ext
11194     LIBS="$gt_save_LIBS"
11195fi
11196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
11197$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
11198  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
11199
11200$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
11201
11202  fi
11203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
11204$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
11205if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
11206  $as_echo_n "(cached) " >&6
11207else
11208  gt_save_LIBS="$LIBS"
11209     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
11210     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11211/* end confdefs.h.  */
11212#include <CoreFoundation/CFLocale.h>
11213int
11214main ()
11215{
11216CFLocaleCopyCurrent();
11217  ;
11218  return 0;
11219}
11220_ACEOF
11221if ac_fn_c_try_link "$LINENO"; then :
11222  gt_cv_func_CFLocaleCopyCurrent=yes
11223else
11224  gt_cv_func_CFLocaleCopyCurrent=no
11225fi
11226rm -f core conftest.err conftest.$ac_objext \
11227    conftest$ac_exeext conftest.$ac_ext
11228     LIBS="$gt_save_LIBS"
11229fi
11230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
11231$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
11232  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
11233
11234$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
11235
11236  fi
11237  INTL_MACOSX_LIBS=
11238  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
11239    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
11240  fi
11241
11242
11243
11244
11245
11246
11247  LIBINTL=
11248  LTLIBINTL=
11249  POSUB=
11250
11251    case " $gt_needs " in
11252    *" need-formatstring-macros "*) gt_api_version=3 ;;
11253    *" need-ngettext "*) gt_api_version=2 ;;
11254    *) gt_api_version=1 ;;
11255  esac
11256  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
11257  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
11258
11259    if test "$USE_NLS" = "yes"; then
11260    gt_use_preinstalled_gnugettext=no
11261
11262
11263        if test $gt_api_version -ge 3; then
11264          gt_revision_test_code='
11265#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
11266#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
11267#endif
11268typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
11269'
11270        else
11271          gt_revision_test_code=
11272        fi
11273        if test $gt_api_version -ge 2; then
11274          gt_expression_test_code=' + * ngettext ("", "", 0)'
11275        else
11276          gt_expression_test_code=
11277        fi
11278
11279        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
11280$as_echo_n "checking for GNU gettext in libc... " >&6; }
11281if eval \${$gt_func_gnugettext_libc+:} false; then :
11282  $as_echo_n "(cached) " >&6
11283else
11284  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11285/* end confdefs.h.  */
11286#include <libintl.h>
11287$gt_revision_test_code
11288extern int _nl_msg_cat_cntr;
11289extern int *_nl_domain_bindings;
11290int
11291main ()
11292{
11293bindtextdomain ("", "");
11294return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
11295  ;
11296  return 0;
11297}
11298_ACEOF
11299if ac_fn_c_try_link "$LINENO"; then :
11300  eval "$gt_func_gnugettext_libc=yes"
11301else
11302  eval "$gt_func_gnugettext_libc=no"
11303fi
11304rm -f core conftest.err conftest.$ac_objext \
11305    conftest$ac_exeext conftest.$ac_ext
11306fi
11307eval ac_res=\$$gt_func_gnugettext_libc
11308	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11309$as_echo "$ac_res" >&6; }
11310
11311        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
11312
11313
11314
11315
11316
11317          am_save_CPPFLAGS="$CPPFLAGS"
11318
11319  for element in $INCICONV; do
11320    haveit=
11321    for x in $CPPFLAGS; do
11322
11323  acl_save_prefix="$prefix"
11324  prefix="$acl_final_prefix"
11325  acl_save_exec_prefix="$exec_prefix"
11326  exec_prefix="$acl_final_exec_prefix"
11327  eval x=\"$x\"
11328  exec_prefix="$acl_save_exec_prefix"
11329  prefix="$acl_save_prefix"
11330
11331      if test "X$x" = "X$element"; then
11332        haveit=yes
11333        break
11334      fi
11335    done
11336    if test -z "$haveit"; then
11337      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
11338    fi
11339  done
11340
11341
11342  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
11343$as_echo_n "checking for iconv... " >&6; }
11344if ${am_cv_func_iconv+:} false; then :
11345  $as_echo_n "(cached) " >&6
11346else
11347
11348    am_cv_func_iconv="no, consider installing GNU libiconv"
11349    am_cv_lib_iconv=no
11350    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11351/* end confdefs.h.  */
11352
11353#include <stdlib.h>
11354#include <iconv.h>
11355
11356int
11357main ()
11358{
11359iconv_t cd = iconv_open("","");
11360           iconv(cd,NULL,NULL,NULL,NULL);
11361           iconv_close(cd);
11362  ;
11363  return 0;
11364}
11365_ACEOF
11366if ac_fn_c_try_link "$LINENO"; then :
11367  am_cv_func_iconv=yes
11368fi
11369rm -f core conftest.err conftest.$ac_objext \
11370    conftest$ac_exeext conftest.$ac_ext
11371    if test "$am_cv_func_iconv" != yes; then
11372      am_save_LIBS="$LIBS"
11373      LIBS="$LIBS $LIBICONV"
11374      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11375/* end confdefs.h.  */
11376
11377#include <stdlib.h>
11378#include <iconv.h>
11379
11380int
11381main ()
11382{
11383iconv_t cd = iconv_open("","");
11384             iconv(cd,NULL,NULL,NULL,NULL);
11385             iconv_close(cd);
11386  ;
11387  return 0;
11388}
11389_ACEOF
11390if ac_fn_c_try_link "$LINENO"; then :
11391  am_cv_lib_iconv=yes
11392        am_cv_func_iconv=yes
11393fi
11394rm -f core conftest.err conftest.$ac_objext \
11395    conftest$ac_exeext conftest.$ac_ext
11396      LIBS="$am_save_LIBS"
11397    fi
11398
11399fi
11400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
11401$as_echo "$am_cv_func_iconv" >&6; }
11402  if test "$am_cv_func_iconv" = yes; then
11403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
11404$as_echo_n "checking for working iconv... " >&6; }
11405if ${am_cv_func_iconv_works+:} false; then :
11406  $as_echo_n "(cached) " >&6
11407else
11408
11409                  am_save_LIBS="$LIBS"
11410      if test $am_cv_lib_iconv = yes; then
11411        LIBS="$LIBS $LIBICONV"
11412      fi
11413      am_cv_func_iconv_works=no
11414      for ac_iconv_const in '' 'const'; do
11415        if test "$cross_compiling" = yes; then :
11416  case "$host_os" in
11417             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
11418             *)            am_cv_func_iconv_works="guessing yes" ;;
11419           esac
11420else
11421  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11422/* end confdefs.h.  */
11423
11424#include <iconv.h>
11425#include <string.h>
11426
11427#ifndef ICONV_CONST
11428# define ICONV_CONST $ac_iconv_const
11429#endif
11430
11431int
11432main ()
11433{
11434int result = 0;
11435  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
11436     returns.  */
11437  {
11438    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
11439    if (cd_utf8_to_88591 != (iconv_t)(-1))
11440      {
11441        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
11442        char buf[10];
11443        ICONV_CONST char *inptr = input;
11444        size_t inbytesleft = strlen (input);
11445        char *outptr = buf;
11446        size_t outbytesleft = sizeof (buf);
11447        size_t res = iconv (cd_utf8_to_88591,
11448                            &inptr, &inbytesleft,
11449                            &outptr, &outbytesleft);
11450        if (res == 0)
11451          result |= 1;
11452        iconv_close (cd_utf8_to_88591);
11453      }
11454  }
11455  /* Test against Solaris 10 bug: Failures are not distinguishable from
11456     successful returns.  */
11457  {
11458    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
11459    if (cd_ascii_to_88591 != (iconv_t)(-1))
11460      {
11461        static ICONV_CONST char input[] = "\263";
11462        char buf[10];
11463        ICONV_CONST char *inptr = input;
11464        size_t inbytesleft = strlen (input);
11465        char *outptr = buf;
11466        size_t outbytesleft = sizeof (buf);
11467        size_t res = iconv (cd_ascii_to_88591,
11468                            &inptr, &inbytesleft,
11469                            &outptr, &outbytesleft);
11470        if (res == 0)
11471          result |= 2;
11472        iconv_close (cd_ascii_to_88591);
11473      }
11474  }
11475  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
11476  {
11477    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
11478    if (cd_88591_to_utf8 != (iconv_t)(-1))
11479      {
11480        static ICONV_CONST char input[] = "\304";
11481        static char buf[2] = { (char)0xDE, (char)0xAD };
11482        ICONV_CONST char *inptr = input;
11483        size_t inbytesleft = 1;
11484        char *outptr = buf;
11485        size_t outbytesleft = 1;
11486        size_t res = iconv (cd_88591_to_utf8,
11487                            &inptr, &inbytesleft,
11488                            &outptr, &outbytesleft);
11489        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
11490          result |= 4;
11491        iconv_close (cd_88591_to_utf8);
11492      }
11493  }
11494#if 0 /* This bug could be worked around by the caller.  */
11495  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
11496  {
11497    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
11498    if (cd_88591_to_utf8 != (iconv_t)(-1))
11499      {
11500        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
11501        char buf[50];
11502        ICONV_CONST char *inptr = input;
11503        size_t inbytesleft = strlen (input);
11504        char *outptr = buf;
11505        size_t outbytesleft = sizeof (buf);
11506        size_t res = iconv (cd_88591_to_utf8,
11507                            &inptr, &inbytesleft,
11508                            &outptr, &outbytesleft);
11509        if ((int)res > 0)
11510          result |= 8;
11511        iconv_close (cd_88591_to_utf8);
11512      }
11513  }
11514#endif
11515  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
11516     provided.  */
11517  if (/* Try standardized names.  */
11518      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
11519      /* Try IRIX, OSF/1 names.  */
11520      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
11521      /* Try AIX names.  */
11522      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
11523      /* Try HP-UX names.  */
11524      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
11525    result |= 16;
11526  return result;
11527
11528  ;
11529  return 0;
11530}
11531_ACEOF
11532if ac_fn_c_try_run "$LINENO"; then :
11533  am_cv_func_iconv_works=yes
11534fi
11535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11536  conftest.$ac_objext conftest.beam conftest.$ac_ext
11537fi
11538
11539        test "$am_cv_func_iconv_works" = no || break
11540      done
11541      LIBS="$am_save_LIBS"
11542
11543fi
11544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
11545$as_echo "$am_cv_func_iconv_works" >&6; }
11546    case "$am_cv_func_iconv_works" in
11547      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
11548      *)   am_func_iconv=yes ;;
11549    esac
11550  else
11551    am_func_iconv=no am_cv_lib_iconv=no
11552  fi
11553  if test "$am_func_iconv" = yes; then
11554
11555$as_echo "#define HAVE_ICONV 1" >>confdefs.h
11556
11557  fi
11558  if test "$am_cv_lib_iconv" = yes; then
11559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
11560$as_echo_n "checking how to link with libiconv... " >&6; }
11561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
11562$as_echo "$LIBICONV" >&6; }
11563  else
11564            CPPFLAGS="$am_save_CPPFLAGS"
11565    LIBICONV=
11566    LTLIBICONV=
11567  fi
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579    use_additional=yes
11580
11581  acl_save_prefix="$prefix"
11582  prefix="$acl_final_prefix"
11583  acl_save_exec_prefix="$exec_prefix"
11584  exec_prefix="$acl_final_exec_prefix"
11585
11586    eval additional_includedir=\"$includedir\"
11587    eval additional_libdir=\"$libdir\"
11588
11589  exec_prefix="$acl_save_exec_prefix"
11590  prefix="$acl_save_prefix"
11591
11592
11593# Check whether --with-libintl-prefix was given.
11594if test "${with_libintl_prefix+set}" = set; then :
11595  withval=$with_libintl_prefix;
11596    if test "X$withval" = "Xno"; then
11597      use_additional=no
11598    else
11599      if test "X$withval" = "X"; then
11600
11601  acl_save_prefix="$prefix"
11602  prefix="$acl_final_prefix"
11603  acl_save_exec_prefix="$exec_prefix"
11604  exec_prefix="$acl_final_exec_prefix"
11605
11606          eval additional_includedir=\"$includedir\"
11607          eval additional_libdir=\"$libdir\"
11608
11609  exec_prefix="$acl_save_exec_prefix"
11610  prefix="$acl_save_prefix"
11611
11612      else
11613        additional_includedir="$withval/include"
11614        additional_libdir="$withval/$acl_libdirstem"
11615        if test "$acl_libdirstem2" != "$acl_libdirstem" \
11616           && ! test -d "$withval/$acl_libdirstem"; then
11617          additional_libdir="$withval/$acl_libdirstem2"
11618        fi
11619      fi
11620    fi
11621
11622fi
11623
11624      LIBINTL=
11625  LTLIBINTL=
11626  INCINTL=
11627  LIBINTL_PREFIX=
11628      HAVE_LIBINTL=
11629  rpathdirs=
11630  ltrpathdirs=
11631  names_already_handled=
11632  names_next_round='intl '
11633  while test -n "$names_next_round"; do
11634    names_this_round="$names_next_round"
11635    names_next_round=
11636    for name in $names_this_round; do
11637      already_handled=
11638      for n in $names_already_handled; do
11639        if test "$n" = "$name"; then
11640          already_handled=yes
11641          break
11642        fi
11643      done
11644      if test -z "$already_handled"; then
11645        names_already_handled="$names_already_handled $name"
11646                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
11647        eval value=\"\$HAVE_LIB$uppername\"
11648        if test -n "$value"; then
11649          if test "$value" = yes; then
11650            eval value=\"\$LIB$uppername\"
11651            test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
11652            eval value=\"\$LTLIB$uppername\"
11653            test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
11654          else
11655                                    :
11656          fi
11657        else
11658                              found_dir=
11659          found_la=
11660          found_so=
11661          found_a=
11662          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
11663          if test -n "$acl_shlibext"; then
11664            shrext=".$acl_shlibext"             # typically: shrext=.so
11665          else
11666            shrext=
11667          fi
11668          if test $use_additional = yes; then
11669            dir="$additional_libdir"
11670                                    if test -n "$acl_shlibext"; then
11671              if test -f "$dir/$libname$shrext"; then
11672                found_dir="$dir"
11673                found_so="$dir/$libname$shrext"
11674              else
11675                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11676                  ver=`(cd "$dir" && \
11677                        for f in "$libname$shrext".*; do echo "$f"; done \
11678                        | sed -e "s,^$libname$shrext\\\\.,," \
11679                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
11680                        | sed 1q ) 2>/dev/null`
11681                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
11682                    found_dir="$dir"
11683                    found_so="$dir/$libname$shrext.$ver"
11684                  fi
11685                else
11686                  eval library_names=\"$acl_library_names_spec\"
11687                  for f in $library_names; do
11688                    if test -f "$dir/$f"; then
11689                      found_dir="$dir"
11690                      found_so="$dir/$f"
11691                      break
11692                    fi
11693                  done
11694                fi
11695              fi
11696            fi
11697                        if test "X$found_dir" = "X"; then
11698              if test -f "$dir/$libname.$acl_libext"; then
11699                found_dir="$dir"
11700                found_a="$dir/$libname.$acl_libext"
11701              fi
11702            fi
11703            if test "X$found_dir" != "X"; then
11704              if test -f "$dir/$libname.la"; then
11705                found_la="$dir/$libname.la"
11706              fi
11707            fi
11708          fi
11709          if test "X$found_dir" = "X"; then
11710            for x in $LDFLAGS $LTLIBINTL; do
11711
11712  acl_save_prefix="$prefix"
11713  prefix="$acl_final_prefix"
11714  acl_save_exec_prefix="$exec_prefix"
11715  exec_prefix="$acl_final_exec_prefix"
11716  eval x=\"$x\"
11717  exec_prefix="$acl_save_exec_prefix"
11718  prefix="$acl_save_prefix"
11719
11720              case "$x" in
11721                -L*)
11722                  dir=`echo "X$x" | sed -e 's/^X-L//'`
11723                                    if test -n "$acl_shlibext"; then
11724                    if test -f "$dir/$libname$shrext"; then
11725                      found_dir="$dir"
11726                      found_so="$dir/$libname$shrext"
11727                    else
11728                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11729                        ver=`(cd "$dir" && \
11730                              for f in "$libname$shrext".*; do echo "$f"; done \
11731                              | sed -e "s,^$libname$shrext\\\\.,," \
11732                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
11733                              | sed 1q ) 2>/dev/null`
11734                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
11735                          found_dir="$dir"
11736                          found_so="$dir/$libname$shrext.$ver"
11737                        fi
11738                      else
11739                        eval library_names=\"$acl_library_names_spec\"
11740                        for f in $library_names; do
11741                          if test -f "$dir/$f"; then
11742                            found_dir="$dir"
11743                            found_so="$dir/$f"
11744                            break
11745                          fi
11746                        done
11747                      fi
11748                    fi
11749                  fi
11750                                    if test "X$found_dir" = "X"; then
11751                    if test -f "$dir/$libname.$acl_libext"; then
11752                      found_dir="$dir"
11753                      found_a="$dir/$libname.$acl_libext"
11754                    fi
11755                  fi
11756                  if test "X$found_dir" != "X"; then
11757                    if test -f "$dir/$libname.la"; then
11758                      found_la="$dir/$libname.la"
11759                    fi
11760                  fi
11761                  ;;
11762              esac
11763              if test "X$found_dir" != "X"; then
11764                break
11765              fi
11766            done
11767          fi
11768          if test "X$found_dir" != "X"; then
11769                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
11770            if test "X$found_so" != "X"; then
11771                                                        if test "$enable_rpath" = no \
11772                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
11773                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
11774                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
11775              else
11776                                                                                haveit=
11777                for x in $ltrpathdirs; do
11778                  if test "X$x" = "X$found_dir"; then
11779                    haveit=yes
11780                    break
11781                  fi
11782                done
11783                if test -z "$haveit"; then
11784                  ltrpathdirs="$ltrpathdirs $found_dir"
11785                fi
11786                                if test "$acl_hardcode_direct" = yes; then
11787                                                      LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
11788                else
11789                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
11790                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
11791                                                            haveit=
11792                    for x in $rpathdirs; do
11793                      if test "X$x" = "X$found_dir"; then
11794                        haveit=yes
11795                        break
11796                      fi
11797                    done
11798                    if test -z "$haveit"; then
11799                      rpathdirs="$rpathdirs $found_dir"
11800                    fi
11801                  else
11802                                                                                haveit=
11803                    for x in $LDFLAGS $LIBINTL; do
11804
11805  acl_save_prefix="$prefix"
11806  prefix="$acl_final_prefix"
11807  acl_save_exec_prefix="$exec_prefix"
11808  exec_prefix="$acl_final_exec_prefix"
11809  eval x=\"$x\"
11810  exec_prefix="$acl_save_exec_prefix"
11811  prefix="$acl_save_prefix"
11812
11813                      if test "X$x" = "X-L$found_dir"; then
11814                        haveit=yes
11815                        break
11816                      fi
11817                    done
11818                    if test -z "$haveit"; then
11819                      LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
11820                    fi
11821                    if test "$acl_hardcode_minus_L" != no; then
11822                                                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
11823                    else
11824                                                                                                                                                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
11825                    fi
11826                  fi
11827                fi
11828              fi
11829            else
11830              if test "X$found_a" != "X"; then
11831                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
11832              else
11833                                                LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
11834              fi
11835            fi
11836                        additional_includedir=
11837            case "$found_dir" in
11838              */$acl_libdirstem | */$acl_libdirstem/)
11839                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
11840                if test "$name" = 'intl'; then
11841                  LIBINTL_PREFIX="$basedir"
11842                fi
11843                additional_includedir="$basedir/include"
11844                ;;
11845              */$acl_libdirstem2 | */$acl_libdirstem2/)
11846                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
11847                if test "$name" = 'intl'; then
11848                  LIBINTL_PREFIX="$basedir"
11849                fi
11850                additional_includedir="$basedir/include"
11851                ;;
11852            esac
11853            if test "X$additional_includedir" != "X"; then
11854                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
11855                haveit=
11856                if test "X$additional_includedir" = "X/usr/local/include"; then
11857                  if test -n "$GCC"; then
11858                    case $host_os in
11859                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
11860                    esac
11861                  fi
11862                fi
11863                if test -z "$haveit"; then
11864                  for x in $CPPFLAGS $INCINTL; do
11865
11866  acl_save_prefix="$prefix"
11867  prefix="$acl_final_prefix"
11868  acl_save_exec_prefix="$exec_prefix"
11869  exec_prefix="$acl_final_exec_prefix"
11870  eval x=\"$x\"
11871  exec_prefix="$acl_save_exec_prefix"
11872  prefix="$acl_save_prefix"
11873
11874                    if test "X$x" = "X-I$additional_includedir"; then
11875                      haveit=yes
11876                      break
11877                    fi
11878                  done
11879                  if test -z "$haveit"; then
11880                    if test -d "$additional_includedir"; then
11881                                            INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
11882                    fi
11883                  fi
11884                fi
11885              fi
11886            fi
11887                        if test -n "$found_la"; then
11888                                                        save_libdir="$libdir"
11889              case "$found_la" in
11890                */* | *\\*) . "$found_la" ;;
11891                *) . "./$found_la" ;;
11892              esac
11893              libdir="$save_libdir"
11894                            for dep in $dependency_libs; do
11895                case "$dep" in
11896                  -L*)
11897                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
11898                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
11899                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
11900                      haveit=
11901                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
11902                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
11903                        if test -n "$GCC"; then
11904                          case $host_os in
11905                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
11906                          esac
11907                        fi
11908                      fi
11909                      if test -z "$haveit"; then
11910                        haveit=
11911                        for x in $LDFLAGS $LIBINTL; do
11912
11913  acl_save_prefix="$prefix"
11914  prefix="$acl_final_prefix"
11915  acl_save_exec_prefix="$exec_prefix"
11916  exec_prefix="$acl_final_exec_prefix"
11917  eval x=\"$x\"
11918  exec_prefix="$acl_save_exec_prefix"
11919  prefix="$acl_save_prefix"
11920
11921                          if test "X$x" = "X-L$additional_libdir"; then
11922                            haveit=yes
11923                            break
11924                          fi
11925                        done
11926                        if test -z "$haveit"; then
11927                          if test -d "$additional_libdir"; then
11928                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
11929                          fi
11930                        fi
11931                        haveit=
11932                        for x in $LDFLAGS $LTLIBINTL; do
11933
11934  acl_save_prefix="$prefix"
11935  prefix="$acl_final_prefix"
11936  acl_save_exec_prefix="$exec_prefix"
11937  exec_prefix="$acl_final_exec_prefix"
11938  eval x=\"$x\"
11939  exec_prefix="$acl_save_exec_prefix"
11940  prefix="$acl_save_prefix"
11941
11942                          if test "X$x" = "X-L$additional_libdir"; then
11943                            haveit=yes
11944                            break
11945                          fi
11946                        done
11947                        if test -z "$haveit"; then
11948                          if test -d "$additional_libdir"; then
11949                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
11950                          fi
11951                        fi
11952                      fi
11953                    fi
11954                    ;;
11955                  -R*)
11956                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
11957                    if test "$enable_rpath" != no; then
11958                                                                  haveit=
11959                      for x in $rpathdirs; do
11960                        if test "X$x" = "X$dir"; then
11961                          haveit=yes
11962                          break
11963                        fi
11964                      done
11965                      if test -z "$haveit"; then
11966                        rpathdirs="$rpathdirs $dir"
11967                      fi
11968                                                                  haveit=
11969                      for x in $ltrpathdirs; do
11970                        if test "X$x" = "X$dir"; then
11971                          haveit=yes
11972                          break
11973                        fi
11974                      done
11975                      if test -z "$haveit"; then
11976                        ltrpathdirs="$ltrpathdirs $dir"
11977                      fi
11978                    fi
11979                    ;;
11980                  -l*)
11981                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
11982                    ;;
11983                  *.la)
11984                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
11985                    ;;
11986                  *)
11987                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
11988                    LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
11989                    ;;
11990                esac
11991              done
11992            fi
11993          else
11994                                                            LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
11995            LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
11996          fi
11997        fi
11998      fi
11999    done
12000  done
12001  if test "X$rpathdirs" != "X"; then
12002    if test -n "$acl_hardcode_libdir_separator"; then
12003                        alldirs=
12004      for found_dir in $rpathdirs; do
12005        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
12006      done
12007            acl_save_libdir="$libdir"
12008      libdir="$alldirs"
12009      eval flag=\"$acl_hardcode_libdir_flag_spec\"
12010      libdir="$acl_save_libdir"
12011      LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
12012    else
12013            for found_dir in $rpathdirs; do
12014        acl_save_libdir="$libdir"
12015        libdir="$found_dir"
12016        eval flag=\"$acl_hardcode_libdir_flag_spec\"
12017        libdir="$acl_save_libdir"
12018        LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
12019      done
12020    fi
12021  fi
12022  if test "X$ltrpathdirs" != "X"; then
12023            for found_dir in $ltrpathdirs; do
12024      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
12025    done
12026  fi
12027
12028
12029
12030
12031
12032
12033          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
12034$as_echo_n "checking for GNU gettext in libintl... " >&6; }
12035if eval \${$gt_func_gnugettext_libintl+:} false; then :
12036  $as_echo_n "(cached) " >&6
12037else
12038  gt_save_CPPFLAGS="$CPPFLAGS"
12039            CPPFLAGS="$CPPFLAGS $INCINTL"
12040            gt_save_LIBS="$LIBS"
12041            LIBS="$LIBS $LIBINTL"
12042                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12043/* end confdefs.h.  */
12044#include <libintl.h>
12045$gt_revision_test_code
12046extern int _nl_msg_cat_cntr;
12047extern
12048#ifdef __cplusplus
12049"C"
12050#endif
12051const char *_nl_expand_alias (const char *);
12052int
12053main ()
12054{
12055bindtextdomain ("", "");
12056return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
12057  ;
12058  return 0;
12059}
12060_ACEOF
12061if ac_fn_c_try_link "$LINENO"; then :
12062  eval "$gt_func_gnugettext_libintl=yes"
12063else
12064  eval "$gt_func_gnugettext_libintl=no"
12065fi
12066rm -f core conftest.err conftest.$ac_objext \
12067    conftest$ac_exeext conftest.$ac_ext
12068                        if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
12069              LIBS="$LIBS $LIBICONV"
12070              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12071/* end confdefs.h.  */
12072#include <libintl.h>
12073$gt_revision_test_code
12074extern int _nl_msg_cat_cntr;
12075extern
12076#ifdef __cplusplus
12077"C"
12078#endif
12079const char *_nl_expand_alias (const char *);
12080int
12081main ()
12082{
12083bindtextdomain ("", "");
12084return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
12085  ;
12086  return 0;
12087}
12088_ACEOF
12089if ac_fn_c_try_link "$LINENO"; then :
12090  LIBINTL="$LIBINTL $LIBICONV"
12091                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
12092                eval "$gt_func_gnugettext_libintl=yes"
12093
12094fi
12095rm -f core conftest.err conftest.$ac_objext \
12096    conftest$ac_exeext conftest.$ac_ext
12097            fi
12098            CPPFLAGS="$gt_save_CPPFLAGS"
12099            LIBS="$gt_save_LIBS"
12100fi
12101eval ac_res=\$$gt_func_gnugettext_libintl
12102	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12103$as_echo "$ac_res" >&6; }
12104        fi
12105
12106                                        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
12107           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
12108                && test "$PACKAGE" != gettext-runtime \
12109                && test "$PACKAGE" != gettext-tools; }; then
12110          gt_use_preinstalled_gnugettext=yes
12111        else
12112                    LIBINTL=
12113          LTLIBINTL=
12114          INCINTL=
12115        fi
12116
12117
12118
12119    if test -n "$INTL_MACOSX_LIBS"; then
12120      if test "$gt_use_preinstalled_gnugettext" = "yes" \
12121         || test "$nls_cv_use_gnu_gettext" = "yes"; then
12122                LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
12123        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
12124      fi
12125    fi
12126
12127    if test "$gt_use_preinstalled_gnugettext" = "yes" \
12128       || test "$nls_cv_use_gnu_gettext" = "yes"; then
12129
12130$as_echo "#define ENABLE_NLS 1" >>confdefs.h
12131
12132    else
12133      USE_NLS=no
12134    fi
12135  fi
12136
12137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
12138$as_echo_n "checking whether to use NLS... " >&6; }
12139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
12140$as_echo "$USE_NLS" >&6; }
12141  if test "$USE_NLS" = "yes"; then
12142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
12143$as_echo_n "checking where the gettext function comes from... " >&6; }
12144    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
12145      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
12146        gt_source="external libintl"
12147      else
12148        gt_source="libc"
12149      fi
12150    else
12151      gt_source="included intl directory"
12152    fi
12153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
12154$as_echo "$gt_source" >&6; }
12155  fi
12156
12157  if test "$USE_NLS" = "yes"; then
12158
12159    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
12160      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
12161        { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
12162$as_echo_n "checking how to link with libintl... " >&6; }
12163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
12164$as_echo "$LIBINTL" >&6; }
12165
12166  for element in $INCINTL; do
12167    haveit=
12168    for x in $CPPFLAGS; do
12169
12170  acl_save_prefix="$prefix"
12171  prefix="$acl_final_prefix"
12172  acl_save_exec_prefix="$exec_prefix"
12173  exec_prefix="$acl_final_exec_prefix"
12174  eval x=\"$x\"
12175  exec_prefix="$acl_save_exec_prefix"
12176  prefix="$acl_save_prefix"
12177
12178      if test "X$x" = "X$element"; then
12179        haveit=yes
12180        break
12181      fi
12182    done
12183    if test -z "$haveit"; then
12184      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12185    fi
12186  done
12187
12188      fi
12189
12190
12191$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
12192
12193
12194$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
12195
12196    fi
12197
12198        POSUB=po
12199  fi
12200
12201
12202
12203    INTLLIBS="$LIBINTL"
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216          LIBC_FATAL_STDERR_=1
12217  export LIBC_FATAL_STDERR_
12218
12219
12220
12221
12222
12223
12224  POW_LIBM=
12225  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pow can be used without linking with libm" >&5
12226$as_echo_n "checking whether pow can be used without linking with libm... " >&6; }
12227if ${gl_cv_func_pow_no_libm+:} false; then :
12228  $as_echo_n "(cached) " >&6
12229else
12230
12231      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12232/* end confdefs.h.  */
12233#ifndef __NO_MATH_INLINES
12234             # define __NO_MATH_INLINES 1 /* for glibc */
12235             #endif
12236             #include <math.h>
12237
12238             double (*funcptr) (double, double) = pow;
12239             int i_ret;
12240             float f_ret;
12241             double d_ret;
12242             long double l_ret;
12243int
12244main ()
12245{
12246double y = funcptr (1.6180339887, 1.6180339887) + pow (1.6180339887, 1.6180339887);
12247
12248             return y < 0.3 || y > 1.7;
12249
12250  ;
12251  return 0;
12252}
12253_ACEOF
12254if ac_fn_c_try_link "$LINENO"; then :
12255  gl_cv_func_pow_no_libm=yes
12256else
12257  gl_cv_func_pow_no_libm=no
12258fi
12259rm -f core conftest.err conftest.$ac_objext \
12260    conftest$ac_exeext conftest.$ac_ext
12261
12262fi
12263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pow_no_libm" >&5
12264$as_echo "$gl_cv_func_pow_no_libm" >&6; }
12265  if test $gl_cv_func_pow_no_libm = no; then
12266    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pow can be used with libm" >&5
12267$as_echo_n "checking whether pow can be used with libm... " >&6; }
12268if ${gl_cv_func_pow_in_libm+:} false; then :
12269  $as_echo_n "(cached) " >&6
12270else
12271
12272        save_LIBS="$LIBS"
12273        LIBS="$LIBS -lm"
12274        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12275/* end confdefs.h.  */
12276#ifndef __NO_MATH_INLINES
12277               # define __NO_MATH_INLINES 1 /* for glibc */
12278               #endif
12279               #include <math.h>
12280
12281               double (*funcptr) (double, double) = pow;
12282               int i_ret;
12283               float f_ret;
12284               double d_ret;
12285               long double l_ret;
12286int
12287main ()
12288{
12289double y = funcptr (1.6180339887, 1.6180339887) + pow (1.6180339887, 1.6180339887);
12290
12291               return y < 0.3 || y > 1.7;
12292
12293  ;
12294  return 0;
12295}
12296_ACEOF
12297if ac_fn_c_try_link "$LINENO"; then :
12298  gl_cv_func_pow_in_libm=yes
12299else
12300  gl_cv_func_pow_in_libm=no
12301fi
12302rm -f core conftest.err conftest.$ac_objext \
12303    conftest$ac_exeext conftest.$ac_ext
12304        LIBS="$save_LIBS"
12305
12306fi
12307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pow_in_libm" >&5
12308$as_echo "$gl_cv_func_pow_in_libm" >&6; }
12309    if test $gl_cv_func_pow_in_libm = yes; then
12310      POW_LIBM=-lm
12311    fi
12312  fi
12313
12314
12315
12316
12317
12318
12319
12320  GNULIB_BTOWC=0;
12321  GNULIB_WCTOB=0;
12322  GNULIB_MBSINIT=0;
12323  GNULIB_MBRTOWC=0;
12324  GNULIB_MBRLEN=0;
12325  GNULIB_MBSRTOWCS=0;
12326  GNULIB_MBSNRTOWCS=0;
12327  GNULIB_WCRTOMB=0;
12328  GNULIB_WCSRTOMBS=0;
12329  GNULIB_WCSNRTOMBS=0;
12330  GNULIB_WCWIDTH=0;
12331  GNULIB_WMEMCHR=0;
12332  GNULIB_WMEMCMP=0;
12333  GNULIB_WMEMCPY=0;
12334  GNULIB_WMEMMOVE=0;
12335  GNULIB_WMEMSET=0;
12336  GNULIB_WCSLEN=0;
12337  GNULIB_WCSNLEN=0;
12338  GNULIB_WCSCPY=0;
12339  GNULIB_WCPCPY=0;
12340  GNULIB_WCSNCPY=0;
12341  GNULIB_WCPNCPY=0;
12342  GNULIB_WCSCAT=0;
12343  GNULIB_WCSNCAT=0;
12344  GNULIB_WCSCMP=0;
12345  GNULIB_WCSNCMP=0;
12346  GNULIB_WCSCASECMP=0;
12347  GNULIB_WCSNCASECMP=0;
12348  GNULIB_WCSCOLL=0;
12349  GNULIB_WCSXFRM=0;
12350  GNULIB_WCSDUP=0;
12351  GNULIB_WCSCHR=0;
12352  GNULIB_WCSRCHR=0;
12353  GNULIB_WCSCSPN=0;
12354  GNULIB_WCSSPN=0;
12355  GNULIB_WCSPBRK=0;
12356  GNULIB_WCSSTR=0;
12357  GNULIB_WCSTOK=0;
12358  GNULIB_WCSWIDTH=0;
12359    HAVE_BTOWC=1;
12360  HAVE_MBSINIT=1;
12361  HAVE_MBRTOWC=1;
12362  HAVE_MBRLEN=1;
12363  HAVE_MBSRTOWCS=1;
12364  HAVE_MBSNRTOWCS=1;
12365  HAVE_WCRTOMB=1;
12366  HAVE_WCSRTOMBS=1;
12367  HAVE_WCSNRTOMBS=1;
12368  HAVE_WMEMCHR=1;
12369  HAVE_WMEMCMP=1;
12370  HAVE_WMEMCPY=1;
12371  HAVE_WMEMMOVE=1;
12372  HAVE_WMEMSET=1;
12373  HAVE_WCSLEN=1;
12374  HAVE_WCSNLEN=1;
12375  HAVE_WCSCPY=1;
12376  HAVE_WCPCPY=1;
12377  HAVE_WCSNCPY=1;
12378  HAVE_WCPNCPY=1;
12379  HAVE_WCSCAT=1;
12380  HAVE_WCSNCAT=1;
12381  HAVE_WCSCMP=1;
12382  HAVE_WCSNCMP=1;
12383  HAVE_WCSCASECMP=1;
12384  HAVE_WCSNCASECMP=1;
12385  HAVE_WCSCOLL=1;
12386  HAVE_WCSXFRM=1;
12387  HAVE_WCSDUP=1;
12388  HAVE_WCSCHR=1;
12389  HAVE_WCSRCHR=1;
12390  HAVE_WCSCSPN=1;
12391  HAVE_WCSSPN=1;
12392  HAVE_WCSPBRK=1;
12393  HAVE_WCSSTR=1;
12394  HAVE_WCSTOK=1;
12395  HAVE_WCSWIDTH=1;
12396  HAVE_DECL_WCTOB=1;
12397  HAVE_DECL_WCWIDTH=1;
12398  REPLACE_MBSTATE_T=0;
12399  REPLACE_BTOWC=0;
12400  REPLACE_WCTOB=0;
12401  REPLACE_MBSINIT=0;
12402  REPLACE_MBRTOWC=0;
12403  REPLACE_MBRLEN=0;
12404  REPLACE_MBSRTOWCS=0;
12405  REPLACE_MBSNRTOWCS=0;
12406  REPLACE_WCRTOMB=0;
12407  REPLACE_WCSRTOMBS=0;
12408  REPLACE_WCSNRTOMBS=0;
12409  REPLACE_WCWIDTH=0;
12410  REPLACE_WCSWIDTH=0;
12411
12412
12413            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
12414$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
12415if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
12416  $as_echo_n "(cached) " >&6
12417else
12418  gl_cv_header_wchar_h_correct_inline=yes
12419     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12420/* end confdefs.h.  */
12421
12422       #define wcstod renamed_wcstod
12423/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12424   <wchar.h>.
12425   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12426   included before <wchar.h>.  */
12427#include <stddef.h>
12428#include <stdio.h>
12429#include <time.h>
12430#include <wchar.h>
12431extern int zero (void);
12432int main () { return zero(); }
12433
12434_ACEOF
12435                              save_ac_compile="$ac_compile"
12436     ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
12437     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12438  (eval $ac_compile) 2>&5
12439  ac_status=$?
12440  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12441  test $ac_status = 0; }; then
12442       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12443/* end confdefs.h.  */
12444
12445         #define wcstod renamed_wcstod
12446/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12447   <wchar.h>.
12448   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12449   included before <wchar.h>.  */
12450#include <stddef.h>
12451#include <stdio.h>
12452#include <time.h>
12453#include <wchar.h>
12454int zero (void) { return 0; }
12455
12456_ACEOF
12457              ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
12458       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12459  (eval $ac_compile) 2>&5
12460  ac_status=$?
12461  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12462  test $ac_status = 0; }; then
12463         if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
12464           :
12465         else
12466           gl_cv_header_wchar_h_correct_inline=no
12467         fi
12468       fi
12469     fi
12470     ac_compile="$save_ac_compile"
12471     rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
12472
12473fi
12474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
12475$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
12476  if test $gl_cv_header_wchar_h_correct_inline = no; then
12477    as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
12478This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
12479C99 mode. You have four options:
12480  - Add the flag -fgnu89-inline to CC and reconfigure, or
12481  - Fix your include files, using parts of
12482    <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
12483  - Use a gcc version older than 4.3, or
12484  - Don't use the flags -std=c99 or -std=gnu99.
12485Configuration aborted." "$LINENO" 5
12486  fi
12487
12488
12489
12490
12491  for ac_func in $ac_func_list
12492do :
12493  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12494ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12495if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12496  cat >>confdefs.h <<_ACEOF
12497#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12498_ACEOF
12499
12500fi
12501done
12502
12503
12504
12505
12506  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12507$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12508if ${am_cv_langinfo_codeset+:} false; then :
12509  $as_echo_n "(cached) " >&6
12510else
12511  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12512/* end confdefs.h.  */
12513#include <langinfo.h>
12514int
12515main ()
12516{
12517char* cs = nl_langinfo(CODESET); return !cs;
12518  ;
12519  return 0;
12520}
12521_ACEOF
12522if ac_fn_c_try_link "$LINENO"; then :
12523  am_cv_langinfo_codeset=yes
12524else
12525  am_cv_langinfo_codeset=no
12526fi
12527rm -f core conftest.err conftest.$ac_objext \
12528    conftest$ac_exeext conftest.$ac_ext
12529
12530fi
12531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12532$as_echo "$am_cv_langinfo_codeset" >&6; }
12533  if test $am_cv_langinfo_codeset = yes; then
12534
12535$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12536
12537  fi
12538
12539
12540
12541
12542  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
12543$as_echo_n "checking for a traditional french locale... " >&6; }
12544if ${gt_cv_locale_fr+:} false; then :
12545  $as_echo_n "(cached) " >&6
12546else
12547
12548    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12549/* end confdefs.h.  */
12550
12551#include <locale.h>
12552#include <time.h>
12553#if HAVE_LANGINFO_CODESET
12554# include <langinfo.h>
12555#endif
12556#include <stdlib.h>
12557#include <string.h>
12558struct tm t;
12559char buf[16];
12560int main () {
12561  /* Check whether the given locale name is recognized by the system.  */
12562#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
12563  /* On native Windows, setlocale(category, "") looks at the system settings,
12564     not at the environment variables.  Also, when an encoding suffix such
12565     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12566     category of the locale to "C".  */
12567  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12568      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12569    return 1;
12570#else
12571  if (setlocale (LC_ALL, "") == NULL) return 1;
12572#endif
12573  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12574     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12575     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12576     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12577     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12578     some unit tests fail.
12579     On MirBSD 10, when an unsupported locale is specified, setlocale()
12580     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
12581#if HAVE_LANGINFO_CODESET
12582  {
12583    const char *cs = nl_langinfo (CODESET);
12584    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12585        || strcmp (cs, "UTF-8") == 0)
12586      return 1;
12587  }
12588#endif
12589#ifdef __CYGWIN__
12590  /* On Cygwin, avoid locale names without encoding suffix, because the
12591     locale_charset() function relies on the encoding suffix.  Note that
12592     LC_ALL is set on the command line.  */
12593  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
12594#endif
12595  /* Check whether in the abbreviation of the second month, the second
12596     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
12597     one byte long. This excludes the UTF-8 encoding.  */
12598  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12599  if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
12600#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
12601  /* Check whether the decimal separator is a comma.
12602     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
12603     are nl_langinfo(RADIXCHAR) are both ".".  */
12604  if (localeconv () ->decimal_point[0] != ',') return 1;
12605#endif
12606  return 0;
12607}
12608
12609_ACEOF
12610    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12611  (eval $ac_link) 2>&5
12612  ac_status=$?
12613  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12614  test $ac_status = 0; } && test -s conftest$ac_exeext; then
12615      case "$host_os" in
12616        # Handle native Windows specially, because there setlocale() interprets
12617        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12618        # "fr" or "fra" as "French" or "French_France.1252",
12619        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12620        # "ja" as "Japanese" or "Japanese_Japan.932",
12621        # and similar.
12622        mingw*)
12623          # Test for the native Windows locale name.
12624          if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12625            gt_cv_locale_fr=French_France.1252
12626          else
12627            # None found.
12628            gt_cv_locale_fr=none
12629          fi
12630          ;;
12631        *)
12632          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12633          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12634          # configure script would override the LC_ALL setting. Likewise for
12635          # LC_CTYPE, which is also set at the beginning of the configure script.
12636          # Test for the usual locale name.
12637          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12638            gt_cv_locale_fr=fr_FR
12639          else
12640            # Test for the locale name with explicit encoding suffix.
12641            if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12642              gt_cv_locale_fr=fr_FR.ISO-8859-1
12643            else
12644              # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
12645              if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12646                gt_cv_locale_fr=fr_FR.ISO8859-1
12647              else
12648                # Test for the HP-UX locale name.
12649                if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12650                  gt_cv_locale_fr=fr_FR.iso88591
12651                else
12652                  # Test for the Solaris 7 locale name.
12653                  if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12654                    gt_cv_locale_fr=fr
12655                  else
12656                    # None found.
12657                    gt_cv_locale_fr=none
12658                  fi
12659                fi
12660              fi
12661            fi
12662          fi
12663          ;;
12664      esac
12665    fi
12666    rm -fr conftest*
12667
12668fi
12669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
12670$as_echo "$gt_cv_locale_fr" >&6; }
12671  LOCALE_FR=$gt_cv_locale_fr
12672
12673
12674
12675  GNULIB_ACOSF=0;
12676  GNULIB_ACOSL=0;
12677  GNULIB_ASINF=0;
12678  GNULIB_ASINL=0;
12679  GNULIB_ATANF=0;
12680  GNULIB_ATANL=0;
12681  GNULIB_ATAN2F=0;
12682  GNULIB_CBRT=0;
12683  GNULIB_CBRTF=0;
12684  GNULIB_CBRTL=0;
12685  GNULIB_CEIL=0;
12686  GNULIB_CEILF=0;
12687  GNULIB_CEILL=0;
12688  GNULIB_COPYSIGN=0;
12689  GNULIB_COPYSIGNF=0;
12690  GNULIB_COPYSIGNL=0;
12691  GNULIB_COSF=0;
12692  GNULIB_COSL=0;
12693  GNULIB_COSHF=0;
12694  GNULIB_EXPF=0;
12695  GNULIB_EXPL=0;
12696  GNULIB_EXP2=0;
12697  GNULIB_EXP2F=0;
12698  GNULIB_EXP2L=0;
12699  GNULIB_EXPM1=0;
12700  GNULIB_EXPM1F=0;
12701  GNULIB_EXPM1L=0;
12702  GNULIB_FABSF=0;
12703  GNULIB_FABSL=0;
12704  GNULIB_FLOOR=0;
12705  GNULIB_FLOORF=0;
12706  GNULIB_FLOORL=0;
12707  GNULIB_FMA=0;
12708  GNULIB_FMAF=0;
12709  GNULIB_FMAL=0;
12710  GNULIB_FMOD=0;
12711  GNULIB_FMODF=0;
12712  GNULIB_FMODL=0;
12713  GNULIB_FREXPF=0;
12714  GNULIB_FREXP=0;
12715  GNULIB_FREXPL=0;
12716  GNULIB_HYPOT=0;
12717  GNULIB_HYPOTF=0;
12718  GNULIB_HYPOTL=0;
12719  GNULIB_ILOGB=0;
12720  GNULIB_ILOGBF=0;
12721  GNULIB_ILOGBL=0;
12722  GNULIB_ISFINITE=0;
12723  GNULIB_ISINF=0;
12724  GNULIB_ISNAN=0;
12725  GNULIB_ISNANF=0;
12726  GNULIB_ISNAND=0;
12727  GNULIB_ISNANL=0;
12728  GNULIB_LDEXPF=0;
12729  GNULIB_LDEXPL=0;
12730  GNULIB_LOG=0;
12731  GNULIB_LOGF=0;
12732  GNULIB_LOGL=0;
12733  GNULIB_LOG10=0;
12734  GNULIB_LOG10F=0;
12735  GNULIB_LOG10L=0;
12736  GNULIB_LOG1P=0;
12737  GNULIB_LOG1PF=0;
12738  GNULIB_LOG1PL=0;
12739  GNULIB_LOG2=0;
12740  GNULIB_LOG2F=0;
12741  GNULIB_LOG2L=0;
12742  GNULIB_LOGB=0;
12743  GNULIB_LOGBF=0;
12744  GNULIB_LOGBL=0;
12745  GNULIB_MODF=0;
12746  GNULIB_MODFF=0;
12747  GNULIB_MODFL=0;
12748  GNULIB_POWF=0;
12749  GNULIB_REMAINDER=0;
12750  GNULIB_REMAINDERF=0;
12751  GNULIB_REMAINDERL=0;
12752  GNULIB_RINT=0;
12753  GNULIB_RINTF=0;
12754  GNULIB_RINTL=0;
12755  GNULIB_ROUND=0;
12756  GNULIB_ROUNDF=0;
12757  GNULIB_ROUNDL=0;
12758  GNULIB_SIGNBIT=0;
12759  GNULIB_SINF=0;
12760  GNULIB_SINL=0;
12761  GNULIB_SINHF=0;
12762  GNULIB_SQRTF=0;
12763  GNULIB_SQRTL=0;
12764  GNULIB_TANF=0;
12765  GNULIB_TANL=0;
12766  GNULIB_TANHF=0;
12767  GNULIB_TRUNC=0;
12768  GNULIB_TRUNCF=0;
12769  GNULIB_TRUNCL=0;
12770    HAVE_ACOSF=1;
12771  HAVE_ACOSL=1;
12772  HAVE_ASINF=1;
12773  HAVE_ASINL=1;
12774  HAVE_ATANF=1;
12775  HAVE_ATANL=1;
12776  HAVE_ATAN2F=1;
12777  HAVE_CBRT=1;
12778  HAVE_CBRTF=1;
12779  HAVE_CBRTL=1;
12780  HAVE_COPYSIGN=1;
12781  HAVE_COPYSIGNL=1;
12782  HAVE_COSF=1;
12783  HAVE_COSL=1;
12784  HAVE_COSHF=1;
12785  HAVE_EXPF=1;
12786  HAVE_EXPL=1;
12787  HAVE_EXPM1=1;
12788  HAVE_EXPM1F=1;
12789  HAVE_FABSF=1;
12790  HAVE_FABSL=1;
12791  HAVE_FMA=1;
12792  HAVE_FMAF=1;
12793  HAVE_FMAL=1;
12794  HAVE_FMODF=1;
12795  HAVE_FMODL=1;
12796  HAVE_FREXPF=1;
12797  HAVE_HYPOTF=1;
12798  HAVE_HYPOTL=1;
12799  HAVE_ILOGB=1;
12800  HAVE_ILOGBF=1;
12801  HAVE_ILOGBL=1;
12802  HAVE_ISNANF=1;
12803  HAVE_ISNAND=1;
12804  HAVE_ISNANL=1;
12805  HAVE_LDEXPF=1;
12806  HAVE_LOGF=1;
12807  HAVE_LOGL=1;
12808  HAVE_LOG10F=1;
12809  HAVE_LOG10L=1;
12810  HAVE_LOG1P=1;
12811  HAVE_LOG1PF=1;
12812  HAVE_LOG1PL=1;
12813  HAVE_LOGBF=1;
12814  HAVE_LOGBL=1;
12815  HAVE_MODFF=1;
12816  HAVE_MODFL=1;
12817  HAVE_POWF=1;
12818  HAVE_REMAINDER=1;
12819  HAVE_REMAINDERF=1;
12820  HAVE_RINT=1;
12821  HAVE_RINTL=1;
12822  HAVE_SINF=1;
12823  HAVE_SINL=1;
12824  HAVE_SINHF=1;
12825  HAVE_SQRTF=1;
12826  HAVE_SQRTL=1;
12827  HAVE_TANF=1;
12828  HAVE_TANL=1;
12829  HAVE_TANHF=1;
12830  HAVE_DECL_ACOSL=1;
12831  HAVE_DECL_ASINL=1;
12832  HAVE_DECL_ATANL=1;
12833  HAVE_DECL_CBRTF=1;
12834  HAVE_DECL_CBRTL=1;
12835  HAVE_DECL_CEILF=1;
12836  HAVE_DECL_CEILL=1;
12837  HAVE_DECL_COPYSIGNF=1;
12838  HAVE_DECL_COSL=1;
12839  HAVE_DECL_EXPL=1;
12840  HAVE_DECL_EXP2=1;
12841  HAVE_DECL_EXP2F=1;
12842  HAVE_DECL_EXP2L=1;
12843  HAVE_DECL_EXPM1L=1;
12844  HAVE_DECL_FLOORF=1;
12845  HAVE_DECL_FLOORL=1;
12846  HAVE_DECL_FREXPL=1;
12847  HAVE_DECL_LDEXPL=1;
12848  HAVE_DECL_LOGL=1;
12849  HAVE_DECL_LOG10L=1;
12850  HAVE_DECL_LOG2=1;
12851  HAVE_DECL_LOG2F=1;
12852  HAVE_DECL_LOG2L=1;
12853  HAVE_DECL_LOGB=1;
12854  HAVE_DECL_REMAINDER=1;
12855  HAVE_DECL_REMAINDERL=1;
12856  HAVE_DECL_RINTF=1;
12857  HAVE_DECL_ROUND=1;
12858  HAVE_DECL_ROUNDF=1;
12859  HAVE_DECL_ROUNDL=1;
12860  HAVE_DECL_SINL=1;
12861  HAVE_DECL_SQRTL=1;
12862  HAVE_DECL_TANL=1;
12863  HAVE_DECL_TRUNC=1;
12864  HAVE_DECL_TRUNCF=1;
12865  HAVE_DECL_TRUNCL=1;
12866  REPLACE_ACOSF=0;
12867  REPLACE_ASINF=0;
12868  REPLACE_ATANF=0;
12869  REPLACE_ATAN2F=0;
12870  REPLACE_CBRTF=0;
12871  REPLACE_CBRTL=0;
12872  REPLACE_CEIL=0;
12873  REPLACE_CEILF=0;
12874  REPLACE_CEILL=0;
12875  REPLACE_COSF=0;
12876  REPLACE_COSHF=0;
12877  REPLACE_EXPF=0;
12878  REPLACE_EXPM1=0;
12879  REPLACE_EXPM1F=0;
12880  REPLACE_EXP2=0;
12881  REPLACE_EXP2L=0;
12882  REPLACE_FABSL=0;
12883  REPLACE_FLOOR=0;
12884  REPLACE_FLOORF=0;
12885  REPLACE_FLOORL=0;
12886  REPLACE_FMA=0;
12887  REPLACE_FMAF=0;
12888  REPLACE_FMAL=0;
12889  REPLACE_FMOD=0;
12890  REPLACE_FMODF=0;
12891  REPLACE_FMODL=0;
12892  REPLACE_FREXPF=0;
12893  REPLACE_FREXP=0;
12894  REPLACE_FREXPL=0;
12895  REPLACE_HUGE_VAL=0;
12896  REPLACE_HYPOT=0;
12897  REPLACE_HYPOTF=0;
12898  REPLACE_HYPOTL=0;
12899  REPLACE_ILOGB=0;
12900  REPLACE_ILOGBF=0;
12901  REPLACE_ISFINITE=0;
12902  REPLACE_ISINF=0;
12903  REPLACE_ISNAN=0;
12904  REPLACE_LDEXPL=0;
12905  REPLACE_LOG=0;
12906  REPLACE_LOGF=0;
12907  REPLACE_LOGL=0;
12908  REPLACE_LOG10=0;
12909  REPLACE_LOG10F=0;
12910  REPLACE_LOG10L=0;
12911  REPLACE_LOG1P=0;
12912  REPLACE_LOG1PF=0;
12913  REPLACE_LOG1PL=0;
12914  REPLACE_LOG2=0;
12915  REPLACE_LOG2F=0;
12916  REPLACE_LOG2L=0;
12917  REPLACE_LOGB=0;
12918  REPLACE_LOGBF=0;
12919  REPLACE_LOGBL=0;
12920  REPLACE_MODF=0;
12921  REPLACE_MODFF=0;
12922  REPLACE_MODFL=0;
12923  REPLACE_NAN=0;
12924  REPLACE_REMAINDER=0;
12925  REPLACE_REMAINDERF=0;
12926  REPLACE_REMAINDERL=0;
12927  REPLACE_ROUND=0;
12928  REPLACE_ROUNDF=0;
12929  REPLACE_ROUNDL=0;
12930  REPLACE_SIGNBIT=0;
12931  REPLACE_SIGNBIT_USING_GCC=0;
12932  REPLACE_SINF=0;
12933  REPLACE_SINHF=0;
12934  REPLACE_SQRTF=0;
12935  REPLACE_SQRTL=0;
12936  REPLACE_TANF=0;
12937  REPLACE_TANHF=0;
12938  REPLACE_TRUNC=0;
12939  REPLACE_TRUNCF=0;
12940  REPLACE_TRUNCL=0;
12941
12942
12943  GNULIB_CHDIR=0;
12944  GNULIB_CHOWN=0;
12945  GNULIB_CLOSE=0;
12946  GNULIB_DUP=0;
12947  GNULIB_DUP2=0;
12948  GNULIB_DUP3=0;
12949  GNULIB_ENVIRON=0;
12950  GNULIB_EUIDACCESS=0;
12951  GNULIB_FACCESSAT=0;
12952  GNULIB_FCHDIR=0;
12953  GNULIB_FCHOWNAT=0;
12954  GNULIB_FDATASYNC=0;
12955  GNULIB_FSYNC=0;
12956  GNULIB_FTRUNCATE=0;
12957  GNULIB_GETCWD=0;
12958  GNULIB_GETDOMAINNAME=0;
12959  GNULIB_GETDTABLESIZE=0;
12960  GNULIB_GETGROUPS=0;
12961  GNULIB_GETHOSTNAME=0;
12962  GNULIB_GETLOGIN=0;
12963  GNULIB_GETLOGIN_R=0;
12964  GNULIB_GETPAGESIZE=0;
12965  GNULIB_GETUSERSHELL=0;
12966  GNULIB_GROUP_MEMBER=0;
12967  GNULIB_ISATTY=0;
12968  GNULIB_LCHOWN=0;
12969  GNULIB_LINK=0;
12970  GNULIB_LINKAT=0;
12971  GNULIB_LSEEK=0;
12972  GNULIB_PIPE=0;
12973  GNULIB_PIPE2=0;
12974  GNULIB_PREAD=0;
12975  GNULIB_PWRITE=0;
12976  GNULIB_READ=0;
12977  GNULIB_READLINK=0;
12978  GNULIB_READLINKAT=0;
12979  GNULIB_RMDIR=0;
12980  GNULIB_SETHOSTNAME=0;
12981  GNULIB_SLEEP=0;
12982  GNULIB_SYMLINK=0;
12983  GNULIB_SYMLINKAT=0;
12984  GNULIB_TTYNAME_R=0;
12985  GNULIB_UNISTD_H_NONBLOCKING=0;
12986  GNULIB_UNISTD_H_SIGPIPE=0;
12987  GNULIB_UNLINK=0;
12988  GNULIB_UNLINKAT=0;
12989  GNULIB_USLEEP=0;
12990  GNULIB_WRITE=0;
12991    HAVE_CHOWN=1;
12992  HAVE_DUP2=1;
12993  HAVE_DUP3=1;
12994  HAVE_EUIDACCESS=1;
12995  HAVE_FACCESSAT=1;
12996  HAVE_FCHDIR=1;
12997  HAVE_FCHOWNAT=1;
12998  HAVE_FDATASYNC=1;
12999  HAVE_FSYNC=1;
13000  HAVE_FTRUNCATE=1;
13001  HAVE_GETDTABLESIZE=1;
13002  HAVE_GETGROUPS=1;
13003  HAVE_GETHOSTNAME=1;
13004  HAVE_GETLOGIN=1;
13005  HAVE_GETPAGESIZE=1;
13006  HAVE_GROUP_MEMBER=1;
13007  HAVE_LCHOWN=1;
13008  HAVE_LINK=1;
13009  HAVE_LINKAT=1;
13010  HAVE_PIPE=1;
13011  HAVE_PIPE2=1;
13012  HAVE_PREAD=1;
13013  HAVE_PWRITE=1;
13014  HAVE_READLINK=1;
13015  HAVE_READLINKAT=1;
13016  HAVE_SETHOSTNAME=1;
13017  HAVE_SLEEP=1;
13018  HAVE_SYMLINK=1;
13019  HAVE_SYMLINKAT=1;
13020  HAVE_UNLINKAT=1;
13021  HAVE_USLEEP=1;
13022  HAVE_DECL_ENVIRON=1;
13023  HAVE_DECL_FCHDIR=1;
13024  HAVE_DECL_FDATASYNC=1;
13025  HAVE_DECL_GETDOMAINNAME=1;
13026  HAVE_DECL_GETLOGIN=1;
13027  HAVE_DECL_GETLOGIN_R=1;
13028  HAVE_DECL_GETPAGESIZE=1;
13029  HAVE_DECL_GETUSERSHELL=1;
13030  HAVE_DECL_SETHOSTNAME=1;
13031  HAVE_DECL_TTYNAME_R=1;
13032  HAVE_OS_H=0;
13033  HAVE_SYS_PARAM_H=0;
13034  REPLACE_CHOWN=0;
13035  REPLACE_CLOSE=0;
13036  REPLACE_DUP=0;
13037  REPLACE_DUP2=0;
13038  REPLACE_FCHOWNAT=0;
13039  REPLACE_FTRUNCATE=0;
13040  REPLACE_GETCWD=0;
13041  REPLACE_GETDOMAINNAME=0;
13042  REPLACE_GETDTABLESIZE=0;
13043  REPLACE_GETLOGIN_R=0;
13044  REPLACE_GETGROUPS=0;
13045  REPLACE_GETPAGESIZE=0;
13046  REPLACE_ISATTY=0;
13047  REPLACE_LCHOWN=0;
13048  REPLACE_LINK=0;
13049  REPLACE_LINKAT=0;
13050  REPLACE_LSEEK=0;
13051  REPLACE_PREAD=0;
13052  REPLACE_PWRITE=0;
13053  REPLACE_READ=0;
13054  REPLACE_READLINK=0;
13055  REPLACE_READLINKAT=0;
13056  REPLACE_RMDIR=0;
13057  REPLACE_SLEEP=0;
13058  REPLACE_SYMLINK=0;
13059  REPLACE_SYMLINKAT=0;
13060  REPLACE_TTYNAME_R=0;
13061  REPLACE_UNLINK=0;
13062  REPLACE_UNLINKAT=0;
13063  REPLACE_USLEEP=0;
13064  REPLACE_WRITE=0;
13065  UNISTD_H_HAVE_WINSOCK2_H=0;
13066  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
13067
13068
13069
13070
13071
13072
13073  if test $ac_cv_func__set_invalid_parameter_handler = yes; then
13074    HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
13075
13076$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
13077
13078  else
13079    HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
13080  fi
13081
13082
13083
13084  GNULIB_IOCTL=0;
13085    SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
13086  SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
13087
13088  REPLACE_IOCTL=0;
13089
13090
13091
13092
13093  for ac_header in $ac_header_list
13094do :
13095  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13096ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
13097"
13098if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13099  cat >>confdefs.h <<_ACEOF
13100#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13101_ACEOF
13102
13103fi
13104
13105done
13106
13107
13108
13109
13110
13111  gl_threads_api=none
13112  LIBTHREAD=
13113  LTLIBTHREAD=
13114  LIBMULTITHREAD=
13115  LTLIBMULTITHREAD=
13116  if test "$gl_use_threads" != no; then
13117        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
13118$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
13119if ${gl_cv_have_weak+:} false; then :
13120  $as_echo_n "(cached) " >&6
13121else
13122  gl_cv_have_weak=no
13123              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13124/* end confdefs.h.  */
13125extern void xyzzy ();
13126#pragma weak xyzzy
13127int
13128main ()
13129{
13130xyzzy();
13131  ;
13132  return 0;
13133}
13134_ACEOF
13135if ac_fn_c_try_link "$LINENO"; then :
13136  gl_cv_have_weak=maybe
13137fi
13138rm -f core conftest.err conftest.$ac_objext \
13139    conftest$ac_exeext conftest.$ac_ext
13140       if test $gl_cv_have_weak = maybe; then
13141                           if test "$cross_compiling" = yes; then :
13142                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13143/* end confdefs.h.  */
13144#ifdef __ELF__
13145               Extensible Linking Format
13146               #endif
13147
13148_ACEOF
13149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13150  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
13151  gl_cv_have_weak="guessing yes"
13152else
13153  gl_cv_have_weak="guessing no"
13154fi
13155rm -f conftest*
13156
13157
13158else
13159  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13160/* end confdefs.h.  */
13161
13162#include <stdio.h>
13163#pragma weak fputs
13164int main ()
13165{
13166  return (fputs == NULL);
13167}
13168_ACEOF
13169if ac_fn_c_try_run "$LINENO"; then :
13170  gl_cv_have_weak=yes
13171else
13172  gl_cv_have_weak=no
13173fi
13174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13175  conftest.$ac_objext conftest.beam conftest.$ac_ext
13176fi
13177
13178       fi
13179
13180fi
13181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
13182$as_echo "$gl_cv_have_weak" >&6; }
13183    if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
13184      # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
13185      # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
13186      ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
13187if test "x$ac_cv_header_pthread_h" = xyes; then :
13188  gl_have_pthread_h=yes
13189else
13190  gl_have_pthread_h=no
13191fi
13192
13193
13194      if test "$gl_have_pthread_h" = yes; then
13195        # Other possible tests:
13196        #   -lpthreads (FSU threads, PCthreads)
13197        #   -lgthreads
13198        gl_have_pthread=
13199        # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
13200        # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
13201        # the second one only in libpthread, and lock.c needs it.
13202        #
13203        # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
13204        # needs -pthread for some reason.  See:
13205        # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
13206        save_LIBS=$LIBS
13207        for gl_pthread in '' '-pthread'; do
13208          LIBS="$LIBS $gl_pthread"
13209          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13210/* end confdefs.h.  */
13211#include <pthread.h>
13212                 pthread_mutex_t m;
13213                 pthread_mutexattr_t ma;
13214
13215int
13216main ()
13217{
13218pthread_mutex_lock (&m);
13219                 pthread_mutexattr_init (&ma);
13220  ;
13221  return 0;
13222}
13223_ACEOF
13224if ac_fn_c_try_link "$LINENO"; then :
13225  gl_have_pthread=yes
13226             LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
13227             LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
13228fi
13229rm -f core conftest.err conftest.$ac_objext \
13230    conftest$ac_exeext conftest.$ac_ext
13231          LIBS=$save_LIBS
13232          test -n "$gl_have_pthread" && break
13233        done
13234
13235        # Test for libpthread by looking for pthread_kill. (Not pthread_self,
13236        # since it is defined as a macro on OSF/1.)
13237        if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
13238          # The program links fine without libpthread. But it may actually
13239          # need to link with libpthread in order to create multiple threads.
13240          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13241$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
13242if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13243  $as_echo_n "(cached) " >&6
13244else
13245  ac_check_lib_save_LIBS=$LIBS
13246LIBS="-lpthread  $LIBS"
13247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13248/* end confdefs.h.  */
13249
13250/* Override any GCC internal prototype to avoid an error.
13251   Use char because int might match the return type of a GCC
13252   builtin and then its argument prototype would still apply.  */
13253#ifdef __cplusplus
13254extern "C"
13255#endif
13256char pthread_kill ();
13257int
13258main ()
13259{
13260return pthread_kill ();
13261  ;
13262  return 0;
13263}
13264_ACEOF
13265if ac_fn_c_try_link "$LINENO"; then :
13266  ac_cv_lib_pthread_pthread_kill=yes
13267else
13268  ac_cv_lib_pthread_pthread_kill=no
13269fi
13270rm -f core conftest.err conftest.$ac_objext \
13271    conftest$ac_exeext conftest.$ac_ext
13272LIBS=$ac_check_lib_save_LIBS
13273fi
13274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13275$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
13276if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13277  LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
13278             # On Solaris and HP-UX, most pthread functions exist also in libc.
13279             # Therefore pthread_in_use() needs to actually try to create a
13280             # thread: pthread_create from libc will fail, whereas
13281             # pthread_create will actually create a thread.
13282             # On Solaris 10 or newer, this test is no longer needed, because
13283             # libc contains the fully functional pthread functions.
13284             case "$host_os" in
13285               solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
13286
13287$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
13288
13289             esac
13290
13291fi
13292
13293        elif test -z "$gl_have_pthread"; then
13294          # Some library is needed. Try libpthread and libc_r.
13295          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
13296$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
13297if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
13298  $as_echo_n "(cached) " >&6
13299else
13300  ac_check_lib_save_LIBS=$LIBS
13301LIBS="-lpthread  $LIBS"
13302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13303/* end confdefs.h.  */
13304
13305/* Override any GCC internal prototype to avoid an error.
13306   Use char because int might match the return type of a GCC
13307   builtin and then its argument prototype would still apply.  */
13308#ifdef __cplusplus
13309extern "C"
13310#endif
13311char pthread_kill ();
13312int
13313main ()
13314{
13315return pthread_kill ();
13316  ;
13317  return 0;
13318}
13319_ACEOF
13320if ac_fn_c_try_link "$LINENO"; then :
13321  ac_cv_lib_pthread_pthread_kill=yes
13322else
13323  ac_cv_lib_pthread_pthread_kill=no
13324fi
13325rm -f core conftest.err conftest.$ac_objext \
13326    conftest$ac_exeext conftest.$ac_ext
13327LIBS=$ac_check_lib_save_LIBS
13328fi
13329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
13330$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
13331if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
13332  gl_have_pthread=yes
13333             LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
13334             LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
13335fi
13336
13337          if test -z "$gl_have_pthread"; then
13338            # For FreeBSD 4.
13339            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
13340$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
13341if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
13342  $as_echo_n "(cached) " >&6
13343else
13344  ac_check_lib_save_LIBS=$LIBS
13345LIBS="-lc_r  $LIBS"
13346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13347/* end confdefs.h.  */
13348
13349/* Override any GCC internal prototype to avoid an error.
13350   Use char because int might match the return type of a GCC
13351   builtin and then its argument prototype would still apply.  */
13352#ifdef __cplusplus
13353extern "C"
13354#endif
13355char pthread_kill ();
13356int
13357main ()
13358{
13359return pthread_kill ();
13360  ;
13361  return 0;
13362}
13363_ACEOF
13364if ac_fn_c_try_link "$LINENO"; then :
13365  ac_cv_lib_c_r_pthread_kill=yes
13366else
13367  ac_cv_lib_c_r_pthread_kill=no
13368fi
13369rm -f core conftest.err conftest.$ac_objext \
13370    conftest$ac_exeext conftest.$ac_ext
13371LIBS=$ac_check_lib_save_LIBS
13372fi
13373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
13374$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
13375if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
13376  gl_have_pthread=yes
13377               LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
13378               LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
13379fi
13380
13381          fi
13382        fi
13383        if test -n "$gl_have_pthread"; then
13384          gl_threads_api=posix
13385
13386$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
13387
13388          if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13389            if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13390
13391$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
13392
13393              LIBTHREAD=
13394              LTLIBTHREAD=
13395            fi
13396          fi
13397        fi
13398      fi
13399    fi
13400    if test -z "$gl_have_pthread"; then
13401      if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
13402        gl_have_solaristhread=
13403        gl_save_LIBS="$LIBS"
13404        LIBS="$LIBS -lthread"
13405        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13406/* end confdefs.h.  */
13407
13408#include <thread.h>
13409#include <synch.h>
13410
13411int
13412main ()
13413{
13414thr_self();
13415  ;
13416  return 0;
13417}
13418_ACEOF
13419if ac_fn_c_try_link "$LINENO"; then :
13420  gl_have_solaristhread=yes
13421fi
13422rm -f core conftest.err conftest.$ac_objext \
13423    conftest$ac_exeext conftest.$ac_ext
13424        LIBS="$gl_save_LIBS"
13425        if test -n "$gl_have_solaristhread"; then
13426          gl_threads_api=solaris
13427          LIBTHREAD=-lthread
13428          LTLIBTHREAD=-lthread
13429          LIBMULTITHREAD="$LIBTHREAD"
13430          LTLIBMULTITHREAD="$LTLIBTHREAD"
13431
13432$as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
13433
13434          if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13435
13436$as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
13437
13438            LIBTHREAD=
13439            LTLIBTHREAD=
13440          fi
13441        fi
13442      fi
13443    fi
13444    if test "$gl_use_threads" = pth; then
13445      gl_save_CPPFLAGS="$CPPFLAGS"
13446
13447
13448
13449
13450
13451  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
13452$as_echo_n "checking how to link with libpth... " >&6; }
13453if ${ac_cv_libpth_libs+:} false; then :
13454  $as_echo_n "(cached) " >&6
13455else
13456
13457
13458
13459
13460
13461
13462
13463
13464    use_additional=yes
13465
13466  acl_save_prefix="$prefix"
13467  prefix="$acl_final_prefix"
13468  acl_save_exec_prefix="$exec_prefix"
13469  exec_prefix="$acl_final_exec_prefix"
13470
13471    eval additional_includedir=\"$includedir\"
13472    eval additional_libdir=\"$libdir\"
13473
13474  exec_prefix="$acl_save_exec_prefix"
13475  prefix="$acl_save_prefix"
13476
13477
13478# Check whether --with-libpth-prefix was given.
13479if test "${with_libpth_prefix+set}" = set; then :
13480  withval=$with_libpth_prefix;
13481    if test "X$withval" = "Xno"; then
13482      use_additional=no
13483    else
13484      if test "X$withval" = "X"; then
13485
13486  acl_save_prefix="$prefix"
13487  prefix="$acl_final_prefix"
13488  acl_save_exec_prefix="$exec_prefix"
13489  exec_prefix="$acl_final_exec_prefix"
13490
13491          eval additional_includedir=\"$includedir\"
13492          eval additional_libdir=\"$libdir\"
13493
13494  exec_prefix="$acl_save_exec_prefix"
13495  prefix="$acl_save_prefix"
13496
13497      else
13498        additional_includedir="$withval/include"
13499        additional_libdir="$withval/$acl_libdirstem"
13500        if test "$acl_libdirstem2" != "$acl_libdirstem" \
13501           && ! test -d "$withval/$acl_libdirstem"; then
13502          additional_libdir="$withval/$acl_libdirstem2"
13503        fi
13504      fi
13505    fi
13506
13507fi
13508
13509      LIBPTH=
13510  LTLIBPTH=
13511  INCPTH=
13512  LIBPTH_PREFIX=
13513      HAVE_LIBPTH=
13514  rpathdirs=
13515  ltrpathdirs=
13516  names_already_handled=
13517  names_next_round='pth '
13518  while test -n "$names_next_round"; do
13519    names_this_round="$names_next_round"
13520    names_next_round=
13521    for name in $names_this_round; do
13522      already_handled=
13523      for n in $names_already_handled; do
13524        if test "$n" = "$name"; then
13525          already_handled=yes
13526          break
13527        fi
13528      done
13529      if test -z "$already_handled"; then
13530        names_already_handled="$names_already_handled $name"
13531                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
13532        eval value=\"\$HAVE_LIB$uppername\"
13533        if test -n "$value"; then
13534          if test "$value" = yes; then
13535            eval value=\"\$LIB$uppername\"
13536            test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
13537            eval value=\"\$LTLIB$uppername\"
13538            test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
13539          else
13540                                    :
13541          fi
13542        else
13543                              found_dir=
13544          found_la=
13545          found_so=
13546          found_a=
13547          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
13548          if test -n "$acl_shlibext"; then
13549            shrext=".$acl_shlibext"             # typically: shrext=.so
13550          else
13551            shrext=
13552          fi
13553          if test $use_additional = yes; then
13554            dir="$additional_libdir"
13555                                    if test -n "$acl_shlibext"; then
13556              if test -f "$dir/$libname$shrext"; then
13557                found_dir="$dir"
13558                found_so="$dir/$libname$shrext"
13559              else
13560                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13561                  ver=`(cd "$dir" && \
13562                        for f in "$libname$shrext".*; do echo "$f"; done \
13563                        | sed -e "s,^$libname$shrext\\\\.,," \
13564                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13565                        | sed 1q ) 2>/dev/null`
13566                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13567                    found_dir="$dir"
13568                    found_so="$dir/$libname$shrext.$ver"
13569                  fi
13570                else
13571                  eval library_names=\"$acl_library_names_spec\"
13572                  for f in $library_names; do
13573                    if test -f "$dir/$f"; then
13574                      found_dir="$dir"
13575                      found_so="$dir/$f"
13576                      break
13577                    fi
13578                  done
13579                fi
13580              fi
13581            fi
13582                        if test "X$found_dir" = "X"; then
13583              if test -f "$dir/$libname.$acl_libext"; then
13584                found_dir="$dir"
13585                found_a="$dir/$libname.$acl_libext"
13586              fi
13587            fi
13588            if test "X$found_dir" != "X"; then
13589              if test -f "$dir/$libname.la"; then
13590                found_la="$dir/$libname.la"
13591              fi
13592            fi
13593          fi
13594          if test "X$found_dir" = "X"; then
13595            for x in $LDFLAGS $LTLIBPTH; do
13596
13597  acl_save_prefix="$prefix"
13598  prefix="$acl_final_prefix"
13599  acl_save_exec_prefix="$exec_prefix"
13600  exec_prefix="$acl_final_exec_prefix"
13601  eval x=\"$x\"
13602  exec_prefix="$acl_save_exec_prefix"
13603  prefix="$acl_save_prefix"
13604
13605              case "$x" in
13606                -L*)
13607                  dir=`echo "X$x" | sed -e 's/^X-L//'`
13608                                    if test -n "$acl_shlibext"; then
13609                    if test -f "$dir/$libname$shrext"; then
13610                      found_dir="$dir"
13611                      found_so="$dir/$libname$shrext"
13612                    else
13613                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13614                        ver=`(cd "$dir" && \
13615                              for f in "$libname$shrext".*; do echo "$f"; done \
13616                              | sed -e "s,^$libname$shrext\\\\.,," \
13617                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13618                              | sed 1q ) 2>/dev/null`
13619                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13620                          found_dir="$dir"
13621                          found_so="$dir/$libname$shrext.$ver"
13622                        fi
13623                      else
13624                        eval library_names=\"$acl_library_names_spec\"
13625                        for f in $library_names; do
13626                          if test -f "$dir/$f"; then
13627                            found_dir="$dir"
13628                            found_so="$dir/$f"
13629                            break
13630                          fi
13631                        done
13632                      fi
13633                    fi
13634                  fi
13635                                    if test "X$found_dir" = "X"; then
13636                    if test -f "$dir/$libname.$acl_libext"; then
13637                      found_dir="$dir"
13638                      found_a="$dir/$libname.$acl_libext"
13639                    fi
13640                  fi
13641                  if test "X$found_dir" != "X"; then
13642                    if test -f "$dir/$libname.la"; then
13643                      found_la="$dir/$libname.la"
13644                    fi
13645                  fi
13646                  ;;
13647              esac
13648              if test "X$found_dir" != "X"; then
13649                break
13650              fi
13651            done
13652          fi
13653          if test "X$found_dir" != "X"; then
13654                        LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
13655            if test "X$found_so" != "X"; then
13656                                                        if test "$enable_rpath" = no \
13657                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
13658                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
13659                                LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13660              else
13661                                                                                haveit=
13662                for x in $ltrpathdirs; do
13663                  if test "X$x" = "X$found_dir"; then
13664                    haveit=yes
13665                    break
13666                  fi
13667                done
13668                if test -z "$haveit"; then
13669                  ltrpathdirs="$ltrpathdirs $found_dir"
13670                fi
13671                                if test "$acl_hardcode_direct" = yes; then
13672                                                      LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13673                else
13674                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
13675                                                            LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13676                                                            haveit=
13677                    for x in $rpathdirs; do
13678                      if test "X$x" = "X$found_dir"; then
13679                        haveit=yes
13680                        break
13681                      fi
13682                    done
13683                    if test -z "$haveit"; then
13684                      rpathdirs="$rpathdirs $found_dir"
13685                    fi
13686                  else
13687                                                                                haveit=
13688                    for x in $LDFLAGS $LIBPTH; do
13689
13690  acl_save_prefix="$prefix"
13691  prefix="$acl_final_prefix"
13692  acl_save_exec_prefix="$exec_prefix"
13693  exec_prefix="$acl_final_exec_prefix"
13694  eval x=\"$x\"
13695  exec_prefix="$acl_save_exec_prefix"
13696  prefix="$acl_save_prefix"
13697
13698                      if test "X$x" = "X-L$found_dir"; then
13699                        haveit=yes
13700                        break
13701                      fi
13702                    done
13703                    if test -z "$haveit"; then
13704                      LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
13705                    fi
13706                    if test "$acl_hardcode_minus_L" != no; then
13707                                                                                        LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13708                    else
13709                                                                                                                                                                                LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
13710                    fi
13711                  fi
13712                fi
13713              fi
13714            else
13715              if test "X$found_a" != "X"; then
13716                                LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
13717              else
13718                                                LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
13719              fi
13720            fi
13721                        additional_includedir=
13722            case "$found_dir" in
13723              */$acl_libdirstem | */$acl_libdirstem/)
13724                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
13725                if test "$name" = 'pth'; then
13726                  LIBPTH_PREFIX="$basedir"
13727                fi
13728                additional_includedir="$basedir/include"
13729                ;;
13730              */$acl_libdirstem2 | */$acl_libdirstem2/)
13731                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
13732                if test "$name" = 'pth'; then
13733                  LIBPTH_PREFIX="$basedir"
13734                fi
13735                additional_includedir="$basedir/include"
13736                ;;
13737            esac
13738            if test "X$additional_includedir" != "X"; then
13739                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
13740                haveit=
13741                if test "X$additional_includedir" = "X/usr/local/include"; then
13742                  if test -n "$GCC"; then
13743                    case $host_os in
13744                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13745                    esac
13746                  fi
13747                fi
13748                if test -z "$haveit"; then
13749                  for x in $CPPFLAGS $INCPTH; do
13750
13751  acl_save_prefix="$prefix"
13752  prefix="$acl_final_prefix"
13753  acl_save_exec_prefix="$exec_prefix"
13754  exec_prefix="$acl_final_exec_prefix"
13755  eval x=\"$x\"
13756  exec_prefix="$acl_save_exec_prefix"
13757  prefix="$acl_save_prefix"
13758
13759                    if test "X$x" = "X-I$additional_includedir"; then
13760                      haveit=yes
13761                      break
13762                    fi
13763                  done
13764                  if test -z "$haveit"; then
13765                    if test -d "$additional_includedir"; then
13766                                            INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
13767                    fi
13768                  fi
13769                fi
13770              fi
13771            fi
13772                        if test -n "$found_la"; then
13773                                                        save_libdir="$libdir"
13774              case "$found_la" in
13775                */* | *\\*) . "$found_la" ;;
13776                *) . "./$found_la" ;;
13777              esac
13778              libdir="$save_libdir"
13779                            for dep in $dependency_libs; do
13780                case "$dep" in
13781                  -L*)
13782                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13783                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
13784                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
13785                      haveit=
13786                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
13787                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
13788                        if test -n "$GCC"; then
13789                          case $host_os in
13790                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13791                          esac
13792                        fi
13793                      fi
13794                      if test -z "$haveit"; then
13795                        haveit=
13796                        for x in $LDFLAGS $LIBPTH; do
13797
13798  acl_save_prefix="$prefix"
13799  prefix="$acl_final_prefix"
13800  acl_save_exec_prefix="$exec_prefix"
13801  exec_prefix="$acl_final_exec_prefix"
13802  eval x=\"$x\"
13803  exec_prefix="$acl_save_exec_prefix"
13804  prefix="$acl_save_prefix"
13805
13806                          if test "X$x" = "X-L$additional_libdir"; then
13807                            haveit=yes
13808                            break
13809                          fi
13810                        done
13811                        if test -z "$haveit"; then
13812                          if test -d "$additional_libdir"; then
13813                                                        LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
13814                          fi
13815                        fi
13816                        haveit=
13817                        for x in $LDFLAGS $LTLIBPTH; do
13818
13819  acl_save_prefix="$prefix"
13820  prefix="$acl_final_prefix"
13821  acl_save_exec_prefix="$exec_prefix"
13822  exec_prefix="$acl_final_exec_prefix"
13823  eval x=\"$x\"
13824  exec_prefix="$acl_save_exec_prefix"
13825  prefix="$acl_save_prefix"
13826
13827                          if test "X$x" = "X-L$additional_libdir"; then
13828                            haveit=yes
13829                            break
13830                          fi
13831                        done
13832                        if test -z "$haveit"; then
13833                          if test -d "$additional_libdir"; then
13834                                                        LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
13835                          fi
13836                        fi
13837                      fi
13838                    fi
13839                    ;;
13840                  -R*)
13841                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
13842                    if test "$enable_rpath" != no; then
13843                                                                  haveit=
13844                      for x in $rpathdirs; do
13845                        if test "X$x" = "X$dir"; then
13846                          haveit=yes
13847                          break
13848                        fi
13849                      done
13850                      if test -z "$haveit"; then
13851                        rpathdirs="$rpathdirs $dir"
13852                      fi
13853                                                                  haveit=
13854                      for x in $ltrpathdirs; do
13855                        if test "X$x" = "X$dir"; then
13856                          haveit=yes
13857                          break
13858                        fi
13859                      done
13860                      if test -z "$haveit"; then
13861                        ltrpathdirs="$ltrpathdirs $dir"
13862                      fi
13863                    fi
13864                    ;;
13865                  -l*)
13866                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13867                    ;;
13868                  *.la)
13869                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13870                    ;;
13871                  *)
13872                                        LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
13873                    LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
13874                    ;;
13875                esac
13876              done
13877            fi
13878          else
13879                                                            LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
13880            LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
13881          fi
13882        fi
13883      fi
13884    done
13885  done
13886  if test "X$rpathdirs" != "X"; then
13887    if test -n "$acl_hardcode_libdir_separator"; then
13888                        alldirs=
13889      for found_dir in $rpathdirs; do
13890        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
13891      done
13892            acl_save_libdir="$libdir"
13893      libdir="$alldirs"
13894      eval flag=\"$acl_hardcode_libdir_flag_spec\"
13895      libdir="$acl_save_libdir"
13896      LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
13897    else
13898            for found_dir in $rpathdirs; do
13899        acl_save_libdir="$libdir"
13900        libdir="$found_dir"
13901        eval flag=\"$acl_hardcode_libdir_flag_spec\"
13902        libdir="$acl_save_libdir"
13903        LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
13904      done
13905    fi
13906  fi
13907  if test "X$ltrpathdirs" != "X"; then
13908            for found_dir in $ltrpathdirs; do
13909      LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
13910    done
13911  fi
13912
13913
13914
13915
13916
13917
13918    ac_cv_libpth_libs="$LIBPTH"
13919    ac_cv_libpth_ltlibs="$LTLIBPTH"
13920    ac_cv_libpth_cppflags="$INCPTH"
13921    ac_cv_libpth_prefix="$LIBPTH_PREFIX"
13922
13923fi
13924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
13925$as_echo "$ac_cv_libpth_libs" >&6; }
13926  LIBPTH="$ac_cv_libpth_libs"
13927  LTLIBPTH="$ac_cv_libpth_ltlibs"
13928  INCPTH="$ac_cv_libpth_cppflags"
13929  LIBPTH_PREFIX="$ac_cv_libpth_prefix"
13930
13931  for element in $INCPTH; do
13932    haveit=
13933    for x in $CPPFLAGS; do
13934
13935  acl_save_prefix="$prefix"
13936  prefix="$acl_final_prefix"
13937  acl_save_exec_prefix="$exec_prefix"
13938  exec_prefix="$acl_final_exec_prefix"
13939  eval x=\"$x\"
13940  exec_prefix="$acl_save_exec_prefix"
13941  prefix="$acl_save_prefix"
13942
13943      if test "X$x" = "X$element"; then
13944        haveit=yes
13945        break
13946      fi
13947    done
13948    if test -z "$haveit"; then
13949      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13950    fi
13951  done
13952
13953
13954
13955
13956      HAVE_LIBPTH=yes
13957
13958
13959
13960      gl_have_pth=
13961      gl_save_LIBS="$LIBS"
13962      LIBS="$LIBS $LIBPTH"
13963      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13964/* end confdefs.h.  */
13965#include <pth.h>
13966int
13967main ()
13968{
13969pth_self();
13970  ;
13971  return 0;
13972}
13973_ACEOF
13974if ac_fn_c_try_link "$LINENO"; then :
13975  gl_have_pth=yes
13976fi
13977rm -f core conftest.err conftest.$ac_objext \
13978    conftest$ac_exeext conftest.$ac_ext
13979      LIBS="$gl_save_LIBS"
13980      if test -n "$gl_have_pth"; then
13981        gl_threads_api=pth
13982        LIBTHREAD="$LIBPTH"
13983        LTLIBTHREAD="$LTLIBPTH"
13984        LIBMULTITHREAD="$LIBTHREAD"
13985        LTLIBMULTITHREAD="$LTLIBTHREAD"
13986
13987$as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
13988
13989        if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13990          if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13991
13992$as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
13993
13994            LIBTHREAD=
13995            LTLIBTHREAD=
13996          fi
13997        fi
13998      else
13999        CPPFLAGS="$gl_save_CPPFLAGS"
14000      fi
14001    fi
14002    if test -z "$gl_have_pthread"; then
14003      case "$gl_use_threads" in
14004        yes | windows | win32) # The 'win32' is for backward compatibility.
14005          if { case "$host_os" in
14006                 mingw*) true;;
14007                 *) false;;
14008               esac
14009             }; then
14010            gl_threads_api=windows
14011
14012$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
14013
14014          fi
14015          ;;
14016      esac
14017    fi
14018  fi
14019  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
14020$as_echo_n "checking for multithread API to use... " >&6; }
14021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
14022$as_echo "$gl_threads_api" >&6; }
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
14035$as_echo_n "checking whether // is distinct from /... " >&6; }
14036if ${gl_cv_double_slash_root+:} false; then :
14037  $as_echo_n "(cached) " >&6
14038else
14039   if test x"$cross_compiling" = xyes ; then
14040        # When cross-compiling, there is no way to tell whether // is special
14041        # short of a list of hosts.  However, the only known hosts to date
14042        # that have a distinct // are Apollo DomainOS (too old to port to),
14043        # Cygwin, and z/OS.  If anyone knows of another system for which // has
14044        # special semantics and is distinct from /, please report it to
14045        # <bug-gnulib@gnu.org>.
14046        case $host in
14047          *-cygwin | i370-ibm-openedition)
14048            gl_cv_double_slash_root=yes ;;
14049          *)
14050            # Be optimistic and assume that / and // are the same when we
14051            # don't know.
14052            gl_cv_double_slash_root='unknown, assuming no' ;;
14053        esac
14054      else
14055        set x `ls -di / // 2>/dev/null`
14056        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
14057          gl_cv_double_slash_root=no
14058        else
14059          gl_cv_double_slash_root=yes
14060        fi
14061      fi
14062fi
14063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
14064$as_echo "$gl_cv_double_slash_root" >&6; }
14065  if test "$gl_cv_double_slash_root" = yes; then
14066
14067$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
14068
14069  fi
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
14081$as_echo_n "checking if environ is properly declared... " >&6; }
14082  if ${gt_cv_var_environ_declaration+:} false; then :
14083  $as_echo_n "(cached) " >&6
14084else
14085
14086    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14087/* end confdefs.h.  */
14088#if HAVE_UNISTD_H
14089     #include <unistd.h>
14090     #endif
14091     /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
14092     #include <stdlib.h>
14093
14094           extern struct { int foo; } environ;
14095int
14096main ()
14097{
14098environ.foo = 1;
14099  ;
14100  return 0;
14101}
14102_ACEOF
14103if ac_fn_c_try_compile "$LINENO"; then :
14104  gt_cv_var_environ_declaration=no
14105else
14106  gt_cv_var_environ_declaration=yes
14107fi
14108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14109fi
14110
14111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
14112$as_echo "$gt_cv_var_environ_declaration" >&6; }
14113  if test $gt_cv_var_environ_declaration = yes; then
14114
14115$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
14116
14117  fi
14118
14119
14120  if test $gt_cv_var_environ_declaration != yes; then
14121    HAVE_DECL_ENVIRON=0
14122  fi
14123
14124
14125
14126  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
14127$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
14128if ${gl_cv_have_include_next+:} false; then :
14129  $as_echo_n "(cached) " >&6
14130else
14131  rm -rf conftestd1a conftestd1b conftestd2
14132     mkdir conftestd1a conftestd1b conftestd2
14133                                                  cat <<EOF > conftestd1a/conftest.h
14134#define DEFINED_IN_CONFTESTD1
14135#include_next <conftest.h>
14136#ifdef DEFINED_IN_CONFTESTD2
14137int foo;
14138#else
14139#error "include_next doesn't work"
14140#endif
14141EOF
14142     cat <<EOF > conftestd1b/conftest.h
14143#define DEFINED_IN_CONFTESTD1
14144#include <stdio.h>
14145#include_next <conftest.h>
14146#ifdef DEFINED_IN_CONFTESTD2
14147int foo;
14148#else
14149#error "include_next doesn't work"
14150#endif
14151EOF
14152     cat <<EOF > conftestd2/conftest.h
14153#ifndef DEFINED_IN_CONFTESTD1
14154#error "include_next test doesn't work"
14155#endif
14156#define DEFINED_IN_CONFTESTD2
14157EOF
14158     gl_save_CPPFLAGS="$CPPFLAGS"
14159     CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
14160     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14161/* end confdefs.h.  */
14162#include <conftest.h>
14163_ACEOF
14164if ac_fn_c_try_compile "$LINENO"; then :
14165  gl_cv_have_include_next=yes
14166else
14167  CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
14168        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14169/* end confdefs.h.  */
14170#include <conftest.h>
14171_ACEOF
14172if ac_fn_c_try_compile "$LINENO"; then :
14173  gl_cv_have_include_next=buggy
14174else
14175  gl_cv_have_include_next=no
14176fi
14177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14178
14179fi
14180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14181     CPPFLAGS="$gl_save_CPPFLAGS"
14182     rm -rf conftestd1a conftestd1b conftestd2
14183
14184fi
14185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
14186$as_echo "$gl_cv_have_include_next" >&6; }
14187  PRAGMA_SYSTEM_HEADER=
14188  if test $gl_cv_have_include_next = yes; then
14189    INCLUDE_NEXT=include_next
14190    INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
14191    if test -n "$GCC"; then
14192      PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
14193    fi
14194  else
14195    if test $gl_cv_have_include_next = buggy; then
14196      INCLUDE_NEXT=include
14197      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
14198    else
14199      INCLUDE_NEXT=include
14200      INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
14201    fi
14202  fi
14203
14204
14205
14206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
14207$as_echo_n "checking whether system header files limit the line length... " >&6; }
14208if ${gl_cv_pragma_columns+:} false; then :
14209  $as_echo_n "(cached) " >&6
14210else
14211       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14212/* end confdefs.h.  */
14213
14214#ifdef __TANDEM
14215choke me
14216#endif
14217
14218_ACEOF
14219if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14220  $EGREP "choke me" >/dev/null 2>&1; then :
14221  gl_cv_pragma_columns=yes
14222else
14223  gl_cv_pragma_columns=no
14224fi
14225rm -f conftest*
14226
14227
14228fi
14229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
14230$as_echo "$gl_cv_pragma_columns" >&6; }
14231  if test $gl_cv_pragma_columns = yes; then
14232    PRAGMA_COLUMNS="#pragma COLUMNS 10000"
14233  else
14234    PRAGMA_COLUMNS=
14235  fi
14236
14237
14238
14239
14240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
14241$as_echo_n "checking for complete errno.h... " >&6; }
14242if ${gl_cv_header_errno_h_complete+:} false; then :
14243  $as_echo_n "(cached) " >&6
14244else
14245
14246    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14247/* end confdefs.h.  */
14248
14249#include <errno.h>
14250#if !defined ETXTBSY
14251booboo
14252#endif
14253#if !defined ENOMSG
14254booboo
14255#endif
14256#if !defined EIDRM
14257booboo
14258#endif
14259#if !defined ENOLINK
14260booboo
14261#endif
14262#if !defined EPROTO
14263booboo
14264#endif
14265#if !defined EMULTIHOP
14266booboo
14267#endif
14268#if !defined EBADMSG
14269booboo
14270#endif
14271#if !defined EOVERFLOW
14272booboo
14273#endif
14274#if !defined ENOTSUP
14275booboo
14276#endif
14277#if !defined ENETRESET
14278booboo
14279#endif
14280#if !defined ECONNABORTED
14281booboo
14282#endif
14283#if !defined ESTALE
14284booboo
14285#endif
14286#if !defined EDQUOT
14287booboo
14288#endif
14289#if !defined ECANCELED
14290booboo
14291#endif
14292#if !defined EOWNERDEAD
14293booboo
14294#endif
14295#if !defined ENOTRECOVERABLE
14296booboo
14297#endif
14298#if !defined EILSEQ
14299booboo
14300#endif
14301
14302_ACEOF
14303if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14304  $EGREP "booboo" >/dev/null 2>&1; then :
14305  gl_cv_header_errno_h_complete=no
14306else
14307  gl_cv_header_errno_h_complete=yes
14308fi
14309rm -f conftest*
14310
14311
14312fi
14313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
14314$as_echo "$gl_cv_header_errno_h_complete" >&6; }
14315  if test $gl_cv_header_errno_h_complete = yes; then
14316    ERRNO_H=''
14317  else
14318
14319
14320
14321
14322
14323
14324
14325
14326     if test $gl_cv_have_include_next = yes; then
14327       gl_cv_next_errno_h='<'errno.h'>'
14328     else
14329       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
14330$as_echo_n "checking absolute name of <errno.h>... " >&6; }
14331if ${gl_cv_next_errno_h+:} false; then :
14332  $as_echo_n "(cached) " >&6
14333else
14334
14335
14336
14337  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14338/* end confdefs.h.  */
14339#include <errno.h>
14340_ACEOF
14341                case "$host_os" in
14342    aix*) gl_absname_cpp="$ac_cpp -C" ;;
14343    *)    gl_absname_cpp="$ac_cpp" ;;
14344  esac
14345
14346  case "$host_os" in
14347    mingw*)
14348                                          gl_dirsep_regex='[/\\]'
14349      ;;
14350    *)
14351      gl_dirsep_regex='\/'
14352      ;;
14353  esac
14354      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14355  gl_header_literal_regex=`echo 'errno.h' \
14356                           | sed -e "$gl_make_literal_regex_sed"`
14357  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14358      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14359      s|^/[^/]|//&|
14360      p
14361      q
14362    }'
14363
14364        gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14365  sed -n "$gl_absolute_header_sed"`
14366
14367           gl_header=$gl_cv_absolute_errno_h
14368           gl_cv_next_errno_h='"'$gl_header'"'
14369
14370
14371fi
14372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
14373$as_echo "$gl_cv_next_errno_h" >&6; }
14374     fi
14375     NEXT_ERRNO_H=$gl_cv_next_errno_h
14376
14377     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14378       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14379       gl_next_as_first_directive='<'errno.h'>'
14380     else
14381       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14382       gl_next_as_first_directive=$gl_cv_next_errno_h
14383     fi
14384     NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
14385
14386
14387
14388
14389    ERRNO_H='errno.h'
14390  fi
14391
14392   if test -n "$ERRNO_H"; then
14393  GL_GENERATE_ERRNO_H_TRUE=
14394  GL_GENERATE_ERRNO_H_FALSE='#'
14395else
14396  GL_GENERATE_ERRNO_H_TRUE='#'
14397  GL_GENERATE_ERRNO_H_FALSE=
14398fi
14399
14400
14401  if test -n "$ERRNO_H"; then
14402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
14403$as_echo_n "checking for EMULTIHOP value... " >&6; }
14404if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
14405  $as_echo_n "(cached) " >&6
14406else
14407
14408      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14409/* end confdefs.h.  */
14410
14411#include <errno.h>
14412#ifdef EMULTIHOP
14413yes
14414#endif
14415
14416_ACEOF
14417if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14418  $EGREP "yes" >/dev/null 2>&1; then :
14419  gl_cv_header_errno_h_EMULTIHOP=yes
14420else
14421  gl_cv_header_errno_h_EMULTIHOP=no
14422fi
14423rm -f conftest*
14424
14425      if test $gl_cv_header_errno_h_EMULTIHOP = no; then
14426        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14427/* end confdefs.h.  */
14428
14429#define _XOPEN_SOURCE_EXTENDED 1
14430#include <errno.h>
14431#ifdef EMULTIHOP
14432yes
14433#endif
14434
14435_ACEOF
14436if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14437  $EGREP "yes" >/dev/null 2>&1; then :
14438  gl_cv_header_errno_h_EMULTIHOP=hidden
14439fi
14440rm -f conftest*
14441
14442        if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
14443                              if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
14444#define _XOPEN_SOURCE_EXTENDED 1
14445#include <errno.h>
14446/* The following two lines are a workaround against an autoconf-2.52 bug.  */
14447#include <stdio.h>
14448#include <stdlib.h>
14449"; then :
14450
14451fi
14452
14453        fi
14454      fi
14455
14456fi
14457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
14458$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
14459    case $gl_cv_header_errno_h_EMULTIHOP in
14460      yes | no)
14461        EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
14462        ;;
14463      *)
14464        EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
14465        ;;
14466    esac
14467
14468
14469  fi
14470
14471
14472  if test -n "$ERRNO_H"; then
14473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
14474$as_echo_n "checking for ENOLINK value... " >&6; }
14475if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
14476  $as_echo_n "(cached) " >&6
14477else
14478
14479      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14480/* end confdefs.h.  */
14481
14482#include <errno.h>
14483#ifdef ENOLINK
14484yes
14485#endif
14486
14487_ACEOF
14488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14489  $EGREP "yes" >/dev/null 2>&1; then :
14490  gl_cv_header_errno_h_ENOLINK=yes
14491else
14492  gl_cv_header_errno_h_ENOLINK=no
14493fi
14494rm -f conftest*
14495
14496      if test $gl_cv_header_errno_h_ENOLINK = no; then
14497        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14498/* end confdefs.h.  */
14499
14500#define _XOPEN_SOURCE_EXTENDED 1
14501#include <errno.h>
14502#ifdef ENOLINK
14503yes
14504#endif
14505
14506_ACEOF
14507if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14508  $EGREP "yes" >/dev/null 2>&1; then :
14509  gl_cv_header_errno_h_ENOLINK=hidden
14510fi
14511rm -f conftest*
14512
14513        if test $gl_cv_header_errno_h_ENOLINK = hidden; then
14514                              if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
14515#define _XOPEN_SOURCE_EXTENDED 1
14516#include <errno.h>
14517/* The following two lines are a workaround against an autoconf-2.52 bug.  */
14518#include <stdio.h>
14519#include <stdlib.h>
14520"; then :
14521
14522fi
14523
14524        fi
14525      fi
14526
14527fi
14528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
14529$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
14530    case $gl_cv_header_errno_h_ENOLINK in
14531      yes | no)
14532        ENOLINK_HIDDEN=0; ENOLINK_VALUE=
14533        ;;
14534      *)
14535        ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
14536        ;;
14537    esac
14538
14539
14540  fi
14541
14542
14543  if test -n "$ERRNO_H"; then
14544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
14545$as_echo_n "checking for EOVERFLOW value... " >&6; }
14546if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
14547  $as_echo_n "(cached) " >&6
14548else
14549
14550      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14551/* end confdefs.h.  */
14552
14553#include <errno.h>
14554#ifdef EOVERFLOW
14555yes
14556#endif
14557
14558_ACEOF
14559if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14560  $EGREP "yes" >/dev/null 2>&1; then :
14561  gl_cv_header_errno_h_EOVERFLOW=yes
14562else
14563  gl_cv_header_errno_h_EOVERFLOW=no
14564fi
14565rm -f conftest*
14566
14567      if test $gl_cv_header_errno_h_EOVERFLOW = no; then
14568        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14569/* end confdefs.h.  */
14570
14571#define _XOPEN_SOURCE_EXTENDED 1
14572#include <errno.h>
14573#ifdef EOVERFLOW
14574yes
14575#endif
14576
14577_ACEOF
14578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14579  $EGREP "yes" >/dev/null 2>&1; then :
14580  gl_cv_header_errno_h_EOVERFLOW=hidden
14581fi
14582rm -f conftest*
14583
14584        if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
14585                              if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
14586#define _XOPEN_SOURCE_EXTENDED 1
14587#include <errno.h>
14588/* The following two lines are a workaround against an autoconf-2.52 bug.  */
14589#include <stdio.h>
14590#include <stdlib.h>
14591"; then :
14592
14593fi
14594
14595        fi
14596      fi
14597
14598fi
14599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
14600$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
14601    case $gl_cv_header_errno_h_EOVERFLOW in
14602      yes | no)
14603        EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
14604        ;;
14605      *)
14606        EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
14607        ;;
14608    esac
14609
14610
14611  fi
14612
14613
14614
14615
14616$as_echo "#define HAVE_DECL_STRERROR_R 1" >>confdefs.h
14617
14618
14619$as_echo "#define HAVE_STRERROR_R 1" >>confdefs.h
14620
14621
14622$as_echo "#define STRERROR_R_CHAR_P 0" >>confdefs.h
14623
14624
14625
14626  XGETTEXT_EXTRA_OPTIONS=
14627
14628
14629
14630
14631
14632  ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
14633"
14634if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
14635
14636cat >>confdefs.h <<_ACEOF
14637#define HAVE_SIG_ATOMIC_T 1
14638_ACEOF
14639
14640
14641else
14642
14643$as_echo "#define sig_atomic_t int" >>confdefs.h
14644
14645fi
14646
14647
14648
14649  GNULIB_DPRINTF=0;
14650  GNULIB_FCLOSE=0;
14651  GNULIB_FDOPEN=0;
14652  GNULIB_FFLUSH=0;
14653  GNULIB_FGETC=0;
14654  GNULIB_FGETS=0;
14655  GNULIB_FOPEN=0;
14656  GNULIB_FPRINTF=0;
14657  GNULIB_FPRINTF_POSIX=0;
14658  GNULIB_FPURGE=0;
14659  GNULIB_FPUTC=0;
14660  GNULIB_FPUTS=0;
14661  GNULIB_FREAD=0;
14662  GNULIB_FREOPEN=0;
14663  GNULIB_FSCANF=0;
14664  GNULIB_FSEEK=0;
14665  GNULIB_FSEEKO=0;
14666  GNULIB_FTELL=0;
14667  GNULIB_FTELLO=0;
14668  GNULIB_FWRITE=0;
14669  GNULIB_GETC=0;
14670  GNULIB_GETCHAR=0;
14671  GNULIB_GETDELIM=0;
14672  GNULIB_GETLINE=0;
14673  GNULIB_OBSTACK_PRINTF=0;
14674  GNULIB_OBSTACK_PRINTF_POSIX=0;
14675  GNULIB_PCLOSE=0;
14676  GNULIB_PERROR=0;
14677  GNULIB_POPEN=0;
14678  GNULIB_PRINTF=0;
14679  GNULIB_PRINTF_POSIX=0;
14680  GNULIB_PUTC=0;
14681  GNULIB_PUTCHAR=0;
14682  GNULIB_PUTS=0;
14683  GNULIB_REMOVE=0;
14684  GNULIB_RENAME=0;
14685  GNULIB_RENAMEAT=0;
14686  GNULIB_SCANF=0;
14687  GNULIB_SNPRINTF=0;
14688  GNULIB_SPRINTF_POSIX=0;
14689  GNULIB_STDIO_H_NONBLOCKING=0;
14690  GNULIB_STDIO_H_SIGPIPE=0;
14691  GNULIB_TMPFILE=0;
14692  GNULIB_VASPRINTF=0;
14693  GNULIB_VFSCANF=0;
14694  GNULIB_VSCANF=0;
14695  GNULIB_VDPRINTF=0;
14696  GNULIB_VFPRINTF=0;
14697  GNULIB_VFPRINTF_POSIX=0;
14698  GNULIB_VPRINTF=0;
14699  GNULIB_VPRINTF_POSIX=0;
14700  GNULIB_VSNPRINTF=0;
14701  GNULIB_VSPRINTF_POSIX=0;
14702    HAVE_DECL_FPURGE=1;
14703  HAVE_DECL_FSEEKO=1;
14704  HAVE_DECL_FTELLO=1;
14705  HAVE_DECL_GETDELIM=1;
14706  HAVE_DECL_GETLINE=1;
14707  HAVE_DECL_OBSTACK_PRINTF=1;
14708  HAVE_DECL_SNPRINTF=1;
14709  HAVE_DECL_VSNPRINTF=1;
14710  HAVE_DPRINTF=1;
14711  HAVE_FSEEKO=1;
14712  HAVE_FTELLO=1;
14713  HAVE_PCLOSE=1;
14714  HAVE_POPEN=1;
14715  HAVE_RENAMEAT=1;
14716  HAVE_VASPRINTF=1;
14717  HAVE_VDPRINTF=1;
14718  REPLACE_DPRINTF=0;
14719  REPLACE_FCLOSE=0;
14720  REPLACE_FDOPEN=0;
14721  REPLACE_FFLUSH=0;
14722  REPLACE_FOPEN=0;
14723  REPLACE_FPRINTF=0;
14724  REPLACE_FPURGE=0;
14725  REPLACE_FREOPEN=0;
14726  REPLACE_FSEEK=0;
14727  REPLACE_FSEEKO=0;
14728  REPLACE_FTELL=0;
14729  REPLACE_FTELLO=0;
14730  REPLACE_GETDELIM=0;
14731  REPLACE_GETLINE=0;
14732  REPLACE_OBSTACK_PRINTF=0;
14733  REPLACE_PERROR=0;
14734  REPLACE_POPEN=0;
14735  REPLACE_PRINTF=0;
14736  REPLACE_REMOVE=0;
14737  REPLACE_RENAME=0;
14738  REPLACE_RENAMEAT=0;
14739  REPLACE_SNPRINTF=0;
14740  REPLACE_SPRINTF=0;
14741  REPLACE_STDIO_READ_FUNCS=0;
14742  REPLACE_STDIO_WRITE_FUNCS=0;
14743  REPLACE_TMPFILE=0;
14744  REPLACE_VASPRINTF=0;
14745  REPLACE_VDPRINTF=0;
14746  REPLACE_VFPRINTF=0;
14747  REPLACE_VPRINTF=0;
14748  REPLACE_VSNPRINTF=0;
14749  REPLACE_VSPRINTF=0;
14750
14751
14752  GNULIB_FCNTL=0;
14753  GNULIB_NONBLOCKING=0;
14754  GNULIB_OPEN=0;
14755  GNULIB_OPENAT=0;
14756    HAVE_FCNTL=1;
14757  HAVE_OPENAT=1;
14758  REPLACE_FCNTL=0;
14759  REPLACE_OPEN=0;
14760  REPLACE_OPENAT=0;
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
14772$as_echo_n "checking for working fcntl.h... " >&6; }
14773if ${gl_cv_header_working_fcntl_h+:} false; then :
14774  $as_echo_n "(cached) " >&6
14775else
14776  if test "$cross_compiling" = yes; then :
14777  gl_cv_header_working_fcntl_h=cross-compiling
14778else
14779  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14780/* end confdefs.h.  */
14781#include <sys/types.h>
14782           #include <sys/stat.h>
14783           #if HAVE_UNISTD_H
14784           # include <unistd.h>
14785           #else /* on Windows with MSVC */
14786           # include <io.h>
14787           # include <stdlib.h>
14788           # defined sleep(n) _sleep ((n) * 1000)
14789           #endif
14790           #include <fcntl.h>
14791           #ifndef O_NOATIME
14792            #define O_NOATIME 0
14793           #endif
14794           #ifndef O_NOFOLLOW
14795            #define O_NOFOLLOW 0
14796           #endif
14797           static int const constants[] =
14798            {
14799              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
14800              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
14801            };
14802
14803int
14804main ()
14805{
14806
14807            int result = !constants;
14808            #if HAVE_SYMLINK
14809            {
14810              static char const sym[] = "conftest.sym";
14811              if (symlink ("/dev/null", sym) != 0)
14812                result |= 2;
14813              else
14814                {
14815                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
14816                  if (fd >= 0)
14817                    {
14818                      close (fd);
14819                      result |= 4;
14820                    }
14821                }
14822              if (unlink (sym) != 0 || symlink (".", sym) != 0)
14823                result |= 2;
14824              else
14825                {
14826                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
14827                  if (fd >= 0)
14828                    {
14829                      close (fd);
14830                      result |= 4;
14831                    }
14832                }
14833              unlink (sym);
14834            }
14835            #endif
14836            {
14837              static char const file[] = "confdefs.h";
14838              int fd = open (file, O_RDONLY | O_NOATIME);
14839              if (fd < 0)
14840                result |= 8;
14841              else
14842                {
14843                  struct stat st0;
14844                  if (fstat (fd, &st0) != 0)
14845                    result |= 16;
14846                  else
14847                    {
14848                      char c;
14849                      sleep (1);
14850                      if (read (fd, &c, 1) != 1)
14851                        result |= 24;
14852                      else
14853                        {
14854                          if (close (fd) != 0)
14855                            result |= 32;
14856                          else
14857                            {
14858                              struct stat st1;
14859                              if (stat (file, &st1) != 0)
14860                                result |= 40;
14861                              else
14862                                if (st0.st_atime != st1.st_atime)
14863                                  result |= 64;
14864                            }
14865                        }
14866                    }
14867                }
14868            }
14869            return result;
14870  ;
14871  return 0;
14872}
14873_ACEOF
14874if ac_fn_c_try_run "$LINENO"; then :
14875  gl_cv_header_working_fcntl_h=yes
14876else
14877  case $? in #(
14878        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
14879        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
14880        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
14881         *) gl_cv_header_working_fcntl_h='no';;
14882        esac
14883fi
14884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14885  conftest.$ac_objext conftest.beam conftest.$ac_ext
14886fi
14887
14888fi
14889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
14890$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
14891
14892  case $gl_cv_header_working_fcntl_h in #(
14893  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
14894  *) ac_val=1;;
14895  esac
14896
14897cat >>confdefs.h <<_ACEOF
14898#define HAVE_WORKING_O_NOATIME $ac_val
14899_ACEOF
14900
14901
14902  case $gl_cv_header_working_fcntl_h in #(
14903  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
14904  *) ac_val=1;;
14905  esac
14906
14907cat >>confdefs.h <<_ACEOF
14908#define HAVE_WORKING_O_NOFOLLOW $ac_val
14909_ACEOF
14910
14911
14912ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
14913if test "x$ac_cv_type_mode_t" = xyes; then :
14914
14915else
14916
14917cat >>confdefs.h <<_ACEOF
14918#define mode_t int
14919_ACEOF
14920
14921fi
14922
14923
14924
14925
14926
14927
14928
14929
14930    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
14931$as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
14932if ${gl_cv_var_stdin_large_offset+:} false; then :
14933  $as_echo_n "(cached) " >&6
14934else
14935  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14936/* end confdefs.h.  */
14937#include <stdio.h>
14938int
14939main ()
14940{
14941#if defined __SL64 && defined __SCLE /* cygwin */
14942  /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
14943     fseeko/ftello needlessly fail.  This bug was fixed in 1.5.25, and
14944     it is easier to do a version check than building a runtime test.  */
14945# include <cygwin/version.h>
14946# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
14947  choke me
14948# endif
14949#endif
14950  ;
14951  return 0;
14952}
14953_ACEOF
14954if ac_fn_c_try_link "$LINENO"; then :
14955  gl_cv_var_stdin_large_offset=yes
14956else
14957  gl_cv_var_stdin_large_offset=no
14958fi
14959rm -f core conftest.err conftest.$ac_objext \
14960    conftest$ac_exeext conftest.$ac_ext
14961fi
14962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
14963$as_echo "$gl_cv_var_stdin_large_offset" >&6; }
14964
14965
14966
14967
14968
14969  case "$host_os" in
14970    mingw*)
14971                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
14972$as_echo_n "checking for 64-bit off_t... " >&6; }
14973if ${gl_cv_type_off_t_64+:} false; then :
14974  $as_echo_n "(cached) " >&6
14975else
14976  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14977/* end confdefs.h.  */
14978#include <sys/types.h>
14979                int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
14980
14981int
14982main ()
14983{
14984
14985  ;
14986  return 0;
14987}
14988_ACEOF
14989if ac_fn_c_try_compile "$LINENO"; then :
14990  gl_cv_type_off_t_64=yes
14991else
14992  gl_cv_type_off_t_64=no
14993fi
14994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14995
14996fi
14997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
14998$as_echo "$gl_cv_type_off_t_64" >&6; }
14999      if test $gl_cv_type_off_t_64 = no; then
15000        WINDOWS_64_BIT_OFF_T=1
15001      else
15002        WINDOWS_64_BIT_OFF_T=0
15003      fi
15004                  WINDOWS_64_BIT_ST_SIZE=1
15005      ;;
15006    *)
15007                                                      WINDOWS_64_BIT_OFF_T=0
15008      WINDOWS_64_BIT_ST_SIZE=0
15009      ;;
15010  esac
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028     if test $gl_cv_have_include_next = yes; then
15029       gl_cv_next_sys_types_h='<'sys/types.h'>'
15030     else
15031       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
15032$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
15033if ${gl_cv_next_sys_types_h+:} false; then :
15034  $as_echo_n "(cached) " >&6
15035else
15036
15037
15038
15039  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15040/* end confdefs.h.  */
15041#include <sys/types.h>
15042_ACEOF
15043                case "$host_os" in
15044    aix*) gl_absname_cpp="$ac_cpp -C" ;;
15045    *)    gl_absname_cpp="$ac_cpp" ;;
15046  esac
15047
15048  case "$host_os" in
15049    mingw*)
15050                                          gl_dirsep_regex='[/\\]'
15051      ;;
15052    *)
15053      gl_dirsep_regex='\/'
15054      ;;
15055  esac
15056      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15057  gl_header_literal_regex=`echo 'sys/types.h' \
15058                           | sed -e "$gl_make_literal_regex_sed"`
15059  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15060      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15061      s|^/[^/]|//&|
15062      p
15063      q
15064    }'
15065
15066        gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15067  sed -n "$gl_absolute_header_sed"`
15068
15069           gl_header=$gl_cv_absolute_sys_types_h
15070           gl_cv_next_sys_types_h='"'$gl_header'"'
15071
15072
15073fi
15074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
15075$as_echo "$gl_cv_next_sys_types_h" >&6; }
15076     fi
15077     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
15078
15079     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15080       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15081       gl_next_as_first_directive='<'sys/types.h'>'
15082     else
15083       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15084       gl_next_as_first_directive=$gl_cv_next_sys_types_h
15085     fi
15086     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
15099if test "x$ac_cv_have_decl_fseeko" = xyes; then :
15100  ac_have_decl=1
15101else
15102  ac_have_decl=0
15103fi
15104
15105cat >>confdefs.h <<_ACEOF
15106#define HAVE_DECL_FSEEKO $ac_have_decl
15107_ACEOF
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
15118$as_echo_n "checking for fseeko... " >&6; }
15119if ${gl_cv_func_fseeko+:} false; then :
15120  $as_echo_n "(cached) " >&6
15121else
15122
15123      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15124/* end confdefs.h.  */
15125#include <stdio.h>
15126
15127int
15128main ()
15129{
15130fseeko (stdin, 0, 0);
15131  ;
15132  return 0;
15133}
15134_ACEOF
15135if ac_fn_c_try_link "$LINENO"; then :
15136  gl_cv_func_fseeko=yes
15137else
15138  gl_cv_func_fseeko=no
15139fi
15140rm -f core conftest.err conftest.$ac_objext \
15141    conftest$ac_exeext conftest.$ac_ext
15142
15143fi
15144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
15145$as_echo "$gl_cv_func_fseeko" >&6; }
15146
15147
15148  if test $ac_cv_have_decl_fseeko = no; then
15149    HAVE_DECL_FSEEKO=0
15150  fi
15151
15152  if test $gl_cv_func_fseeko = no; then
15153    HAVE_FSEEKO=0
15154  else
15155    if test $WINDOWS_64_BIT_OFF_T = 1; then
15156      REPLACE_FSEEKO=1
15157    fi
15158    if test $gl_cv_var_stdin_large_offset = no; then
15159      REPLACE_FSEEKO=1
15160    fi
15161
15162
15163
15164  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
15165$as_echo_n "checking whether fflush works on input streams... " >&6; }
15166if ${gl_cv_func_fflush_stdin+:} false; then :
15167  $as_echo_n "(cached) " >&6
15168else
15169  echo hello world > conftest.txt
15170     if test "$cross_compiling" = yes; then :
15171  gl_cv_func_fflush_stdin=cross
15172else
15173  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15174/* end confdefs.h.  */
15175
15176#include <stdio.h>
15177#if HAVE_UNISTD_H
15178# include <unistd.h>
15179#else /* on Windows with MSVC */
15180# include <io.h>
15181#endif
15182
15183int
15184main ()
15185{
15186FILE *f = fopen ("conftest.txt", "r");
15187         char buffer[10];
15188         int fd;
15189         int c;
15190         if (f == NULL)
15191           return 1;
15192         fd = fileno (f);
15193         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
15194           return 2;
15195         /* For deterministic results, ensure f read a bigger buffer.  */
15196         if (lseek (fd, 0, SEEK_CUR) == 5)
15197           return 3;
15198         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
15199            on BSD systems and on mingw.  */
15200         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
15201           return 4;
15202         if (lseek (fd, 0, SEEK_CUR) != 5)
15203           return 5;
15204         /* Verify behaviour of fflush after ungetc. See
15205            <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
15206         /* Verify behaviour of fflush after a backup ungetc.  This fails on
15207            mingw.  */
15208         c = fgetc (f);
15209         ungetc (c, f);
15210         fflush (f);
15211         if (fgetc (f) != c)
15212           return 6;
15213         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
15214            on glibc 2.8 and on BSD systems.  */
15215         c = fgetc (f);
15216         ungetc ('@', f);
15217         fflush (f);
15218         if (fgetc (f) != c)
15219           return 7;
15220         return 0;
15221
15222  ;
15223  return 0;
15224}
15225_ACEOF
15226if ac_fn_c_try_run "$LINENO"; then :
15227  gl_cv_func_fflush_stdin=yes
15228else
15229  gl_cv_func_fflush_stdin=no
15230fi
15231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15232  conftest.$ac_objext conftest.beam conftest.$ac_ext
15233fi
15234
15235     rm conftest.txt
15236
15237fi
15238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
15239$as_echo "$gl_cv_func_fflush_stdin" >&6; }
15240  case $gl_cv_func_fflush_stdin in
15241    yes) gl_func_fflush_stdin=1 ;;
15242    no)  gl_func_fflush_stdin=0 ;;
15243    *)   gl_func_fflush_stdin='(-1)' ;;
15244  esac
15245
15246cat >>confdefs.h <<_ACEOF
15247#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
15248_ACEOF
15249
15250
15251      if test $gl_cv_func_fflush_stdin != yes; then
15252        REPLACE_FSEEKO=1
15253      fi
15254
15255  fi
15256
15257
15258     GNULIB_FCHMODAT=0;
15259  GNULIB_FSTAT=0;
15260  GNULIB_FSTATAT=0;
15261  GNULIB_FUTIMENS=0;
15262  GNULIB_LCHMOD=0;
15263  GNULIB_LSTAT=0;
15264  GNULIB_MKDIRAT=0;
15265  GNULIB_MKFIFO=0;
15266  GNULIB_MKFIFOAT=0;
15267  GNULIB_MKNOD=0;
15268  GNULIB_MKNODAT=0;
15269  GNULIB_STAT=0;
15270  GNULIB_UTIMENSAT=0;
15271    HAVE_FCHMODAT=1;
15272  HAVE_FSTATAT=1;
15273  HAVE_FUTIMENS=1;
15274  HAVE_LCHMOD=1;
15275  HAVE_LSTAT=1;
15276  HAVE_MKDIRAT=1;
15277  HAVE_MKFIFO=1;
15278  HAVE_MKFIFOAT=1;
15279  HAVE_MKNOD=1;
15280  HAVE_MKNODAT=1;
15281  HAVE_UTIMENSAT=1;
15282  REPLACE_FSTAT=0;
15283  REPLACE_FSTATAT=0;
15284  REPLACE_FUTIMENS=0;
15285  REPLACE_LSTAT=0;
15286  REPLACE_MKDIR=0;
15287  REPLACE_MKFIFO=0;
15288  REPLACE_MKNOD=0;
15289  REPLACE_STAT=0;
15290  REPLACE_UTIMENSAT=0;
15291
15292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
15293$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
15294if ${ac_cv_header_stat_broken+:} false; then :
15295  $as_echo_n "(cached) " >&6
15296else
15297  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15298/* end confdefs.h.  */
15299#include <sys/types.h>
15300#include <sys/stat.h>
15301
15302#if defined S_ISBLK && defined S_IFDIR
15303extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
15304#endif
15305
15306#if defined S_ISBLK && defined S_IFCHR
15307extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
15308#endif
15309
15310#if defined S_ISLNK && defined S_IFREG
15311extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
15312#endif
15313
15314#if defined S_ISSOCK && defined S_IFREG
15315extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
15316#endif
15317
15318_ACEOF
15319if ac_fn_c_try_compile "$LINENO"; then :
15320  ac_cv_header_stat_broken=no
15321else
15322  ac_cv_header_stat_broken=yes
15323fi
15324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15325fi
15326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
15327$as_echo "$ac_cv_header_stat_broken" >&6; }
15328if test $ac_cv_header_stat_broken = yes; then
15329
15330$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
15331
15332fi
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350     if test $gl_cv_have_include_next = yes; then
15351       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
15352     else
15353       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
15354$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
15355if ${gl_cv_next_sys_stat_h+:} false; then :
15356  $as_echo_n "(cached) " >&6
15357else
15358
15359             if test $ac_cv_header_sys_stat_h = yes; then
15360
15361
15362
15363
15364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15365/* end confdefs.h.  */
15366#include <sys/stat.h>
15367_ACEOF
15368                case "$host_os" in
15369    aix*) gl_absname_cpp="$ac_cpp -C" ;;
15370    *)    gl_absname_cpp="$ac_cpp" ;;
15371  esac
15372
15373  case "$host_os" in
15374    mingw*)
15375                                          gl_dirsep_regex='[/\\]'
15376      ;;
15377    *)
15378      gl_dirsep_regex='\/'
15379      ;;
15380  esac
15381      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15382  gl_header_literal_regex=`echo 'sys/stat.h' \
15383                           | sed -e "$gl_make_literal_regex_sed"`
15384  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15385      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15386      s|^/[^/]|//&|
15387      p
15388      q
15389    }'
15390
15391        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15392  sed -n "$gl_absolute_header_sed"`
15393
15394           gl_header=$gl_cv_absolute_sys_stat_h
15395           gl_cv_next_sys_stat_h='"'$gl_header'"'
15396          else
15397               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
15398             fi
15399
15400
15401fi
15402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
15403$as_echo "$gl_cv_next_sys_stat_h" >&6; }
15404     fi
15405     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
15406
15407     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15408       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15409       gl_next_as_first_directive='<'sys/stat.h'>'
15410     else
15411       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15412       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
15413     fi
15414     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
15427
15428$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
15429
15430  fi
15431
15432      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
15433     #include <sys/stat.h>
15434"
15435if test "x$ac_cv_type_nlink_t" = xyes; then :
15436
15437else
15438
15439$as_echo "#define nlink_t int" >>confdefs.h
15440
15441fi
15442
15443
15444
15445    for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
15446    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15448$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15449if eval \${$as_gl_Symbol+:} false; then :
15450  $as_echo_n "(cached) " >&6
15451else
15452  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15453/* end confdefs.h.  */
15454#include <sys/stat.h>
15455
15456int
15457main ()
15458{
15459#undef $gl_func
15460  (void) $gl_func;
15461  ;
15462  return 0;
15463}
15464_ACEOF
15465if ac_fn_c_try_compile "$LINENO"; then :
15466  eval "$as_gl_Symbol=yes"
15467else
15468  eval "$as_gl_Symbol=no"
15469fi
15470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15471fi
15472eval ac_res=\$$as_gl_Symbol
15473	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15474$as_echo "$ac_res" >&6; }
15475    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15476  cat >>confdefs.h <<_ACEOF
15477#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15478_ACEOF
15479
15480                     eval ac_cv_have_decl_$gl_func=yes
15481fi
15482      done
15483
15484
15485ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
15486if test "x$ac_cv_have_decl_ftello" = xyes; then :
15487  ac_have_decl=1
15488else
15489  ac_have_decl=0
15490fi
15491
15492cat >>confdefs.h <<_ACEOF
15493#define HAVE_DECL_FTELLO $ac_have_decl
15494_ACEOF
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505  if test $ac_cv_have_decl_ftello = no; then
15506    HAVE_DECL_FTELLO=0
15507  fi
15508
15509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
15510$as_echo_n "checking for ftello... " >&6; }
15511if ${gl_cv_func_ftello+:} false; then :
15512  $as_echo_n "(cached) " >&6
15513else
15514
15515      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15516/* end confdefs.h.  */
15517#include <stdio.h>
15518int
15519main ()
15520{
15521ftello (stdin);
15522  ;
15523  return 0;
15524}
15525_ACEOF
15526if ac_fn_c_try_link "$LINENO"; then :
15527  gl_cv_func_ftello=yes
15528else
15529  gl_cv_func_ftello=no
15530fi
15531rm -f core conftest.err conftest.$ac_objext \
15532    conftest$ac_exeext conftest.$ac_ext
15533
15534fi
15535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
15536$as_echo "$gl_cv_func_ftello" >&6; }
15537  if test $gl_cv_func_ftello = no; then
15538    HAVE_FTELLO=0
15539  else
15540    if test $WINDOWS_64_BIT_OFF_T = 1; then
15541      REPLACE_FTELLO=1
15542    fi
15543    if test $gl_cv_var_stdin_large_offset = no; then
15544      REPLACE_FTELLO=1
15545    fi
15546    if test $REPLACE_FTELLO = 0; then
15547
15548      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
15549$as_echo_n "checking whether ftello works... " >&6; }
15550if ${gl_cv_func_ftello_works+:} false; then :
15551  $as_echo_n "(cached) " >&6
15552else
15553
15554                              case "$host_os" in
15555                      # Guess no on Solaris.
15556            solaris*) gl_cv_func_ftello_works="guessing no" ;;
15557                      # Guess yes otherwise.
15558            *)        gl_cv_func_ftello_works="guessing yes" ;;
15559          esac
15560          if test "$cross_compiling" = yes; then :
15561  :
15562else
15563  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15564/* end confdefs.h.  */
15565
15566#include <stdio.h>
15567#include <stdlib.h>
15568#include <string.h>
15569#define TESTFILE "conftest.tmp"
15570int
15571main (void)
15572{
15573  FILE *fp;
15574
15575  /* Create a file with some contents.  */
15576  fp = fopen (TESTFILE, "w");
15577  if (fp == NULL)
15578    return 70;
15579  if (fwrite ("foogarsh", 1, 8, fp) < 8)
15580    return 71;
15581  if (fclose (fp))
15582    return 72;
15583
15584  /* The file's contents is now "foogarsh".  */
15585
15586  /* Try writing after reading to EOF.  */
15587  fp = fopen (TESTFILE, "r+");
15588  if (fp == NULL)
15589    return 73;
15590  if (fseek (fp, -1, SEEK_END))
15591    return 74;
15592  if (!(getc (fp) == 'h'))
15593    return 1;
15594  if (!(getc (fp) == EOF))
15595    return 2;
15596  if (!(ftell (fp) == 8))
15597    return 3;
15598  if (!(ftell (fp) == 8))
15599    return 4;
15600  if (!(putc ('!', fp) == '!'))
15601    return 5;
15602  if (!(ftell (fp) == 9))
15603    return 6;
15604  if (!(fclose (fp) == 0))
15605    return 7;
15606  fp = fopen (TESTFILE, "r");
15607  if (fp == NULL)
15608    return 75;
15609  {
15610    char buf[10];
15611    if (!(fread (buf, 1, 10, fp) == 9))
15612      return 10;
15613    if (!(memcmp (buf, "foogarsh!", 9) == 0))
15614      return 11;
15615  }
15616  if (!(fclose (fp) == 0))
15617    return 12;
15618
15619  /* The file's contents is now "foogarsh!".  */
15620
15621  return 0;
15622}
15623_ACEOF
15624if ac_fn_c_try_run "$LINENO"; then :
15625  gl_cv_func_ftello_works=yes
15626else
15627  gl_cv_func_ftello_works=no
15628fi
15629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15630  conftest.$ac_objext conftest.beam conftest.$ac_ext
15631fi
15632
15633
15634fi
15635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
15636$as_echo "$gl_cv_func_ftello_works" >&6; }
15637      case "$gl_cv_func_ftello_works" in
15638        *yes) ;;
15639        *)
15640          REPLACE_FTELLO=1
15641
15642$as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
15643
15644          ;;
15645      esac
15646    fi
15647  fi
15648
15649
15650
15651ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
15652if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
15653  ac_have_decl=1
15654else
15655  ac_have_decl=0
15656fi
15657
15658cat >>confdefs.h <<_ACEOF
15659#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
15660_ACEOF
15661
15662
15663
15664
15665
15666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
15667$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
15668if ${ac_cv_c_restrict+:} false; then :
15669  $as_echo_n "(cached) " >&6
15670else
15671  ac_cv_c_restrict=no
15672   # The order here caters to the fact that C++ does not require restrict.
15673   for ac_kw in __restrict __restrict__ _Restrict restrict; do
15674     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15675/* end confdefs.h.  */
15676typedef int *int_ptr;
15677	   int foo (int_ptr $ac_kw ip) { return ip[0]; }
15678	   int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
15679	   int bar (int ip[$ac_kw]) { return ip[0]; }
15680
15681int
15682main ()
15683{
15684int s[1];
15685	   int *$ac_kw t = s;
15686	   t[0] = 0;
15687	   return foo (t) + bar (t);
15688
15689  ;
15690  return 0;
15691}
15692_ACEOF
15693if ac_fn_c_try_compile "$LINENO"; then :
15694  ac_cv_c_restrict=$ac_kw
15695fi
15696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15697     test "$ac_cv_c_restrict" != no && break
15698   done
15699
15700fi
15701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
15702$as_echo "$ac_cv_c_restrict" >&6; }
15703
15704 case $ac_cv_c_restrict in
15705   restrict) ;;
15706   no) $as_echo "#define restrict /**/" >>confdefs.h
15707 ;;
15708   *)  cat >>confdefs.h <<_ACEOF
15709#define restrict $ac_cv_c_restrict
15710_ACEOF
15711 ;;
15712 esac
15713
15714
15715  GNULIB_GETTIMEOFDAY=0;
15716    HAVE_GETTIMEOFDAY=1;
15717  HAVE_STRUCT_TIMEVAL=1;
15718  HAVE_SYS_TIME_H=1;
15719  HAVE_TIMEZONE_T=0;
15720  REPLACE_GETTIMEOFDAY=0;
15721  REPLACE_STRUCT_TIMEVAL=0;
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738     if test $gl_cv_have_include_next = yes; then
15739       gl_cv_next_sys_time_h='<'sys/time.h'>'
15740     else
15741       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
15742$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
15743if ${gl_cv_next_sys_time_h+:} false; then :
15744  $as_echo_n "(cached) " >&6
15745else
15746
15747             if test $ac_cv_header_sys_time_h = yes; then
15748
15749
15750
15751
15752  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15753/* end confdefs.h.  */
15754#include <sys/time.h>
15755_ACEOF
15756                case "$host_os" in
15757    aix*) gl_absname_cpp="$ac_cpp -C" ;;
15758    *)    gl_absname_cpp="$ac_cpp" ;;
15759  esac
15760
15761  case "$host_os" in
15762    mingw*)
15763                                          gl_dirsep_regex='[/\\]'
15764      ;;
15765    *)
15766      gl_dirsep_regex='\/'
15767      ;;
15768  esac
15769      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15770  gl_header_literal_regex=`echo 'sys/time.h' \
15771                           | sed -e "$gl_make_literal_regex_sed"`
15772  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15773      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15774      s|^/[^/]|//&|
15775      p
15776      q
15777    }'
15778
15779        gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15780  sed -n "$gl_absolute_header_sed"`
15781
15782           gl_header=$gl_cv_absolute_sys_time_h
15783           gl_cv_next_sys_time_h='"'$gl_header'"'
15784          else
15785               gl_cv_next_sys_time_h='<'sys/time.h'>'
15786             fi
15787
15788
15789fi
15790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
15791$as_echo "$gl_cv_next_sys_time_h" >&6; }
15792     fi
15793     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
15794
15795     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15796       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15797       gl_next_as_first_directive='<'sys/time.h'>'
15798     else
15799       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15800       gl_next_as_first_directive=$gl_cv_next_sys_time_h
15801     fi
15802     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
15803
15804
15805
15806
15807
15808  if test $ac_cv_header_sys_time_h != yes; then
15809    HAVE_SYS_TIME_H=0
15810  fi
15811
15812
15813
15814
15815
15816  if test $ac_cv_header_sys_socket_h != yes; then
15817                    for ac_header in winsock2.h
15818do :
15819  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
15820if test "x$ac_cv_header_winsock2_h" = xyes; then :
15821  cat >>confdefs.h <<_ACEOF
15822#define HAVE_WINSOCK2_H 1
15823_ACEOF
15824
15825fi
15826
15827done
15828
15829  fi
15830  if test "$ac_cv_header_winsock2_h" = yes; then
15831    HAVE_WINSOCK2_H=1
15832    UNISTD_H_HAVE_WINSOCK2_H=1
15833    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
15834  else
15835    HAVE_WINSOCK2_H=0
15836  fi
15837
15838
15839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
15840$as_echo_n "checking for struct timeval... " >&6; }
15841if ${gl_cv_sys_struct_timeval+:} false; then :
15842  $as_echo_n "(cached) " >&6
15843else
15844  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15845/* end confdefs.h.  */
15846#if HAVE_SYS_TIME_H
15847             #include <sys/time.h>
15848            #endif
15849            #include <time.h>
15850            #if HAVE_WINSOCK2_H
15851            # include <winsock2.h>
15852            #endif
15853
15854int
15855main ()
15856{
15857static struct timeval x; x.tv_sec = x.tv_usec;
15858  ;
15859  return 0;
15860}
15861_ACEOF
15862if ac_fn_c_try_compile "$LINENO"; then :
15863  gl_cv_sys_struct_timeval=yes
15864else
15865  gl_cv_sys_struct_timeval=no
15866fi
15867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15868
15869fi
15870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
15871$as_echo "$gl_cv_sys_struct_timeval" >&6; }
15872  if test $gl_cv_sys_struct_timeval != yes; then
15873    HAVE_STRUCT_TIMEVAL=0
15874  else
15875                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
15876$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
15877if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
15878  $as_echo_n "(cached) " >&6
15879else
15880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15881/* end confdefs.h.  */
15882#if HAVE_SYS_TIME_H
15883               #include <sys/time.h>
15884              #endif
15885              #include <time.h>
15886              #if HAVE_WINSOCK2_H
15887              # include <winsock2.h>
15888              #endif
15889
15890int
15891main ()
15892{
15893static struct timeval x;
15894              typedef int verify_tv_sec_type[
15895                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
15896              ];
15897
15898  ;
15899  return 0;
15900}
15901_ACEOF
15902if ac_fn_c_try_compile "$LINENO"; then :
15903  gl_cv_sys_struct_timeval_tv_sec=yes
15904else
15905  gl_cv_sys_struct_timeval_tv_sec=no
15906fi
15907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15908
15909fi
15910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
15911$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
15912    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
15913      REPLACE_STRUCT_TIMEVAL=1
15914    fi
15915  fi
15916
15917
15918    for gl_func in gettimeofday; do
15919    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15921$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15922if eval \${$as_gl_Symbol+:} false; then :
15923  $as_echo_n "(cached) " >&6
15924else
15925  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15926/* end confdefs.h.  */
15927
15928#if HAVE_SYS_TIME_H
15929# include <sys/time.h>
15930#endif
15931#include <time.h>
15932
15933int
15934main ()
15935{
15936#undef $gl_func
15937  (void) $gl_func;
15938  ;
15939  return 0;
15940}
15941_ACEOF
15942if ac_fn_c_try_compile "$LINENO"; then :
15943  eval "$as_gl_Symbol=yes"
15944else
15945  eval "$as_gl_Symbol=no"
15946fi
15947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15948fi
15949eval ac_res=\$$as_gl_Symbol
15950	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15951$as_echo "$ac_res" >&6; }
15952    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15953  cat >>confdefs.h <<_ACEOF
15954#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15955_ACEOF
15956
15957                     eval ac_cv_have_decl_$gl_func=yes
15958fi
15959      done
15960
15961
15962
15963
15964
15965
15966
15967
15968  GNULIB_ICONV=0;
15969    ICONV_CONST=;
15970  REPLACE_ICONV=0;
15971  REPLACE_ICONV_OPEN=0;
15972  REPLACE_ICONV_UTF=0;
15973  ICONV_H='';
15974   if test -n "$ICONV_H"; then
15975  GL_GENERATE_ICONV_H_TRUE=
15976  GL_GENERATE_ICONV_H_FALSE='#'
15977else
15978  GL_GENERATE_ICONV_H_TRUE='#'
15979  GL_GENERATE_ICONV_H_FALSE=
15980fi
15981
15982
15983
15984
15985
15986
15987
15988          am_save_CPPFLAGS="$CPPFLAGS"
15989
15990  for element in $INCICONV; do
15991    haveit=
15992    for x in $CPPFLAGS; do
15993
15994  acl_save_prefix="$prefix"
15995  prefix="$acl_final_prefix"
15996  acl_save_exec_prefix="$exec_prefix"
15997  exec_prefix="$acl_final_exec_prefix"
15998  eval x=\"$x\"
15999  exec_prefix="$acl_save_exec_prefix"
16000  prefix="$acl_save_prefix"
16001
16002      if test "X$x" = "X$element"; then
16003        haveit=yes
16004        break
16005      fi
16006    done
16007    if test -z "$haveit"; then
16008      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16009    fi
16010  done
16011
16012
16013  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
16014$as_echo_n "checking for iconv... " >&6; }
16015if ${am_cv_func_iconv+:} false; then :
16016  $as_echo_n "(cached) " >&6
16017else
16018
16019    am_cv_func_iconv="no, consider installing GNU libiconv"
16020    am_cv_lib_iconv=no
16021    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16022/* end confdefs.h.  */
16023
16024#include <stdlib.h>
16025#include <iconv.h>
16026
16027int
16028main ()
16029{
16030iconv_t cd = iconv_open("","");
16031           iconv(cd,NULL,NULL,NULL,NULL);
16032           iconv_close(cd);
16033  ;
16034  return 0;
16035}
16036_ACEOF
16037if ac_fn_c_try_link "$LINENO"; then :
16038  am_cv_func_iconv=yes
16039fi
16040rm -f core conftest.err conftest.$ac_objext \
16041    conftest$ac_exeext conftest.$ac_ext
16042    if test "$am_cv_func_iconv" != yes; then
16043      am_save_LIBS="$LIBS"
16044      LIBS="$LIBS $LIBICONV"
16045      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16046/* end confdefs.h.  */
16047
16048#include <stdlib.h>
16049#include <iconv.h>
16050
16051int
16052main ()
16053{
16054iconv_t cd = iconv_open("","");
16055             iconv(cd,NULL,NULL,NULL,NULL);
16056             iconv_close(cd);
16057  ;
16058  return 0;
16059}
16060_ACEOF
16061if ac_fn_c_try_link "$LINENO"; then :
16062  am_cv_lib_iconv=yes
16063        am_cv_func_iconv=yes
16064fi
16065rm -f core conftest.err conftest.$ac_objext \
16066    conftest$ac_exeext conftest.$ac_ext
16067      LIBS="$am_save_LIBS"
16068    fi
16069
16070fi
16071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
16072$as_echo "$am_cv_func_iconv" >&6; }
16073  if test "$am_cv_func_iconv" = yes; then
16074    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
16075$as_echo_n "checking for working iconv... " >&6; }
16076if ${am_cv_func_iconv_works+:} false; then :
16077  $as_echo_n "(cached) " >&6
16078else
16079
16080                  am_save_LIBS="$LIBS"
16081      if test $am_cv_lib_iconv = yes; then
16082        LIBS="$LIBS $LIBICONV"
16083      fi
16084      am_cv_func_iconv_works=no
16085      for ac_iconv_const in '' 'const'; do
16086        if test "$cross_compiling" = yes; then :
16087  case "$host_os" in
16088             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
16089             *)            am_cv_func_iconv_works="guessing yes" ;;
16090           esac
16091else
16092  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16093/* end confdefs.h.  */
16094
16095#include <iconv.h>
16096#include <string.h>
16097
16098#ifndef ICONV_CONST
16099# define ICONV_CONST $ac_iconv_const
16100#endif
16101
16102int
16103main ()
16104{
16105int result = 0;
16106  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
16107     returns.  */
16108  {
16109    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
16110    if (cd_utf8_to_88591 != (iconv_t)(-1))
16111      {
16112        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
16113        char buf[10];
16114        ICONV_CONST char *inptr = input;
16115        size_t inbytesleft = strlen (input);
16116        char *outptr = buf;
16117        size_t outbytesleft = sizeof (buf);
16118        size_t res = iconv (cd_utf8_to_88591,
16119                            &inptr, &inbytesleft,
16120                            &outptr, &outbytesleft);
16121        if (res == 0)
16122          result |= 1;
16123        iconv_close (cd_utf8_to_88591);
16124      }
16125  }
16126  /* Test against Solaris 10 bug: Failures are not distinguishable from
16127     successful returns.  */
16128  {
16129    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
16130    if (cd_ascii_to_88591 != (iconv_t)(-1))
16131      {
16132        static ICONV_CONST char input[] = "\263";
16133        char buf[10];
16134        ICONV_CONST char *inptr = input;
16135        size_t inbytesleft = strlen (input);
16136        char *outptr = buf;
16137        size_t outbytesleft = sizeof (buf);
16138        size_t res = iconv (cd_ascii_to_88591,
16139                            &inptr, &inbytesleft,
16140                            &outptr, &outbytesleft);
16141        if (res == 0)
16142          result |= 2;
16143        iconv_close (cd_ascii_to_88591);
16144      }
16145  }
16146  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
16147  {
16148    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
16149    if (cd_88591_to_utf8 != (iconv_t)(-1))
16150      {
16151        static ICONV_CONST char input[] = "\304";
16152        static char buf[2] = { (char)0xDE, (char)0xAD };
16153        ICONV_CONST char *inptr = input;
16154        size_t inbytesleft = 1;
16155        char *outptr = buf;
16156        size_t outbytesleft = 1;
16157        size_t res = iconv (cd_88591_to_utf8,
16158                            &inptr, &inbytesleft,
16159                            &outptr, &outbytesleft);
16160        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
16161          result |= 4;
16162        iconv_close (cd_88591_to_utf8);
16163      }
16164  }
16165#if 0 /* This bug could be worked around by the caller.  */
16166  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
16167  {
16168    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
16169    if (cd_88591_to_utf8 != (iconv_t)(-1))
16170      {
16171        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
16172        char buf[50];
16173        ICONV_CONST char *inptr = input;
16174        size_t inbytesleft = strlen (input);
16175        char *outptr = buf;
16176        size_t outbytesleft = sizeof (buf);
16177        size_t res = iconv (cd_88591_to_utf8,
16178                            &inptr, &inbytesleft,
16179                            &outptr, &outbytesleft);
16180        if ((int)res > 0)
16181          result |= 8;
16182        iconv_close (cd_88591_to_utf8);
16183      }
16184  }
16185#endif
16186  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
16187     provided.  */
16188  if (/* Try standardized names.  */
16189      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
16190      /* Try IRIX, OSF/1 names.  */
16191      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
16192      /* Try AIX names.  */
16193      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
16194      /* Try HP-UX names.  */
16195      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
16196    result |= 16;
16197  return result;
16198
16199  ;
16200  return 0;
16201}
16202_ACEOF
16203if ac_fn_c_try_run "$LINENO"; then :
16204  am_cv_func_iconv_works=yes
16205fi
16206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16207  conftest.$ac_objext conftest.beam conftest.$ac_ext
16208fi
16209
16210        test "$am_cv_func_iconv_works" = no || break
16211      done
16212      LIBS="$am_save_LIBS"
16213
16214fi
16215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
16216$as_echo "$am_cv_func_iconv_works" >&6; }
16217    case "$am_cv_func_iconv_works" in
16218      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
16219      *)   am_func_iconv=yes ;;
16220    esac
16221  else
16222    am_func_iconv=no am_cv_lib_iconv=no
16223  fi
16224  if test "$am_func_iconv" = yes; then
16225
16226$as_echo "#define HAVE_ICONV 1" >>confdefs.h
16227
16228  fi
16229  if test "$am_cv_lib_iconv" = yes; then
16230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
16231$as_echo_n "checking how to link with libiconv... " >&6; }
16232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
16233$as_echo "$LIBICONV" >&6; }
16234  else
16235            CPPFLAGS="$am_save_CPPFLAGS"
16236    LIBICONV=
16237    LTLIBICONV=
16238  fi
16239
16240
16241
16242  if test "$am_cv_func_iconv" = yes; then
16243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
16244$as_echo_n "checking for iconv declaration... " >&6; }
16245    if ${am_cv_proto_iconv+:} false; then :
16246  $as_echo_n "(cached) " >&6
16247else
16248
16249      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16250/* end confdefs.h.  */
16251
16252#include <stdlib.h>
16253#include <iconv.h>
16254extern
16255#ifdef __cplusplus
16256"C"
16257#endif
16258#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
16259size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
16260#else
16261size_t iconv();
16262#endif
16263
16264int
16265main ()
16266{
16267
16268  ;
16269  return 0;
16270}
16271_ACEOF
16272if ac_fn_c_try_compile "$LINENO"; then :
16273  am_cv_proto_iconv_arg1=""
16274else
16275  am_cv_proto_iconv_arg1="const"
16276fi
16277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16278      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);"
16279fi
16280
16281    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
16282    { $as_echo "$as_me:${as_lineno-$LINENO}: result:
16283         $am_cv_proto_iconv" >&5
16284$as_echo "
16285         $am_cv_proto_iconv" >&6; }
16286  else
16287            am_cv_proto_iconv_arg1=""
16288  fi
16289
16290cat >>confdefs.h <<_ACEOF
16291#define ICONV_CONST $am_cv_proto_iconv_arg1
16292_ACEOF
16293
16294
16295     if test -n "$am_cv_proto_iconv_arg1"; then
16296       ICONV_CONST="const"
16297     fi
16298
16299
16300
16301
16302
16303  GNULIB_SOCKET=0;
16304  GNULIB_CONNECT=0;
16305  GNULIB_ACCEPT=0;
16306  GNULIB_BIND=0;
16307  GNULIB_GETPEERNAME=0;
16308  GNULIB_GETSOCKNAME=0;
16309  GNULIB_GETSOCKOPT=0;
16310  GNULIB_LISTEN=0;
16311  GNULIB_RECV=0;
16312  GNULIB_SEND=0;
16313  GNULIB_RECVFROM=0;
16314  GNULIB_SENDTO=0;
16315  GNULIB_SETSOCKOPT=0;
16316  GNULIB_SHUTDOWN=0;
16317  GNULIB_ACCEPT4=0;
16318  HAVE_STRUCT_SOCKADDR_STORAGE=1;
16319  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
16320
16321  HAVE_SA_FAMILY_T=1;
16322  HAVE_ACCEPT4=1;
16323
16324
16325   if test $ac_cv_header_sys_socket_h = no; then
16326                         for ac_header in ws2tcpip.h
16327do :
16328  ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
16329if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
16330  cat >>confdefs.h <<_ACEOF
16331#define HAVE_WS2TCPIP_H 1
16332_ACEOF
16333
16334fi
16335
16336done
16337
16338   fi
16339
16340
16341
16342
16343
16344        case "$host_os" in
16345    osf*)
16346
16347$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
16348
16349      ;;
16350  esac
16351
16352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
16353$as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
16354if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
16355  $as_echo_n "(cached) " >&6
16356else
16357
16358      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16359/* end confdefs.h.  */
16360#include <sys/socket.h>
16361int
16362main ()
16363{
16364
16365  ;
16366  return 0;
16367}
16368_ACEOF
16369if ac_fn_c_try_compile "$LINENO"; then :
16370  gl_cv_header_sys_socket_h_selfcontained=yes
16371else
16372  gl_cv_header_sys_socket_h_selfcontained=no
16373fi
16374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16375
16376fi
16377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
16378$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
16379  if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
16380            for ac_func in shutdown
16381do :
16382  ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
16383if test "x$ac_cv_func_shutdown" = xyes; then :
16384  cat >>confdefs.h <<_ACEOF
16385#define HAVE_SHUTDOWN 1
16386_ACEOF
16387
16388fi
16389done
16390
16391    if test $ac_cv_func_shutdown = yes; then
16392      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
16393$as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
16394if ${gl_cv_header_sys_socket_h_shut+:} false; then :
16395  $as_echo_n "(cached) " >&6
16396else
16397
16398          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16399/* end confdefs.h.  */
16400#include <sys/socket.h>
16401int
16402main ()
16403{
16404int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
16405  ;
16406  return 0;
16407}
16408_ACEOF
16409if ac_fn_c_try_compile "$LINENO"; then :
16410  gl_cv_header_sys_socket_h_shut=yes
16411else
16412  gl_cv_header_sys_socket_h_shut=no
16413fi
16414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16415
16416fi
16417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
16418$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
16419      if test $gl_cv_header_sys_socket_h_shut = no; then
16420        SYS_SOCKET_H='sys/socket.h'
16421      fi
16422    fi
16423  fi
16424  # We need to check for ws2tcpip.h now.
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436     if test $gl_cv_have_include_next = yes; then
16437       gl_cv_next_sys_socket_h='<'sys/socket.h'>'
16438     else
16439       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
16440$as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
16441if ${gl_cv_next_sys_socket_h+:} false; then :
16442  $as_echo_n "(cached) " >&6
16443else
16444
16445             if test $ac_cv_header_sys_socket_h = yes; then
16446
16447
16448
16449
16450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16451/* end confdefs.h.  */
16452#include <sys/socket.h>
16453_ACEOF
16454                case "$host_os" in
16455    aix*) gl_absname_cpp="$ac_cpp -C" ;;
16456    *)    gl_absname_cpp="$ac_cpp" ;;
16457  esac
16458
16459  case "$host_os" in
16460    mingw*)
16461                                          gl_dirsep_regex='[/\\]'
16462      ;;
16463    *)
16464      gl_dirsep_regex='\/'
16465      ;;
16466  esac
16467      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16468  gl_header_literal_regex=`echo 'sys/socket.h' \
16469                           | sed -e "$gl_make_literal_regex_sed"`
16470  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16471      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16472      s|^/[^/]|//&|
16473      p
16474      q
16475    }'
16476
16477        gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16478  sed -n "$gl_absolute_header_sed"`
16479
16480           gl_header=$gl_cv_absolute_sys_socket_h
16481           gl_cv_next_sys_socket_h='"'$gl_header'"'
16482          else
16483               gl_cv_next_sys_socket_h='<'sys/socket.h'>'
16484             fi
16485
16486
16487fi
16488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
16489$as_echo "$gl_cv_next_sys_socket_h" >&6; }
16490     fi
16491     NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
16492
16493     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16494       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16495       gl_next_as_first_directive='<'sys/socket.h'>'
16496     else
16497       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16498       gl_next_as_first_directive=$gl_cv_next_sys_socket_h
16499     fi
16500     NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
16501
16502
16503
16504
16505  if test $ac_cv_header_sys_socket_h = yes; then
16506    HAVE_SYS_SOCKET_H=1
16507    HAVE_WS2TCPIP_H=0
16508  else
16509    HAVE_SYS_SOCKET_H=0
16510    if test $ac_cv_header_ws2tcpip_h = yes; then
16511      HAVE_WS2TCPIP_H=1
16512    else
16513      HAVE_WS2TCPIP_H=0
16514    fi
16515  fi
16516
16517
16518
16519  ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
16520  /* sys/types.h is not needed according to POSIX, but the
16521     sys/socket.h in i386-unknown-freebsd4.10 and
16522     powerpc-apple-darwin5.5 required it. */
16523#include <sys/types.h>
16524#ifdef HAVE_SYS_SOCKET_H
16525#include <sys/socket.h>
16526#endif
16527#ifdef HAVE_WS2TCPIP_H
16528#include <ws2tcpip.h>
16529#endif
16530
16531"
16532if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
16533
16534cat >>confdefs.h <<_ACEOF
16535#define HAVE_STRUCT_SOCKADDR_STORAGE 1
16536_ACEOF
16537
16538
16539fi
16540ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
16541  /* sys/types.h is not needed according to POSIX, but the
16542     sys/socket.h in i386-unknown-freebsd4.10 and
16543     powerpc-apple-darwin5.5 required it. */
16544#include <sys/types.h>
16545#ifdef HAVE_SYS_SOCKET_H
16546#include <sys/socket.h>
16547#endif
16548#ifdef HAVE_WS2TCPIP_H
16549#include <ws2tcpip.h>
16550#endif
16551
16552"
16553if test "x$ac_cv_type_sa_family_t" = xyes; then :
16554
16555cat >>confdefs.h <<_ACEOF
16556#define HAVE_SA_FAMILY_T 1
16557_ACEOF
16558
16559
16560fi
16561
16562  if test $ac_cv_type_struct_sockaddr_storage = no; then
16563    HAVE_STRUCT_SOCKADDR_STORAGE=0
16564  fi
16565  if test $ac_cv_type_sa_family_t = no; then
16566    HAVE_SA_FAMILY_T=0
16567  fi
16568  if test $ac_cv_type_struct_sockaddr_storage != no; then
16569    ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
16570       #ifdef HAVE_SYS_SOCKET_H
16571       #include <sys/socket.h>
16572       #endif
16573       #ifdef HAVE_WS2TCPIP_H
16574       #include <ws2tcpip.h>
16575       #endif
16576
16577"
16578if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
16579
16580cat >>confdefs.h <<_ACEOF
16581#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
16582_ACEOF
16583
16584
16585else
16586  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
16587fi
16588
16589  fi
16590  if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
16591     || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
16592    SYS_SOCKET_H='sys/socket.h'
16593  fi
16594
16595
16596
16597
16598  if test $ac_cv_header_sys_socket_h != yes; then
16599                    for ac_header in winsock2.h
16600do :
16601  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
16602if test "x$ac_cv_header_winsock2_h" = xyes; then :
16603  cat >>confdefs.h <<_ACEOF
16604#define HAVE_WINSOCK2_H 1
16605_ACEOF
16606
16607fi
16608
16609done
16610
16611  fi
16612  if test "$ac_cv_header_winsock2_h" = yes; then
16613    HAVE_WINSOCK2_H=1
16614    UNISTD_H_HAVE_WINSOCK2_H=1
16615    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
16616  else
16617    HAVE_WINSOCK2_H=0
16618  fi
16619
16620
16621
16622
16623    for gl_func in socket connect accept bind getpeername getsockname getsockopt     listen recv send recvfrom sendto setsockopt shutdown accept4; do
16624    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16626$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16627if eval \${$as_gl_Symbol+:} false; then :
16628  $as_echo_n "(cached) " >&6
16629else
16630  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16631/* end confdefs.h.  */
16632
16633/* Some systems require prerequisite headers.  */
16634#include <sys/types.h>
16635#include <sys/socket.h>
16636
16637int
16638main ()
16639{
16640#undef $gl_func
16641  (void) $gl_func;
16642  ;
16643  return 0;
16644}
16645_ACEOF
16646if ac_fn_c_try_compile "$LINENO"; then :
16647  eval "$as_gl_Symbol=yes"
16648else
16649  eval "$as_gl_Symbol=no"
16650fi
16651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16652fi
16653eval ac_res=\$$as_gl_Symbol
16654	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16655$as_echo "$ac_res" >&6; }
16656    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
16657  cat >>confdefs.h <<_ACEOF
16658#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
16659_ACEOF
16660
16661                     eval ac_cv_have_decl_$gl_func=yes
16662fi
16663      done
16664
16665
16666
16667  GNULIB_NL_LANGINFO=0;
16668    HAVE_NL_LANGINFO=1;
16669  REPLACE_NL_LANGINFO=0;
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685     if test $gl_cv_have_include_next = yes; then
16686       gl_cv_next_limits_h='<'limits.h'>'
16687     else
16688       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
16689$as_echo_n "checking absolute name of <limits.h>... " >&6; }
16690if ${gl_cv_next_limits_h+:} false; then :
16691  $as_echo_n "(cached) " >&6
16692else
16693
16694             if test $ac_cv_header_limits_h = yes; then
16695
16696
16697
16698
16699  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16700/* end confdefs.h.  */
16701#include <limits.h>
16702_ACEOF
16703                case "$host_os" in
16704    aix*) gl_absname_cpp="$ac_cpp -C" ;;
16705    *)    gl_absname_cpp="$ac_cpp" ;;
16706  esac
16707
16708  case "$host_os" in
16709    mingw*)
16710                                          gl_dirsep_regex='[/\\]'
16711      ;;
16712    *)
16713      gl_dirsep_regex='\/'
16714      ;;
16715  esac
16716      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16717  gl_header_literal_regex=`echo 'limits.h' \
16718                           | sed -e "$gl_make_literal_regex_sed"`
16719  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16720      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16721      s|^/[^/]|//&|
16722      p
16723      q
16724    }'
16725
16726        gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16727  sed -n "$gl_absolute_header_sed"`
16728
16729           gl_header=$gl_cv_absolute_limits_h
16730           gl_cv_next_limits_h='"'$gl_header'"'
16731          else
16732               gl_cv_next_limits_h='<'limits.h'>'
16733             fi
16734
16735
16736fi
16737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
16738$as_echo "$gl_cv_next_limits_h" >&6; }
16739     fi
16740     NEXT_LIMITS_H=$gl_cv_next_limits_h
16741
16742     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16743       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16744       gl_next_as_first_directive='<'limits.h'>'
16745     else
16746       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16747       gl_next_as_first_directive=$gl_cv_next_limits_h
16748     fi
16749     NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
16750
16751
16752
16753
16754
16755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
16756$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
16757if ${gl_cv_header_limits_width+:} false; then :
16758  $as_echo_n "(cached) " >&6
16759else
16760  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16761/* end confdefs.h.  */
16762#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
16763                           #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
16764                          #endif
16765                          #include <limits.h>
16766                          int ullw = ULLONG_WIDTH;
16767int
16768main ()
16769{
16770
16771  ;
16772  return 0;
16773}
16774_ACEOF
16775if ac_fn_c_try_compile "$LINENO"; then :
16776  gl_cv_header_limits_width=yes
16777else
16778  gl_cv_header_limits_width=no
16779fi
16780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16781fi
16782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
16783$as_echo "$gl_cv_header_limits_width" >&6; }
16784  if test "$gl_cv_header_limits_width" = yes; then
16785    LIMITS_H=
16786  else
16787    LIMITS_H=limits.h
16788  fi
16789
16790   if test -n "$LIMITS_H"; then
16791  GL_GENERATE_LIMITS_H_TRUE=
16792  GL_GENERATE_LIMITS_H_FALSE='#'
16793else
16794  GL_GENERATE_LIMITS_H_TRUE='#'
16795  GL_GENERATE_LIMITS_H_FALSE=
16796fi
16797
16798
16799
16800
16801ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
16802if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
16803  ac_have_decl=1
16804else
16805  ac_have_decl=0
16806fi
16807
16808cat >>confdefs.h <<_ACEOF
16809#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
16810_ACEOF
16811
16812
16813    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
16814$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
16815if ${ac_cv_gnu_library_2_1+:} false; then :
16816  $as_echo_n "(cached) " >&6
16817else
16818  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16819/* end confdefs.h.  */
16820
16821#include <features.h>
16822#ifdef __GNU_LIBRARY__
16823 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
16824  Lucky GNU user
16825 #endif
16826#endif
16827#ifdef __UCLIBC__
16828 Lucky user
16829#endif
16830
16831_ACEOF
16832if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16833  $EGREP "Lucky" >/dev/null 2>&1; then :
16834  ac_cv_gnu_library_2_1=yes
16835else
16836  ac_cv_gnu_library_2_1=no
16837fi
16838rm -f conftest*
16839
16840
16841
16842fi
16843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
16844$as_echo "$ac_cv_gnu_library_2_1" >&6; }
16845
16846    GLIBC21="$ac_cv_gnu_library_2_1"
16847
16848
16849
16850  GNULIB_LOCALECONV=0;
16851  GNULIB_SETLOCALE=0;
16852  GNULIB_DUPLOCALE=0;
16853    HAVE_DUPLOCALE=1;
16854  REPLACE_LOCALECONV=0;
16855  REPLACE_SETLOCALE=0;
16856  REPLACE_DUPLOCALE=0;
16857  REPLACE_STRUCT_LCONV=0;
16858
16859
16860    REPLACE_NULL=0;
16861  HAVE_MAX_ALIGN_T=1;
16862  HAVE_WCHAR_T=1;
16863
16864
16865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
16866$as_echo_n "checking for wchar_t... " >&6; }
16867if ${gt_cv_c_wchar_t+:} false; then :
16868  $as_echo_n "(cached) " >&6
16869else
16870  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16871/* end confdefs.h.  */
16872#include <stddef.h>
16873            wchar_t foo = (wchar_t)'\0';
16874int
16875main ()
16876{
16877
16878  ;
16879  return 0;
16880}
16881_ACEOF
16882if ac_fn_c_try_compile "$LINENO"; then :
16883  gt_cv_c_wchar_t=yes
16884else
16885  gt_cv_c_wchar_t=no
16886fi
16887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16888fi
16889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
16890$as_echo "$gt_cv_c_wchar_t" >&6; }
16891  if test $gt_cv_c_wchar_t = yes; then
16892
16893$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
16894
16895  fi
16896
16897
16898
16899
16900  STDDEF_H=
16901  ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
16902
16903"
16904if test "x$ac_cv_type_max_align_t" = xyes; then :
16905
16906else
16907  HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
16908fi
16909
16910  if test $gt_cv_c_wchar_t = no; then
16911    HAVE_WCHAR_T=0
16912    STDDEF_H=stddef.h
16913  fi
16914  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
16915$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
16916if ${gl_cv_decl_null_works+:} false; then :
16917  $as_echo_n "(cached) " >&6
16918else
16919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16920/* end confdefs.h.  */
16921#include <stddef.h>
16922      int test[2 * (sizeof NULL == sizeof (void *)) -1];
16923
16924int
16925main ()
16926{
16927
16928  ;
16929  return 0;
16930}
16931_ACEOF
16932if ac_fn_c_try_compile "$LINENO"; then :
16933  gl_cv_decl_null_works=yes
16934else
16935  gl_cv_decl_null_works=no
16936fi
16937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16938fi
16939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
16940$as_echo "$gl_cv_decl_null_works" >&6; }
16941  if test $gl_cv_decl_null_works = no; then
16942    REPLACE_NULL=1
16943    STDDEF_H=stddef.h
16944  fi
16945
16946   if test -n "$STDDEF_H"; then
16947  GL_GENERATE_STDDEF_H_TRUE=
16948  GL_GENERATE_STDDEF_H_FALSE='#'
16949else
16950  GL_GENERATE_STDDEF_H_TRUE='#'
16951  GL_GENERATE_STDDEF_H_FALSE=
16952fi
16953
16954  if test -n "$STDDEF_H"; then
16955
16956
16957
16958
16959
16960
16961
16962
16963     if test $gl_cv_have_include_next = yes; then
16964       gl_cv_next_stddef_h='<'stddef.h'>'
16965     else
16966       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
16967$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
16968if ${gl_cv_next_stddef_h+:} false; then :
16969  $as_echo_n "(cached) " >&6
16970else
16971
16972
16973
16974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16975/* end confdefs.h.  */
16976#include <stddef.h>
16977_ACEOF
16978                case "$host_os" in
16979    aix*) gl_absname_cpp="$ac_cpp -C" ;;
16980    *)    gl_absname_cpp="$ac_cpp" ;;
16981  esac
16982
16983  case "$host_os" in
16984    mingw*)
16985                                          gl_dirsep_regex='[/\\]'
16986      ;;
16987    *)
16988      gl_dirsep_regex='\/'
16989      ;;
16990  esac
16991      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16992  gl_header_literal_regex=`echo 'stddef.h' \
16993                           | sed -e "$gl_make_literal_regex_sed"`
16994  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16995      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16996      s|^/[^/]|//&|
16997      p
16998      q
16999    }'
17000
17001        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17002  sed -n "$gl_absolute_header_sed"`
17003
17004           gl_header=$gl_cv_absolute_stddef_h
17005           gl_cv_next_stddef_h='"'$gl_header'"'
17006
17007
17008fi
17009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
17010$as_echo "$gl_cv_next_stddef_h" >&6; }
17011     fi
17012     NEXT_STDDEF_H=$gl_cv_next_stddef_h
17013
17014     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17015       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17016       gl_next_as_first_directive='<'stddef.h'>'
17017     else
17018       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17019       gl_next_as_first_directive=$gl_cv_next_stddef_h
17020     fi
17021     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
17022
17023
17024
17025
17026  fi
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037  LOG_LIBM="$POW_LIBM"
17038
17039
17040
17041
17042  save_LIBS="$LIBS"
17043  LIBS="$LIBS $LOG_LIBM"
17044
17045
17046     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log works" >&5
17047$as_echo_n "checking whether log works... " >&6; }
17048if ${gl_cv_func_log_works+:} false; then :
17049  $as_echo_n "(cached) " >&6
17050else
17051
17052      if test "$cross_compiling" = yes; then :
17053  case "$host_os" in
17054           osf*) gl_cv_func_log_works="guessing no";;
17055           *)    gl_cv_func_log_works="guessing yes";;
17056         esac
17057
17058else
17059  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17060/* end confdefs.h.  */
17061
17062#include <math.h>
17063volatile double x;
17064double y;
17065int main ()
17066{
17067  x = -0.0;
17068  y = log (x);
17069  if (!(y + y == y))
17070    return 1;
17071  return 0;
17072}
17073
17074_ACEOF
17075if ac_fn_c_try_run "$LINENO"; then :
17076  gl_cv_func_log_works=yes
17077else
17078  gl_cv_func_log_works=no
17079fi
17080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17081  conftest.$ac_objext conftest.beam conftest.$ac_ext
17082fi
17083
17084
17085fi
17086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_log_works" >&5
17087$as_echo "$gl_cv_func_log_works" >&6; }
17088
17089  LIBS="$save_LIBS"
17090  case "$gl_cv_func_log_works" in
17091    *yes) ;;
17092    *) REPLACE_LOG=1 ;;
17093  esac
17094
17095
17096
17097
17098
17099
17100      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
17101$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
17102if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
17103  $as_echo_n "(cached) " >&6
17104else
17105  rm -f conftest.sym conftest.file
17106     echo >conftest.file
17107     if test "$cross_compiling" = yes; then :
17108  case "$host_os" in
17109          *-gnu*)
17110            # Guess yes on glibc systems.
17111            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
17112          *)
17113            # If we don't know, assume the worst.
17114            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
17115        esac
17116
17117else
17118  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17119/* end confdefs.h.  */
17120$ac_includes_default
17121int
17122main ()
17123{
17124struct stat sbuf;
17125            if (symlink ("conftest.file", "conftest.sym") != 0)
17126              return 1;
17127            /* Linux will dereference the symlink and fail, as required by
17128               POSIX.  That is better in the sense that it means we will not
17129               have to compile and use the lstat wrapper.  */
17130            return lstat ("conftest.sym/", &sbuf) == 0;
17131
17132  ;
17133  return 0;
17134}
17135_ACEOF
17136if ac_fn_c_try_run "$LINENO"; then :
17137  gl_cv_func_lstat_dereferences_slashed_symlink=yes
17138else
17139  gl_cv_func_lstat_dereferences_slashed_symlink=no
17140fi
17141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17142  conftest.$ac_objext conftest.beam conftest.$ac_ext
17143fi
17144
17145     rm -f conftest.sym conftest.file
17146
17147fi
17148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
17149$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
17150  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
17151    *yes)
17152
17153cat >>confdefs.h <<_ACEOF
17154#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
17155_ACEOF
17156
17157      ;;
17158  esac
17159
17160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
17161$as_echo_n "checking for a sed that does not truncate output... " >&6; }
17162if ${ac_cv_path_SED+:} false; then :
17163  $as_echo_n "(cached) " >&6
17164else
17165            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
17166     for ac_i in 1 2 3 4 5 6 7; do
17167       ac_script="$ac_script$as_nl$ac_script"
17168     done
17169     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
17170     { ac_script=; unset ac_script;}
17171     if test -z "$SED"; then
17172  ac_path_SED_found=false
17173  # Loop through the user's path and test for each of PROGNAME-LIST
17174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17175for as_dir in $PATH
17176do
17177  IFS=$as_save_IFS
17178  test -z "$as_dir" && as_dir=.
17179    for ac_prog in sed gsed; do
17180    for ac_exec_ext in '' $ac_executable_extensions; do
17181      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
17182      as_fn_executable_p "$ac_path_SED" || continue
17183# Check for GNU ac_path_SED and select it if it is found.
17184  # Check for GNU $ac_path_SED
17185case `"$ac_path_SED" --version 2>&1` in
17186*GNU*)
17187  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
17188*)
17189  ac_count=0
17190  $as_echo_n 0123456789 >"conftest.in"
17191  while :
17192  do
17193    cat "conftest.in" "conftest.in" >"conftest.tmp"
17194    mv "conftest.tmp" "conftest.in"
17195    cp "conftest.in" "conftest.nl"
17196    $as_echo '' >> "conftest.nl"
17197    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
17198    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
17199    as_fn_arith $ac_count + 1 && ac_count=$as_val
17200    if test $ac_count -gt ${ac_path_SED_max-0}; then
17201      # Best one so far, save it but keep looking for a better one
17202      ac_cv_path_SED="$ac_path_SED"
17203      ac_path_SED_max=$ac_count
17204    fi
17205    # 10*(2^10) chars as input seems more than enough
17206    test $ac_count -gt 10 && break
17207  done
17208  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
17209esac
17210
17211      $ac_path_SED_found && break 3
17212    done
17213  done
17214  done
17215IFS=$as_save_IFS
17216  if test -z "$ac_cv_path_SED"; then
17217    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
17218  fi
17219else
17220  ac_cv_path_SED=$SED
17221fi
17222
17223fi
17224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
17225$as_echo "$ac_cv_path_SED" >&6; }
17226 SED="$ac_cv_path_SED"
17227  rm -f conftest.sed
17228
17229
17230  GNULIB__EXIT=0;
17231  GNULIB_ATOLL=0;
17232  GNULIB_CALLOC_POSIX=0;
17233  GNULIB_CANONICALIZE_FILE_NAME=0;
17234  GNULIB_GETLOADAVG=0;
17235  GNULIB_GETSUBOPT=0;
17236  GNULIB_GRANTPT=0;
17237  GNULIB_MALLOC_POSIX=0;
17238  GNULIB_MBTOWC=0;
17239  GNULIB_MKDTEMP=0;
17240  GNULIB_MKOSTEMP=0;
17241  GNULIB_MKOSTEMPS=0;
17242  GNULIB_MKSTEMP=0;
17243  GNULIB_MKSTEMPS=0;
17244  GNULIB_POSIX_OPENPT=0;
17245  GNULIB_PTSNAME=0;
17246  GNULIB_PTSNAME_R=0;
17247  GNULIB_PUTENV=0;
17248  GNULIB_QSORT_R=0;
17249  GNULIB_RANDOM=0;
17250  GNULIB_RANDOM_R=0;
17251  GNULIB_REALLOC_POSIX=0;
17252  GNULIB_REALPATH=0;
17253  GNULIB_RPMATCH=0;
17254  GNULIB_SECURE_GETENV=0;
17255  GNULIB_SETENV=0;
17256  GNULIB_STRTOD=0;
17257  GNULIB_STRTOLL=0;
17258  GNULIB_STRTOULL=0;
17259  GNULIB_SYSTEM_POSIX=0;
17260  GNULIB_UNLOCKPT=0;
17261  GNULIB_UNSETENV=0;
17262  GNULIB_WCTOMB=0;
17263    HAVE__EXIT=1;
17264  HAVE_ATOLL=1;
17265  HAVE_CANONICALIZE_FILE_NAME=1;
17266  HAVE_DECL_GETLOADAVG=1;
17267  HAVE_GETSUBOPT=1;
17268  HAVE_GRANTPT=1;
17269  HAVE_MKDTEMP=1;
17270  HAVE_MKOSTEMP=1;
17271  HAVE_MKOSTEMPS=1;
17272  HAVE_MKSTEMP=1;
17273  HAVE_MKSTEMPS=1;
17274  HAVE_POSIX_OPENPT=1;
17275  HAVE_PTSNAME=1;
17276  HAVE_PTSNAME_R=1;
17277  HAVE_QSORT_R=1;
17278  HAVE_RANDOM=1;
17279  HAVE_RANDOM_H=1;
17280  HAVE_RANDOM_R=1;
17281  HAVE_REALPATH=1;
17282  HAVE_RPMATCH=1;
17283  HAVE_SECURE_GETENV=1;
17284  HAVE_SETENV=1;
17285  HAVE_DECL_SETENV=1;
17286  HAVE_STRTOD=1;
17287  HAVE_STRTOLL=1;
17288  HAVE_STRTOULL=1;
17289  HAVE_STRUCT_RANDOM_DATA=1;
17290  HAVE_SYS_LOADAVG_H=0;
17291  HAVE_UNLOCKPT=1;
17292  HAVE_DECL_UNSETENV=1;
17293  REPLACE_CALLOC=0;
17294  REPLACE_CANONICALIZE_FILE_NAME=0;
17295  REPLACE_MALLOC=0;
17296  REPLACE_MBTOWC=0;
17297  REPLACE_MKSTEMP=0;
17298  REPLACE_PTSNAME=0;
17299  REPLACE_PTSNAME_R=0;
17300  REPLACE_PUTENV=0;
17301  REPLACE_QSORT_R=0;
17302  REPLACE_RANDOM_R=0;
17303  REPLACE_REALLOC=0;
17304  REPLACE_REALPATH=0;
17305  REPLACE_SETENV=0;
17306  REPLACE_STRTOD=0;
17307  REPLACE_UNSETENV=0;
17308  REPLACE_WCTOMB=0;
17309
17310
17311  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
17312$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
17313if ${gl_cv_func_malloc_posix+:} false; then :
17314  $as_echo_n "(cached) " >&6
17315else
17316
17317                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17318/* end confdefs.h.  */
17319
17320int
17321main ()
17322{
17323#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17324             choke me
17325             #endif
17326
17327  ;
17328  return 0;
17329}
17330_ACEOF
17331if ac_fn_c_try_compile "$LINENO"; then :
17332  gl_cv_func_malloc_posix=yes
17333else
17334  gl_cv_func_malloc_posix=no
17335fi
17336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17337
17338fi
17339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
17340$as_echo "$gl_cv_func_malloc_posix" >&6; }
17341
17342
17343
17344
17345
17346   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
17347$as_echo_n "checking for mbstate_t... " >&6; }
17348if ${ac_cv_type_mbstate_t+:} false; then :
17349  $as_echo_n "(cached) " >&6
17350else
17351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17352/* end confdefs.h.  */
17353$ac_includes_default
17354/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
17355   <wchar.h>.
17356   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17357   included before <wchar.h>.  */
17358#include <stddef.h>
17359#include <stdio.h>
17360#include <time.h>
17361#include <wchar.h>
17362int
17363main ()
17364{
17365mbstate_t x; return sizeof x;
17366  ;
17367  return 0;
17368}
17369_ACEOF
17370if ac_fn_c_try_compile "$LINENO"; then :
17371  ac_cv_type_mbstate_t=yes
17372else
17373  ac_cv_type_mbstate_t=no
17374fi
17375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17376fi
17377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
17378$as_echo "$ac_cv_type_mbstate_t" >&6; }
17379   if test $ac_cv_type_mbstate_t = yes; then
17380
17381$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
17382
17383   else
17384
17385$as_echo "#define mbstate_t int" >>confdefs.h
17386
17387   fi
17388
17389
17390
17391
17392
17393
17394
17395
17396  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
17397$as_echo_n "checking for a traditional japanese locale... " >&6; }
17398if ${gt_cv_locale_ja+:} false; then :
17399  $as_echo_n "(cached) " >&6
17400else
17401
17402    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17403/* end confdefs.h.  */
17404
17405#include <locale.h>
17406#include <time.h>
17407#if HAVE_LANGINFO_CODESET
17408# include <langinfo.h>
17409#endif
17410#include <stdlib.h>
17411#include <string.h>
17412struct tm t;
17413char buf[16];
17414int main ()
17415{
17416  const char *p;
17417  /* Check whether the given locale name is recognized by the system.  */
17418#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
17419  /* On native Windows, setlocale(category, "") looks at the system settings,
17420     not at the environment variables.  Also, when an encoding suffix such
17421     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
17422     category of the locale to "C".  */
17423  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
17424      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
17425    return 1;
17426#else
17427  if (setlocale (LC_ALL, "") == NULL) return 1;
17428#endif
17429  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
17430     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
17431     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
17432     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
17433     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
17434     some unit tests fail.
17435     On MirBSD 10, when an unsupported locale is specified, setlocale()
17436     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
17437#if HAVE_LANGINFO_CODESET
17438  {
17439    const char *cs = nl_langinfo (CODESET);
17440    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
17441        || strcmp (cs, "UTF-8") == 0)
17442      return 1;
17443  }
17444#endif
17445#ifdef __CYGWIN__
17446  /* On Cygwin, avoid locale names without encoding suffix, because the
17447     locale_charset() function relies on the encoding suffix.  Note that
17448     LC_ALL is set on the command line.  */
17449  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
17450#endif
17451  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
17452     on Cygwin 1.5.x.  */
17453  if (MB_CUR_MAX == 1)
17454    return 1;
17455  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
17456     This excludes the UTF-8 encoding (except on MirBSD).  */
17457  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
17458  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
17459  for (p = buf; *p != '\0'; p++)
17460    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
17461      return 1;
17462  return 0;
17463}
17464
17465_ACEOF
17466    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17467  (eval $ac_link) 2>&5
17468  ac_status=$?
17469  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17470  test $ac_status = 0; } && test -s conftest$ac_exeext; then
17471      case "$host_os" in
17472        # Handle native Windows specially, because there setlocale() interprets
17473        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
17474        # "fr" or "fra" as "French" or "French_France.1252",
17475        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
17476        # "ja" as "Japanese" or "Japanese_Japan.932",
17477        # and similar.
17478        mingw*)
17479          # Note that on native Windows, the Japanese locale is
17480          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
17481          # cannot use it here.
17482          gt_cv_locale_ja=none
17483          ;;
17484        *)
17485          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
17486          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
17487          # configure script would override the LC_ALL setting. Likewise for
17488          # LC_CTYPE, which is also set at the beginning of the configure script.
17489          # Test for the AIX locale name.
17490          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17491            gt_cv_locale_ja=ja_JP
17492          else
17493            # Test for the locale name with explicit encoding suffix.
17494            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17495              gt_cv_locale_ja=ja_JP.EUC-JP
17496            else
17497              # Test for the HP-UX, OSF/1, NetBSD locale name.
17498              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17499                gt_cv_locale_ja=ja_JP.eucJP
17500              else
17501                # Test for the IRIX, FreeBSD locale name.
17502                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17503                  gt_cv_locale_ja=ja_JP.EUC
17504                else
17505                  # Test for the Solaris 7 locale name.
17506                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17507                    gt_cv_locale_ja=ja
17508                  else
17509                    # Special test for NetBSD 1.6.
17510                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
17511                      gt_cv_locale_ja=ja_JP.eucJP
17512                    else
17513                      # None found.
17514                      gt_cv_locale_ja=none
17515                    fi
17516                  fi
17517                fi
17518              fi
17519            fi
17520          fi
17521          ;;
17522      esac
17523    fi
17524    rm -fr conftest*
17525
17526fi
17527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
17528$as_echo "$gt_cv_locale_ja" >&6; }
17529  LOCALE_JA=$gt_cv_locale_ja
17530
17531
17532
17533
17534
17535  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
17536$as_echo_n "checking for a transitional chinese locale... " >&6; }
17537if ${gt_cv_locale_zh_CN+:} false; then :
17538  $as_echo_n "(cached) " >&6
17539else
17540
17541    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17542/* end confdefs.h.  */
17543
17544#include <locale.h>
17545#include <stdlib.h>
17546#include <time.h>
17547#if HAVE_LANGINFO_CODESET
17548# include <langinfo.h>
17549#endif
17550#include <stdlib.h>
17551#include <string.h>
17552struct tm t;
17553char buf[16];
17554int main ()
17555{
17556  const char *p;
17557  /* Check whether the given locale name is recognized by the system.  */
17558#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
17559  /* On native Windows, setlocale(category, "") looks at the system settings,
17560     not at the environment variables.  Also, when an encoding suffix such
17561     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
17562     category of the locale to "C".  */
17563  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
17564      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
17565    return 1;
17566#else
17567  if (setlocale (LC_ALL, "") == NULL) return 1;
17568#endif
17569  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
17570     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
17571     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
17572     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
17573     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
17574     some unit tests fail.
17575     On MirBSD 10, when an unsupported locale is specified, setlocale()
17576     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
17577#if HAVE_LANGINFO_CODESET
17578  {
17579    const char *cs = nl_langinfo (CODESET);
17580    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
17581        || strcmp (cs, "UTF-8") == 0)
17582      return 1;
17583  }
17584#endif
17585#ifdef __CYGWIN__
17586  /* On Cygwin, avoid locale names without encoding suffix, because the
17587     locale_charset() function relies on the encoding suffix.  Note that
17588     LC_ALL is set on the command line.  */
17589  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
17590#endif
17591  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
17592     This excludes the UTF-8 encoding (except on MirBSD).  */
17593  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
17594  if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
17595  for (p = buf; *p != '\0'; p++)
17596    if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
17597      return 1;
17598  /* Check whether a typical GB18030 multibyte sequence is recognized as a
17599     single wide character.  This excludes the GB2312 and GBK encodings.  */
17600  if (mblen ("\203\062\332\066", 5) != 4)
17601    return 1;
17602  return 0;
17603}
17604
17605_ACEOF
17606    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17607  (eval $ac_link) 2>&5
17608  ac_status=$?
17609  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17610  test $ac_status = 0; } && test -s conftest$ac_exeext; then
17611      case "$host_os" in
17612        # Handle native Windows specially, because there setlocale() interprets
17613        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
17614        # "fr" or "fra" as "French" or "French_France.1252",
17615        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
17616        # "ja" as "Japanese" or "Japanese_Japan.932",
17617        # and similar.
17618        mingw*)
17619          # Test for the hypothetical native Windows locale name.
17620          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17621            gt_cv_locale_zh_CN=Chinese_China.54936
17622          else
17623            # None found.
17624            gt_cv_locale_zh_CN=none
17625          fi
17626          ;;
17627        solaris2.8)
17628          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
17629          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
17630          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
17631          gt_cv_locale_zh_CN=none
17632          ;;
17633        *)
17634          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
17635          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
17636          # configure script would override the LC_ALL setting. Likewise for
17637          # LC_CTYPE, which is also set at the beginning of the configure script.
17638          # Test for the locale name without encoding suffix.
17639          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17640            gt_cv_locale_zh_CN=zh_CN
17641          else
17642            # Test for the locale name with explicit encoding suffix.
17643            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17644              gt_cv_locale_zh_CN=zh_CN.GB18030
17645            else
17646              # None found.
17647              gt_cv_locale_zh_CN=none
17648            fi
17649          fi
17650          ;;
17651      esac
17652    else
17653      # If there was a link error, due to mblen(), the system is so old that
17654      # it certainly doesn't have a chinese locale.
17655      gt_cv_locale_zh_CN=none
17656    fi
17657    rm -fr conftest*
17658
17659fi
17660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
17661$as_echo "$gt_cv_locale_zh_CN" >&6; }
17662  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
17663
17664
17665
17666
17667  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
17668$as_echo_n "checking for a french Unicode locale... " >&6; }
17669if ${gt_cv_locale_fr_utf8+:} false; then :
17670  $as_echo_n "(cached) " >&6
17671else
17672
17673    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17674/* end confdefs.h.  */
17675
17676#include <locale.h>
17677#include <time.h>
17678#if HAVE_LANGINFO_CODESET
17679# include <langinfo.h>
17680#endif
17681#include <stdlib.h>
17682#include <string.h>
17683struct tm t;
17684char buf[16];
17685int main () {
17686  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
17687     imitates locale dependent behaviour by looking at the environment
17688     variables, and all locales use the UTF-8 encoding.  */
17689#if !(defined __BEOS__ || defined __HAIKU__)
17690  /* Check whether the given locale name is recognized by the system.  */
17691# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
17692  /* On native Windows, setlocale(category, "") looks at the system settings,
17693     not at the environment variables.  Also, when an encoding suffix such
17694     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
17695     category of the locale to "C".  */
17696  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
17697      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
17698    return 1;
17699# else
17700  if (setlocale (LC_ALL, "") == NULL) return 1;
17701# endif
17702  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
17703     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
17704     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
17705     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
17706     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
17707     some unit tests fail.  */
17708# if HAVE_LANGINFO_CODESET
17709  {
17710    const char *cs = nl_langinfo (CODESET);
17711    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
17712      return 1;
17713  }
17714# endif
17715# ifdef __CYGWIN__
17716  /* On Cygwin, avoid locale names without encoding suffix, because the
17717     locale_charset() function relies on the encoding suffix.  Note that
17718     LC_ALL is set on the command line.  */
17719  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
17720# endif
17721  /* Check whether in the abbreviation of the second month, the second
17722     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
17723     two bytes long, with UTF-8 encoding.  */
17724  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
17725  if (strftime (buf, sizeof (buf), "%b", &t) < 4
17726      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
17727    return 1;
17728#endif
17729#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
17730  /* Check whether the decimal separator is a comma.
17731     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
17732     are nl_langinfo(RADIXCHAR) are both ".".  */
17733  if (localeconv () ->decimal_point[0] != ',') return 1;
17734#endif
17735  return 0;
17736}
17737
17738_ACEOF
17739    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17740  (eval $ac_link) 2>&5
17741  ac_status=$?
17742  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17743  test $ac_status = 0; } && test -s conftest$ac_exeext; then
17744      case "$host_os" in
17745        # Handle native Windows specially, because there setlocale() interprets
17746        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
17747        # "fr" or "fra" as "French" or "French_France.1252",
17748        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
17749        # "ja" as "Japanese" or "Japanese_Japan.932",
17750        # and similar.
17751        mingw*)
17752          # Test for the hypothetical native Windows locale name.
17753          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17754            gt_cv_locale_fr_utf8=French_France.65001
17755          else
17756            # None found.
17757            gt_cv_locale_fr_utf8=none
17758          fi
17759          ;;
17760        *)
17761          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
17762          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
17763          # configure script would override the LC_ALL setting. Likewise for
17764          # LC_CTYPE, which is also set at the beginning of the configure script.
17765          # Test for the usual locale name.
17766          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17767            gt_cv_locale_fr_utf8=fr_FR
17768          else
17769            # Test for the locale name with explicit encoding suffix.
17770            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17771              gt_cv_locale_fr_utf8=fr_FR.UTF-8
17772            else
17773              # Test for the Solaris 7 locale name.
17774              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
17775                gt_cv_locale_fr_utf8=fr.UTF-8
17776              else
17777                # None found.
17778                gt_cv_locale_fr_utf8=none
17779              fi
17780            fi
17781          fi
17782          ;;
17783      esac
17784    fi
17785    rm -fr conftest*
17786
17787fi
17788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
17789$as_echo "$gt_cv_locale_fr_utf8" >&6; }
17790  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
17791
17792
17793
17794
17795
17796
17797
17798  GNULIB_FFSL=0;
17799  GNULIB_FFSLL=0;
17800  GNULIB_MEMCHR=0;
17801  GNULIB_MEMMEM=0;
17802  GNULIB_MEMPCPY=0;
17803  GNULIB_MEMRCHR=0;
17804  GNULIB_RAWMEMCHR=0;
17805  GNULIB_STPCPY=0;
17806  GNULIB_STPNCPY=0;
17807  GNULIB_STRCHRNUL=0;
17808  GNULIB_STRDUP=0;
17809  GNULIB_STRNCAT=0;
17810  GNULIB_STRNDUP=0;
17811  GNULIB_STRNLEN=0;
17812  GNULIB_STRPBRK=0;
17813  GNULIB_STRSEP=0;
17814  GNULIB_STRSTR=0;
17815  GNULIB_STRCASESTR=0;
17816  GNULIB_STRTOK_R=0;
17817  GNULIB_MBSLEN=0;
17818  GNULIB_MBSNLEN=0;
17819  GNULIB_MBSCHR=0;
17820  GNULIB_MBSRCHR=0;
17821  GNULIB_MBSSTR=0;
17822  GNULIB_MBSCASECMP=0;
17823  GNULIB_MBSNCASECMP=0;
17824  GNULIB_MBSPCASECMP=0;
17825  GNULIB_MBSCASESTR=0;
17826  GNULIB_MBSCSPN=0;
17827  GNULIB_MBSPBRK=0;
17828  GNULIB_MBSSPN=0;
17829  GNULIB_MBSSEP=0;
17830  GNULIB_MBSTOK_R=0;
17831  GNULIB_STRERROR=0;
17832  GNULIB_STRERROR_R=0;
17833  GNULIB_STRSIGNAL=0;
17834  GNULIB_STRVERSCMP=0;
17835  HAVE_MBSLEN=0;
17836    HAVE_FFSL=1;
17837  HAVE_FFSLL=1;
17838  HAVE_MEMCHR=1;
17839  HAVE_DECL_MEMMEM=1;
17840  HAVE_MEMPCPY=1;
17841  HAVE_DECL_MEMRCHR=1;
17842  HAVE_RAWMEMCHR=1;
17843  HAVE_STPCPY=1;
17844  HAVE_STPNCPY=1;
17845  HAVE_STRCHRNUL=1;
17846  HAVE_DECL_STRDUP=1;
17847  HAVE_DECL_STRNDUP=1;
17848  HAVE_DECL_STRNLEN=1;
17849  HAVE_STRPBRK=1;
17850  HAVE_STRSEP=1;
17851  HAVE_STRCASESTR=1;
17852  HAVE_DECL_STRTOK_R=1;
17853  HAVE_DECL_STRERROR_R=1;
17854  HAVE_DECL_STRSIGNAL=1;
17855  HAVE_STRVERSCMP=1;
17856  REPLACE_MEMCHR=0;
17857  REPLACE_MEMMEM=0;
17858  REPLACE_STPNCPY=0;
17859  REPLACE_STRDUP=0;
17860  REPLACE_STRSTR=0;
17861  REPLACE_STRCASESTR=0;
17862  REPLACE_STRCHRNUL=0;
17863  REPLACE_STRERROR=0;
17864  REPLACE_STRERROR_R=0;
17865  REPLACE_STRNCAT=0;
17866  REPLACE_STRNDUP=0;
17867  REPLACE_STRNLEN=0;
17868  REPLACE_STRSIGNAL=0;
17869  REPLACE_STRTOK_R=0;
17870  UNDEFINE_STRTOK_R=0;
17871
17872
17873
17874
17875
17876  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
17877  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
17878  # irrelevant for anonymous mappings.
17879  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
17880if test "x$ac_cv_func_mmap" = xyes; then :
17881  gl_have_mmap=yes
17882else
17883  gl_have_mmap=no
17884fi
17885
17886
17887  # Try to allow MAP_ANONYMOUS.
17888  gl_have_mmap_anonymous=no
17889  if test $gl_have_mmap = yes; then
17890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
17891$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
17892    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17893/* end confdefs.h.  */
17894
17895#include <sys/mman.h>
17896#ifdef MAP_ANONYMOUS
17897    I cannot identify this map
17898#endif
17899
17900_ACEOF
17901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17902  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
17903  gl_have_mmap_anonymous=yes
17904fi
17905rm -f conftest*
17906
17907    if test $gl_have_mmap_anonymous != yes; then
17908      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17909/* end confdefs.h.  */
17910
17911#include <sys/mman.h>
17912#ifdef MAP_ANON
17913    I cannot identify this map
17914#endif
17915
17916_ACEOF
17917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17918  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
17919
17920$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
17921
17922         gl_have_mmap_anonymous=yes
17923fi
17924rm -f conftest*
17925
17926    fi
17927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
17928$as_echo "$gl_have_mmap_anonymous" >&6; }
17929    if test $gl_have_mmap_anonymous = yes; then
17930
17931$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
17932
17933    fi
17934  fi
17935
17936
17937
17938
17939
17940
17941  if test $HAVE_MEMCHR = 1; then
17942    # Detect platform-specific bugs in some versions of glibc:
17943    # memchr should not dereference anything with length 0
17944    #   http://bugzilla.redhat.com/499689
17945    # memchr should not dereference overestimated length after a match
17946    #   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
17947    #   http://sourceware.org/bugzilla/show_bug.cgi?id=10162
17948    # Assume that memchr works on platforms that lack mprotect.
17949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
17950$as_echo_n "checking whether memchr works... " >&6; }
17951if ${gl_cv_func_memchr_works+:} false; then :
17952  $as_echo_n "(cached) " >&6
17953else
17954  if test "$cross_compiling" = yes; then :
17955         gl_cv_func_memchr_works="guessing no"
17956else
17957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17958/* end confdefs.h.  */
17959
17960#include <string.h>
17961#if HAVE_SYS_MMAN_H
17962# include <fcntl.h>
17963# include <unistd.h>
17964# include <sys/types.h>
17965# include <sys/mman.h>
17966# ifndef MAP_FILE
17967#  define MAP_FILE 0
17968# endif
17969#endif
17970
17971int
17972main ()
17973{
17974
17975  int result = 0;
17976  char *fence = NULL;
17977#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
17978# if HAVE_MAP_ANONYMOUS
17979  const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
17980  const int fd = -1;
17981# else /* !HAVE_MAP_ANONYMOUS */
17982  const int flags = MAP_FILE | MAP_PRIVATE;
17983  int fd = open ("/dev/zero", O_RDONLY, 0666);
17984  if (fd >= 0)
17985# endif
17986    {
17987      int pagesize = getpagesize ();
17988      char *two_pages =
17989        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
17990                       flags, fd, 0);
17991      if (two_pages != (char *)(-1)
17992          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
17993        fence = two_pages + pagesize;
17994    }
17995#endif
17996  if (fence)
17997    {
17998      if (memchr (fence, 0, 0))
17999        result |= 1;
18000      strcpy (fence - 9, "12345678");
18001      if (memchr (fence - 9, 0, 79) != fence - 1)
18002        result |= 2;
18003      if (memchr (fence - 1, 0, 3) != fence - 1)
18004        result |= 4;
18005    }
18006  return result;
18007
18008  ;
18009  return 0;
18010}
18011_ACEOF
18012if ac_fn_c_try_run "$LINENO"; then :
18013  gl_cv_func_memchr_works=yes
18014else
18015  gl_cv_func_memchr_works=no
18016fi
18017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18018  conftest.$ac_objext conftest.beam conftest.$ac_ext
18019fi
18020
18021fi
18022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
18023$as_echo "$gl_cv_func_memchr_works" >&6; }
18024    if test "$gl_cv_func_memchr_works" != yes; then
18025      REPLACE_MEMCHR=1
18026    fi
18027  fi
18028
18029
18030
18031
18032
18033
18034
18035    gl_cv_c_multiarch=no
18036  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18037/* end confdefs.h.  */
18038#ifndef __APPLE_CC__
18039         not a universal capable compiler
18040        #endif
18041        typedef int dummy;
18042
18043_ACEOF
18044if ac_fn_c_try_compile "$LINENO"; then :
18045
18046               arch=
18047     prev=
18048     for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
18049       if test -n "$prev"; then
18050         case $word in
18051           i?86 | x86_64 | ppc | ppc64)
18052             if test -z "$arch" || test "$arch" = "$word"; then
18053               arch="$word"
18054             else
18055               gl_cv_c_multiarch=yes
18056             fi
18057             ;;
18058         esac
18059         prev=
18060       else
18061         if test "x$word" = "x-arch"; then
18062           prev=arch
18063         fi
18064       fi
18065     done
18066
18067fi
18068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18069  if test $gl_cv_c_multiarch = yes; then
18070    APPLE_UNIVERSAL_BUILD=1
18071  else
18072    APPLE_UNIVERSAL_BUILD=0
18073  fi
18074
18075
18076
18077
18078
18079
18080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
18081$as_echo_n "checking for promoted mode_t type... " >&6; }
18082if ${gl_cv_promoted_mode_t+:} false; then :
18083  $as_echo_n "(cached) " >&6
18084else
18085
18086                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18087/* end confdefs.h.  */
18088#include <sys/types.h>
18089int
18090main ()
18091{
18092typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
18093  ;
18094  return 0;
18095}
18096_ACEOF
18097if ac_fn_c_try_compile "$LINENO"; then :
18098  gl_cv_promoted_mode_t='int'
18099else
18100  gl_cv_promoted_mode_t='mode_t'
18101fi
18102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18103
18104fi
18105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
18106$as_echo "$gl_cv_promoted_mode_t" >&6; }
18107
18108cat >>confdefs.h <<_ACEOF
18109#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
18110_ACEOF
18111
18112
18113
18114
18115
18116     REPLACE_STRERROR_0=0
18117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
18118$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
18119if ${gl_cv_func_strerror_0_works+:} false; then :
18120  $as_echo_n "(cached) " >&6
18121else
18122  if test "$cross_compiling" = yes; then :
18123  case "$host_os" in
18124                 # Guess yes on glibc systems.
18125         *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
18126                 # If we don't know, assume the worst.
18127         *)      gl_cv_func_strerror_0_works="guessing no" ;;
18128       esac
18129
18130else
18131  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18132/* end confdefs.h.  */
18133#include <string.h>
18134           #include <errno.h>
18135
18136int
18137main ()
18138{
18139int result = 0;
18140           char *str;
18141           errno = 0;
18142           str = strerror (0);
18143           if (!*str) result |= 1;
18144           if (errno) result |= 2;
18145           if (strstr (str, "nknown") || strstr (str, "ndefined"))
18146             result |= 4;
18147           return result;
18148  ;
18149  return 0;
18150}
18151_ACEOF
18152if ac_fn_c_try_run "$LINENO"; then :
18153  gl_cv_func_strerror_0_works=yes
18154else
18155  gl_cv_func_strerror_0_works=no
18156fi
18157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18158  conftest.$ac_objext conftest.beam conftest.$ac_ext
18159fi
18160
18161
18162fi
18163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
18164$as_echo "$gl_cv_func_strerror_0_works" >&6; }
18165  case "$gl_cv_func_strerror_0_works" in
18166    *yes) ;;
18167    *)
18168      REPLACE_STRERROR_0=1
18169
18170$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
18171
18172      ;;
18173  esac
18174
18175
18176
18177
18178
18179
18180
18181  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
18182if test "x$ac_cv_func_strerror_r" = xyes; then :
18183
18184fi
18185
18186  if test $ac_cv_func_strerror_r = yes; then
18187    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
18188                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
18189$as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
18190if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
18191  $as_echo_n "(cached) " >&6
18192else
18193  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18194/* end confdefs.h.  */
18195#include <string.h>
18196                int strerror_r (int, char *, size_t);
18197
18198int
18199main ()
18200{
18201
18202  ;
18203  return 0;
18204}
18205_ACEOF
18206if ac_fn_c_try_compile "$LINENO"; then :
18207  gl_cv_func_strerror_r_posix_signature=yes
18208else
18209  gl_cv_func_strerror_r_posix_signature=no
18210fi
18211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18212
18213fi
18214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
18215$as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
18216      if test $gl_cv_func_strerror_r_posix_signature = yes; then
18217                                                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
18218$as_echo_n "checking whether strerror_r works... " >&6; }
18219if ${gl_cv_func_strerror_r_works+:} false; then :
18220  $as_echo_n "(cached) " >&6
18221else
18222  if test "$cross_compiling" = yes; then :
18223
18224              case "$host_os" in
18225                       # Guess no on AIX.
18226                aix*)  gl_cv_func_strerror_r_works="guessing no";;
18227                       # Guess no on HP-UX.
18228                hpux*) gl_cv_func_strerror_r_works="guessing no";;
18229                       # Guess no on BSD variants.
18230                *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
18231                       # Guess yes otherwise.
18232                *)     gl_cv_func_strerror_r_works="guessing yes";;
18233              esac
18234
18235else
18236  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18237/* end confdefs.h.  */
18238#include <errno.h>
18239                  #include <string.h>
18240
18241int
18242main ()
18243{
18244int result = 0;
18245                  char buf[79];
18246                  if (strerror_r (EACCES, buf, 0) < 0)
18247                    result |= 1;
18248                  errno = 0;
18249                  if (strerror_r (EACCES, buf, sizeof buf) != 0)
18250                    result |= 2;
18251                  strcpy (buf, "Unknown");
18252                  if (strerror_r (0, buf, sizeof buf) != 0)
18253                    result |= 4;
18254                  if (errno)
18255                    result |= 8;
18256                  if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
18257                    result |= 0x10;
18258                  errno = 0;
18259                  *buf = 0;
18260                  if (strerror_r (-3, buf, sizeof buf) < 0)
18261                    result |= 0x20;
18262                  if (errno)
18263                    result |= 0x40;
18264                  if (!*buf)
18265                    result |= 0x80;
18266                  return result;
18267
18268  ;
18269  return 0;
18270}
18271_ACEOF
18272if ac_fn_c_try_run "$LINENO"; then :
18273  gl_cv_func_strerror_r_works=yes
18274else
18275  gl_cv_func_strerror_r_works=no
18276fi
18277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18278  conftest.$ac_objext conftest.beam conftest.$ac_ext
18279fi
18280
18281
18282fi
18283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
18284$as_echo "$gl_cv_func_strerror_r_works" >&6; }
18285      else
18286
18287                        if test $ac_cv_func___xpg_strerror_r = yes; then
18288          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
18289$as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
18290if ${gl_cv_func_strerror_r_works+:} false; then :
18291  $as_echo_n "(cached) " >&6
18292else
18293  if test "$cross_compiling" = yes; then :
18294                                  gl_cv_func_strerror_r_works="guessing no"
18295
18296else
18297  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18298/* end confdefs.h.  */
18299#include <errno.h>
18300                    #include <string.h>
18301                    extern
18302                    #ifdef __cplusplus
18303                    "C"
18304                    #endif
18305                    int __xpg_strerror_r(int, char *, size_t);
18306
18307int
18308main ()
18309{
18310int result = 0;
18311                    char buf[256] = "^";
18312                    char copy[256];
18313                    char *str = strerror (-1);
18314                    strcpy (copy, str);
18315                    if (__xpg_strerror_r (-2, buf, 1) == 0)
18316                      result |= 1;
18317                    if (*buf)
18318                      result |= 2;
18319                    __xpg_strerror_r (-2, buf, 256);
18320                    if (strcmp (str, copy))
18321                      result |= 4;
18322                    return result;
18323
18324  ;
18325  return 0;
18326}
18327_ACEOF
18328if ac_fn_c_try_run "$LINENO"; then :
18329  gl_cv_func_strerror_r_works=yes
18330else
18331  gl_cv_func_strerror_r_works=no
18332fi
18333rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18334  conftest.$ac_objext conftest.beam conftest.$ac_ext
18335fi
18336
18337
18338fi
18339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
18340$as_echo "$gl_cv_func_strerror_r_works" >&6; }
18341        fi
18342      fi
18343    fi
18344  fi
18345
18346
18347
18348
18349
18350
18351
18352      ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
18353if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
18354  HAVE_DECL_STRERROR_R=1
18355else
18356  HAVE_DECL_STRERROR_R=0
18357fi
18358
18359
18360cat >>confdefs.h <<_ACEOF
18361#define HAVE_DECL_STRERROR_R_ORIG $HAVE_DECL_STRERROR_R
18362_ACEOF
18363
18364
18365  if test $ac_cv_func_strerror_r = yes; then
18366    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
18367      if test $gl_cv_func_strerror_r_posix_signature = yes; then
18368        case "$gl_cv_func_strerror_r_works" in
18369                    *no) REPLACE_STRERROR_R=1 ;;
18370        esac
18371      else
18372                REPLACE_STRERROR_R=1
18373      fi
18374    else
18375                  REPLACE_STRERROR_R=1
18376    fi
18377  fi
18378
18379  # Overwrite the findings of AC_FUNC_STRERROR_R (for code that uses that).
18380
18381
18382
18383
18384
18385  GNULIB_POSIX_SPAWN=0;
18386  GNULIB_POSIX_SPAWNP=0;
18387  GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0;
18388  GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
18389  GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
18390  GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
18391  GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0;
18392  GNULIB_POSIX_SPAWNATTR_INIT=0;
18393  GNULIB_POSIX_SPAWNATTR_GETFLAGS=0;
18394  GNULIB_POSIX_SPAWNATTR_SETFLAGS=0;
18395  GNULIB_POSIX_SPAWNATTR_GETPGROUP=0;
18396  GNULIB_POSIX_SPAWNATTR_SETPGROUP=0;
18397  GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0;
18398  GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0;
18399  GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0;
18400  GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0;
18401  GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0;
18402  GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0;
18403  GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0;
18404  GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0;
18405  GNULIB_POSIX_SPAWNATTR_DESTROY=0;
18406    HAVE_POSIX_SPAWN=1;
18407  HAVE_POSIX_SPAWNATTR_T=1;
18408  HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
18409
18410  REPLACE_POSIX_SPAWN=0;
18411  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
18412
18413  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
18414
18415  REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
18416
18417
18418
18419
18420
18421  LIB_POSIX_SPAWN=
18422
18423  gl_saved_libs=$LIBS
18424    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing posix_spawn" >&5
18425$as_echo_n "checking for library containing posix_spawn... " >&6; }
18426if ${ac_cv_search_posix_spawn+:} false; then :
18427  $as_echo_n "(cached) " >&6
18428else
18429  ac_func_search_save_LIBS=$LIBS
18430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18431/* end confdefs.h.  */
18432
18433/* Override any GCC internal prototype to avoid an error.
18434   Use char because int might match the return type of a GCC
18435   builtin and then its argument prototype would still apply.  */
18436#ifdef __cplusplus
18437extern "C"
18438#endif
18439char posix_spawn ();
18440int
18441main ()
18442{
18443return posix_spawn ();
18444  ;
18445  return 0;
18446}
18447_ACEOF
18448for ac_lib in '' rt; do
18449  if test -z "$ac_lib"; then
18450    ac_res="none required"
18451  else
18452    ac_res=-l$ac_lib
18453    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18454  fi
18455  if ac_fn_c_try_link "$LINENO"; then :
18456  ac_cv_search_posix_spawn=$ac_res
18457fi
18458rm -f core conftest.err conftest.$ac_objext \
18459    conftest$ac_exeext
18460  if ${ac_cv_search_posix_spawn+:} false; then :
18461  break
18462fi
18463done
18464if ${ac_cv_search_posix_spawn+:} false; then :
18465
18466else
18467  ac_cv_search_posix_spawn=no
18468fi
18469rm conftest.$ac_ext
18470LIBS=$ac_func_search_save_LIBS
18471fi
18472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_posix_spawn" >&5
18473$as_echo "$ac_cv_search_posix_spawn" >&6; }
18474ac_res=$ac_cv_search_posix_spawn
18475if test "$ac_res" != no; then :
18476  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18477  test "$ac_cv_search_posix_spawn" = "none required" ||
18478                    LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn
18479fi
18480
18481    for ac_func in posix_spawn
18482do :
18483  ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
18484if test "x$ac_cv_func_posix_spawn" = xyes; then :
18485  cat >>confdefs.h <<_ACEOF
18486#define HAVE_POSIX_SPAWN 1
18487_ACEOF
18488
18489fi
18490done
18491
18492  LIBS=$gl_saved_libs
18493
18494  if test $ac_cv_func_posix_spawn != yes; then
18495    HAVE_POSIX_SPAWN=0
18496  fi
18497
18498
18499
18500
18501                                      if test $ac_cv_func_posix_spawn = yes; then
18502
18503
18504     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
18505$as_echo_n "checking whether posix_spawn works... " >&6; }
18506if ${gl_cv_func_posix_spawn_works+:} false; then :
18507  $as_echo_n "(cached) " >&6
18508else
18509  if test $cross_compiling = no; then
18510       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18511/* end confdefs.h.  */
18512
18513#include <errno.h>
18514#include <fcntl.h>
18515#include <signal.h>
18516#include <spawn.h>
18517#include <stdbool.h>
18518#include <stdio.h>
18519#include <stdlib.h>
18520#include <string.h>
18521#include <unistd.h>
18522#include <sys/types.h>
18523#include <sys/wait.h>
18524
18525extern char **environ;
18526
18527#ifndef STDIN_FILENO
18528# define STDIN_FILENO 0
18529#endif
18530#ifndef STDOUT_FILENO
18531# define STDOUT_FILENO 1
18532#endif
18533#ifndef STDERR_FILENO
18534# define STDERR_FILENO 2
18535#endif
18536
18537#ifndef WTERMSIG
18538# define WTERMSIG(x) ((x) & 0x7f)
18539#endif
18540#ifndef WIFEXITED
18541# define WIFEXITED(x) (WTERMSIG (x) == 0)
18542#endif
18543#ifndef WEXITSTATUS
18544# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
18545#endif
18546
18547#define CHILD_PROGRAM_FILENAME "/non/exist/ent"
18548
18549static int
18550fd_safer (int fd)
18551{
18552  if (0 <= fd && fd <= 2)
18553    {
18554      int f = fd_safer (dup (fd));
18555      int e = errno;
18556      close (fd);
18557      errno = e;
18558      fd = f;
18559    }
18560
18561  return fd;
18562}
18563
18564int
18565main ()
18566{
18567  char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
18568  int ofd[2];
18569  sigset_t blocked_signals;
18570  sigset_t fatal_signal_set;
18571  posix_spawn_file_actions_t actions;
18572  bool actions_allocated;
18573  posix_spawnattr_t attrs;
18574  bool attrs_allocated;
18575  int err;
18576  pid_t child;
18577  int status;
18578  int exitstatus;
18579
18580  setvbuf (stdout, NULL, _IOFBF, 0);
18581  puts ("This should be seen only once.");
18582  if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
18583    {
18584      perror ("cannot create pipe");
18585      exit (1);
18586    }
18587  sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
18588  sigemptyset (&fatal_signal_set);
18589  sigaddset (&fatal_signal_set, SIGINT);
18590  sigaddset (&fatal_signal_set, SIGTERM);
18591  sigaddset (&fatal_signal_set, SIGHUP);
18592  sigaddset (&fatal_signal_set, SIGPIPE);
18593  sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
18594  actions_allocated = false;
18595  attrs_allocated = false;
18596  if ((err = posix_spawn_file_actions_init (&actions)) != 0
18597      || (actions_allocated = true,
18598          (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
18599          || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
18600          || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
18601          || (err = posix_spawnattr_init (&attrs)) != 0
18602          || (attrs_allocated = true,
18603              (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
18604              || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
18605          || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
18606    {
18607      if (actions_allocated)
18608        posix_spawn_file_actions_destroy (&actions);
18609      if (attrs_allocated)
18610        posix_spawnattr_destroy (&attrs);
18611      sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
18612      if (err == ENOENT)
18613        return 0;
18614      else
18615        {
18616          errno = err;
18617          perror ("subprocess failed");
18618          exit (1);
18619        }
18620    }
18621  posix_spawn_file_actions_destroy (&actions);
18622  posix_spawnattr_destroy (&attrs);
18623  sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
18624  close (ofd[0]);
18625  close (ofd[1]);
18626  status = 0;
18627  while (waitpid (child, &status, 0) != child)
18628    ;
18629  if (!WIFEXITED (status))
18630    {
18631      fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
18632      exit (1);
18633    }
18634  exitstatus = WEXITSTATUS (status);
18635  if (exitstatus != 127)
18636    {
18637      fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
18638      exit (1);
18639    }
18640  return 0;
18641}
18642
18643_ACEOF
18644if ac_fn_c_try_link "$LINENO"; then :
18645  if test -s conftest$ac_exeext \
18646             && ./conftest$ac_exeext > conftest.out \
18647             && echo 'This should be seen only once.' > conftest.ok \
18648             && cmp conftest.out conftest.ok > /dev/null; then
18649            gl_cv_func_posix_spawn_works=yes
18650          else
18651            gl_cv_func_posix_spawn_works=no
18652          fi
18653else
18654  gl_cv_func_posix_spawn_works=no
18655fi
18656rm -f core conftest.err conftest.$ac_objext \
18657    conftest$ac_exeext conftest.$ac_ext
18658       if test $gl_cv_func_posix_spawn_works = yes; then
18659         if test "$cross_compiling" = yes; then :
18660  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18661$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18662as_fn_error $? "cannot run test program while cross compiling
18663See \`config.log' for more details" "$LINENO" 5; }
18664else
18665  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18666/* end confdefs.h.  */
18667
18668/* Test whether posix_spawn_file_actions_addopen supports filename arguments
18669   that contain special characters such as '*'.  */
18670
18671#include <errno.h>
18672#include <fcntl.h>
18673#include <signal.h>
18674#include <spawn.h>
18675#include <stdbool.h>
18676#include <stdio.h>
18677#include <string.h>
18678#include <unistd.h>
18679#include <sys/types.h>
18680#include <sys/wait.h>
18681
18682extern char **environ;
18683
18684#ifndef STDIN_FILENO
18685# define STDIN_FILENO 0
18686#endif
18687#ifndef STDOUT_FILENO
18688# define STDOUT_FILENO 1
18689#endif
18690#ifndef STDERR_FILENO
18691# define STDERR_FILENO 2
18692#endif
18693
18694#ifndef WTERMSIG
18695# define WTERMSIG(x) ((x) & 0x7f)
18696#endif
18697#ifndef WIFEXITED
18698# define WIFEXITED(x) (WTERMSIG (x) == 0)
18699#endif
18700#ifndef WEXITSTATUS
18701# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
18702#endif
18703
18704#define CHILD_PROGRAM_FILENAME "conftest"
18705#define DATA_FILENAME "conftest%=*#?"
18706
18707static int
18708parent_main (void)
18709{
18710  FILE *fp;
18711  char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
18712  posix_spawn_file_actions_t actions;
18713  bool actions_allocated;
18714  int err;
18715  pid_t child;
18716  int status;
18717  int exitstatus;
18718
18719  /* Create a data file with specific contents.  */
18720  fp = fopen (DATA_FILENAME, "wb");
18721  if (fp == NULL)
18722    {
18723      perror ("cannot create data file");
18724      return 1;
18725    }
18726  fwrite ("Halle Potta", 1, 11, fp);
18727  if (fflush (fp) || fclose (fp))
18728    {
18729      perror ("cannot prepare data file");
18730      return 2;
18731    }
18732
18733  /* Avoid reading from our stdin, as it could block.  */
18734  freopen ("/dev/null", "rb", stdin);
18735
18736  /* Test whether posix_spawn_file_actions_addopen with this file name
18737     actually works, but spawning a child that reads from this file.  */
18738  actions_allocated = false;
18739  if ((err = posix_spawn_file_actions_init (&actions)) != 0
18740      || (actions_allocated = true,
18741          (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
18742          || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
18743    {
18744      if (actions_allocated)
18745        posix_spawn_file_actions_destroy (&actions);
18746      errno = err;
18747      perror ("subprocess failed");
18748      return 3;
18749    }
18750  posix_spawn_file_actions_destroy (&actions);
18751  status = 0;
18752  while (waitpid (child, &status, 0) != child)
18753    ;
18754  if (!WIFEXITED (status))
18755    {
18756      fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
18757      return 4;
18758    }
18759  exitstatus = WEXITSTATUS (status);
18760  if (exitstatus != 0)
18761    {
18762      fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
18763      return 5;
18764    }
18765  return 0;
18766}
18767
18768static int
18769child_main (void)
18770{
18771  char buf[1024];
18772
18773  /* See if reading from STDIN_FILENO yields the expected contents.  */
18774  if (fread (buf, 1, sizeof (buf), stdin) == 11
18775      && memcmp (buf, "Halle Potta", 11) == 0)
18776    return 0;
18777  else
18778    return 8;
18779}
18780
18781static void
18782cleanup_then_die (int sig)
18783{
18784  /* Clean up data file.  */
18785  unlink (DATA_FILENAME);
18786
18787  /* Re-raise the signal and die from it.  */
18788  signal (sig, SIG_DFL);
18789  raise (sig);
18790}
18791
18792int
18793main (int argc, char *argv[])
18794{
18795  int exitstatus;
18796
18797  if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
18798    {
18799      /* This is the parent process.  */
18800      signal (SIGINT, cleanup_then_die);
18801      signal (SIGTERM, cleanup_then_die);
18802      #ifdef SIGHUP
18803      signal (SIGHUP, cleanup_then_die);
18804      #endif
18805
18806      exitstatus = parent_main ();
18807    }
18808  else
18809    {
18810      /* This is the child process.  */
18811
18812      exitstatus = child_main ();
18813    }
18814  unlink (DATA_FILENAME);
18815  return exitstatus;
18816}
18817
18818_ACEOF
18819if ac_fn_c_try_run "$LINENO"; then :
18820
18821else
18822  gl_cv_func_posix_spawn_works=no
18823fi
18824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18825  conftest.$ac_objext conftest.beam conftest.$ac_ext
18826fi
18827
18828       fi
18829     else
18830       case "$host_os" in
18831         aix*) gl_cv_func_posix_spawn_works="guessing no";;
18832         *)    gl_cv_func_posix_spawn_works="guessing yes";;
18833       esac
18834     fi
18835
18836fi
18837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
18838$as_echo "$gl_cv_func_posix_spawn_works" >&6; }
18839
18840    case "$gl_cv_func_posix_spawn_works" in
18841      *yes)
18842
18843$as_echo "#define HAVE_WORKING_POSIX_SPAWN 1" >>confdefs.h
18844
18845                                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5
18846$as_echo_n "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; }
18847if ${gl_cv_func_spawnattr_setschedpolicy+:} false; then :
18848  $as_echo_n "(cached) " >&6
18849else
18850  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18851/* end confdefs.h.  */
18852
18853#include <spawn.h>
18854#if POSIX_SPAWN_SETSCHEDULER
18855 POSIX scheduling supported
18856#endif
18857
18858_ACEOF
18859if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18860  $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
18861  gl_cv_func_spawnattr_setschedpolicy=yes
18862else
18863  gl_cv_func_spawnattr_setschedpolicy=no
18864fi
18865rm -f conftest*
18866
18867
18868fi
18869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedpolicy" >&5
18870$as_echo "$gl_cv_func_spawnattr_setschedpolicy" >&6; }
18871                                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5
18872$as_echo_n "checking whether posix_spawnattr_setschedparam is supported... " >&6; }
18873if ${gl_cv_func_spawnattr_setschedparam+:} false; then :
18874  $as_echo_n "(cached) " >&6
18875else
18876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18877/* end confdefs.h.  */
18878
18879#include <spawn.h>
18880#if POSIX_SPAWN_SETSCHEDPARAM
18881 POSIX scheduling supported
18882#endif
18883
18884_ACEOF
18885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18886  $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
18887  gl_cv_func_spawnattr_setschedparam=yes
18888else
18889  gl_cv_func_spawnattr_setschedparam=no
18890fi
18891rm -f conftest*
18892
18893
18894fi
18895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5
18896$as_echo "$gl_cv_func_spawnattr_setschedparam" >&6; }
18897        ;;
18898      *) REPLACE_POSIX_SPAWN=1 ;;
18899    esac
18900  fi
18901
18902
18903  GNULIB_PTHREAD_SIGMASK=0;
18904  GNULIB_RAISE=0;
18905  GNULIB_SIGNAL_H_SIGPIPE=0;
18906  GNULIB_SIGPROCMASK=0;
18907  GNULIB_SIGACTION=0;
18908    HAVE_POSIX_SIGNALBLOCKING=1;
18909  HAVE_PTHREAD_SIGMASK=1;
18910  HAVE_RAISE=1;
18911  HAVE_SIGSET_T=1;
18912  HAVE_SIGINFO_T=1;
18913  HAVE_SIGACTION=1;
18914  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
18915
18916  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
18917
18918  HAVE_SIGHANDLER_T=1;
18919  REPLACE_PTHREAD_SIGMASK=0;
18920  REPLACE_RAISE=0;
18921
18922
18923  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
18924      #include <signal.h>
18925      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
18926      #include <sys/types.h>
18927
18928"
18929if test "x$ac_cv_type_sigset_t" = xyes; then :
18930
18931cat >>confdefs.h <<_ACEOF
18932#define HAVE_SIGSET_T 1
18933_ACEOF
18934
18935gl_cv_type_sigset_t=yes
18936else
18937  gl_cv_type_sigset_t=no
18938fi
18939
18940  if test $gl_cv_type_sigset_t != yes; then
18941    HAVE_SIGSET_T=0
18942  fi
18943
18944ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
18945if test "x$ac_cv_have_decl_alarm" = xyes; then :
18946  ac_have_decl=1
18947else
18948  ac_have_decl=0
18949fi
18950
18951cat >>confdefs.h <<_ACEOF
18952#define HAVE_DECL_ALARM $ac_have_decl
18953_ACEOF
18954
18955
18956
18957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
18958$as_echo_n "checking for inline... " >&6; }
18959if ${ac_cv_c_inline+:} false; then :
18960  $as_echo_n "(cached) " >&6
18961else
18962  ac_cv_c_inline=no
18963for ac_kw in inline __inline__ __inline; do
18964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18965/* end confdefs.h.  */
18966#ifndef __cplusplus
18967typedef int foo_t;
18968static $ac_kw foo_t static_foo () {return 0; }
18969$ac_kw foo_t foo () {return 0; }
18970#endif
18971
18972_ACEOF
18973if ac_fn_c_try_compile "$LINENO"; then :
18974  ac_cv_c_inline=$ac_kw
18975fi
18976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18977  test "$ac_cv_c_inline" != no && break
18978done
18979
18980fi
18981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
18982$as_echo "$ac_cv_c_inline" >&6; }
18983
18984case $ac_cv_c_inline in
18985  inline | yes) ;;
18986  *)
18987    case $ac_cv_c_inline in
18988      no) ac_val=;;
18989      *) ac_val=$ac_cv_c_inline;;
18990    esac
18991    cat >>confdefs.h <<_ACEOF
18992#ifndef __cplusplus
18993#define inline $ac_val
18994#endif
18995_ACEOF
18996    ;;
18997esac
18998
18999
19000
19001      for ac_header in stdlib.h
19002do :
19003  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
19004if test "x$ac_cv_header_stdlib_h" = xyes; then :
19005  cat >>confdefs.h <<_ACEOF
19006#define HAVE_STDLIB_H 1
19007_ACEOF
19008
19009fi
19010
19011done
19012
19013  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
19014$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
19015if ${ac_cv_func_malloc_0_nonnull+:} false; then :
19016  $as_echo_n "(cached) " >&6
19017else
19018  if test "$cross_compiling" = yes; then :
19019  case "$host_os" in
19020          # Guess yes on platforms where we know the result.
19021          *-gnu* | freebsd* | netbsd* | openbsd* \
19022          | hpux* | solaris* | cygwin* | mingw*)
19023            ac_cv_func_malloc_0_nonnull=yes ;;
19024          # If we don't know, assume the worst.
19025          *) ac_cv_func_malloc_0_nonnull=no ;;
19026        esac
19027
19028else
19029  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19030/* end confdefs.h.  */
19031#if defined STDC_HEADERS || defined HAVE_STDLIB_H
19032            # include <stdlib.h>
19033            #else
19034            char *malloc ();
19035            #endif
19036
19037int
19038main ()
19039{
19040char *p = malloc (0);
19041            int result = !p;
19042            free (p);
19043            return result;
19044  ;
19045  return 0;
19046}
19047
19048_ACEOF
19049if ac_fn_c_try_run "$LINENO"; then :
19050  ac_cv_func_malloc_0_nonnull=yes
19051else
19052  ac_cv_func_malloc_0_nonnull=no
19053fi
19054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19055  conftest.$ac_objext conftest.beam conftest.$ac_ext
19056fi
19057
19058
19059fi
19060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
19061$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
19062  if test $ac_cv_func_malloc_0_nonnull = yes; then :
19063  gl_cv_func_malloc_0_nonnull=1
19064else
19065  gl_cv_func_malloc_0_nonnull=0
19066fi
19067
19068
19069cat >>confdefs.h <<_ACEOF
19070#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
19071_ACEOF
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
19093$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
19094if ${ac_cv_type_uid_t+:} false; then :
19095  $as_echo_n "(cached) " >&6
19096else
19097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19098/* end confdefs.h.  */
19099#include <sys/types.h>
19100
19101_ACEOF
19102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19103  $EGREP "uid_t" >/dev/null 2>&1; then :
19104  ac_cv_type_uid_t=yes
19105else
19106  ac_cv_type_uid_t=no
19107fi
19108rm -f conftest*
19109
19110fi
19111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
19112$as_echo "$ac_cv_type_uid_t" >&6; }
19113if test $ac_cv_type_uid_t = no; then
19114
19115$as_echo "#define uid_t int" >>confdefs.h
19116
19117
19118$as_echo "#define gid_t int" >>confdefs.h
19119
19120fi
19121
19122
19123
19124
19125
19126
19127
19128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
19129$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
19130if ${ac_cv_header_stdbool_h+:} false; then :
19131  $as_echo_n "(cached) " >&6
19132else
19133  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19134/* end confdefs.h.  */
19135
19136             #include <stdbool.h>
19137
19138             #ifdef __cplusplus
19139              typedef bool Bool;
19140             #else
19141              typedef _Bool Bool;
19142              #ifndef bool
19143               "error: bool is not defined"
19144              #endif
19145              #ifndef false
19146               "error: false is not defined"
19147              #endif
19148              #if false
19149               "error: false is not 0"
19150              #endif
19151              #ifndef true
19152               "error: true is not defined"
19153              #endif
19154              #if true != 1
19155               "error: true is not 1"
19156              #endif
19157             #endif
19158
19159             #ifndef __bool_true_false_are_defined
19160              "error: __bool_true_false_are_defined is not defined"
19161             #endif
19162
19163             struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
19164
19165             char a[true == 1 ? 1 : -1];
19166             char b[false == 0 ? 1 : -1];
19167             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
19168             char d[(bool) 0.5 == true ? 1 : -1];
19169             /* See body of main program for 'e'.  */
19170             char f[(Bool) 0.0 == false ? 1 : -1];
19171             char g[true];
19172             char h[sizeof (Bool)];
19173             char i[sizeof s.t];
19174             enum { j = false, k = true, l = false * true, m = true * 256 };
19175             /* The following fails for
19176                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
19177             Bool n[m];
19178             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
19179             char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
19180             /* Catch a bug in an HP-UX C compiler.  See
19181                http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
19182                http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
19183              */
19184             Bool q = true;
19185             Bool *pq = &q;
19186             bool *qq = &q;
19187
19188int
19189main ()
19190{
19191
19192             bool e = &s;
19193             *pq |= q; *pq |= ! q;
19194             *qq |= q; *qq |= ! q;
19195             /* Refer to every declared value, to avoid compiler optimizations.  */
19196             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
19197                     + !m + !n + !o + !p + !q + !pq + !qq);
19198
19199  ;
19200  return 0;
19201}
19202_ACEOF
19203if ac_fn_c_try_compile "$LINENO"; then :
19204  ac_cv_header_stdbool_h=yes
19205else
19206  ac_cv_header_stdbool_h=no
19207fi
19208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19209fi
19210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
19211$as_echo "$ac_cv_header_stdbool_h" >&6; }
19212   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
19213if test "x$ac_cv_type__Bool" = xyes; then :
19214
19215cat >>confdefs.h <<_ACEOF
19216#define HAVE__BOOL 1
19217_ACEOF
19218
19219
19220fi
19221
19222
19223
19224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
19225$as_echo_n "checking for wint_t... " >&6; }
19226if ${gt_cv_c_wint_t+:} false; then :
19227  $as_echo_n "(cached) " >&6
19228else
19229  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19230/* end confdefs.h.  */
19231
19232/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19233   <wchar.h>.
19234   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
19235   before <wchar.h>.  */
19236#include <stddef.h>
19237#include <stdio.h>
19238#include <time.h>
19239#include <wchar.h>
19240            wint_t foo = (wchar_t)'\0';
19241int
19242main ()
19243{
19244
19245  ;
19246  return 0;
19247}
19248_ACEOF
19249if ac_fn_c_try_compile "$LINENO"; then :
19250  gt_cv_c_wint_t=yes
19251else
19252  gt_cv_c_wint_t=no
19253fi
19254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19255fi
19256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
19257$as_echo "$gt_cv_c_wint_t" >&6; }
19258  if test $gt_cv_c_wint_t = yes; then
19259
19260$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
19261
19262
19263            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
19264$as_echo_n "checking whether wint_t is too small... " >&6; }
19265if ${gl_cv_type_wint_t_too_small+:} false; then :
19266  $as_echo_n "(cached) " >&6
19267else
19268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19269/* end confdefs.h.  */
19270
19271/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19272   <wchar.h>.
19273   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19274   included before <wchar.h>.  */
19275#if !(defined __GLIBC__ && !defined __UCLIBC__)
19276# include <stddef.h>
19277# include <stdio.h>
19278# include <time.h>
19279#endif
19280#include <wchar.h>
19281              int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
19282
19283int
19284main ()
19285{
19286
19287  ;
19288  return 0;
19289}
19290_ACEOF
19291if ac_fn_c_try_compile "$LINENO"; then :
19292  gl_cv_type_wint_t_too_small=no
19293else
19294  gl_cv_type_wint_t_too_small=yes
19295fi
19296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19297fi
19298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
19299$as_echo "$gl_cv_type_wint_t_too_small" >&6; }
19300    if test $gl_cv_type_wint_t_too_small = yes; then
19301      GNULIB_OVERRIDES_WINT_T=1
19302    else
19303      GNULIB_OVERRIDES_WINT_T=0
19304    fi
19305  else
19306    GNULIB_OVERRIDES_WINT_T=0
19307  fi
19308
19309
19310
19311  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
19312$as_echo_n "checking for unsigned long long int... " >&6; }
19313if ${ac_cv_type_unsigned_long_long_int+:} false; then :
19314  $as_echo_n "(cached) " >&6
19315else
19316  ac_cv_type_unsigned_long_long_int=yes
19317     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19318       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19319/* end confdefs.h.  */
19320
19321  /* For now, do not test the preprocessor; as of 2007 there are too many
19322         implementations with broken preprocessors.  Perhaps this can
19323         be revisited in 2012.  In the meantime, code should not expect
19324         #if to work with literals wider than 32 bits.  */
19325      /* Test literals.  */
19326      long long int ll = 9223372036854775807ll;
19327      long long int nll = -9223372036854775807LL;
19328      unsigned long long int ull = 18446744073709551615ULL;
19329      /* Test constant expressions.   */
19330      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
19331                     ? 1 : -1)];
19332      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
19333                     ? 1 : -1)];
19334      int i = 63;
19335int
19336main ()
19337{
19338/* Test availability of runtime routines for shift and division.  */
19339      long long int llmax = 9223372036854775807ll;
19340      unsigned long long int ullmax = 18446744073709551615ull;
19341      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
19342              | (llmax / ll) | (llmax % ll)
19343              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
19344              | (ullmax / ull) | (ullmax % ull));
19345  ;
19346  return 0;
19347}
19348
19349_ACEOF
19350if ac_fn_c_try_link "$LINENO"; then :
19351
19352else
19353  ac_cv_type_unsigned_long_long_int=no
19354fi
19355rm -f core conftest.err conftest.$ac_objext \
19356    conftest$ac_exeext conftest.$ac_ext
19357     fi
19358fi
19359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
19360$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
19361  if test $ac_cv_type_unsigned_long_long_int = yes; then
19362
19363$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
19364
19365  fi
19366
19367
19368
19369  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
19370$as_echo_n "checking for long long int... " >&6; }
19371if ${ac_cv_type_long_long_int+:} false; then :
19372  $as_echo_n "(cached) " >&6
19373else
19374  ac_cv_type_long_long_int=yes
19375      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19376        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
19377        if test $ac_cv_type_long_long_int = yes; then
19378                                        if test "$cross_compiling" = yes; then :
19379  :
19380else
19381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19382/* end confdefs.h.  */
19383#include <limits.h>
19384                 #ifndef LLONG_MAX
19385                 # define HALF \
19386                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
19387                 # define LLONG_MAX (HALF - 1 + HALF)
19388                 #endif
19389int
19390main ()
19391{
19392long long int n = 1;
19393                 int i;
19394                 for (i = 0; ; i++)
19395                   {
19396                     long long int m = n << i;
19397                     if (m >> i != n)
19398                       return 1;
19399                     if (LLONG_MAX / 2 < m)
19400                       break;
19401                   }
19402                 return 0;
19403  ;
19404  return 0;
19405}
19406_ACEOF
19407if ac_fn_c_try_run "$LINENO"; then :
19408
19409else
19410  ac_cv_type_long_long_int=no
19411fi
19412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19413  conftest.$ac_objext conftest.beam conftest.$ac_ext
19414fi
19415
19416        fi
19417      fi
19418fi
19419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
19420$as_echo "$ac_cv_type_long_long_int" >&6; }
19421  if test $ac_cv_type_long_long_int = yes; then
19422
19423$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
19424
19425  fi
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437  if test $ac_cv_type_long_long_int = yes; then
19438    HAVE_LONG_LONG_INT=1
19439  else
19440    HAVE_LONG_LONG_INT=0
19441  fi
19442
19443
19444  if test $ac_cv_type_unsigned_long_long_int = yes; then
19445    HAVE_UNSIGNED_LONG_LONG_INT=1
19446  else
19447    HAVE_UNSIGNED_LONG_LONG_INT=0
19448  fi
19449
19450
19451
19452  if test $ac_cv_header_wchar_h = yes; then
19453    HAVE_WCHAR_H=1
19454  else
19455    HAVE_WCHAR_H=0
19456  fi
19457
19458
19459      if test $ac_cv_header_inttypes_h = yes; then
19460    HAVE_INTTYPES_H=1
19461  else
19462    HAVE_INTTYPES_H=0
19463  fi
19464
19465
19466      if test $ac_cv_header_sys_types_h = yes; then
19467    HAVE_SYS_TYPES_H=1
19468  else
19469    HAVE_SYS_TYPES_H=0
19470  fi
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482     if test $gl_cv_have_include_next = yes; then
19483       gl_cv_next_stdint_h='<'stdint.h'>'
19484     else
19485       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
19486$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
19487if ${gl_cv_next_stdint_h+:} false; then :
19488  $as_echo_n "(cached) " >&6
19489else
19490
19491             if test $ac_cv_header_stdint_h = yes; then
19492
19493
19494
19495
19496  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19497/* end confdefs.h.  */
19498#include <stdint.h>
19499_ACEOF
19500                case "$host_os" in
19501    aix*) gl_absname_cpp="$ac_cpp -C" ;;
19502    *)    gl_absname_cpp="$ac_cpp" ;;
19503  esac
19504
19505  case "$host_os" in
19506    mingw*)
19507                                          gl_dirsep_regex='[/\\]'
19508      ;;
19509    *)
19510      gl_dirsep_regex='\/'
19511      ;;
19512  esac
19513      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19514  gl_header_literal_regex=`echo 'stdint.h' \
19515                           | sed -e "$gl_make_literal_regex_sed"`
19516  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19517      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19518      s|^/[^/]|//&|
19519      p
19520      q
19521    }'
19522
19523        gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19524  sed -n "$gl_absolute_header_sed"`
19525
19526           gl_header=$gl_cv_absolute_stdint_h
19527           gl_cv_next_stdint_h='"'$gl_header'"'
19528          else
19529               gl_cv_next_stdint_h='<'stdint.h'>'
19530             fi
19531
19532
19533fi
19534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
19535$as_echo "$gl_cv_next_stdint_h" >&6; }
19536     fi
19537     NEXT_STDINT_H=$gl_cv_next_stdint_h
19538
19539     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19540       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19541       gl_next_as_first_directive='<'stdint.h'>'
19542     else
19543       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19544       gl_next_as_first_directive=$gl_cv_next_stdint_h
19545     fi
19546     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
19547
19548
19549
19550
19551  if test $ac_cv_header_stdint_h = yes; then
19552    HAVE_STDINT_H=1
19553  else
19554    HAVE_STDINT_H=0
19555  fi
19556
19557
19558    if test $ac_cv_header_stdint_h = yes; then
19559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
19560$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
19561if ${gl_cv_header_working_stdint_h+:} false; then :
19562  $as_echo_n "(cached) " >&6
19563else
19564  gl_cv_header_working_stdint_h=no
19565       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19566/* end confdefs.h.  */
19567
19568
19569#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
19570#define __STDC_CONSTANT_MACROS 1
19571#define __STDC_LIMIT_MACROS 1
19572#include <stdint.h>
19573/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
19574#if !(defined WCHAR_MIN && defined WCHAR_MAX)
19575#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
19576#endif
19577
19578
19579  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19580     included before <wchar.h>.  */
19581  #include <stddef.h>
19582  #include <signal.h>
19583  #if HAVE_WCHAR_H
19584  # include <stdio.h>
19585  # include <time.h>
19586  # include <wchar.h>
19587  #endif
19588
19589
19590#ifdef INT8_MAX
19591int8_t a1 = INT8_MAX;
19592int8_t a1min = INT8_MIN;
19593#endif
19594#ifdef INT16_MAX
19595int16_t a2 = INT16_MAX;
19596int16_t a2min = INT16_MIN;
19597#endif
19598#ifdef INT32_MAX
19599int32_t a3 = INT32_MAX;
19600int32_t a3min = INT32_MIN;
19601#endif
19602#ifdef INT64_MAX
19603int64_t a4 = INT64_MAX;
19604int64_t a4min = INT64_MIN;
19605#endif
19606#ifdef UINT8_MAX
19607uint8_t b1 = UINT8_MAX;
19608#else
19609typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
19610#endif
19611#ifdef UINT16_MAX
19612uint16_t b2 = UINT16_MAX;
19613#endif
19614#ifdef UINT32_MAX
19615uint32_t b3 = UINT32_MAX;
19616#endif
19617#ifdef UINT64_MAX
19618uint64_t b4 = UINT64_MAX;
19619#endif
19620int_least8_t c1 = INT8_C (0x7f);
19621int_least8_t c1max = INT_LEAST8_MAX;
19622int_least8_t c1min = INT_LEAST8_MIN;
19623int_least16_t c2 = INT16_C (0x7fff);
19624int_least16_t c2max = INT_LEAST16_MAX;
19625int_least16_t c2min = INT_LEAST16_MIN;
19626int_least32_t c3 = INT32_C (0x7fffffff);
19627int_least32_t c3max = INT_LEAST32_MAX;
19628int_least32_t c3min = INT_LEAST32_MIN;
19629int_least64_t c4 = INT64_C (0x7fffffffffffffff);
19630int_least64_t c4max = INT_LEAST64_MAX;
19631int_least64_t c4min = INT_LEAST64_MIN;
19632uint_least8_t d1 = UINT8_C (0xff);
19633uint_least8_t d1max = UINT_LEAST8_MAX;
19634uint_least16_t d2 = UINT16_C (0xffff);
19635uint_least16_t d2max = UINT_LEAST16_MAX;
19636uint_least32_t d3 = UINT32_C (0xffffffff);
19637uint_least32_t d3max = UINT_LEAST32_MAX;
19638uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
19639uint_least64_t d4max = UINT_LEAST64_MAX;
19640int_fast8_t e1 = INT_FAST8_MAX;
19641int_fast8_t e1min = INT_FAST8_MIN;
19642int_fast16_t e2 = INT_FAST16_MAX;
19643int_fast16_t e2min = INT_FAST16_MIN;
19644int_fast32_t e3 = INT_FAST32_MAX;
19645int_fast32_t e3min = INT_FAST32_MIN;
19646int_fast64_t e4 = INT_FAST64_MAX;
19647int_fast64_t e4min = INT_FAST64_MIN;
19648uint_fast8_t f1 = UINT_FAST8_MAX;
19649uint_fast16_t f2 = UINT_FAST16_MAX;
19650uint_fast32_t f3 = UINT_FAST32_MAX;
19651uint_fast64_t f4 = UINT_FAST64_MAX;
19652#ifdef INTPTR_MAX
19653intptr_t g = INTPTR_MAX;
19654intptr_t gmin = INTPTR_MIN;
19655#endif
19656#ifdef UINTPTR_MAX
19657uintptr_t h = UINTPTR_MAX;
19658#endif
19659intmax_t i = INTMAX_MAX;
19660uintmax_t j = UINTMAX_MAX;
19661
19662/* Check that SIZE_MAX has the correct type, if possible.  */
19663#if 201112 <= __STDC_VERSION__
19664int k = _Generic (SIZE_MAX, size_t: 0);
19665#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
19666       || (0x5110 <= __SUNPRO_C && !__STDC__))
19667extern size_t k;
19668extern __typeof__ (SIZE_MAX) k;
19669#endif
19670
19671#include <limits.h> /* for CHAR_BIT */
19672#define TYPE_MINIMUM(t) \
19673  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
19674#define TYPE_MAXIMUM(t) \
19675  ((t) ((t) 0 < (t) -1 \
19676        ? (t) -1 \
19677        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
19678struct s {
19679  int check_PTRDIFF:
19680      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
19681      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
19682      ? 1 : -1;
19683  /* Detect bug in FreeBSD 6.0 / ia64.  */
19684  int check_SIG_ATOMIC:
19685      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
19686      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
19687      ? 1 : -1;
19688  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
19689  int check_WCHAR:
19690      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
19691      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
19692      ? 1 : -1;
19693  /* Detect bug in mingw.  */
19694  int check_WINT:
19695      WINT_MIN == TYPE_MINIMUM (wint_t)
19696      && WINT_MAX == TYPE_MAXIMUM (wint_t)
19697      ? 1 : -1;
19698
19699  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
19700  int check_UINT8_C:
19701        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
19702  int check_UINT16_C:
19703        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
19704
19705  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
19706#ifdef UINT8_MAX
19707  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
19708#endif
19709#ifdef UINT16_MAX
19710  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
19711#endif
19712#ifdef UINT32_MAX
19713  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
19714#endif
19715#ifdef UINT64_MAX
19716  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
19717#endif
19718  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
19719  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
19720  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
19721  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
19722  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
19723  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
19724  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
19725  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
19726  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
19727  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
19728  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
19729};
19730
19731int
19732main ()
19733{
19734
19735  ;
19736  return 0;
19737}
19738_ACEOF
19739if ac_fn_c_try_compile "$LINENO"; then :
19740                                                    if test "$cross_compiling" = yes; then :
19741                 gl_cv_header_working_stdint_h=yes
19742
19743else
19744  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19745/* end confdefs.h.  */
19746
19747
19748#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
19749#define __STDC_CONSTANT_MACROS 1
19750#define __STDC_LIMIT_MACROS 1
19751#include <stdint.h>
19752
19753
19754  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19755     included before <wchar.h>.  */
19756  #include <stddef.h>
19757  #include <signal.h>
19758  #if HAVE_WCHAR_H
19759  # include <stdio.h>
19760  # include <time.h>
19761  # include <wchar.h>
19762  #endif
19763
19764
19765#include <stdio.h>
19766#include <string.h>
19767#define MVAL(macro) MVAL1(macro)
19768#define MVAL1(expression) #expression
19769static const char *macro_values[] =
19770  {
19771#ifdef INT8_MAX
19772    MVAL (INT8_MAX),
19773#endif
19774#ifdef INT16_MAX
19775    MVAL (INT16_MAX),
19776#endif
19777#ifdef INT32_MAX
19778    MVAL (INT32_MAX),
19779#endif
19780#ifdef INT64_MAX
19781    MVAL (INT64_MAX),
19782#endif
19783#ifdef UINT8_MAX
19784    MVAL (UINT8_MAX),
19785#endif
19786#ifdef UINT16_MAX
19787    MVAL (UINT16_MAX),
19788#endif
19789#ifdef UINT32_MAX
19790    MVAL (UINT32_MAX),
19791#endif
19792#ifdef UINT64_MAX
19793    MVAL (UINT64_MAX),
19794#endif
19795    NULL
19796  };
19797
19798int
19799main ()
19800{
19801
19802  const char **mv;
19803  for (mv = macro_values; *mv != NULL; mv++)
19804    {
19805      const char *value = *mv;
19806      /* Test whether it looks like a cast expression.  */
19807      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
19808          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
19809          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
19810          || strncmp (value, "((int)"/*)*/, 6) == 0
19811          || strncmp (value, "((signed short)"/*)*/, 15) == 0
19812          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
19813        return mv - macro_values + 1;
19814    }
19815  return 0;
19816
19817  ;
19818  return 0;
19819}
19820_ACEOF
19821if ac_fn_c_try_run "$LINENO"; then :
19822  gl_cv_header_working_stdint_h=yes
19823fi
19824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19825  conftest.$ac_objext conftest.beam conftest.$ac_ext
19826fi
19827
19828
19829fi
19830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19831
19832fi
19833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
19834$as_echo "$gl_cv_header_working_stdint_h" >&6; }
19835  fi
19836
19837  HAVE_C99_STDINT_H=0
19838  HAVE_SYS_BITYPES_H=0
19839  HAVE_SYS_INTTYPES_H=0
19840  STDINT_H=stdint.h
19841  if test "$gl_cv_header_working_stdint_h" = yes; then
19842    HAVE_C99_STDINT_H=1
19843            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
19844$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
19845if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
19846  $as_echo_n "(cached) " >&6
19847else
19848  gl_cv_header_stdint_predates_cxx11_h=yes
19849       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19850/* end confdefs.h.  */
19851
19852
19853#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
19854#include <stdint.h>
19855
19856
19857  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19858     included before <wchar.h>.  */
19859  #include <stddef.h>
19860  #include <signal.h>
19861  #if HAVE_WCHAR_H
19862  # include <stdio.h>
19863  # include <time.h>
19864  # include <wchar.h>
19865  #endif
19866
19867
19868intmax_t im = INTMAX_MAX;
19869int32_t i32 = INT32_C (0x7fffffff);
19870
19871int
19872main ()
19873{
19874
19875  ;
19876  return 0;
19877}
19878_ACEOF
19879if ac_fn_c_try_compile "$LINENO"; then :
19880  gl_cv_header_stdint_predates_cxx11_h=no
19881fi
19882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19883fi
19884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
19885$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
19886
19887    if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
19888
19889$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
19890
19891
19892$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
19893
19894    fi
19895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
19896$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
19897if ${gl_cv_header_stdint_width+:} false; then :
19898  $as_echo_n "(cached) " >&6
19899else
19900  gl_cv_header_stdint_width=no
19901       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19902/* end confdefs.h.  */
19903
19904            /* Work if build is not clean.  */
19905            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
19906            #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
19907             #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
19908            #endif
19909            #include <stdint.h>
19910
19911  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19912     included before <wchar.h>.  */
19913  #include <stddef.h>
19914  #include <signal.h>
19915  #if HAVE_WCHAR_H
19916  # include <stdio.h>
19917  # include <time.h>
19918  # include <wchar.h>
19919  #endif
19920
19921            int iw = UINTMAX_WIDTH;
19922
19923int
19924main ()
19925{
19926
19927  ;
19928  return 0;
19929}
19930_ACEOF
19931if ac_fn_c_try_compile "$LINENO"; then :
19932  gl_cv_header_stdint_width=yes
19933fi
19934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19935fi
19936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
19937$as_echo "$gl_cv_header_stdint_width" >&6; }
19938    if test "$gl_cv_header_stdint_width" = yes; then
19939      STDINT_H=
19940    fi
19941  else
19942            for ac_header in sys/inttypes.h sys/bitypes.h
19943do :
19944  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19945ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19946if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
19947  cat >>confdefs.h <<_ACEOF
19948#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19949_ACEOF
19950
19951fi
19952
19953done
19954
19955    if test $ac_cv_header_sys_inttypes_h = yes; then
19956      HAVE_SYS_INTTYPES_H=1
19957    fi
19958    if test $ac_cv_header_sys_bitypes_h = yes; then
19959      HAVE_SYS_BITYPES_H=1
19960    fi
19961
19962
19963  if test $APPLE_UNIVERSAL_BUILD = 0; then
19964
19965
19966  for gltype in ptrdiff_t size_t ; do
19967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
19968$as_echo_n "checking for bit size of $gltype... " >&6; }
19969if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
19970  $as_echo_n "(cached) " >&6
19971else
19972  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
19973  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19974     included before <wchar.h>.  */
19975  #include <stddef.h>
19976  #include <signal.h>
19977  #if HAVE_WCHAR_H
19978  # include <stdio.h>
19979  # include <time.h>
19980  # include <wchar.h>
19981  #endif
19982
19983#include <limits.h>"; then :
19984
19985else
19986  result=unknown
19987fi
19988
19989       eval gl_cv_bitsizeof_${gltype}=\$result
19990
19991fi
19992eval ac_res=\$gl_cv_bitsizeof_${gltype}
19993	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19994$as_echo "$ac_res" >&6; }
19995    eval result=\$gl_cv_bitsizeof_${gltype}
19996    if test $result = unknown; then
19997                                                result=0
19998    fi
19999    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20000    cat >>confdefs.h <<_ACEOF
20001#define BITSIZEOF_${GLTYPE} $result
20002_ACEOF
20003
20004    eval BITSIZEOF_${GLTYPE}=\$result
20005  done
20006
20007
20008  fi
20009
20010
20011  for gltype in sig_atomic_t wchar_t wint_t ; do
20012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20013$as_echo_n "checking for bit size of $gltype... " >&6; }
20014if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
20015  $as_echo_n "(cached) " >&6
20016else
20017  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
20018  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20019     included before <wchar.h>.  */
20020  #include <stddef.h>
20021  #include <signal.h>
20022  #if HAVE_WCHAR_H
20023  # include <stdio.h>
20024  # include <time.h>
20025  # include <wchar.h>
20026  #endif
20027
20028#include <limits.h>"; then :
20029
20030else
20031  result=unknown
20032fi
20033
20034       eval gl_cv_bitsizeof_${gltype}=\$result
20035
20036fi
20037eval ac_res=\$gl_cv_bitsizeof_${gltype}
20038	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20039$as_echo "$ac_res" >&6; }
20040    eval result=\$gl_cv_bitsizeof_${gltype}
20041    if test $result = unknown; then
20042                                                result=0
20043    fi
20044    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20045    cat >>confdefs.h <<_ACEOF
20046#define BITSIZEOF_${GLTYPE} $result
20047_ACEOF
20048
20049    eval BITSIZEOF_${GLTYPE}=\$result
20050  done
20051
20052
20053
20054
20055  for gltype in sig_atomic_t wchar_t wint_t ; do
20056    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
20057$as_echo_n "checking whether $gltype is signed... " >&6; }
20058if eval \${gl_cv_type_${gltype}_signed+:} false; then :
20059  $as_echo_n "(cached) " >&6
20060else
20061  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20062/* end confdefs.h.  */
20063
20064  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20065     included before <wchar.h>.  */
20066  #include <stddef.h>
20067  #include <signal.h>
20068  #if HAVE_WCHAR_H
20069  # include <stdio.h>
20070  # include <time.h>
20071  # include <wchar.h>
20072  #endif
20073
20074            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
20075int
20076main ()
20077{
20078
20079  ;
20080  return 0;
20081}
20082_ACEOF
20083if ac_fn_c_try_compile "$LINENO"; then :
20084  result=yes
20085else
20086  result=no
20087fi
20088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20089       eval gl_cv_type_${gltype}_signed=\$result
20090
20091fi
20092eval ac_res=\$gl_cv_type_${gltype}_signed
20093	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20094$as_echo "$ac_res" >&6; }
20095    eval result=\$gl_cv_type_${gltype}_signed
20096    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20097    if test "$result" = yes; then
20098      cat >>confdefs.h <<_ACEOF
20099#define HAVE_SIGNED_${GLTYPE} 1
20100_ACEOF
20101
20102      eval HAVE_SIGNED_${GLTYPE}=1
20103    else
20104      eval HAVE_SIGNED_${GLTYPE}=0
20105    fi
20106  done
20107
20108
20109  gl_cv_type_ptrdiff_t_signed=yes
20110  gl_cv_type_size_t_signed=no
20111  if test $APPLE_UNIVERSAL_BUILD = 0; then
20112
20113
20114  for gltype in ptrdiff_t size_t ; do
20115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20116$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20117if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
20118  $as_echo_n "(cached) " >&6
20119else
20120  eval gl_cv_type_${gltype}_suffix=no
20121       eval result=\$gl_cv_type_${gltype}_signed
20122       if test "$result" = yes; then
20123         glsufu=
20124       else
20125         glsufu=u
20126       fi
20127       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20128         case $glsuf in
20129           '')  gltype1='int';;
20130           l)   gltype1='long int';;
20131           ll)  gltype1='long long int';;
20132           i64) gltype1='__int64';;
20133           u)   gltype1='unsigned int';;
20134           ul)  gltype1='unsigned long int';;
20135           ull) gltype1='unsigned long long int';;
20136           ui64)gltype1='unsigned __int64';;
20137         esac
20138         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20139/* end confdefs.h.  */
20140
20141  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20142     included before <wchar.h>.  */
20143  #include <stddef.h>
20144  #include <signal.h>
20145  #if HAVE_WCHAR_H
20146  # include <stdio.h>
20147  # include <time.h>
20148  # include <wchar.h>
20149  #endif
20150
20151              extern $gltype foo;
20152              extern $gltype1 foo;
20153int
20154main ()
20155{
20156
20157  ;
20158  return 0;
20159}
20160_ACEOF
20161if ac_fn_c_try_compile "$LINENO"; then :
20162  eval gl_cv_type_${gltype}_suffix=\$glsuf
20163fi
20164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20165         eval result=\$gl_cv_type_${gltype}_suffix
20166         test "$result" != no && break
20167       done
20168fi
20169eval ac_res=\$gl_cv_type_${gltype}_suffix
20170	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20171$as_echo "$ac_res" >&6; }
20172    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20173    eval result=\$gl_cv_type_${gltype}_suffix
20174    test "$result" = no && result=
20175    eval ${GLTYPE}_SUFFIX=\$result
20176    cat >>confdefs.h <<_ACEOF
20177#define ${GLTYPE}_SUFFIX $result
20178_ACEOF
20179
20180  done
20181
20182
20183  fi
20184
20185
20186  for gltype in sig_atomic_t wchar_t wint_t ; do
20187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20188$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20189if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
20190  $as_echo_n "(cached) " >&6
20191else
20192  eval gl_cv_type_${gltype}_suffix=no
20193       eval result=\$gl_cv_type_${gltype}_signed
20194       if test "$result" = yes; then
20195         glsufu=
20196       else
20197         glsufu=u
20198       fi
20199       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20200         case $glsuf in
20201           '')  gltype1='int';;
20202           l)   gltype1='long int';;
20203           ll)  gltype1='long long int';;
20204           i64) gltype1='__int64';;
20205           u)   gltype1='unsigned int';;
20206           ul)  gltype1='unsigned long int';;
20207           ull) gltype1='unsigned long long int';;
20208           ui64)gltype1='unsigned __int64';;
20209         esac
20210         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20211/* end confdefs.h.  */
20212
20213  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20214     included before <wchar.h>.  */
20215  #include <stddef.h>
20216  #include <signal.h>
20217  #if HAVE_WCHAR_H
20218  # include <stdio.h>
20219  # include <time.h>
20220  # include <wchar.h>
20221  #endif
20222
20223              extern $gltype foo;
20224              extern $gltype1 foo;
20225int
20226main ()
20227{
20228
20229  ;
20230  return 0;
20231}
20232_ACEOF
20233if ac_fn_c_try_compile "$LINENO"; then :
20234  eval gl_cv_type_${gltype}_suffix=\$glsuf
20235fi
20236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20237         eval result=\$gl_cv_type_${gltype}_suffix
20238         test "$result" != no && break
20239       done
20240fi
20241eval ac_res=\$gl_cv_type_${gltype}_suffix
20242	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20243$as_echo "$ac_res" >&6; }
20244    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20245    eval result=\$gl_cv_type_${gltype}_suffix
20246    test "$result" = no && result=
20247    eval ${GLTYPE}_SUFFIX=\$result
20248    cat >>confdefs.h <<_ACEOF
20249#define ${GLTYPE}_SUFFIX $result
20250_ACEOF
20251
20252  done
20253
20254
20255
20256          if test $GNULIB_OVERRIDES_WINT_T = 1; then
20257    BITSIZEOF_WINT_T=32
20258  fi
20259
20260  fi
20261
20262    LIMITS_H=limits.h
20263   if test -n "$LIMITS_H"; then
20264  GL_GENERATE_LIMITS_H_TRUE=
20265  GL_GENERATE_LIMITS_H_FALSE='#'
20266else
20267  GL_GENERATE_LIMITS_H_TRUE='#'
20268  GL_GENERATE_LIMITS_H_FALSE=
20269fi
20270
20271
20272
20273
20274
20275
20276   if test -n "$STDINT_H"; then
20277  GL_GENERATE_STDINT_H_TRUE=
20278  GL_GENERATE_STDINT_H_FALSE='#'
20279else
20280  GL_GENERATE_STDINT_H_TRUE='#'
20281  GL_GENERATE_STDINT_H_FALSE=
20282fi
20283
20284
20285
20286
20287ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
20288if test "x$ac_cv_have_decl_strdup" = xyes; then :
20289  ac_have_decl=1
20290else
20291  ac_have_decl=0
20292fi
20293
20294cat >>confdefs.h <<_ACEOF
20295#define HAVE_DECL_STRDUP $ac_have_decl
20296_ACEOF
20297
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313     if test $gl_cv_have_include_next = yes; then
20314       gl_cv_next_string_h='<'string.h'>'
20315     else
20316       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
20317$as_echo_n "checking absolute name of <string.h>... " >&6; }
20318if ${gl_cv_next_string_h+:} false; then :
20319  $as_echo_n "(cached) " >&6
20320else
20321
20322
20323
20324  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20325/* end confdefs.h.  */
20326#include <string.h>
20327_ACEOF
20328                case "$host_os" in
20329    aix*) gl_absname_cpp="$ac_cpp -C" ;;
20330    *)    gl_absname_cpp="$ac_cpp" ;;
20331  esac
20332
20333  case "$host_os" in
20334    mingw*)
20335                                          gl_dirsep_regex='[/\\]'
20336      ;;
20337    *)
20338      gl_dirsep_regex='\/'
20339      ;;
20340  esac
20341      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20342  gl_header_literal_regex=`echo 'string.h' \
20343                           | sed -e "$gl_make_literal_regex_sed"`
20344  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20345      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20346      s|^/[^/]|//&|
20347      p
20348      q
20349    }'
20350
20351        gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20352  sed -n "$gl_absolute_header_sed"`
20353
20354           gl_header=$gl_cv_absolute_string_h
20355           gl_cv_next_string_h='"'$gl_header'"'
20356
20357
20358fi
20359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
20360$as_echo "$gl_cv_next_string_h" >&6; }
20361     fi
20362     NEXT_STRING_H=$gl_cv_next_string_h
20363
20364     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20365       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20366       gl_next_as_first_directive='<'string.h'>'
20367     else
20368       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20369       gl_next_as_first_directive=$gl_cv_next_string_h
20370     fi
20371     NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
20372
20373
20374
20375
20376
20377
20378    for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul      strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r      strerror_r strsignal strverscmp; do
20379    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
20380    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
20381$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
20382if eval \${$as_gl_Symbol+:} false; then :
20383  $as_echo_n "(cached) " >&6
20384else
20385  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20386/* end confdefs.h.  */
20387#include <string.h>
20388
20389int
20390main ()
20391{
20392#undef $gl_func
20393  (void) $gl_func;
20394  ;
20395  return 0;
20396}
20397_ACEOF
20398if ac_fn_c_try_compile "$LINENO"; then :
20399  eval "$as_gl_Symbol=yes"
20400else
20401  eval "$as_gl_Symbol=no"
20402fi
20403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20404fi
20405eval ac_res=\$$as_gl_Symbol
20406	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20407$as_echo "$ac_res" >&6; }
20408    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
20409  cat >>confdefs.h <<_ACEOF
20410#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
20411_ACEOF
20412
20413                     eval ac_cv_have_decl_$gl_func=yes
20414fi
20415      done
20416
20417
20418
20419  GNULIB_FFS=0;
20420    HAVE_FFS=1;
20421  HAVE_STRCASECMP=1;
20422  HAVE_DECL_STRNCASECMP=1;
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438     if test $gl_cv_have_include_next = yes; then
20439       gl_cv_next_strings_h='<'strings.h'>'
20440     else
20441       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
20442$as_echo_n "checking absolute name of <strings.h>... " >&6; }
20443if ${gl_cv_next_strings_h+:} false; then :
20444  $as_echo_n "(cached) " >&6
20445else
20446
20447             if test $ac_cv_header_strings_h = yes; then
20448
20449
20450
20451
20452  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20453/* end confdefs.h.  */
20454#include <strings.h>
20455_ACEOF
20456                case "$host_os" in
20457    aix*) gl_absname_cpp="$ac_cpp -C" ;;
20458    *)    gl_absname_cpp="$ac_cpp" ;;
20459  esac
20460
20461  case "$host_os" in
20462    mingw*)
20463                                          gl_dirsep_regex='[/\\]'
20464      ;;
20465    *)
20466      gl_dirsep_regex='\/'
20467      ;;
20468  esac
20469      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20470  gl_header_literal_regex=`echo 'strings.h' \
20471                           | sed -e "$gl_make_literal_regex_sed"`
20472  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20473      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20474      s|^/[^/]|//&|
20475      p
20476      q
20477    }'
20478
20479        gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20480  sed -n "$gl_absolute_header_sed"`
20481
20482           gl_header=$gl_cv_absolute_strings_h
20483           gl_cv_next_strings_h='"'$gl_header'"'
20484          else
20485               gl_cv_next_strings_h='<'strings.h'>'
20486             fi
20487
20488
20489fi
20490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
20491$as_echo "$gl_cv_next_strings_h" >&6; }
20492     fi
20493     NEXT_STRINGS_H=$gl_cv_next_strings_h
20494
20495     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20496       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20497       gl_next_as_first_directive='<'strings.h'>'
20498     else
20499       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20500       gl_next_as_first_directive=$gl_cv_next_strings_h
20501     fi
20502     NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
20503
20504
20505
20506
20507  if test $ac_cv_header_strings_h = yes; then
20508    HAVE_STRINGS_H=1
20509  else
20510    HAVE_STRINGS_H=0
20511  fi
20512
20513
20514
20515    for gl_func in ffs strcasecmp strncasecmp; do
20516    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
20517    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
20518$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
20519if eval \${$as_gl_Symbol+:} false; then :
20520  $as_echo_n "(cached) " >&6
20521else
20522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20523/* end confdefs.h.  */
20524
20525    /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
20526       <strings.h>.  */
20527    #include <sys/types.h>
20528    #include <strings.h>
20529
20530int
20531main ()
20532{
20533#undef $gl_func
20534  (void) $gl_func;
20535  ;
20536  return 0;
20537}
20538_ACEOF
20539if ac_fn_c_try_compile "$LINENO"; then :
20540  eval "$as_gl_Symbol=yes"
20541else
20542  eval "$as_gl_Symbol=no"
20543fi
20544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20545fi
20546eval ac_res=\$$as_gl_Symbol
20547	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20548$as_echo "$ac_res" >&6; }
20549    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
20550  cat >>confdefs.h <<_ACEOF
20551#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
20552_ACEOF
20553
20554                     eval ac_cv_have_decl_$gl_func=yes
20555fi
20556      done
20557
20558
20559
20560
20561
20562  if test "$gl_cv_func_memchr_works" != yes; then
20563    REPLACE_STRSTR=1
20564  else
20565        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
20566$as_echo_n "checking whether strstr works... " >&6; }
20567if ${gl_cv_func_strstr_works_always+:} false; then :
20568  $as_echo_n "(cached) " >&6
20569else
20570  if test "$cross_compiling" = yes; then :
20571                                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20572/* end confdefs.h.  */
20573
20574#ifdef __GNU_LIBRARY__
20575 #include <features.h>
20576 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
20577     || defined __UCLIBC__
20578  Lucky user
20579 #endif
20580#elif defined __CYGWIN__
20581 #include <cygwin/version.h>
20582 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
20583  Lucky user
20584 #endif
20585#else
20586  Lucky user
20587#endif
20588
20589_ACEOF
20590if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20591  $EGREP "Lucky user" >/dev/null 2>&1; then :
20592  gl_cv_func_strstr_works_always="guessing yes"
20593else
20594  gl_cv_func_strstr_works_always="guessing no"
20595fi
20596rm -f conftest*
20597
20598
20599else
20600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20601/* end confdefs.h.  */
20602
20603#include <string.h> /* for strstr */
20604#define P "_EF_BF_BD"
20605#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
20606#define NEEDLE P P P P P
20607
20608int
20609main ()
20610{
20611return !!strstr (HAYSTACK, NEEDLE);
20612
20613  ;
20614  return 0;
20615}
20616_ACEOF
20617if ac_fn_c_try_run "$LINENO"; then :
20618  gl_cv_func_strstr_works_always=yes
20619else
20620  gl_cv_func_strstr_works_always=no
20621fi
20622rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20623  conftest.$ac_objext conftest.beam conftest.$ac_ext
20624fi
20625
20626
20627fi
20628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
20629$as_echo "$gl_cv_func_strstr_works_always" >&6; }
20630    case "$gl_cv_func_strstr_works_always" in
20631      *yes) ;;
20632      *)
20633        REPLACE_STRSTR=1
20634        ;;
20635    esac
20636  fi
20637
20638
20639
20640
20641
20642
20643
20644
20645  GNULIB_WAITPID=0;
20646
20647
20648
20649
20650  GNULIB_MKTIME=0;
20651  GNULIB_NANOSLEEP=0;
20652  GNULIB_STRPTIME=0;
20653  GNULIB_TIMEGM=0;
20654  GNULIB_TIME_R=0;
20655  GNULIB_TIME_RZ=0;
20656    HAVE_DECL_LOCALTIME_R=1;
20657  HAVE_NANOSLEEP=1;
20658  HAVE_STRPTIME=1;
20659  HAVE_TIMEGM=1;
20660        REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
20661  REPLACE_MKTIME=GNULIB_PORTCHECK;
20662  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
20663  REPLACE_TIMEGM=GNULIB_PORTCHECK;
20664
20665      : ${GNULIB_GETTIMEOFDAY=0};
20666        REPLACE_GMTIME=0;
20667  REPLACE_LOCALTIME=0;
20668
20669
20670
20671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
20672$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
20673if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
20674  $as_echo_n "(cached) " >&6
20675else
20676  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20677/* end confdefs.h.  */
20678#include <time.h>
20679
20680int
20681main ()
20682{
20683static struct timespec x; x.tv_sec = x.tv_nsec;
20684  ;
20685  return 0;
20686}
20687_ACEOF
20688if ac_fn_c_try_compile "$LINENO"; then :
20689  gl_cv_sys_struct_timespec_in_time_h=yes
20690else
20691  gl_cv_sys_struct_timespec_in_time_h=no
20692fi
20693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20694fi
20695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
20696$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
20697
20698  TIME_H_DEFINES_STRUCT_TIMESPEC=0
20699  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
20700  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
20701  UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
20702  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
20703    TIME_H_DEFINES_STRUCT_TIMESPEC=1
20704  else
20705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
20706$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
20707if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
20708  $as_echo_n "(cached) " >&6
20709else
20710  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20711/* end confdefs.h.  */
20712#include <sys/time.h>
20713
20714int
20715main ()
20716{
20717static struct timespec x; x.tv_sec = x.tv_nsec;
20718  ;
20719  return 0;
20720}
20721_ACEOF
20722if ac_fn_c_try_compile "$LINENO"; then :
20723  gl_cv_sys_struct_timespec_in_sys_time_h=yes
20724else
20725  gl_cv_sys_struct_timespec_in_sys_time_h=no
20726fi
20727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20728fi
20729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
20730$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
20731    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
20732      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
20733    else
20734      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
20735$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
20736if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
20737  $as_echo_n "(cached) " >&6
20738else
20739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20740/* end confdefs.h.  */
20741#include <pthread.h>
20742
20743int
20744main ()
20745{
20746static struct timespec x; x.tv_sec = x.tv_nsec;
20747  ;
20748  return 0;
20749}
20750_ACEOF
20751if ac_fn_c_try_compile "$LINENO"; then :
20752  gl_cv_sys_struct_timespec_in_pthread_h=yes
20753else
20754  gl_cv_sys_struct_timespec_in_pthread_h=no
20755fi
20756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20757fi
20758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
20759$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
20760      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
20761        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
20762      else
20763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
20764$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
20765if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
20766  $as_echo_n "(cached) " >&6
20767else
20768  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20769/* end confdefs.h.  */
20770#include <unistd.h>
20771
20772int
20773main ()
20774{
20775static struct timespec x; x.tv_sec = x.tv_nsec;
20776  ;
20777  return 0;
20778}
20779_ACEOF
20780if ac_fn_c_try_compile "$LINENO"; then :
20781  gl_cv_sys_struct_timespec_in_unistd_h=yes
20782else
20783  gl_cv_sys_struct_timespec_in_unistd_h=no
20784fi
20785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20786fi
20787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
20788$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
20789        if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
20790          UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
20791        fi
20792      fi
20793    fi
20794  fi
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811     if test $gl_cv_have_include_next = yes; then
20812       gl_cv_next_time_h='<'time.h'>'
20813     else
20814       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
20815$as_echo_n "checking absolute name of <time.h>... " >&6; }
20816if ${gl_cv_next_time_h+:} false; then :
20817  $as_echo_n "(cached) " >&6
20818else
20819
20820
20821
20822  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20823/* end confdefs.h.  */
20824#include <time.h>
20825_ACEOF
20826                case "$host_os" in
20827    aix*) gl_absname_cpp="$ac_cpp -C" ;;
20828    *)    gl_absname_cpp="$ac_cpp" ;;
20829  esac
20830
20831  case "$host_os" in
20832    mingw*)
20833                                          gl_dirsep_regex='[/\\]'
20834      ;;
20835    *)
20836      gl_dirsep_regex='\/'
20837      ;;
20838  esac
20839      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20840  gl_header_literal_regex=`echo 'time.h' \
20841                           | sed -e "$gl_make_literal_regex_sed"`
20842  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20843      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20844      s|^/[^/]|//&|
20845      p
20846      q
20847    }'
20848
20849        gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20850  sed -n "$gl_absolute_header_sed"`
20851
20852           gl_header=$gl_cv_absolute_time_h
20853           gl_cv_next_time_h='"'$gl_header'"'
20854
20855
20856fi
20857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
20858$as_echo "$gl_cv_next_time_h" >&6; }
20859     fi
20860     NEXT_TIME_H=$gl_cv_next_time_h
20861
20862     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20863       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20864       gl_next_as_first_directive='<'time.h'>'
20865     else
20866       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20867       gl_next_as_first_directive=$gl_cv_next_time_h
20868     fi
20869     NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882  if test $ac_cv_header_features_h = yes; then
20883    HAVE_FEATURES_H=1
20884  else
20885    HAVE_FEATURES_H=0
20886  fi
20887
20888
20889
20890
20891
20892  GNULIB_ISWBLANK=0;
20893  GNULIB_WCTYPE=0;
20894  GNULIB_ISWCTYPE=0;
20895  GNULIB_WCTRANS=0;
20896  GNULIB_TOWCTRANS=0;
20897    HAVE_ISWBLANK=1;
20898  HAVE_WCTYPE_T=1;
20899  HAVE_WCTRANS_T=1;
20900  REPLACE_ISWBLANK=0;
20901
20902
20903
20904
20905
20906
20907   if false; then
20908  GL_COND_LIBTOOL_TRUE=
20909  GL_COND_LIBTOOL_FALSE='#'
20910else
20911  GL_COND_LIBTOOL_TRUE='#'
20912  GL_COND_LIBTOOL_FALSE=
20913fi
20914
20915  gl_cond_libtool=false
20916  gl_libdeps=
20917  gl_ltlibdeps=
20918  gl_m4_base='m4'
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928  gl_source_base='lib'
20929
20930
20931
20932
20933  ACOS_LIBM="$POW_LIBM"
20934
20935
20936
20937
20938
20939
20940  if test $ac_cv_func_alloca_works = no; then
20941    :
20942  fi
20943
20944  # Define an additional variable used in the Makefile substitution.
20945  if test $ac_cv_working_alloca_h = yes; then
20946    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
20947$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
20948if ${gl_cv_rpl_alloca+:} false; then :
20949  $as_echo_n "(cached) " >&6
20950else
20951
20952      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20953/* end confdefs.h.  */
20954
20955#if defined __GNUC__ || defined _AIX || defined _MSC_VER
20956        Need own alloca
20957#endif
20958
20959_ACEOF
20960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20961  $EGREP "Need own alloca" >/dev/null 2>&1; then :
20962  gl_cv_rpl_alloca=yes
20963else
20964  gl_cv_rpl_alloca=no
20965fi
20966rm -f conftest*
20967
20968
20969fi
20970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
20971$as_echo "$gl_cv_rpl_alloca" >&6; }
20972    if test $gl_cv_rpl_alloca = yes; then
20973
20974$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
20975
20976      ALLOCA_H=alloca.h
20977    else
20978                  ALLOCA_H=
20979    fi
20980  else
20981    ALLOCA_H=alloca.h
20982  fi
20983
20984   if test -n "$ALLOCA_H"; then
20985  GL_GENERATE_ALLOCA_H_TRUE=
20986  GL_GENERATE_ALLOCA_H_FALSE='#'
20987else
20988  GL_GENERATE_ALLOCA_H_TRUE='#'
20989  GL_GENERATE_ALLOCA_H_FALSE=
20990fi
20991
20992
20993
20994
20995
20996
20997  ASIN_LIBM="$POW_LIBM"
20998
20999
21000
21001
21002
21003  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
21004$as_echo_n "checking whether to enable assertions... " >&6; }
21005  # Check whether --enable-assert was given.
21006if test "${enable_assert+set}" = set; then :
21007  enableval=$enable_assert; if test "x$enableval" = xno; then :
21008
21009$as_echo "#define NDEBUG 1" >>confdefs.h
21010
21011elif test "x$enableval" != xyes; then :
21012  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
21013$as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
21014      enable_assert=yes
21015fi
21016else
21017  enable_assert=yes
21018fi
21019
21020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
21021$as_echo "$enable_assert" >&6; }
21022
21023
21024
21025
21026
21027  ATAN_LIBM="$POW_LIBM"
21028
21029
21030
21031
21032
21033
21034
21035
21036  ATAN2_LIBM="$POW_LIBM"
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047  if test $ac_cv_func_btowc = no; then
21048    HAVE_BTOWC=0
21049  else
21050
21051
21052
21053
21054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
21055$as_echo_n "checking whether btowc(0) is correct... " >&6; }
21056if ${gl_cv_func_btowc_nul+:} false; then :
21057  $as_echo_n "(cached) " >&6
21058else
21059
21060        if test "$cross_compiling" = yes; then :
21061
21062           case "$host_os" in
21063                      # Guess no on Cygwin.
21064             cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
21065                      # Guess yes otherwise.
21066             *)       gl_cv_func_btowc_nul="guessing yes" ;;
21067           esac
21068
21069else
21070  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21071/* end confdefs.h.  */
21072
21073#include <string.h>
21074/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21075   <wchar.h>.
21076   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21077   included before <wchar.h>.  */
21078#include <stddef.h>
21079#include <stdio.h>
21080#include <time.h>
21081#include <wchar.h>
21082int main ()
21083{
21084  if (btowc ('\0') != 0)
21085    return 1;
21086  return 0;
21087}
21088_ACEOF
21089if ac_fn_c_try_run "$LINENO"; then :
21090  gl_cv_func_btowc_nul=yes
21091else
21092  gl_cv_func_btowc_nul=no
21093fi
21094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21095  conftest.$ac_objext conftest.beam conftest.$ac_ext
21096fi
21097
21098
21099fi
21100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
21101$as_echo "$gl_cv_func_btowc_nul" >&6; }
21102
21103        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
21104$as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
21105if ${gl_cv_func_btowc_eof+:} false; then :
21106  $as_echo_n "(cached) " >&6
21107else
21108
21109                        case "$host_os" in
21110                 # Guess no on IRIX.
21111          irix*) gl_cv_func_btowc_eof="guessing no" ;;
21112                 # Guess yes otherwise.
21113          *)     gl_cv_func_btowc_eof="guessing yes" ;;
21114        esac
21115        if test $LOCALE_FR != none; then
21116          if test "$cross_compiling" = yes; then :
21117  :
21118else
21119  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21120/* end confdefs.h.  */
21121
21122#include <locale.h>
21123#include <string.h>
21124/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21125   <wchar.h>.
21126   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21127   included before <wchar.h>.  */
21128#include <stddef.h>
21129#include <stdio.h>
21130#include <time.h>
21131#include <wchar.h>
21132int main ()
21133{
21134  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
21135    {
21136      if (btowc (EOF) != WEOF)
21137        return 1;
21138    }
21139  return 0;
21140}
21141_ACEOF
21142if ac_fn_c_try_run "$LINENO"; then :
21143  gl_cv_func_btowc_eof=yes
21144else
21145  gl_cv_func_btowc_eof=no
21146fi
21147rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21148  conftest.$ac_objext conftest.beam conftest.$ac_ext
21149fi
21150
21151        fi
21152
21153fi
21154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
21155$as_echo "$gl_cv_func_btowc_eof" >&6; }
21156
21157    case "$gl_cv_func_btowc_nul" in
21158      *yes) ;;
21159      *) REPLACE_BTOWC=1 ;;
21160    esac
21161    case "$gl_cv_func_btowc_eof" in
21162      *yes) ;;
21163      *) REPLACE_BTOWC=1 ;;
21164    esac
21165  fi
21166
21167  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
21168
21169
21170
21171
21172
21173
21174
21175
21176  gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
21177
21178
21179  :
21180
21181  fi
21182
21183
21184
21185
21186
21187          GNULIB_BTOWC=1
21188
21189
21190
21191
21192
21193$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
21194
21195
21196
21197
21198  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
21199$as_echo_n "checking for __builtin_expect... " >&6; }
21200if ${gl_cv___builtin_expect+:} false; then :
21201  $as_echo_n "(cached) " >&6
21202else
21203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21204/* end confdefs.h.  */
21205
21206         int
21207         main (int argc, char **argv)
21208         {
21209           argc = __builtin_expect (argc, 100);
21210           return argv[argc != 100][0];
21211         }
21212_ACEOF
21213if ac_fn_c_try_link "$LINENO"; then :
21214  gl_cv___builtin_expect=yes
21215else
21216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21217/* end confdefs.h.  */
21218
21219             #include <builtins.h>
21220             int
21221             main (int argc, char **argv)
21222             {
21223               argc = __builtin_expect (argc, 100);
21224               return argv[argc != 100][0];
21225             }
21226_ACEOF
21227if ac_fn_c_try_link "$LINENO"; then :
21228  gl_cv___builtin_expect="in <builtins.h>"
21229else
21230  gl_cv___builtin_expect=no
21231fi
21232rm -f core conftest.err conftest.$ac_objext \
21233    conftest$ac_exeext conftest.$ac_ext
21234fi
21235rm -f core conftest.err conftest.$ac_objext \
21236    conftest$ac_exeext conftest.$ac_ext
21237fi
21238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
21239$as_echo "$gl_cv___builtin_expect" >&6; }
21240  if test "$gl_cv___builtin_expect" = yes; then
21241    $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
21242
21243  elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
21244    $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
21245
21246  fi
21247
21248
21249
21250
21251
21252
21253
21254  saved_as_echo_n="$as_echo_n"
21255  as_echo_n=':'
21256  if ${gl_cv_func_ceil_libm+:} false; then :
21257  $as_echo_n "(cached) " >&6
21258else
21259
21260    gl_cv_func_ceil_libm=?
21261    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21262/* end confdefs.h.  */
21263#ifndef __NO_MATH_INLINES
21264           # define __NO_MATH_INLINES 1 /* for glibc */
21265           #endif
21266           #include <math.h>
21267           double x;
21268int
21269main ()
21270{
21271x = ceil(x);
21272  ;
21273  return 0;
21274}
21275_ACEOF
21276if ac_fn_c_try_link "$LINENO"; then :
21277  gl_cv_func_ceil_libm=
21278fi
21279rm -f core conftest.err conftest.$ac_objext \
21280    conftest$ac_exeext conftest.$ac_ext
21281    if test "$gl_cv_func_ceil_libm" = "?"; then
21282      save_LIBS="$LIBS"
21283      LIBS="$LIBS -lm"
21284      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21285/* end confdefs.h.  */
21286#ifndef __NO_MATH_INLINES
21287             # define __NO_MATH_INLINES 1 /* for glibc */
21288             #endif
21289             #include <math.h>
21290             double x;
21291int
21292main ()
21293{
21294x = ceil(x);
21295  ;
21296  return 0;
21297}
21298_ACEOF
21299if ac_fn_c_try_link "$LINENO"; then :
21300  gl_cv_func_ceil_libm="-lm"
21301fi
21302rm -f core conftest.err conftest.$ac_objext \
21303    conftest$ac_exeext conftest.$ac_ext
21304      LIBS="$save_LIBS"
21305    fi
21306
21307fi
21308
21309  as_echo_n="$saved_as_echo_n"
21310
21311  CEIL_LIBM="$gl_cv_func_ceil_libm"
21312
21313  if test "$CEIL_LIBM" = "?"; then
21314    CEIL_LIBM=
21315  fi
21316
21317  if test $REPLACE_CEIL = 1; then
21318        CEIL_LIBM=
21319  fi
21320
21321
21322  if test $REPLACE_CEIL = 1; then
21323
21324
21325
21326
21327
21328
21329
21330
21331  gl_LIBOBJS="$gl_LIBOBJS ceil.$ac_objext"
21332
21333  fi
21334
21335
21336
21337
21338
21339          GNULIB_CEIL=1
21340
21341
21342
21343
21344
21345$as_echo "#define GNULIB_TEST_CEIL 1" >>confdefs.h
21346
21347
21348
21349
21350
21351$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
21352
21353
21354
21355
21356
21357  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21358    REPLACE_CLOSE=1
21359  fi
21360
21361
21362
21363
21364
21365  if test $ac_cv_header_sys_socket_h != yes; then
21366                    for ac_header in winsock2.h
21367do :
21368  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21369if test "x$ac_cv_header_winsock2_h" = xyes; then :
21370  cat >>confdefs.h <<_ACEOF
21371#define HAVE_WINSOCK2_H 1
21372_ACEOF
21373
21374fi
21375
21376done
21377
21378  fi
21379  if test "$ac_cv_header_winsock2_h" = yes; then
21380    HAVE_WINSOCK2_H=1
21381    UNISTD_H_HAVE_WINSOCK2_H=1
21382    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21383  else
21384    HAVE_WINSOCK2_H=0
21385  fi
21386
21387
21388    if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
21389                        REPLACE_CLOSE=1
21390    fi
21391
21392
21393
21394  if test $REPLACE_CLOSE = 1; then
21395
21396
21397
21398
21399
21400
21401
21402
21403  gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
21404
21405  fi
21406
21407
21408
21409
21410
21411          GNULIB_CLOSE=1
21412
21413
21414
21415
21416
21417$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
21418
21419
21420
21421
21422
21423
21424
21425          if test "x$datarootdir" = x; then
21426    datarootdir='${datadir}'
21427
21428  fi
21429    if test "x$docdir" = x; then
21430    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
21431
21432  fi
21433    if test "x$htmldir" = x; then
21434    htmldir='${docdir}'
21435
21436  fi
21437  if test "x$dvidir" = x; then
21438    dvidir='${docdir}'
21439
21440  fi
21441  if test "x$pdfdir" = x; then
21442    pdfdir='${docdir}'
21443
21444  fi
21445  if test "x$psdir" = x; then
21446    psdir='${docdir}'
21447
21448  fi
21449  if test "x$lispdir" = x; then
21450    lispdir='${datarootdir}/emacs/site-lisp'
21451
21452  fi
21453  if test "x$localedir" = x; then
21454    localedir='${datarootdir}/locale'
21455
21456  fi
21457    if test "x$runstatedir" = x; then
21458    runstatedir='${localstatedir}/run'
21459
21460  fi
21461
21462      pkglibexecdir='${libexecdir}/${PACKAGE}'
21463
21464
21465
21466
21467
21468
21469  COS_LIBM="$POW_LIBM"
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
21481$as_echo_n "checking whether // is distinct from /... " >&6; }
21482if ${gl_cv_double_slash_root+:} false; then :
21483  $as_echo_n "(cached) " >&6
21484else
21485   if test x"$cross_compiling" = xyes ; then
21486        # When cross-compiling, there is no way to tell whether // is special
21487        # short of a list of hosts.  However, the only known hosts to date
21488        # that have a distinct // are Apollo DomainOS (too old to port to),
21489        # Cygwin, and z/OS.  If anyone knows of another system for which // has
21490        # special semantics and is distinct from /, please report it to
21491        # <bug-gnulib@gnu.org>.
21492        case $host in
21493          *-cygwin | i370-ibm-openedition)
21494            gl_cv_double_slash_root=yes ;;
21495          *)
21496            # Be optimistic and assume that / and // are the same when we
21497            # don't know.
21498            gl_cv_double_slash_root='unknown, assuming no' ;;
21499        esac
21500      else
21501        set x `ls -di / // 2>/dev/null`
21502        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
21503          gl_cv_double_slash_root=no
21504        else
21505          gl_cv_double_slash_root=yes
21506        fi
21507      fi
21508fi
21509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
21510$as_echo "$gl_cv_double_slash_root" >&6; }
21511  if test "$gl_cv_double_slash_root" = yes; then
21512
21513$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
21514
21515  fi
21516
21517
21518
21519
21520
21521
21522$as_echo "#define HAVE_DUP2 1" >>confdefs.h
21523
21524
21525  if test $HAVE_DUP2 = 1; then
21526    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
21527$as_echo_n "checking whether dup2 works... " >&6; }
21528if ${gl_cv_func_dup2_works+:} false; then :
21529  $as_echo_n "(cached) " >&6
21530else
21531  if test "$cross_compiling" = yes; then :
21532  case "$host_os" in
21533           mingw*) # on this platform, dup2 always returns 0 for success
21534             gl_cv_func_dup2_works="guessing no" ;;
21535           cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
21536             gl_cv_func_dup2_works="guessing no" ;;
21537           aix* | freebsd*)
21538                   # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
21539                   # not EBADF.
21540             gl_cv_func_dup2_works="guessing no" ;;
21541           haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
21542             gl_cv_func_dup2_works="guessing no" ;;
21543           *-android*) # implemented using dup3(), which fails if oldfd == newfd
21544             gl_cv_func_dup2_works="guessing no" ;;
21545           os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
21546             gl_cv_func_dup2_works="guessing no" ;;
21547           *) gl_cv_func_dup2_works="guessing yes" ;;
21548         esac
21549else
21550  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21551/* end confdefs.h.  */
21552
21553         #include <errno.h>
21554             #include <fcntl.h>
21555             #include <limits.h>
21556             #include <sys/resource.h>
21557             #include <unistd.h>
21558             #ifndef RLIM_SAVED_CUR
21559             # define RLIM_SAVED_CUR RLIM_INFINITY
21560             #endif
21561             #ifndef RLIM_SAVED_MAX
21562             # define RLIM_SAVED_MAX RLIM_INFINITY
21563             #endif
21564
21565int
21566main ()
21567{
21568int result = 0;
21569             int bad_fd = INT_MAX;
21570             struct rlimit rlim;
21571             if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
21572                 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
21573                 && rlim.rlim_cur != RLIM_INFINITY
21574                 && rlim.rlim_cur != RLIM_SAVED_MAX
21575                 && rlim.rlim_cur != RLIM_SAVED_CUR)
21576               bad_fd = rlim.rlim_cur;
21577             #ifdef FD_CLOEXEC
21578               if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
21579                 result |= 1;
21580             #endif
21581             if (dup2 (1, 1) != 1)
21582               result |= 2;
21583             #ifdef FD_CLOEXEC
21584               if (fcntl (1, F_GETFD) != FD_CLOEXEC)
21585                 result |= 4;
21586             #endif
21587             close (0);
21588             if (dup2 (0, 0) != -1)
21589               result |= 8;
21590             /* Many gnulib modules require POSIX conformance of EBADF.  */
21591             if (dup2 (2, bad_fd) == -1 && errno != EBADF)
21592               result |= 16;
21593             /* Flush out some cygwin core dumps.  */
21594             if (dup2 (2, -1) != -1 || errno != EBADF)
21595               result |= 32;
21596             dup2 (2, 255);
21597             dup2 (2, 256);
21598             /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
21599             {
21600               int fd = open (".", O_RDONLY);
21601               if (fd == -1)
21602                 result |= 64;
21603               else if (dup2 (fd, fd + 1) == -1)
21604                 result |= 128;
21605
21606               close (fd);
21607             }
21608             return result;
21609  ;
21610  return 0;
21611}
21612
21613_ACEOF
21614if ac_fn_c_try_run "$LINENO"; then :
21615  gl_cv_func_dup2_works=yes
21616else
21617  gl_cv_func_dup2_works=no
21618fi
21619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21620  conftest.$ac_objext conftest.beam conftest.$ac_ext
21621fi
21622
21623
21624fi
21625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
21626$as_echo "$gl_cv_func_dup2_works" >&6; }
21627    case "$gl_cv_func_dup2_works" in
21628      *yes) ;;
21629      *)
21630        REPLACE_DUP2=1
21631        for ac_func in setdtablesize
21632do :
21633  ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
21634if test "x$ac_cv_func_setdtablesize" = xyes; then :
21635  cat >>confdefs.h <<_ACEOF
21636#define HAVE_SETDTABLESIZE 1
21637_ACEOF
21638
21639fi
21640done
21641
21642        ;;
21643    esac
21644  fi
21645
21646
21647  if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
21648
21649
21650
21651
21652
21653
21654
21655
21656  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
21657
21658
21659  fi
21660
21661
21662
21663
21664
21665          GNULIB_DUP2=1
21666
21667
21668
21669
21670
21671$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681          GNULIB_ENVIRON=1
21682
21683
21684
21685
21686
21687$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
21688
21689
21690
21691
21692
21693      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
21694$as_echo_n "checking for error_at_line... " >&6; }
21695if ${ac_cv_lib_error_at_line+:} false; then :
21696  $as_echo_n "(cached) " >&6
21697else
21698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21699/* end confdefs.h.  */
21700#include <error.h>
21701int
21702main ()
21703{
21704error_at_line (0, 0, "", 0, "an error occurred");
21705  ;
21706  return 0;
21707}
21708_ACEOF
21709if ac_fn_c_try_link "$LINENO"; then :
21710  ac_cv_lib_error_at_line=yes
21711else
21712  ac_cv_lib_error_at_line=no
21713fi
21714rm -f core conftest.err conftest.$ac_objext \
21715    conftest$ac_exeext conftest.$ac_ext
21716fi
21717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
21718$as_echo "$ac_cv_lib_error_at_line" >&6; }
21719
21720  if test $ac_cv_lib_error_at_line = no; then
21721
21722
21723
21724
21725
21726
21727
21728
21729  gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
21730
21731
21732
21733  :
21734
21735  fi
21736
21737
21738  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
21739
21740
21741
21742  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
21743
21744
21745
21746
21747
21748  :
21749
21750
21751
21752
21753
21754
21755
21756  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
21757$as_echo_n "checking whether fflush works on input streams... " >&6; }
21758if ${gl_cv_func_fflush_stdin+:} false; then :
21759  $as_echo_n "(cached) " >&6
21760else
21761  echo hello world > conftest.txt
21762     if test "$cross_compiling" = yes; then :
21763  gl_cv_func_fflush_stdin=cross
21764else
21765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21766/* end confdefs.h.  */
21767
21768#include <stdio.h>
21769#if HAVE_UNISTD_H
21770# include <unistd.h>
21771#else /* on Windows with MSVC */
21772# include <io.h>
21773#endif
21774
21775int
21776main ()
21777{
21778FILE *f = fopen ("conftest.txt", "r");
21779         char buffer[10];
21780         int fd;
21781         int c;
21782         if (f == NULL)
21783           return 1;
21784         fd = fileno (f);
21785         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
21786           return 2;
21787         /* For deterministic results, ensure f read a bigger buffer.  */
21788         if (lseek (fd, 0, SEEK_CUR) == 5)
21789           return 3;
21790         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
21791            on BSD systems and on mingw.  */
21792         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
21793           return 4;
21794         if (lseek (fd, 0, SEEK_CUR) != 5)
21795           return 5;
21796         /* Verify behaviour of fflush after ungetc. See
21797            <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
21798         /* Verify behaviour of fflush after a backup ungetc.  This fails on
21799            mingw.  */
21800         c = fgetc (f);
21801         ungetc (c, f);
21802         fflush (f);
21803         if (fgetc (f) != c)
21804           return 6;
21805         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
21806            on glibc 2.8 and on BSD systems.  */
21807         c = fgetc (f);
21808         ungetc ('@', f);
21809         fflush (f);
21810         if (fgetc (f) != c)
21811           return 7;
21812         return 0;
21813
21814  ;
21815  return 0;
21816}
21817_ACEOF
21818if ac_fn_c_try_run "$LINENO"; then :
21819  gl_cv_func_fflush_stdin=yes
21820else
21821  gl_cv_func_fflush_stdin=no
21822fi
21823rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21824  conftest.$ac_objext conftest.beam conftest.$ac_ext
21825fi
21826
21827     rm conftest.txt
21828
21829fi
21830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
21831$as_echo "$gl_cv_func_fflush_stdin" >&6; }
21832  case $gl_cv_func_fflush_stdin in
21833    yes) gl_func_fflush_stdin=1 ;;
21834    no)  gl_func_fflush_stdin=0 ;;
21835    *)   gl_func_fflush_stdin='(-1)' ;;
21836  esac
21837
21838cat >>confdefs.h <<_ACEOF
21839#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
21840_ACEOF
21841
21842
21843  if test $gl_cv_func_fflush_stdin != yes; then
21844    REPLACE_FCLOSE=1
21845  fi
21846
21847
21848  if test $REPLACE_CLOSE = 1; then
21849    REPLACE_FCLOSE=1
21850  fi
21851
21852  case "$host_os" in
21853    openedition) REPLACE_FCLOSE=1 ;;
21854  esac
21855
21856  if test $REPLACE_FCLOSE = 1; then
21857
21858
21859
21860
21861
21862
21863
21864
21865  gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext"
21866
21867  fi
21868
21869
21870
21871
21872
21873          GNULIB_FCLOSE=1
21874
21875
21876
21877
21878
21879$as_echo "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
21880
21881
21882
21883
21884
21885
21886
21887
21888  if test $ac_cv_func_fcntl = no; then
21889
21890
21891
21892  if test $ac_cv_func_fcntl = no; then
21893    HAVE_FCNTL=0
21894  else
21895    REPLACE_FCNTL=1
21896  fi
21897
21898  else
21899            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
21900$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
21901if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
21902  $as_echo_n "(cached) " >&6
21903else
21904  if test "$cross_compiling" = yes; then :
21905  case $host_os in
21906            aix* | cygwin* | haiku*)
21907               gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
21908            *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
21909          esac
21910else
21911  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21912/* end confdefs.h.  */
21913#include <errno.h>
21914              #include <fcntl.h>
21915              #include <limits.h>
21916              #include <sys/resource.h>
21917              #include <unistd.h>
21918              #ifndef RLIM_SAVED_CUR
21919              # define RLIM_SAVED_CUR RLIM_INFINITY
21920              #endif
21921              #ifndef RLIM_SAVED_MAX
21922              # define RLIM_SAVED_MAX RLIM_INFINITY
21923              #endif
21924
21925int
21926main ()
21927{
21928int result = 0;
21929              int bad_fd = INT_MAX;
21930              struct rlimit rlim;
21931              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
21932                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
21933                  && rlim.rlim_cur != RLIM_INFINITY
21934                  && rlim.rlim_cur != RLIM_SAVED_MAX
21935                  && rlim.rlim_cur != RLIM_SAVED_CUR)
21936                bad_fd = rlim.rlim_cur;
21937              if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
21938              if (errno != EINVAL) result |= 2;
21939              if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
21940              if (errno != EINVAL) result |= 8;
21941              /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
21942              {
21943                int fd;
21944                fd = open (".", O_RDONLY);
21945                if (fd == -1)
21946                  result |= 16;
21947                else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
21948                  result |= 32;
21949
21950                close (fd);
21951              }
21952              return result;
21953  ;
21954  return 0;
21955}
21956_ACEOF
21957if ac_fn_c_try_run "$LINENO"; then :
21958  gl_cv_func_fcntl_f_dupfd_works=yes
21959else
21960  gl_cv_func_fcntl_f_dupfd_works=no
21961fi
21962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21963  conftest.$ac_objext conftest.beam conftest.$ac_ext
21964fi
21965
21966fi
21967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
21968$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
21969    case $gl_cv_func_fcntl_f_dupfd_works in
21970      *yes) ;;
21971      *)
21972
21973
21974  if test $ac_cv_func_fcntl = no; then
21975    HAVE_FCNTL=0
21976  else
21977    REPLACE_FCNTL=1
21978  fi
21979
21980
21981$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
21982 ;;
21983    esac
21984
21985        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
21986$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
21987if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
21988  $as_echo_n "(cached) " >&6
21989else
21990  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21991/* end confdefs.h.  */
21992
21993#include <fcntl.h>
21994#ifndef F_DUPFD_CLOEXEC
21995choke me
21996#endif
21997
21998int
21999main ()
22000{
22001
22002  ;
22003  return 0;
22004}
22005_ACEOF
22006if ac_fn_c_try_compile "$LINENO"; then :
22007  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22008/* end confdefs.h.  */
22009
22010#ifdef __linux__
22011/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
22012   it to support the semantics on older kernels that failed with EINVAL.  */
22013choke me
22014#endif
22015
22016int
22017main ()
22018{
22019
22020  ;
22021  return 0;
22022}
22023_ACEOF
22024if ac_fn_c_try_compile "$LINENO"; then :
22025  gl_cv_func_fcntl_f_dupfd_cloexec=yes
22026else
22027  gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
22028fi
22029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22030else
22031  gl_cv_func_fcntl_f_dupfd_cloexec=no
22032fi
22033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22034fi
22035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
22036$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
22037    if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
22038
22039
22040
22041  if test $ac_cv_func_fcntl = no; then
22042    HAVE_FCNTL=0
22043  else
22044    REPLACE_FCNTL=1
22045  fi
22046
22047          fi
22048  fi
22049
22050
22051  if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
22052
22053
22054
22055
22056
22057
22058
22059
22060  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
22061
22062  fi
22063
22064
22065
22066
22067
22068          GNULIB_FCNTL=1
22069
22070
22071
22072
22073
22074$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089     if test $gl_cv_have_include_next = yes; then
22090       gl_cv_next_fcntl_h='<'fcntl.h'>'
22091     else
22092       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
22093$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
22094if ${gl_cv_next_fcntl_h+:} false; then :
22095  $as_echo_n "(cached) " >&6
22096else
22097
22098
22099
22100  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22101/* end confdefs.h.  */
22102#include <fcntl.h>
22103_ACEOF
22104                case "$host_os" in
22105    aix*) gl_absname_cpp="$ac_cpp -C" ;;
22106    *)    gl_absname_cpp="$ac_cpp" ;;
22107  esac
22108
22109  case "$host_os" in
22110    mingw*)
22111                                          gl_dirsep_regex='[/\\]'
22112      ;;
22113    *)
22114      gl_dirsep_regex='\/'
22115      ;;
22116  esac
22117      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22118  gl_header_literal_regex=`echo 'fcntl.h' \
22119                           | sed -e "$gl_make_literal_regex_sed"`
22120  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22121      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22122      s|^/[^/]|//&|
22123      p
22124      q
22125    }'
22126
22127        gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22128  sed -n "$gl_absolute_header_sed"`
22129
22130           gl_header=$gl_cv_absolute_fcntl_h
22131           gl_cv_next_fcntl_h='"'$gl_header'"'
22132
22133
22134fi
22135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
22136$as_echo "$gl_cv_next_fcntl_h" >&6; }
22137     fi
22138     NEXT_FCNTL_H=$gl_cv_next_fcntl_h
22139
22140     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22141       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22142       gl_next_as_first_directive='<'fcntl.h'>'
22143     else
22144       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22145       gl_next_as_first_directive=$gl_cv_next_fcntl_h
22146     fi
22147     NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158    for gl_func in fcntl openat; do
22159    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22161$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22162if eval \${$as_gl_Symbol+:} false; then :
22163  $as_echo_n "(cached) " >&6
22164else
22165  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22166/* end confdefs.h.  */
22167#include <fcntl.h>
22168
22169int
22170main ()
22171{
22172#undef $gl_func
22173  (void) $gl_func;
22174  ;
22175  return 0;
22176}
22177_ACEOF
22178if ac_fn_c_try_compile "$LINENO"; then :
22179  eval "$as_gl_Symbol=yes"
22180else
22181  eval "$as_gl_Symbol=no"
22182fi
22183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22184fi
22185eval ac_res=\$$as_gl_Symbol
22186	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22187$as_echo "$ac_res" >&6; }
22188    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22189  cat >>confdefs.h <<_ACEOF
22190#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22191_ACEOF
22192
22193                     eval ac_cv_have_decl_$gl_func=yes
22194fi
22195      done
22196
22197
22198
22199
22200cat >>confdefs.h <<_ACEOF
22201#define GNULIB_FD_SAFER_FLAG 1
22202_ACEOF
22203
22204
22205
22206
22207
22208
22209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
22210$as_echo_n "checking whether fflush works on input streams... " >&6; }
22211if ${gl_cv_func_fflush_stdin+:} false; then :
22212  $as_echo_n "(cached) " >&6
22213else
22214  echo hello world > conftest.txt
22215     if test "$cross_compiling" = yes; then :
22216  gl_cv_func_fflush_stdin=cross
22217else
22218  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22219/* end confdefs.h.  */
22220
22221#include <stdio.h>
22222#if HAVE_UNISTD_H
22223# include <unistd.h>
22224#else /* on Windows with MSVC */
22225# include <io.h>
22226#endif
22227
22228int
22229main ()
22230{
22231FILE *f = fopen ("conftest.txt", "r");
22232         char buffer[10];
22233         int fd;
22234         int c;
22235         if (f == NULL)
22236           return 1;
22237         fd = fileno (f);
22238         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
22239           return 2;
22240         /* For deterministic results, ensure f read a bigger buffer.  */
22241         if (lseek (fd, 0, SEEK_CUR) == 5)
22242           return 3;
22243         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
22244            on BSD systems and on mingw.  */
22245         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
22246           return 4;
22247         if (lseek (fd, 0, SEEK_CUR) != 5)
22248           return 5;
22249         /* Verify behaviour of fflush after ungetc. See
22250            <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
22251         /* Verify behaviour of fflush after a backup ungetc.  This fails on
22252            mingw.  */
22253         c = fgetc (f);
22254         ungetc (c, f);
22255         fflush (f);
22256         if (fgetc (f) != c)
22257           return 6;
22258         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
22259            on glibc 2.8 and on BSD systems.  */
22260         c = fgetc (f);
22261         ungetc ('@', f);
22262         fflush (f);
22263         if (fgetc (f) != c)
22264           return 7;
22265         return 0;
22266
22267  ;
22268  return 0;
22269}
22270_ACEOF
22271if ac_fn_c_try_run "$LINENO"; then :
22272  gl_cv_func_fflush_stdin=yes
22273else
22274  gl_cv_func_fflush_stdin=no
22275fi
22276rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22277  conftest.$ac_objext conftest.beam conftest.$ac_ext
22278fi
22279
22280     rm conftest.txt
22281
22282fi
22283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
22284$as_echo "$gl_cv_func_fflush_stdin" >&6; }
22285  case $gl_cv_func_fflush_stdin in
22286    yes) gl_func_fflush_stdin=1 ;;
22287    no)  gl_func_fflush_stdin=0 ;;
22288    *)   gl_func_fflush_stdin='(-1)' ;;
22289  esac
22290
22291cat >>confdefs.h <<_ACEOF
22292#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
22293_ACEOF
22294
22295
22296  if test $gl_cv_func_fflush_stdin != yes; then
22297    REPLACE_FFLUSH=1
22298  fi
22299
22300  if test $REPLACE_FFLUSH = 1; then
22301
22302
22303
22304
22305
22306
22307
22308
22309  gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
22310
22311    :
22312  fi
22313
22314
22315cat >>confdefs.h <<_ACEOF
22316#define GNULIB_FFLUSH 1
22317_ACEOF
22318
22319
22320
22321
22322
22323
22324
22325          GNULIB_FFLUSH=1
22326
22327
22328
22329
22330
22331$as_echo "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
22332
22333
22334
22335
22336
22337
22338  FLOAT_H=
22339  REPLACE_FLOAT_LDBL=0
22340  case "$host_os" in
22341    aix* | beos* | openbsd* | mirbsd* | irix*)
22342      FLOAT_H=float.h
22343      ;;
22344    freebsd*)
22345      case "$host_cpu" in
22346        i[34567]86 )
22347          FLOAT_H=float.h
22348          ;;
22349        x86_64 )
22350          # On x86_64 systems, the C compiler may still be generating
22351          # 32-bit code.
22352          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22353/* end confdefs.h.  */
22354#if defined __LP64__ || defined __x86_64__ || defined __amd64__
22355             yes
22356             #endif
22357_ACEOF
22358if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22359  $EGREP "yes" >/dev/null 2>&1; then :
22360
22361else
22362  FLOAT_H=float.h
22363fi
22364rm -f conftest*
22365
22366          ;;
22367      esac
22368      ;;
22369    linux*)
22370      case "$host_cpu" in
22371        powerpc*)
22372          FLOAT_H=float.h
22373          ;;
22374      esac
22375      ;;
22376  esac
22377  case "$host_os" in
22378    aix* | freebsd* | linux*)
22379      if test -n "$FLOAT_H"; then
22380        REPLACE_FLOAT_LDBL=1
22381      fi
22382      ;;
22383  esac
22384
22385    REPLACE_ITOLD=0
22386  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
22387$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
22388if ${gl_cv_func_itold_works+:} false; then :
22389  $as_echo_n "(cached) " >&6
22390else
22391
22392      if test "$cross_compiling" = yes; then :
22393  case "$host" in
22394           sparc*-*-linux*)
22395             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22396/* end confdefs.h.  */
22397#if defined __LP64__ || defined __arch64__
22398                yes
22399                #endif
22400_ACEOF
22401if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22402  $EGREP "yes" >/dev/null 2>&1; then :
22403  gl_cv_func_itold_works="guessing no"
22404else
22405  gl_cv_func_itold_works="guessing yes"
22406fi
22407rm -f conftest*
22408
22409             ;;
22410           *) gl_cv_func_itold_works="guessing yes" ;;
22411         esac
22412
22413else
22414  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22415/* end confdefs.h.  */
22416
22417int i = -1;
22418volatile long double ld;
22419int main ()
22420{
22421  ld += i * 1.0L;
22422  if (ld > 0)
22423    return 1;
22424  return 0;
22425}
22426_ACEOF
22427if ac_fn_c_try_run "$LINENO"; then :
22428  gl_cv_func_itold_works=yes
22429else
22430  gl_cv_func_itold_works=no
22431fi
22432rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22433  conftest.$ac_objext conftest.beam conftest.$ac_ext
22434fi
22435
22436
22437fi
22438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
22439$as_echo "$gl_cv_func_itold_works" >&6; }
22440  case "$gl_cv_func_itold_works" in
22441    *no)
22442      REPLACE_ITOLD=1
22443                  FLOAT_H=float.h
22444      ;;
22445  esac
22446
22447  if test -n "$FLOAT_H"; then
22448
22449
22450
22451
22452
22453
22454
22455
22456     if test $gl_cv_have_include_next = yes; then
22457       gl_cv_next_float_h='<'float.h'>'
22458     else
22459       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
22460$as_echo_n "checking absolute name of <float.h>... " >&6; }
22461if ${gl_cv_next_float_h+:} false; then :
22462  $as_echo_n "(cached) " >&6
22463else
22464
22465
22466
22467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22468/* end confdefs.h.  */
22469#include <float.h>
22470_ACEOF
22471                case "$host_os" in
22472    aix*) gl_absname_cpp="$ac_cpp -C" ;;
22473    *)    gl_absname_cpp="$ac_cpp" ;;
22474  esac
22475
22476  case "$host_os" in
22477    mingw*)
22478                                          gl_dirsep_regex='[/\\]'
22479      ;;
22480    *)
22481      gl_dirsep_regex='\/'
22482      ;;
22483  esac
22484      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22485  gl_header_literal_regex=`echo 'float.h' \
22486                           | sed -e "$gl_make_literal_regex_sed"`
22487  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22488      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22489      s|^/[^/]|//&|
22490      p
22491      q
22492    }'
22493
22494        gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22495  sed -n "$gl_absolute_header_sed"`
22496
22497           gl_header=$gl_cv_absolute_float_h
22498           gl_cv_next_float_h='"'$gl_header'"'
22499
22500
22501fi
22502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
22503$as_echo "$gl_cv_next_float_h" >&6; }
22504     fi
22505     NEXT_FLOAT_H=$gl_cv_next_float_h
22506
22507     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22508       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22509       gl_next_as_first_directive='<'float.h'>'
22510     else
22511       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22512       gl_next_as_first_directive=$gl_cv_next_float_h
22513     fi
22514     NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
22515
22516
22517
22518
22519  fi
22520
22521   if test -n "$FLOAT_H"; then
22522  GL_GENERATE_FLOAT_H_TRUE=
22523  GL_GENERATE_FLOAT_H_FALSE='#'
22524else
22525  GL_GENERATE_FLOAT_H_TRUE='#'
22526  GL_GENERATE_FLOAT_H_FALSE=
22527fi
22528
22529
22530
22531  if test $REPLACE_FLOAT_LDBL = 1; then
22532
22533
22534
22535
22536
22537
22538
22539
22540  gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
22541
22542  fi
22543  if test $REPLACE_ITOLD = 1; then
22544
22545
22546
22547
22548
22549
22550
22551
22552  gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
22553
22554  fi
22555
22556
22557
22558
22559
22560  saved_as_echo_n="$as_echo_n"
22561  as_echo_n=':'
22562  if ${gl_cv_func_floor_libm+:} false; then :
22563  $as_echo_n "(cached) " >&6
22564else
22565
22566    gl_cv_func_floor_libm=?
22567    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22568/* end confdefs.h.  */
22569#ifndef __NO_MATH_INLINES
22570           # define __NO_MATH_INLINES 1 /* for glibc */
22571           #endif
22572           #include <math.h>
22573           double x;
22574int
22575main ()
22576{
22577x = floor(x);
22578  ;
22579  return 0;
22580}
22581_ACEOF
22582if ac_fn_c_try_link "$LINENO"; then :
22583  gl_cv_func_floor_libm=
22584fi
22585rm -f core conftest.err conftest.$ac_objext \
22586    conftest$ac_exeext conftest.$ac_ext
22587    if test "$gl_cv_func_floor_libm" = "?"; then
22588      save_LIBS="$LIBS"
22589      LIBS="$LIBS -lm"
22590      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22591/* end confdefs.h.  */
22592#ifndef __NO_MATH_INLINES
22593             # define __NO_MATH_INLINES 1 /* for glibc */
22594             #endif
22595             #include <math.h>
22596             double x;
22597int
22598main ()
22599{
22600x = floor(x);
22601  ;
22602  return 0;
22603}
22604_ACEOF
22605if ac_fn_c_try_link "$LINENO"; then :
22606  gl_cv_func_floor_libm="-lm"
22607fi
22608rm -f core conftest.err conftest.$ac_objext \
22609    conftest$ac_exeext conftest.$ac_ext
22610      LIBS="$save_LIBS"
22611    fi
22612
22613fi
22614
22615  as_echo_n="$saved_as_echo_n"
22616
22617  FLOOR_LIBM="$gl_cv_func_floor_libm"
22618
22619  if test "$FLOOR_LIBM" = "?"; then
22620    FLOOR_LIBM=
22621  fi
22622
22623  if test $REPLACE_FLOOR = 1; then
22624        FLOOR_LIBM=
22625  fi
22626
22627
22628  if test $REPLACE_FLOOR = 1; then
22629
22630
22631
22632
22633
22634
22635
22636
22637  gl_LIBOBJS="$gl_LIBOBJS floor.$ac_objext"
22638
22639  fi
22640
22641
22642
22643
22644
22645          GNULIB_FLOOR=1
22646
22647
22648
22649
22650
22651$as_echo "#define GNULIB_TEST_FLOOR 1" >>confdefs.h
22652
22653
22654
22655
22656
22657
22658  case "$host_os" in
22659    mingw* | pw*)
22660            REPLACE_FOPEN=1
22661            gl_cv_func_fopen_slash="guessing no"
22662      ;;
22663    *)
22664                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
22665$as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
22666if ${gl_cv_func_fopen_slash+:} false; then :
22667  $as_echo_n "(cached) " >&6
22668else
22669
22670          if test "$cross_compiling" = yes; then :
22671
22672             case "$host_os" in
22673               aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
22674                 gl_cv_func_fopen_slash="guessing no" ;;
22675               *)
22676                 gl_cv_func_fopen_slash="guessing yes" ;;
22677             esac
22678
22679else
22680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22681/* end confdefs.h.  */
22682
22683#include <stddef.h>
22684#include <stdio.h>
22685int main ()
22686{
22687  return fopen ("conftest.sl/", "w") != NULL;
22688}
22689_ACEOF
22690if ac_fn_c_try_run "$LINENO"; then :
22691  gl_cv_func_fopen_slash=yes
22692else
22693  gl_cv_func_fopen_slash=no
22694fi
22695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22696  conftest.$ac_objext conftest.beam conftest.$ac_ext
22697fi
22698
22699          rm -f conftest.sl
22700
22701fi
22702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
22703$as_echo "$gl_cv_func_fopen_slash" >&6; }
22704      ;;
22705  esac
22706  case "$gl_cv_func_fopen_slash" in
22707    *no)
22708
22709$as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
22710
22711      REPLACE_FOPEN=1
22712      ;;
22713  esac
22714
22715  if test $REPLACE_FOPEN = 1; then
22716
22717
22718
22719
22720
22721
22722
22723
22724  gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
22725
22726    :
22727  fi
22728
22729
22730
22731
22732
22733          GNULIB_FOPEN=1
22734
22735
22736
22737
22738
22739$as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
22740
22741
22742
22743
22744
22745
22746
22747  ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
22748"
22749if test "x$ac_cv_have_decl_fpurge" = xyes; then :
22750  ac_have_decl=1
22751else
22752  ac_have_decl=0
22753fi
22754
22755cat >>confdefs.h <<_ACEOF
22756#define HAVE_DECL_FPURGE $ac_have_decl
22757_ACEOF
22758
22759  if test "x$ac_cv_func_fpurge" = xyes; then
22760    HAVE_FPURGE=1
22761    # Detect BSD bug.  Only cygwin 1.7 is known to be immune.
22762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
22763$as_echo_n "checking whether fpurge works... " >&6; }
22764if ${gl_cv_func_fpurge_works+:} false; then :
22765  $as_echo_n "(cached) " >&6
22766else
22767  if test "$cross_compiling" = yes; then :
22768  gl_cv_func_fpurge_works='guessing no'
22769else
22770  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22771/* end confdefs.h.  */
22772#include <stdio.h>
22773
22774int
22775main ()
22776{
22777FILE *f = fopen ("conftest.txt", "w+");
22778        if (!f) return 1;
22779        if (fputc ('a', f) != 'a') return 2;
22780        rewind (f);
22781        if (fgetc (f) != 'a') return 3;
22782        if (fgetc (f) != EOF) return 4;
22783        if (fpurge (f) != 0) return 5;
22784        if (putc ('b', f) != 'b') return 6;
22785        if (fclose (f) != 0) return 7;
22786        if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
22787        if (fgetc (f) != 'a') return 9;
22788        if (fgetc (f) != 'b') return 10;
22789        if (fgetc (f) != EOF) return 11;
22790        if (fclose (f) != 0) return 12;
22791        if (remove ("conftest.txt") != 0) return 13;
22792        return 0;
22793  ;
22794  return 0;
22795}
22796_ACEOF
22797if ac_fn_c_try_run "$LINENO"; then :
22798  gl_cv_func_fpurge_works=yes
22799else
22800  gl_cv_func_fpurge_works=no
22801fi
22802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22803  conftest.$ac_objext conftest.beam conftest.$ac_ext
22804fi
22805
22806fi
22807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
22808$as_echo "$gl_cv_func_fpurge_works" >&6; }
22809    if test "x$gl_cv_func_fpurge_works" != xyes; then
22810      REPLACE_FPURGE=1
22811    fi
22812  else
22813    HAVE_FPURGE=0
22814  fi
22815  if test "x$ac_cv_have_decl_fpurge" = xno; then
22816    HAVE_DECL_FPURGE=0
22817  fi
22818
22819  if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
22820
22821
22822
22823
22824
22825
22826
22827
22828  gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
22829
22830  fi
22831
22832
22833
22834
22835
22836          GNULIB_FPURGE=1
22837
22838
22839
22840
22841
22842$as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
22843
22844
22845
22846
22847
22848
22849
22850
22851  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether free (NULL) is known to work" >&5
22852$as_echo_n "checking whether free (NULL) is known to work... " >&6; }
22853if ${gl_cv_func_free+:} false; then :
22854  $as_echo_n "(cached) " >&6
22855else
22856  case "$host_os" in
22857       mingw*) gl_cv_func_free=yes ;;
22858       *)
22859         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22860/* end confdefs.h.  */
22861#include <unistd.h>
22862int
22863main ()
22864{
22865#if _POSIX_VERSION < 199009L && \
22866                    (defined unix || defined _unix || defined _unix_ \
22867                     || defined __unix || defined __unix__)
22868                  #error "'free (NULL)' is not known to work"
22869                #endif
22870  ;
22871  return 0;
22872}
22873_ACEOF
22874if ac_fn_c_try_compile "$LINENO"; then :
22875  gl_cv_func_free=yes
22876else
22877  gl_cv_func_free=no
22878fi
22879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22880     esac
22881
22882fi
22883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free" >&5
22884$as_echo "$gl_cv_func_free" >&6; }
22885
22886  if test $gl_cv_func_free = no; then
22887
22888$as_echo "#define free rpl_free" >>confdefs.h
22889
22890  fi
22891
22892  if test $gl_cv_func_free = no; then
22893
22894
22895
22896
22897
22898
22899
22900
22901  gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
22902
22903    :
22904  fi
22905
22906
22907
22908    if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
22909    REPLACE_FSEEK=1
22910  fi
22911
22912  if test $REPLACE_FSEEK = 1; then
22913
22914
22915
22916
22917
22918
22919
22920
22921  gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
22922
22923  fi
22924
22925
22926
22927
22928
22929          GNULIB_FSEEK=1
22930
22931
22932
22933
22934
22935$as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
22948$as_echo_n "checking for fseeko... " >&6; }
22949if ${gl_cv_func_fseeko+:} false; then :
22950  $as_echo_n "(cached) " >&6
22951else
22952
22953      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22954/* end confdefs.h.  */
22955#include <stdio.h>
22956
22957int
22958main ()
22959{
22960fseeko (stdin, 0, 0);
22961  ;
22962  return 0;
22963}
22964_ACEOF
22965if ac_fn_c_try_link "$LINENO"; then :
22966  gl_cv_func_fseeko=yes
22967else
22968  gl_cv_func_fseeko=no
22969fi
22970rm -f core conftest.err conftest.$ac_objext \
22971    conftest$ac_exeext conftest.$ac_ext
22972
22973fi
22974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
22975$as_echo "$gl_cv_func_fseeko" >&6; }
22976
22977
22978  if test $ac_cv_have_decl_fseeko = no; then
22979    HAVE_DECL_FSEEKO=0
22980  fi
22981
22982  if test $gl_cv_func_fseeko = no; then
22983    HAVE_FSEEKO=0
22984  else
22985    if test $WINDOWS_64_BIT_OFF_T = 1; then
22986      REPLACE_FSEEKO=1
22987    fi
22988    if test $gl_cv_var_stdin_large_offset = no; then
22989      REPLACE_FSEEKO=1
22990    fi
22991
22992
22993
22994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
22995$as_echo_n "checking whether fflush works on input streams... " >&6; }
22996if ${gl_cv_func_fflush_stdin+:} false; then :
22997  $as_echo_n "(cached) " >&6
22998else
22999  echo hello world > conftest.txt
23000     if test "$cross_compiling" = yes; then :
23001  gl_cv_func_fflush_stdin=cross
23002else
23003  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23004/* end confdefs.h.  */
23005
23006#include <stdio.h>
23007#if HAVE_UNISTD_H
23008# include <unistd.h>
23009#else /* on Windows with MSVC */
23010# include <io.h>
23011#endif
23012
23013int
23014main ()
23015{
23016FILE *f = fopen ("conftest.txt", "r");
23017         char buffer[10];
23018         int fd;
23019         int c;
23020         if (f == NULL)
23021           return 1;
23022         fd = fileno (f);
23023         if (fd < 0 || fread (buffer, 1, 5, f) != 5)
23024           return 2;
23025         /* For deterministic results, ensure f read a bigger buffer.  */
23026         if (lseek (fd, 0, SEEK_CUR) == 5)
23027           return 3;
23028         /* POSIX requires fflush-fseek to set file offset of fd.  This fails
23029            on BSD systems and on mingw.  */
23030         if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
23031           return 4;
23032         if (lseek (fd, 0, SEEK_CUR) != 5)
23033           return 5;
23034         /* Verify behaviour of fflush after ungetc. See
23035            <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>  */
23036         /* Verify behaviour of fflush after a backup ungetc.  This fails on
23037            mingw.  */
23038         c = fgetc (f);
23039         ungetc (c, f);
23040         fflush (f);
23041         if (fgetc (f) != c)
23042           return 6;
23043         /* Verify behaviour of fflush after a non-backup ungetc.  This fails
23044            on glibc 2.8 and on BSD systems.  */
23045         c = fgetc (f);
23046         ungetc ('@', f);
23047         fflush (f);
23048         if (fgetc (f) != c)
23049           return 7;
23050         return 0;
23051
23052  ;
23053  return 0;
23054}
23055_ACEOF
23056if ac_fn_c_try_run "$LINENO"; then :
23057  gl_cv_func_fflush_stdin=yes
23058else
23059  gl_cv_func_fflush_stdin=no
23060fi
23061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23062  conftest.$ac_objext conftest.beam conftest.$ac_ext
23063fi
23064
23065     rm conftest.txt
23066
23067fi
23068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
23069$as_echo "$gl_cv_func_fflush_stdin" >&6; }
23070  case $gl_cv_func_fflush_stdin in
23071    yes) gl_func_fflush_stdin=1 ;;
23072    no)  gl_func_fflush_stdin=0 ;;
23073    *)   gl_func_fflush_stdin='(-1)' ;;
23074  esac
23075
23076cat >>confdefs.h <<_ACEOF
23077#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
23078_ACEOF
23079
23080
23081      if test $gl_cv_func_fflush_stdin != yes; then
23082        REPLACE_FSEEKO=1
23083      fi
23084
23085  fi
23086
23087  if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
23088
23089
23090
23091
23092
23093
23094
23095
23096  gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
23097
23098
23099      for ac_func in _fseeki64
23100do :
23101  ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
23102if test "x$ac_cv_func__fseeki64" = xyes; then :
23103  cat >>confdefs.h <<_ACEOF
23104#define HAVE__FSEEKI64 1
23105_ACEOF
23106
23107fi
23108done
23109
23110
23111  fi
23112
23113
23114
23115
23116
23117          GNULIB_FSEEKO=1
23118
23119
23120
23121
23122
23123$as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
23124
23125
23126
23127
23128
23129
23130
23131  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23132    REPLACE_FSTAT=1
23133  fi
23134
23135
23136  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
23137    REPLACE_FSTAT=1
23138  fi
23139
23140
23141
23142  if test $REPLACE_FSTAT = 1; then
23143
23144
23145
23146
23147
23148
23149
23150
23151  gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
23152
23153    :
23154  fi
23155
23156
23157
23158
23159
23160          GNULIB_FSTAT=1
23161
23162
23163
23164
23165
23166$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
23167
23168
23169
23170
23171
23172
23173    if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
23174    REPLACE_FTELL=1
23175  fi
23176
23177  if test $REPLACE_FTELL = 1; then
23178
23179
23180
23181
23182
23183
23184
23185
23186  gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
23187
23188  fi
23189
23190
23191
23192
23193
23194          GNULIB_FTELL=1
23195
23196
23197
23198
23199
23200$as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h
23201
23202
23203
23204
23205
23206
23207
23208
23209
23210
23211
23212
23213  if test $ac_cv_have_decl_ftello = no; then
23214    HAVE_DECL_FTELLO=0
23215  fi
23216
23217  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
23218$as_echo_n "checking for ftello... " >&6; }
23219if ${gl_cv_func_ftello+:} false; then :
23220  $as_echo_n "(cached) " >&6
23221else
23222
23223      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23224/* end confdefs.h.  */
23225#include <stdio.h>
23226int
23227main ()
23228{
23229ftello (stdin);
23230  ;
23231  return 0;
23232}
23233_ACEOF
23234if ac_fn_c_try_link "$LINENO"; then :
23235  gl_cv_func_ftello=yes
23236else
23237  gl_cv_func_ftello=no
23238fi
23239rm -f core conftest.err conftest.$ac_objext \
23240    conftest$ac_exeext conftest.$ac_ext
23241
23242fi
23243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
23244$as_echo "$gl_cv_func_ftello" >&6; }
23245  if test $gl_cv_func_ftello = no; then
23246    HAVE_FTELLO=0
23247  else
23248    if test $WINDOWS_64_BIT_OFF_T = 1; then
23249      REPLACE_FTELLO=1
23250    fi
23251    if test $gl_cv_var_stdin_large_offset = no; then
23252      REPLACE_FTELLO=1
23253    fi
23254    if test $REPLACE_FTELLO = 0; then
23255
23256      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
23257$as_echo_n "checking whether ftello works... " >&6; }
23258if ${gl_cv_func_ftello_works+:} false; then :
23259  $as_echo_n "(cached) " >&6
23260else
23261
23262                              case "$host_os" in
23263                      # Guess no on Solaris.
23264            solaris*) gl_cv_func_ftello_works="guessing no" ;;
23265                      # Guess yes otherwise.
23266            *)        gl_cv_func_ftello_works="guessing yes" ;;
23267          esac
23268          if test "$cross_compiling" = yes; then :
23269  :
23270else
23271  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23272/* end confdefs.h.  */
23273
23274#include <stdio.h>
23275#include <stdlib.h>
23276#include <string.h>
23277#define TESTFILE "conftest.tmp"
23278int
23279main (void)
23280{
23281  FILE *fp;
23282
23283  /* Create a file with some contents.  */
23284  fp = fopen (TESTFILE, "w");
23285  if (fp == NULL)
23286    return 70;
23287  if (fwrite ("foogarsh", 1, 8, fp) < 8)
23288    return 71;
23289  if (fclose (fp))
23290    return 72;
23291
23292  /* The file's contents is now "foogarsh".  */
23293
23294  /* Try writing after reading to EOF.  */
23295  fp = fopen (TESTFILE, "r+");
23296  if (fp == NULL)
23297    return 73;
23298  if (fseek (fp, -1, SEEK_END))
23299    return 74;
23300  if (!(getc (fp) == 'h'))
23301    return 1;
23302  if (!(getc (fp) == EOF))
23303    return 2;
23304  if (!(ftell (fp) == 8))
23305    return 3;
23306  if (!(ftell (fp) == 8))
23307    return 4;
23308  if (!(putc ('!', fp) == '!'))
23309    return 5;
23310  if (!(ftell (fp) == 9))
23311    return 6;
23312  if (!(fclose (fp) == 0))
23313    return 7;
23314  fp = fopen (TESTFILE, "r");
23315  if (fp == NULL)
23316    return 75;
23317  {
23318    char buf[10];
23319    if (!(fread (buf, 1, 10, fp) == 9))
23320      return 10;
23321    if (!(memcmp (buf, "foogarsh!", 9) == 0))
23322      return 11;
23323  }
23324  if (!(fclose (fp) == 0))
23325    return 12;
23326
23327  /* The file's contents is now "foogarsh!".  */
23328
23329  return 0;
23330}
23331_ACEOF
23332if ac_fn_c_try_run "$LINENO"; then :
23333  gl_cv_func_ftello_works=yes
23334else
23335  gl_cv_func_ftello_works=no
23336fi
23337rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23338  conftest.$ac_objext conftest.beam conftest.$ac_ext
23339fi
23340
23341
23342fi
23343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
23344$as_echo "$gl_cv_func_ftello_works" >&6; }
23345      case "$gl_cv_func_ftello_works" in
23346        *yes) ;;
23347        *)
23348          REPLACE_FTELLO=1
23349
23350$as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
23351
23352          ;;
23353      esac
23354    fi
23355  fi
23356
23357  if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
23358
23359
23360
23361
23362
23363
23364
23365
23366  gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
23367
23368
23369      for ac_func in _ftelli64
23370do :
23371  ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
23372if test "x$ac_cv_func__ftelli64" = xyes; then :
23373  cat >>confdefs.h <<_ACEOF
23374#define HAVE__FTELLI64 1
23375_ACEOF
23376
23377fi
23378done
23379
23380
23381  fi
23382
23383
23384
23385
23386
23387          GNULIB_FTELLO=1
23388
23389
23390
23391
23392
23393$as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
23394
23395
23396
23397
23398
23399
23400
23401
23402  if test $ac_cv_func_getdtablesize = yes &&
23403     test $ac_cv_have_decl_getdtablesize = yes; then
23404    # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
23405    # up to an unchangeable hard limit; all other platforms correctly
23406    # require setrlimit before getdtablesize() can report a larger value.
23407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
23408$as_echo_n "checking whether getdtablesize works... " >&6; }
23409if ${gl_cv_func_getdtablesize_works+:} false; then :
23410  $as_echo_n "(cached) " >&6
23411else
23412  if test "$cross_compiling" = yes; then :
23413  case "$host_os" in
23414          cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
23415            gl_cv_func_getdtablesize_works="guessing no" ;;
23416          *) gl_cv_func_getdtablesize_works="guessing yes" ;;
23417         esac
23418else
23419  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23420/* end confdefs.h.  */
23421
23422        #include <unistd.h>
23423int
23424main ()
23425{
23426int size = getdtablesize();
23427           if (dup2 (0, getdtablesize()) != -1)
23428             return 1;
23429           if (size != getdtablesize())
23430             return 2;
23431
23432  ;
23433  return 0;
23434}
23435_ACEOF
23436if ac_fn_c_try_run "$LINENO"; then :
23437  gl_cv_func_getdtablesize_works=yes
23438else
23439  gl_cv_func_getdtablesize_works=no
23440fi
23441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23442  conftest.$ac_objext conftest.beam conftest.$ac_ext
23443fi
23444
23445
23446fi
23447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
23448$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
23449    case "$gl_cv_func_getdtablesize_works" in
23450      *yes) ;;
23451      *) REPLACE_GETDTABLESIZE=1 ;;
23452    esac
23453  else
23454    HAVE_GETDTABLESIZE=0
23455  fi
23456
23457  if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
23458
23459
23460
23461
23462
23463
23464
23465
23466  gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
23467
23468    :
23469  fi
23470
23471
23472
23473
23474
23475          GNULIB_GETDTABLESIZE=1
23476
23477
23478
23479
23480
23481$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
23482
23483
23484
23485
23486
23487
23488  ac_found=0
23489  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
23490"
23491if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
23492  ac_have_decl=1
23493else
23494  ac_have_decl=0
23495fi
23496
23497cat >>confdefs.h <<_ACEOF
23498#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
23499_ACEOF
23500if test $ac_have_decl = 1; then :
23501  ac_found=1
23502fi
23503
23504  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
23505"
23506if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
23507  ac_have_decl=1
23508else
23509  ac_have_decl=0
23510fi
23511
23512cat >>confdefs.h <<_ACEOF
23513#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
23514_ACEOF
23515if test $ac_have_decl = 1; then :
23516  ac_found=1
23517fi
23518
23519  ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
23520"
23521if test "x$ac_cv_have_decl___argv" = xyes; then :
23522  ac_have_decl=1
23523else
23524  ac_have_decl=0
23525fi
23526
23527cat >>confdefs.h <<_ACEOF
23528#define HAVE_DECL___ARGV $ac_have_decl
23529_ACEOF
23530if test $ac_have_decl = 1; then :
23531  ac_found=1
23532fi
23533
23534
23535  # Incur the cost of this test only if none of the above worked.
23536  if test $ac_found = 0; then
23537    # On OpenBSD 5.1, using the global __progname variable appears to be
23538    # the only way to implement getprogname.
23539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
23540$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
23541if ${gl_cv_var___progname+:} false; then :
23542  $as_echo_n "(cached) " >&6
23543else
23544
23545        gl_cv_var___progname=
23546        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23547/* end confdefs.h.  */
23548extern char *__progname;
23549int
23550main ()
23551{
23552return *__progname;
23553
23554  ;
23555  return 0;
23556}
23557_ACEOF
23558if ac_fn_c_try_link "$LINENO"; then :
23559  gl_cv_var___progname=yes
23560
23561fi
23562rm -f core conftest.err conftest.$ac_objext \
23563    conftest$ac_exeext conftest.$ac_ext
23564
23565
23566fi
23567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
23568$as_echo "$gl_cv_var___progname" >&6; }
23569    if test "$gl_cv_var___progname" = yes; then
23570
23571$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
23572
23573    fi
23574  fi
23575
23576
23577
23578
23579
23580
23581
23582
23583
23584  gl_gettimeofday_timezone=void
23585  if test $ac_cv_func_gettimeofday != yes; then
23586    HAVE_GETTIMEOFDAY=0
23587  else
23588
23589
23590
23591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
23592$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
23593if ${gl_cv_func_gettimeofday_clobber+:} false; then :
23594  $as_echo_n "(cached) " >&6
23595else
23596  if test "$cross_compiling" = yes; then :
23597  # When cross-compiling:
23598      case "$host_os" in
23599                # Guess all is fine on glibc systems.
23600        *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
23601                # If we don't know, assume the worst.
23602        *)      gl_cv_func_gettimeofday_clobber="guessing yes" ;;
23603      esac
23604
23605else
23606  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23607/* end confdefs.h.  */
23608#include <string.h>
23609          #include <sys/time.h>
23610          #include <time.h>
23611          #include <stdlib.h>
23612
23613int
23614main ()
23615{
23616
23617          time_t t = 0;
23618          struct tm *lt;
23619          struct tm saved_lt;
23620          struct timeval tv;
23621          lt = localtime (&t);
23622          saved_lt = *lt;
23623          gettimeofday (&tv, NULL);
23624          return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
23625
23626  ;
23627  return 0;
23628}
23629_ACEOF
23630if ac_fn_c_try_run "$LINENO"; then :
23631  gl_cv_func_gettimeofday_clobber=no
23632else
23633  gl_cv_func_gettimeofday_clobber=yes
23634fi
23635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23636  conftest.$ac_objext conftest.beam conftest.$ac_ext
23637fi
23638
23639fi
23640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
23641$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
23642
23643 case "$gl_cv_func_gettimeofday_clobber" in
23644   *yes)
23645     REPLACE_GETTIMEOFDAY=1
23646
23647  REPLACE_GMTIME=1
23648  REPLACE_LOCALTIME=1
23649
23650
23651$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
23652
23653     ;;
23654 esac
23655
23656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
23657$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
23658if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
23659  $as_echo_n "(cached) " >&6
23660else
23661  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23662/* end confdefs.h.  */
23663#include <sys/time.h>
23664              struct timeval c;
23665              int gettimeofday (struct timeval *restrict, void *restrict);
23666
23667int
23668main ()
23669{
23670/* glibc uses struct timezone * rather than the POSIX void *
23671                 if _GNU_SOURCE is defined.  However, since the only portable
23672                 use of gettimeofday uses NULL as the second parameter, and
23673                 since the glibc definition is actually more typesafe, it is
23674                 not worth wrapping this to get a compliant signature.  */
23675              int (*f) (struct timeval *restrict, void *restrict)
23676                = gettimeofday;
23677              int x = f (&c, 0);
23678              return !(x | c.tv_sec | c.tv_usec);
23679
23680  ;
23681  return 0;
23682}
23683_ACEOF
23684if ac_fn_c_try_compile "$LINENO"; then :
23685  gl_cv_func_gettimeofday_posix_signature=yes
23686else
23687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23688/* end confdefs.h.  */
23689#include <sys/time.h>
23690int gettimeofday (struct timeval *restrict, struct timezone *restrict);
23691
23692int
23693main ()
23694{
23695
23696  ;
23697  return 0;
23698}
23699_ACEOF
23700if ac_fn_c_try_compile "$LINENO"; then :
23701  gl_cv_func_gettimeofday_posix_signature=almost
23702else
23703  gl_cv_func_gettimeofday_posix_signature=no
23704fi
23705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23706fi
23707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23708fi
23709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
23710$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
23711    if test $gl_cv_func_gettimeofday_posix_signature = almost; then
23712      gl_gettimeofday_timezone='struct timezone'
23713    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
23714      REPLACE_GETTIMEOFDAY=1
23715    fi
23716        if test $REPLACE_STRUCT_TIMEVAL = 1; then
23717      REPLACE_GETTIMEOFDAY=1
23718    fi
23719
23720  fi
23721
23722cat >>confdefs.h <<_ACEOF
23723#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
23724_ACEOF
23725
23726
23727  if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
23728
23729
23730
23731
23732
23733
23734
23735
23736  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
23737
23738
23739  for ac_header in sys/timeb.h
23740do :
23741  ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
23742if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
23743  cat >>confdefs.h <<_ACEOF
23744#define HAVE_SYS_TIMEB_H 1
23745_ACEOF
23746
23747fi
23748
23749done
23750
23751  for ac_func in _ftime
23752do :
23753  ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
23754if test "x$ac_cv_func__ftime" = xyes; then :
23755  cat >>confdefs.h <<_ACEOF
23756#define HAVE__FTIME 1
23757_ACEOF
23758
23759fi
23760done
23761
23762
23763  fi
23764
23765
23766
23767
23768
23769          GNULIB_GETTIMEOFDAY=1
23770
23771
23772
23773
23774
23775$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
23776
23777
23778
23779  # Autoconf 2.61a.99 and earlier don't support linking a file only
23780  # in VPATH builds.  But since GNUmakefile is for maintainer use
23781  # only, it does not matter if we skip the link with older autoconf.
23782  # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
23783  # builds, so use a shell variable to bypass this.
23784  GNUmakefile=GNUmakefile
23785  ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
23786
23787
23788  :
23789
23790
23791
23792
23793
23794
23795
23796          GNULIB_ICONV=1
23797
23798
23799
23800
23801
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812
23813     if test $gl_cv_have_include_next = yes; then
23814       gl_cv_next_iconv_h='<'iconv.h'>'
23815     else
23816       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
23817$as_echo_n "checking absolute name of <iconv.h>... " >&6; }
23818if ${gl_cv_next_iconv_h+:} false; then :
23819  $as_echo_n "(cached) " >&6
23820else
23821
23822             if test $ac_cv_header_iconv_h = yes; then
23823
23824
23825
23826
23827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23828/* end confdefs.h.  */
23829#include <iconv.h>
23830_ACEOF
23831                case "$host_os" in
23832    aix*) gl_absname_cpp="$ac_cpp -C" ;;
23833    *)    gl_absname_cpp="$ac_cpp" ;;
23834  esac
23835
23836  case "$host_os" in
23837    mingw*)
23838                                          gl_dirsep_regex='[/\\]'
23839      ;;
23840    *)
23841      gl_dirsep_regex='\/'
23842      ;;
23843  esac
23844      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23845  gl_header_literal_regex=`echo 'iconv.h' \
23846                           | sed -e "$gl_make_literal_regex_sed"`
23847  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23848      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23849      s|^/[^/]|//&|
23850      p
23851      q
23852    }'
23853
23854        gl_cv_absolute_iconv_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23855  sed -n "$gl_absolute_header_sed"`
23856
23857           gl_header=$gl_cv_absolute_iconv_h
23858           gl_cv_next_iconv_h='"'$gl_header'"'
23859          else
23860               gl_cv_next_iconv_h='<'iconv.h'>'
23861             fi
23862
23863
23864fi
23865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
23866$as_echo "$gl_cv_next_iconv_h" >&6; }
23867     fi
23868     NEXT_ICONV_H=$gl_cv_next_iconv_h
23869
23870     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23871       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23872       gl_next_as_first_directive='<'iconv.h'>'
23873     else
23874       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23875       gl_next_as_first_directive=$gl_cv_next_iconv_h
23876     fi
23877     NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
23878
23879
23880
23881
23882
23883
23884
23885
23886  HAVE_IOCTL=1
23887  if test "$ac_cv_header_winsock2_h" = yes; then
23888                HAVE_IOCTL=0
23889  else
23890    for ac_func in ioctl
23891do :
23892  ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
23893if test "x$ac_cv_func_ioctl" = xyes; then :
23894  cat >>confdefs.h <<_ACEOF
23895#define HAVE_IOCTL 1
23896_ACEOF
23897
23898fi
23899done
23900
23901                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
23902$as_echo_n "checking for ioctl with POSIX signature... " >&6; }
23903if ${gl_cv_func_ioctl_posix_signature+:} false; then :
23904  $as_echo_n "(cached) " >&6
23905else
23906  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23907/* end confdefs.h.  */
23908#include <sys/ioctl.h>
23909int
23910main ()
23911{
23912extern
23913              #ifdef __cplusplus
23914              "C"
23915              #endif
23916              int ioctl (int, int, ...);
23917
23918  ;
23919  return 0;
23920}
23921
23922_ACEOF
23923if ac_fn_c_try_compile "$LINENO"; then :
23924  gl_cv_func_ioctl_posix_signature=yes
23925else
23926  gl_cv_func_ioctl_posix_signature=no
23927fi
23928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23929
23930fi
23931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
23932$as_echo "$gl_cv_func_ioctl_posix_signature" >&6; }
23933    if test $gl_cv_func_ioctl_posix_signature != yes; then
23934      REPLACE_IOCTL=1
23935    fi
23936  fi
23937
23938  if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
23939
23940
23941
23942
23943
23944
23945
23946
23947  gl_LIBOBJS="$gl_LIBOBJS ioctl.$ac_objext"
23948
23949  fi
23950
23951
23952
23953
23954
23955          GNULIB_IOCTL=1
23956
23957
23958
23959
23960
23961$as_echo "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979     if test $gl_cv_have_include_next = yes; then
23980       gl_cv_next_langinfo_h='<'langinfo.h'>'
23981     else
23982       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
23983$as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
23984if ${gl_cv_next_langinfo_h+:} false; then :
23985  $as_echo_n "(cached) " >&6
23986else
23987
23988             if test $ac_cv_header_langinfo_h = yes; then
23989
23990
23991
23992
23993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23994/* end confdefs.h.  */
23995#include <langinfo.h>
23996_ACEOF
23997                case "$host_os" in
23998    aix*) gl_absname_cpp="$ac_cpp -C" ;;
23999    *)    gl_absname_cpp="$ac_cpp" ;;
24000  esac
24001
24002  case "$host_os" in
24003    mingw*)
24004                                          gl_dirsep_regex='[/\\]'
24005      ;;
24006    *)
24007      gl_dirsep_regex='\/'
24008      ;;
24009  esac
24010      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24011  gl_header_literal_regex=`echo 'langinfo.h' \
24012                           | sed -e "$gl_make_literal_regex_sed"`
24013  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24014      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24015      s|^/[^/]|//&|
24016      p
24017      q
24018    }'
24019
24020        gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24021  sed -n "$gl_absolute_header_sed"`
24022
24023           gl_header=$gl_cv_absolute_langinfo_h
24024           gl_cv_next_langinfo_h='"'$gl_header'"'
24025          else
24026               gl_cv_next_langinfo_h='<'langinfo.h'>'
24027             fi
24028
24029
24030fi
24031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
24032$as_echo "$gl_cv_next_langinfo_h" >&6; }
24033     fi
24034     NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
24035
24036     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24037       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24038       gl_next_as_first_directive='<'langinfo.h'>'
24039     else
24040       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24041       gl_next_as_first_directive=$gl_cv_next_langinfo_h
24042     fi
24043     NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
24044
24045
24046
24047
24048
24049    HAVE_LANGINFO_CODESET=0
24050  HAVE_LANGINFO_T_FMT_AMPM=0
24051  HAVE_LANGINFO_ERA=0
24052  HAVE_LANGINFO_YESEXPR=0
24053
24054  if test $ac_cv_header_langinfo_h = yes; then
24055    HAVE_LANGINFO_H=1
24056            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
24057$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
24058if ${gl_cv_header_langinfo_codeset+:} false; then :
24059  $as_echo_n "(cached) " >&6
24060else
24061  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24062/* end confdefs.h.  */
24063#include <langinfo.h>
24064int a = CODESET;
24065
24066int
24067main ()
24068{
24069
24070  ;
24071  return 0;
24072}
24073_ACEOF
24074if ac_fn_c_try_compile "$LINENO"; then :
24075  gl_cv_header_langinfo_codeset=yes
24076else
24077  gl_cv_header_langinfo_codeset=no
24078fi
24079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24080
24081fi
24082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
24083$as_echo "$gl_cv_header_langinfo_codeset" >&6; }
24084    if test $gl_cv_header_langinfo_codeset = yes; then
24085      HAVE_LANGINFO_CODESET=1
24086    fi
24087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
24088$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
24089if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
24090  $as_echo_n "(cached) " >&6
24091else
24092  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24093/* end confdefs.h.  */
24094#include <langinfo.h>
24095int a = T_FMT_AMPM;
24096
24097int
24098main ()
24099{
24100
24101  ;
24102  return 0;
24103}
24104_ACEOF
24105if ac_fn_c_try_compile "$LINENO"; then :
24106  gl_cv_header_langinfo_t_fmt_ampm=yes
24107else
24108  gl_cv_header_langinfo_t_fmt_ampm=no
24109fi
24110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24111
24112fi
24113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
24114$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
24115    if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
24116      HAVE_LANGINFO_T_FMT_AMPM=1
24117    fi
24118    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
24119$as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
24120if ${gl_cv_header_langinfo_era+:} false; then :
24121  $as_echo_n "(cached) " >&6
24122else
24123  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24124/* end confdefs.h.  */
24125#include <langinfo.h>
24126int a = ERA;
24127
24128int
24129main ()
24130{
24131
24132  ;
24133  return 0;
24134}
24135_ACEOF
24136if ac_fn_c_try_compile "$LINENO"; then :
24137  gl_cv_header_langinfo_era=yes
24138else
24139  gl_cv_header_langinfo_era=no
24140fi
24141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24142
24143fi
24144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
24145$as_echo "$gl_cv_header_langinfo_era" >&6; }
24146    if test $gl_cv_header_langinfo_era = yes; then
24147      HAVE_LANGINFO_ERA=1
24148    fi
24149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
24150$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
24151if ${gl_cv_header_langinfo_yesexpr+:} false; then :
24152  $as_echo_n "(cached) " >&6
24153else
24154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24155/* end confdefs.h.  */
24156#include <langinfo.h>
24157int a = YESEXPR;
24158
24159int
24160main ()
24161{
24162
24163  ;
24164  return 0;
24165}
24166_ACEOF
24167if ac_fn_c_try_compile "$LINENO"; then :
24168  gl_cv_header_langinfo_yesexpr=yes
24169else
24170  gl_cv_header_langinfo_yesexpr=no
24171fi
24172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24173
24174fi
24175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
24176$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
24177    if test $gl_cv_header_langinfo_yesexpr = yes; then
24178      HAVE_LANGINFO_YESEXPR=1
24179    fi
24180  else
24181    HAVE_LANGINFO_H=0
24182  fi
24183
24184
24185
24186
24187
24188
24189
24190    for gl_func in nl_langinfo; do
24191    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24193$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24194if eval \${$as_gl_Symbol+:} false; then :
24195  $as_echo_n "(cached) " >&6
24196else
24197  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24198/* end confdefs.h.  */
24199#include <langinfo.h>
24200
24201int
24202main ()
24203{
24204#undef $gl_func
24205  (void) $gl_func;
24206  ;
24207  return 0;
24208}
24209_ACEOF
24210if ac_fn_c_try_compile "$LINENO"; then :
24211  eval "$as_gl_Symbol=yes"
24212else
24213  eval "$as_gl_Symbol=no"
24214fi
24215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24216fi
24217eval ac_res=\$$as_gl_Symbol
24218	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24219$as_echo "$ac_res" >&6; }
24220    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24221  cat >>confdefs.h <<_ACEOF
24222#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24223_ACEOF
24224
24225                     eval ac_cv_have_decl_$gl_func=yes
24226fi
24227      done
24228
24229
24230
24231
24232
24233
24234
24235  if test $ac_cv_func_link = no; then
24236    HAVE_LINK=0
24237  else
24238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
24239$as_echo_n "checking whether link obeys POSIX... " >&6; }
24240if ${gl_cv_func_link_works+:} false; then :
24241  $as_echo_n "(cached) " >&6
24242else
24243  touch conftest.a
24244       # Assume that if we have lstat, we can also check symlinks.
24245       if test $ac_cv_func_lstat = yes; then
24246         ln -s conftest.a conftest.lnk
24247       fi
24248       if test "$cross_compiling" = yes; then :
24249  case "$host_os" in
24250                    # Guess yes on glibc systems.
24251            *-gnu*) gl_cv_func_link_works="guessing yes" ;;
24252                    # If we don't know, assume the worst.
24253            *)      gl_cv_func_link_works="guessing no" ;;
24254          esac
24255
24256else
24257  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24258/* end confdefs.h.  */
24259#include <unistd.h>
24260             #include <stdio.h>
24261
24262int
24263main ()
24264{
24265int result = 0;
24266             if (!link ("conftest.a", "conftest.b/"))
24267               result |= 1;
24268#if HAVE_LSTAT
24269             if (!link ("conftest.lnk/", "conftest.b"))
24270               result |= 2;
24271             if (rename ("conftest.a", "conftest.b"))
24272               result |= 4;
24273             if (!link ("conftest.b", "conftest.lnk"))
24274               result |= 8;
24275#endif
24276             return result;
24277
24278  ;
24279  return 0;
24280}
24281_ACEOF
24282if ac_fn_c_try_run "$LINENO"; then :
24283  gl_cv_func_link_works=yes
24284else
24285  gl_cv_func_link_works=no
24286fi
24287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24288  conftest.$ac_objext conftest.beam conftest.$ac_ext
24289fi
24290
24291       rm -f conftest.a conftest.b conftest.lnk
24292fi
24293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
24294$as_echo "$gl_cv_func_link_works" >&6; }
24295    case "$gl_cv_func_link_works" in
24296      *yes) ;;
24297      *)
24298        REPLACE_LINK=1
24299        ;;
24300    esac
24301  fi
24302
24303  if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
24304
24305
24306
24307
24308
24309
24310
24311
24312  gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext"
24313
24314  fi
24315
24316
24317
24318
24319
24320          GNULIB_LINK=1
24321
24322
24323
24324
24325
24326$as_echo "#define GNULIB_TEST_LINK 1" >>confdefs.h
24327
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338  LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348  case "$host_os" in
24349    solaris*)
24350
24351$as_echo "#define _LCONV_C99 1" >>confdefs.h
24352
24353      ;;
24354  esac
24355
24356  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
24357$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
24358if ${gl_cv_header_locale_h_posix2001+:} false; then :
24359  $as_echo_n "(cached) " >&6
24360else
24361  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24362/* end confdefs.h.  */
24363#include <locale.h>
24364            int x = LC_MESSAGES;
24365            int y = sizeof (((struct lconv *) 0)->decimal_point);
24366int
24367main ()
24368{
24369
24370  ;
24371  return 0;
24372}
24373_ACEOF
24374if ac_fn_c_try_compile "$LINENO"; then :
24375  gl_cv_header_locale_h_posix2001=yes
24376else
24377  gl_cv_header_locale_h_posix2001=no
24378fi
24379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24380fi
24381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
24382$as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
24383
24384
24385  if test $ac_cv_header_xlocale_h = yes; then
24386    HAVE_XLOCALE_H=1
24387                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
24388$as_echo_n "checking whether locale.h defines locale_t... " >&6; }
24389if ${gl_cv_header_locale_has_locale_t+:} false; then :
24390  $as_echo_n "(cached) " >&6
24391else
24392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24393/* end confdefs.h.  */
24394#include <locale.h>
24395              locale_t x;
24396int
24397main ()
24398{
24399
24400  ;
24401  return 0;
24402}
24403_ACEOF
24404if ac_fn_c_try_compile "$LINENO"; then :
24405  gl_cv_header_locale_has_locale_t=yes
24406else
24407  gl_cv_header_locale_has_locale_t=no
24408fi
24409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24410
24411fi
24412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
24413$as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
24414    if test $gl_cv_header_locale_has_locale_t = yes; then
24415      gl_cv_header_locale_h_needs_xlocale_h=no
24416    else
24417      gl_cv_header_locale_h_needs_xlocale_h=yes
24418    fi
24419  else
24420    HAVE_XLOCALE_H=0
24421    gl_cv_header_locale_h_needs_xlocale_h=no
24422  fi
24423
24424
24425          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
24426$as_echo_n "checking whether struct lconv is properly defined... " >&6; }
24427if ${gl_cv_sys_struct_lconv_ok+:} false; then :
24428  $as_echo_n "(cached) " >&6
24429else
24430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24431/* end confdefs.h.  */
24432#include <locale.h>
24433            struct lconv l;
24434            int x = sizeof (l.decimal_point);
24435            int y = sizeof (l.int_p_cs_precedes);
24436int
24437main ()
24438{
24439
24440  ;
24441  return 0;
24442}
24443_ACEOF
24444if ac_fn_c_try_compile "$LINENO"; then :
24445  gl_cv_sys_struct_lconv_ok=yes
24446else
24447  gl_cv_sys_struct_lconv_ok=no
24448fi
24449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24450
24451fi
24452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
24453$as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
24454  if test $gl_cv_sys_struct_lconv_ok = no; then
24455    REPLACE_STRUCT_LCONV=1
24456  fi
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466     if test $gl_cv_have_include_next = yes; then
24467       gl_cv_next_locale_h='<'locale.h'>'
24468     else
24469       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
24470$as_echo_n "checking absolute name of <locale.h>... " >&6; }
24471if ${gl_cv_next_locale_h+:} false; then :
24472  $as_echo_n "(cached) " >&6
24473else
24474
24475
24476
24477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24478/* end confdefs.h.  */
24479#include <locale.h>
24480_ACEOF
24481                case "$host_os" in
24482    aix*) gl_absname_cpp="$ac_cpp -C" ;;
24483    *)    gl_absname_cpp="$ac_cpp" ;;
24484  esac
24485
24486  case "$host_os" in
24487    mingw*)
24488                                          gl_dirsep_regex='[/\\]'
24489      ;;
24490    *)
24491      gl_dirsep_regex='\/'
24492      ;;
24493  esac
24494      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24495  gl_header_literal_regex=`echo 'locale.h' \
24496                           | sed -e "$gl_make_literal_regex_sed"`
24497  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24498      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24499      s|^/[^/]|//&|
24500      p
24501      q
24502    }'
24503
24504        gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24505  sed -n "$gl_absolute_header_sed"`
24506
24507           gl_header=$gl_cv_absolute_locale_h
24508           gl_cv_next_locale_h='"'$gl_header'"'
24509
24510
24511fi
24512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
24513$as_echo "$gl_cv_next_locale_h" >&6; }
24514     fi
24515     NEXT_LOCALE_H=$gl_cv_next_locale_h
24516
24517     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24518       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24519       gl_next_as_first_directive='<'locale.h'>'
24520     else
24521       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24522       gl_next_as_first_directive=$gl_cv_next_locale_h
24523     fi
24524     NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
24525
24526
24527
24528
24529
24530
24531    for gl_func in setlocale duplocale; do
24532    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24534$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24535if eval \${$as_gl_Symbol+:} false; then :
24536  $as_echo_n "(cached) " >&6
24537else
24538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24539/* end confdefs.h.  */
24540#include <locale.h>
24541/* Some systems provide declarations in a non-standard header.  */
24542#if HAVE_XLOCALE_H
24543# include <xlocale.h>
24544#endif
24545
24546int
24547main ()
24548{
24549#undef $gl_func
24550  (void) $gl_func;
24551  ;
24552  return 0;
24553}
24554_ACEOF
24555if ac_fn_c_try_compile "$LINENO"; then :
24556  eval "$as_gl_Symbol=yes"
24557else
24558  eval "$as_gl_Symbol=no"
24559fi
24560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24561fi
24562eval ac_res=\$$as_gl_Symbol
24563	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24564$as_echo "$ac_res" >&6; }
24565    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24566  cat >>confdefs.h <<_ACEOF
24567#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24568_ACEOF
24569
24570                     eval ac_cv_have_decl_$gl_func=yes
24571fi
24572      done
24573
24574
24575
24576
24577
24578
24579  if test $REPLACE_STRUCT_LCONV = 1; then
24580    REPLACE_LOCALECONV=1
24581  fi
24582
24583  if test $REPLACE_LOCALECONV = 1; then
24584
24585
24586
24587
24588
24589
24590
24591
24592  gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
24593
24594
24595  ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
24596"
24597if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
24598
24599cat >>confdefs.h <<_ACEOF
24600#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
24601_ACEOF
24602
24603
24604fi
24605
24606
24607  fi
24608
24609
24610
24611
24612
24613          GNULIB_LOCALECONV=1
24614
24615
24616
24617
24618
24619$as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
24620
24621
24622
24623
24624
24625  if test "$gl_threads_api" = posix; then
24626    # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
24627    # pthread_rwlock_* functions.
24628    has_rwlock=false
24629    ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
24630"
24631if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
24632  has_rwlock=true
24633
24634$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
24635
24636fi
24637
24638    if $has_rwlock; then
24639
24640
24641  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
24642$as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
24643if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
24644  $as_echo_n "(cached) " >&6
24645else
24646  save_LIBS="$LIBS"
24647     LIBS="$LIBS $LIBMULTITHREAD"
24648     if test "$cross_compiling" = yes; then :
24649  gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
24650else
24651  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24652/* end confdefs.h.  */
24653
24654#include <errno.h>
24655#include <pthread.h>
24656#include <stdlib.h>
24657#include <unistd.h>
24658
24659#define SUCCEED() exit (0)
24660#define FAILURE() exit (1)
24661#define UNEXPECTED(n) (exit (10 + (n)))
24662
24663/* The main thread creates the waiting writer and the requesting reader threads
24664   in the default way; this guarantees that they have the same priority.
24665   We can reuse the main thread as first reader thread.  */
24666
24667static pthread_rwlock_t lock;
24668static pthread_t reader1;
24669static pthread_t writer;
24670static pthread_t reader2;
24671static pthread_t timer;
24672/* Used to pass control from writer to reader2 and from reader2 to timer,
24673   as in a relay race.
24674   Passing control from one running thread to another running thread
24675   is most likely faster than to create the second thread.  */
24676static pthread_mutex_t baton;
24677
24678static void *
24679timer_func (void *ignored)
24680{
24681  /* Step 13 (can be before or after step 12):
24682     The timer thread takes the baton, then waits a moment to make sure
24683     it can tell whether the second reader thread is blocked at step 12.  */
24684  if (pthread_mutex_lock (&baton))
24685    UNEXPECTED (13);
24686  usleep (100000);
24687  /* By the time we get here, it's clear that the second reader thread is
24688     blocked at step 12.  This is the desired behaviour.  */
24689  SUCCEED ();
24690}
24691
24692static void *
24693reader2_func (void *ignored)
24694{
24695  int err;
24696
24697  /* Step 8 (can be before or after step 7):
24698     The second reader thread takes the baton, then waits a moment to make sure
24699     the writer thread has reached step 7.  */
24700  if (pthread_mutex_lock (&baton))
24701    UNEXPECTED (8);
24702  usleep (100000);
24703  /* Step 9: The second reader thread requests the lock.  */
24704  err = pthread_rwlock_tryrdlock (&lock);
24705  if (err == 0)
24706    FAILURE ();
24707  else if (err != EBUSY)
24708    UNEXPECTED (9);
24709  /* Step 10: Launch a timer, to test whether the next call blocks.  */
24710  if (pthread_create (&timer, NULL, timer_func, NULL))
24711    UNEXPECTED (10);
24712  /* Step 11: Release the baton.  */
24713  if (pthread_mutex_unlock (&baton))
24714    UNEXPECTED (11);
24715  /* Step 12: The second reader thread requests the lock.  */
24716  err = pthread_rwlock_rdlock (&lock);
24717  if (err == 0)
24718    FAILURE ();
24719  else
24720    UNEXPECTED (12);
24721}
24722
24723static void *
24724writer_func (void *ignored)
24725{
24726  /* Step 4: Take the baton, so that the second reader thread does not go ahead
24727     too early.  */
24728  if (pthread_mutex_lock (&baton))
24729    UNEXPECTED (4);
24730  /* Step 5: Create the second reader thread.  */
24731  if (pthread_create (&reader2, NULL, reader2_func, NULL))
24732    UNEXPECTED (5);
24733  /* Step 6: Release the baton.  */
24734  if (pthread_mutex_unlock (&baton))
24735    UNEXPECTED (6);
24736  /* Step 7: The writer thread requests the lock.  */
24737  if (pthread_rwlock_wrlock (&lock))
24738    UNEXPECTED (7);
24739  return NULL;
24740}
24741
24742int
24743main ()
24744{
24745  reader1 = pthread_self ();
24746
24747  /* Step 1: The main thread initializes the lock and the baton.  */
24748  if (pthread_rwlock_init (&lock, NULL))
24749    UNEXPECTED (1);
24750  if (pthread_mutex_init (&baton, NULL))
24751    UNEXPECTED (1);
24752  /* Step 2: The main thread acquires the lock as a reader.  */
24753  if (pthread_rwlock_rdlock (&lock))
24754    UNEXPECTED (2);
24755  /* Step 3: Create the writer thread.  */
24756  if (pthread_create (&writer, NULL, writer_func, NULL))
24757    UNEXPECTED (3);
24758  /* Job done.  Go to sleep.  */
24759  for (;;)
24760    {
24761      sleep (1);
24762    }
24763}
24764
24765_ACEOF
24766if ac_fn_c_try_run "$LINENO"; then :
24767  gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
24768else
24769  gl_cv_pthread_rwlock_rdlock_prefer_writer=no
24770fi
24771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24772  conftest.$ac_objext conftest.beam conftest.$ac_ext
24773fi
24774
24775     LIBS="$save_LIBS"
24776
24777fi
24778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
24779$as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
24780  case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
24781    *yes)
24782
24783$as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
24784
24785      ;;
24786  esac
24787
24788    fi
24789    # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
24790    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24791/* end confdefs.h.  */
24792
24793      #include <pthread.h>
24794int
24795main ()
24796{
24797
24798#if __FreeBSD__ == 4
24799error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
24800#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
24801       && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
24802error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
24803#else
24804int x = (int)PTHREAD_MUTEX_RECURSIVE;
24805return !x;
24806#endif
24807
24808  ;
24809  return 0;
24810}
24811_ACEOF
24812if ac_fn_c_try_compile "$LINENO"; then :
24813
24814$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
24815
24816fi
24817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24818  fi
24819  :
24820
24821
24822
24823cat >>confdefs.h <<_ACEOF
24824#define GNULIB_LOCK 1
24825_ACEOF
24826
24827
24828
24829  if test $REPLACE_LOG = 1; then
24830
24831
24832
24833
24834
24835
24836
24837
24838  gl_LIBOBJS="$gl_LIBOBJS log.$ac_objext"
24839
24840  fi
24841
24842
24843
24844
24845
24846          GNULIB_LOG=1
24847
24848
24849
24850
24851
24852$as_echo "#define GNULIB_TEST_LOG 1" >>confdefs.h
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863  LOG10_LIBM="$POW_LIBM"
24864
24865
24866
24867
24868  save_LIBS="$LIBS"
24869  LIBS="$LIBS $LOG10_LIBM"
24870
24871
24872     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log10 works" >&5
24873$as_echo_n "checking whether log10 works... " >&6; }
24874if ${gl_cv_func_log10_works+:} false; then :
24875  $as_echo_n "(cached) " >&6
24876else
24877
24878      if test "$cross_compiling" = yes; then :
24879  case "$host_os" in
24880           osf*) gl_cv_func_log10_works="guessing no";;
24881           *)    gl_cv_func_log10_works="guessing yes";;
24882         esac
24883
24884else
24885  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24886/* end confdefs.h.  */
24887
24888#include <math.h>
24889volatile double x;
24890double y;
24891int main ()
24892{
24893  x = -0.0;
24894  y = log10 (x);
24895  if (!(y + y == y))
24896    return 1;
24897  return 0;
24898}
24899
24900_ACEOF
24901if ac_fn_c_try_run "$LINENO"; then :
24902  gl_cv_func_log10_works=yes
24903else
24904  gl_cv_func_log10_works=no
24905fi
24906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24907  conftest.$ac_objext conftest.beam conftest.$ac_ext
24908fi
24909
24910
24911fi
24912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_log10_works" >&5
24913$as_echo "$gl_cv_func_log10_works" >&6; }
24914
24915  LIBS="$save_LIBS"
24916  case "$gl_cv_func_log10_works" in
24917    *yes) ;;
24918    *) REPLACE_LOG10=1 ;;
24919  esac
24920
24921
24922
24923  if test $REPLACE_LOG10 = 1; then
24924
24925
24926
24927
24928
24929
24930
24931
24932  gl_LIBOBJS="$gl_LIBOBJS log10.$ac_objext"
24933
24934  fi
24935
24936
24937
24938
24939
24940          GNULIB_LOG10=1
24941
24942
24943
24944
24945
24946$as_echo "#define GNULIB_TEST_LOG10 1" >>confdefs.h
24947
24948
24949
24950
24951
24952
24953
24954
24955
24956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
24957$as_echo_n "checking whether lseek detects pipes... " >&6; }
24958if ${gl_cv_func_lseek_pipe+:} false; then :
24959  $as_echo_n "(cached) " >&6
24960else
24961  case "$host_os" in
24962       mingw*)
24963                                                               gl_cv_func_lseek_pipe=no
24964         ;;
24965       *)
24966         if test $cross_compiling = no; then
24967           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24968/* end confdefs.h.  */
24969
24970#include <sys/types.h> /* for off_t */
24971#include <stdio.h> /* for SEEK_CUR */
24972#if HAVE_UNISTD_H
24973# include <unistd.h>
24974#else /* on Windows with MSVC */
24975# include <io.h>
24976#endif
24977
24978int
24979main ()
24980{
24981
24982  /* Exit with success only if stdin is seekable.  */
24983  return lseek (0, (off_t)0, SEEK_CUR) < 0;
24984
24985  ;
24986  return 0;
24987}
24988_ACEOF
24989if ac_fn_c_try_link "$LINENO"; then :
24990  if test -s conftest$ac_exeext \
24991                 && ./conftest$ac_exeext < conftest.$ac_ext \
24992                 && test 1 = "`echo hi \
24993                   | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
24994                gl_cv_func_lseek_pipe=yes
24995              else
24996                gl_cv_func_lseek_pipe=no
24997              fi
24998
24999else
25000  gl_cv_func_lseek_pipe=no
25001fi
25002rm -f core conftest.err conftest.$ac_objext \
25003    conftest$ac_exeext conftest.$ac_ext
25004         else
25005           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25006/* end confdefs.h.  */
25007
25008#if defined __BEOS__
25009/* BeOS mistakenly return 0 when trying to seek on pipes.  */
25010  Choke me.
25011#endif
25012_ACEOF
25013if ac_fn_c_try_compile "$LINENO"; then :
25014  gl_cv_func_lseek_pipe=yes
25015else
25016  gl_cv_func_lseek_pipe=no
25017fi
25018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25019         fi
25020         ;;
25021     esac
25022
25023fi
25024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
25025$as_echo "$gl_cv_func_lseek_pipe" >&6; }
25026  if test $gl_cv_func_lseek_pipe = no; then
25027    REPLACE_LSEEK=1
25028
25029$as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
25030
25031  fi
25032
25033
25034  if test $WINDOWS_64_BIT_OFF_T = 1; then
25035    REPLACE_LSEEK=1
25036  fi
25037
25038  if test $REPLACE_LSEEK = 1; then
25039
25040
25041
25042
25043
25044
25045
25046
25047  gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
25048
25049  fi
25050
25051
25052
25053
25054
25055          GNULIB_LSEEK=1
25056
25057
25058
25059
25060
25061$as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
25062
25063
25064
25065
25066
25067
25068  if test $ac_cv_func_lstat = yes; then
25069
25070    case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
25071      *no)
25072        REPLACE_LSTAT=1
25073        ;;
25074    esac
25075  else
25076    HAVE_LSTAT=0
25077  fi
25078
25079  if test $REPLACE_LSTAT = 1; then
25080
25081
25082
25083
25084
25085
25086
25087
25088  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
25089
25090    :
25091  fi
25092
25093
25094
25095
25096
25097          GNULIB_LSTAT=1
25098
25099
25100
25101
25102
25103$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
25104
25105
25106
25107
25108
25109
25110
25111
25112      for ac_header in stdlib.h
25113do :
25114  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
25115if test "x$ac_cv_header_stdlib_h" = xyes; then :
25116  cat >>confdefs.h <<_ACEOF
25117#define HAVE_STDLIB_H 1
25118_ACEOF
25119
25120fi
25121
25122done
25123
25124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
25125$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
25126if ${ac_cv_func_malloc_0_nonnull+:} false; then :
25127  $as_echo_n "(cached) " >&6
25128else
25129  if test "$cross_compiling" = yes; then :
25130  case "$host_os" in
25131          # Guess yes on platforms where we know the result.
25132          *-gnu* | freebsd* | netbsd* | openbsd* \
25133          | hpux* | solaris* | cygwin* | mingw*)
25134            ac_cv_func_malloc_0_nonnull=yes ;;
25135          # If we don't know, assume the worst.
25136          *) ac_cv_func_malloc_0_nonnull=no ;;
25137        esac
25138
25139else
25140  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25141/* end confdefs.h.  */
25142#if defined STDC_HEADERS || defined HAVE_STDLIB_H
25143            # include <stdlib.h>
25144            #else
25145            char *malloc ();
25146            #endif
25147
25148int
25149main ()
25150{
25151char *p = malloc (0);
25152            int result = !p;
25153            free (p);
25154            return result;
25155  ;
25156  return 0;
25157}
25158
25159_ACEOF
25160if ac_fn_c_try_run "$LINENO"; then :
25161  ac_cv_func_malloc_0_nonnull=yes
25162else
25163  ac_cv_func_malloc_0_nonnull=no
25164fi
25165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25166  conftest.$ac_objext conftest.beam conftest.$ac_ext
25167fi
25168
25169
25170fi
25171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
25172$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
25173  if test $ac_cv_func_malloc_0_nonnull = yes; then :
25174
25175$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
25176
25177else
25178  $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
25179
25180     REPLACE_MALLOC=1
25181
25182fi
25183
25184
25185  if test $REPLACE_MALLOC = 1; then
25186
25187
25188
25189
25190
25191
25192
25193
25194  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
25195
25196  fi
25197
25198
25199cat >>confdefs.h <<_ACEOF
25200#define GNULIB_MALLOC_GNU 1
25201_ACEOF
25202
25203
25204
25205
25206
25207  if test $gl_cv_func_malloc_posix = yes; then
25208
25209$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
25210
25211  else
25212    REPLACE_MALLOC=1
25213  fi
25214
25215  if test $REPLACE_MALLOC = 1; then
25216
25217
25218
25219
25220
25221
25222
25223
25224  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
25225
25226  fi
25227
25228
25229
25230
25231
25232          GNULIB_MALLOC_POSIX=1
25233
25234
25235
25236
25237
25238$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250
25251
25252
25253     if test $gl_cv_have_include_next = yes; then
25254       gl_cv_next_math_h='<'math.h'>'
25255     else
25256       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
25257$as_echo_n "checking absolute name of <math.h>... " >&6; }
25258if ${gl_cv_next_math_h+:} false; then :
25259  $as_echo_n "(cached) " >&6
25260else
25261
25262             if test $ac_cv_header_math_h = yes; then
25263
25264
25265
25266
25267  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25268/* end confdefs.h.  */
25269#include <math.h>
25270_ACEOF
25271                case "$host_os" in
25272    aix*) gl_absname_cpp="$ac_cpp -C" ;;
25273    *)    gl_absname_cpp="$ac_cpp" ;;
25274  esac
25275
25276  case "$host_os" in
25277    mingw*)
25278                                          gl_dirsep_regex='[/\\]'
25279      ;;
25280    *)
25281      gl_dirsep_regex='\/'
25282      ;;
25283  esac
25284      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25285  gl_header_literal_regex=`echo 'math.h' \
25286                           | sed -e "$gl_make_literal_regex_sed"`
25287  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25288      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25289      s|^/[^/]|//&|
25290      p
25291      q
25292    }'
25293
25294        gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25295  sed -n "$gl_absolute_header_sed"`
25296
25297           gl_header=$gl_cv_absolute_math_h
25298           gl_cv_next_math_h='"'$gl_header'"'
25299          else
25300               gl_cv_next_math_h='<'math.h'>'
25301             fi
25302
25303
25304fi
25305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
25306$as_echo "$gl_cv_next_math_h" >&6; }
25307     fi
25308     NEXT_MATH_H=$gl_cv_next_math_h
25309
25310     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25311       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25312       gl_next_as_first_directive='<'math.h'>'
25313     else
25314       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25315       gl_next_as_first_directive=$gl_cv_next_math_h
25316     fi
25317     NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
25318
25319
25320
25321
25322
25323  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
25324$as_echo_n "checking whether NAN macro works... " >&6; }
25325if ${gl_cv_header_math_nan_works+:} false; then :
25326  $as_echo_n "(cached) " >&6
25327else
25328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25329/* end confdefs.h.  */
25330#include <math.h>
25331int
25332main ()
25333{
25334/* Solaris 10 has a broken definition of NAN.  Other platforms
25335        fail to provide NAN, or provide it only in C99 mode; this
25336        test only needs to fail when NAN is provided but wrong.  */
25337         float f = 1.0f;
25338#ifdef NAN
25339         f = NAN;
25340#endif
25341         return f == 0;
25342  ;
25343  return 0;
25344}
25345_ACEOF
25346if ac_fn_c_try_compile "$LINENO"; then :
25347  gl_cv_header_math_nan_works=yes
25348else
25349  gl_cv_header_math_nan_works=no
25350fi
25351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25352fi
25353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
25354$as_echo "$gl_cv_header_math_nan_works" >&6; }
25355  if test $gl_cv_header_math_nan_works = no; then
25356    REPLACE_NAN=1
25357  fi
25358  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
25359$as_echo_n "checking whether HUGE_VAL works... " >&6; }
25360if ${gl_cv_header_math_huge_val_works+:} false; then :
25361  $as_echo_n "(cached) " >&6
25362else
25363  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25364/* end confdefs.h.  */
25365#include <math.h>
25366int
25367main ()
25368{
25369/* Solaris 10 has a broken definition of HUGE_VAL.  */
25370         double d = HUGE_VAL;
25371         return d == 0;
25372  ;
25373  return 0;
25374}
25375_ACEOF
25376if ac_fn_c_try_compile "$LINENO"; then :
25377  gl_cv_header_math_huge_val_works=yes
25378else
25379  gl_cv_header_math_huge_val_works=no
25380fi
25381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25382fi
25383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
25384$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
25385  if test $gl_cv_header_math_huge_val_works = no; then
25386    REPLACE_HUGE_VAL=1
25387  fi
25388
25389
25390    for gl_func in acosf acosl asinf asinl atanf atanl      cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf      expf expl exp2 exp2f exp2l expm1 expm1f expm1l      fabsf fabsl floorf floorl fma fmaf fmal      fmod fmodf fmodl frexpf frexpl hypotf hypotl      ilogb ilogbf ilogbl      ldexpf ldexpl      log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l      logb logbf logbl      modf modff modfl powf      remainder remainderf remainderl      rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl      tanf tanl tanhf trunc truncf truncl; do
25391    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25392    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25393$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25394if eval \${$as_gl_Symbol+:} false; then :
25395  $as_echo_n "(cached) " >&6
25396else
25397  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25398/* end confdefs.h.  */
25399#include <math.h>
25400int
25401main ()
25402{
25403#undef $gl_func
25404  (void) $gl_func;
25405  ;
25406  return 0;
25407}
25408_ACEOF
25409if ac_fn_c_try_compile "$LINENO"; then :
25410  eval "$as_gl_Symbol=yes"
25411else
25412  eval "$as_gl_Symbol=no"
25413fi
25414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25415fi
25416eval ac_res=\$$as_gl_Symbol
25417	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25418$as_echo "$ac_res" >&6; }
25419    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25420  cat >>confdefs.h <<_ACEOF
25421#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25422_ACEOF
25423
25424                     eval ac_cv_have_decl_$gl_func=yes
25425fi
25426      done
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
25440
25441
25442
25443     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
25444$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
25445if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
25446  $as_echo_n "(cached) " >&6
25447else
25448
25449                  case "$host_os" in
25450                     # Guess no on AIX and OSF/1.
25451        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
25452                     # Guess yes otherwise.
25453        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
25454      esac
25455      if test $LOCALE_JA != none; then
25456        if test "$cross_compiling" = yes; then :
25457  :
25458else
25459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25460/* end confdefs.h.  */
25461
25462#include <locale.h>
25463#include <string.h>
25464/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25465   <wchar.h>.
25466   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25467   included before <wchar.h>.  */
25468#include <stddef.h>
25469#include <stdio.h>
25470#include <time.h>
25471#include <wchar.h>
25472int main ()
25473{
25474  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25475    {
25476      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25477      mbstate_t state;
25478      wchar_t wc;
25479
25480      memset (&state, '\0', sizeof (mbstate_t));
25481      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25482        if (mbsinit (&state))
25483          return 2;
25484    }
25485  return 0;
25486}
25487_ACEOF
25488if ac_fn_c_try_run "$LINENO"; then :
25489  gl_cv_func_mbrtowc_incomplete_state=yes
25490else
25491  gl_cv_func_mbrtowc_incomplete_state=no
25492fi
25493rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25494  conftest.$ac_objext conftest.beam conftest.$ac_ext
25495fi
25496
25497      fi
25498
25499fi
25500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25501$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25502
25503
25504
25505
25506     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25507$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25508if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25509  $as_echo_n "(cached) " >&6
25510else
25511
25512                  case "$host_os" in
25513                    # Guess no on Solaris 8.
25514        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
25515                    # Guess yes otherwise.
25516        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
25517      esac
25518      if test $LOCALE_ZH_CN != none; then
25519        if test "$cross_compiling" = yes; then :
25520  :
25521else
25522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25523/* end confdefs.h.  */
25524
25525#include <locale.h>
25526#include <stdlib.h>
25527#include <string.h>
25528/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25529   <wchar.h>.
25530   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25531   included before <wchar.h>.  */
25532#include <stddef.h>
25533#include <stdio.h>
25534#include <time.h>
25535#include <wchar.h>
25536int main ()
25537{
25538  /* This fails on Solaris 8:
25539     mbrtowc returns 2, and sets wc to 0x00F0.
25540     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
25541  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25542    {
25543      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25544      mbstate_t state;
25545      wchar_t wc;
25546
25547      memset (&state, '\0', sizeof (mbstate_t));
25548      if (mbrtowc (&wc, input + 3, 6, &state) != 4
25549          && mbtowc (&wc, input + 3, 6) == 4)
25550        return 2;
25551    }
25552  return 0;
25553}
25554_ACEOF
25555if ac_fn_c_try_run "$LINENO"; then :
25556  gl_cv_func_mbrtowc_sanitycheck=yes
25557else
25558  gl_cv_func_mbrtowc_sanitycheck=no
25559fi
25560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25561  conftest.$ac_objext conftest.beam conftest.$ac_ext
25562fi
25563
25564      fi
25565
25566fi
25567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25568$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25569
25570    REPLACE_MBSTATE_T=0
25571    case "$gl_cv_func_mbrtowc_incomplete_state" in
25572      *yes) ;;
25573      *) REPLACE_MBSTATE_T=1 ;;
25574    esac
25575    case "$gl_cv_func_mbrtowc_sanitycheck" in
25576      *yes) ;;
25577      *) REPLACE_MBSTATE_T=1 ;;
25578    esac
25579  else
25580    REPLACE_MBSTATE_T=1
25581  fi
25582
25583
25584
25585  if test $ac_cv_func_mbrtowc = no; then
25586    HAVE_MBRTOWC=0
25587    ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
25588/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25589   <wchar.h>.
25590   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25591   included before <wchar.h>.  */
25592#include <stddef.h>
25593#include <stdio.h>
25594#include <time.h>
25595#include <wchar.h>
25596
25597"
25598if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
25599  ac_have_decl=1
25600else
25601  ac_have_decl=0
25602fi
25603
25604cat >>confdefs.h <<_ACEOF
25605#define HAVE_DECL_MBRTOWC $ac_have_decl
25606_ACEOF
25607
25608    if test $ac_cv_have_decl_mbrtowc = yes; then
25609                        REPLACE_MBRTOWC=1
25610    fi
25611  else
25612    if test $REPLACE_MBSTATE_T = 1; then
25613      REPLACE_MBRTOWC=1
25614    else
25615
25616
25617
25618     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
25619$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
25620if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
25621  $as_echo_n "(cached) " >&6
25622else
25623
25624                  case "$host_os" in
25625                  # Guess no on Solaris.
25626        solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
25627                  # Guess yes otherwise.
25628        *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
25629      esac
25630      if test $LOCALE_FR_UTF8 != none; then
25631        if test "$cross_compiling" = yes; then :
25632  :
25633else
25634  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25635/* end confdefs.h.  */
25636
25637#include <locale.h>
25638#include <stdlib.h>
25639#include <string.h>
25640/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25641   <wchar.h>.
25642   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25643   included before <wchar.h>.  */
25644#include <stddef.h>
25645#include <stdio.h>
25646#include <time.h>
25647#include <wchar.h>
25648int main ()
25649{
25650  int result = 0;
25651
25652  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25653    {
25654      char input[] = "\303\237er";
25655      mbstate_t state;
25656      wchar_t wc;
25657      size_t ret;
25658
25659      memset (&state, '\0', sizeof (mbstate_t));
25660      wc = (wchar_t) 0xBADFACE;
25661      ret = mbrtowc (&wc, input, 5, &state);
25662      if (ret != 2)
25663        result |= 1;
25664      if (!mbsinit (&state))
25665        result |= 2;
25666
25667      memset (&state, '\0', sizeof (mbstate_t));
25668      ret = mbrtowc (NULL, input, 5, &state);
25669      if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
25670        result |= 4;
25671      if (!mbsinit (&state))
25672        result |= 8;
25673    }
25674  return result;
25675}
25676_ACEOF
25677if ac_fn_c_try_run "$LINENO"; then :
25678  gl_cv_func_mbrtowc_null_arg1=yes
25679else
25680  gl_cv_func_mbrtowc_null_arg1=no
25681fi
25682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25683  conftest.$ac_objext conftest.beam conftest.$ac_ext
25684fi
25685
25686      fi
25687
25688fi
25689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
25690$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
25691
25692
25693
25694
25695     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
25696$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
25697if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
25698  $as_echo_n "(cached) " >&6
25699else
25700
25701                  case "$host_os" in
25702              # Guess no on OSF/1.
25703        osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
25704              # Guess yes otherwise.
25705        *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
25706      esac
25707      if test $LOCALE_FR_UTF8 != none; then
25708        if test "$cross_compiling" = yes; then :
25709  :
25710else
25711  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25712/* end confdefs.h.  */
25713
25714#include <locale.h>
25715#include <string.h>
25716/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25717   <wchar.h>.
25718   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25719   included before <wchar.h>.  */
25720#include <stddef.h>
25721#include <stdio.h>
25722#include <time.h>
25723#include <wchar.h>
25724int main ()
25725{
25726  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25727    {
25728      mbstate_t state;
25729      wchar_t wc;
25730      int ret;
25731
25732      memset (&state, '\0', sizeof (mbstate_t));
25733      wc = (wchar_t) 0xBADFACE;
25734      mbrtowc (&wc, NULL, 5, &state);
25735      /* Check that wc was not modified.  */
25736      if (wc != (wchar_t) 0xBADFACE)
25737        return 2;
25738    }
25739  return 0;
25740}
25741_ACEOF
25742if ac_fn_c_try_run "$LINENO"; then :
25743  gl_cv_func_mbrtowc_null_arg2=yes
25744else
25745  gl_cv_func_mbrtowc_null_arg2=no
25746fi
25747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25748  conftest.$ac_objext conftest.beam conftest.$ac_ext
25749fi
25750
25751      fi
25752
25753fi
25754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
25755$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
25756
25757
25758
25759
25760
25761
25762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
25763$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
25764if ${gl_cv_func_mbrtowc_retval+:} false; then :
25765  $as_echo_n "(cached) " >&6
25766else
25767
25768                  case "$host_os" in
25769                                   # Guess no on HP-UX, Solaris, native Windows.
25770        hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
25771                                   # Guess yes otherwise.
25772        *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
25773      esac
25774      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
25775         || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
25776        if test "$cross_compiling" = yes; then :
25777  :
25778else
25779  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25780/* end confdefs.h.  */
25781
25782#include <locale.h>
25783#include <string.h>
25784/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25785   <wchar.h>.
25786   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25787   included before <wchar.h>.  */
25788#include <stddef.h>
25789#include <stdio.h>
25790#include <time.h>
25791#include <wchar.h>
25792int main ()
25793{
25794  int result = 0;
25795  int found_some_locale = 0;
25796  /* This fails on Solaris.  */
25797  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25798    {
25799      char input[] = "B\303\274\303\237er"; /* "Büßer" */
25800      mbstate_t state;
25801      wchar_t wc;
25802
25803      memset (&state, '\0', sizeof (mbstate_t));
25804      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25805        {
25806          input[1] = '\0';
25807          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
25808            result |= 1;
25809        }
25810      found_some_locale = 1;
25811    }
25812  /* This fails on HP-UX 11.11.  */
25813  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25814    {
25815      char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25816      mbstate_t state;
25817      wchar_t wc;
25818
25819      memset (&state, '\0', sizeof (mbstate_t));
25820      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25821        {
25822          input[1] = '\0';
25823          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
25824            result |= 2;
25825        }
25826      found_some_locale = 1;
25827    }
25828  /* This fails on native Windows.  */
25829  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
25830    {
25831      char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
25832      mbstate_t state;
25833      wchar_t wc;
25834
25835      memset (&state, '\0', sizeof (mbstate_t));
25836      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
25837        {
25838          input[3] = '\0';
25839          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
25840            result |= 4;
25841        }
25842      found_some_locale = 1;
25843    }
25844  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
25845    {
25846      char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
25847      mbstate_t state;
25848      wchar_t wc;
25849
25850      memset (&state, '\0', sizeof (mbstate_t));
25851      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
25852        {
25853          input[3] = '\0';
25854          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
25855            result |= 8;
25856        }
25857      found_some_locale = 1;
25858    }
25859  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
25860    {
25861      char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
25862      mbstate_t state;
25863      wchar_t wc;
25864
25865      memset (&state, '\0', sizeof (mbstate_t));
25866      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
25867        {
25868          input[3] = '\0';
25869          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
25870            result |= 16;
25871        }
25872      found_some_locale = 1;
25873    }
25874  return (found_some_locale ? result : 77);
25875}
25876_ACEOF
25877if ac_fn_c_try_run "$LINENO"; then :
25878  gl_cv_func_mbrtowc_retval=yes
25879else
25880  if test $? != 77; then
25881             gl_cv_func_mbrtowc_retval=no
25882           fi
25883
25884fi
25885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25886  conftest.$ac_objext conftest.beam conftest.$ac_ext
25887fi
25888
25889      fi
25890
25891fi
25892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
25893$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
25894
25895
25896
25897
25898     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
25899$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
25900if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
25901  $as_echo_n "(cached) " >&6
25902else
25903
25904                  case "$host_os" in
25905                       # Guess no on Solaris 8 and 9.
25906        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
25907                       # Guess yes otherwise.
25908        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
25909      esac
25910      if test $LOCALE_ZH_CN != none; then
25911        if test "$cross_compiling" = yes; then :
25912  :
25913else
25914  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25915/* end confdefs.h.  */
25916
25917#include <locale.h>
25918#include <string.h>
25919/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25920   <wchar.h>.
25921   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25922   included before <wchar.h>.  */
25923#include <stddef.h>
25924#include <stdio.h>
25925#include <time.h>
25926#include <wchar.h>
25927int main ()
25928{
25929  /* This fails on Solaris 8 and 9.  */
25930  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25931    {
25932      mbstate_t state;
25933      wchar_t wc;
25934
25935      memset (&state, '\0', sizeof (mbstate_t));
25936      if (mbrtowc (&wc, "", 1, &state) != 0)
25937        return 2;
25938    }
25939  return 0;
25940}
25941_ACEOF
25942if ac_fn_c_try_run "$LINENO"; then :
25943  gl_cv_func_mbrtowc_nul_retval=yes
25944else
25945  gl_cv_func_mbrtowc_nul_retval=no
25946fi
25947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25948  conftest.$ac_objext conftest.beam conftest.$ac_ext
25949fi
25950
25951      fi
25952
25953fi
25954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
25955$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
25956
25957
25958
25959     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
25960$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
25961if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
25962  $as_echo_n "(cached) " >&6
25963else
25964
25965                  case "$host_os" in
25966                     # Guess no on AIX and glibc systems.
25967        aix* | *-gnu*)
25968                    gl_cv_func_mbrtowc_empty_input="guessing no" ;;
25969        *)          gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
25970      esac
25971      if test "$cross_compiling" = yes; then :
25972  :
25973else
25974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25975/* end confdefs.h.  */
25976
25977           #include <wchar.h>
25978           static wchar_t wc;
25979           static mbstate_t mbs;
25980           int
25981           main (void)
25982           {
25983             return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
25984           }
25985_ACEOF
25986if ac_fn_c_try_run "$LINENO"; then :
25987  gl_cv_func_mbrtowc_empty_input=yes
25988else
25989  gl_cv_func_mbrtowc_empty_input=no
25990fi
25991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25992  conftest.$ac_objext conftest.beam conftest.$ac_ext
25993fi
25994
25995
25996fi
25997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
25998$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
25999
26000
26001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
26002$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
26003if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
26004  $as_echo_n "(cached) " >&6
26005else
26006
26007               gl_cv_C_locale_sans_EILSEQ="guessing no"
26008
26009     if test "$cross_compiling" = yes; then :
26010  :
26011else
26012  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26013/* end confdefs.h.  */
26014#include <limits.h>
26015            #include <locale.h>
26016            #include <wchar.h>
26017
26018int
26019main ()
26020{
26021
26022            int i;
26023            char *locale = setlocale (LC_ALL, "C");
26024            if (! locale)
26025              return 2;
26026            for (i = CHAR_MIN; i <= CHAR_MAX; i++)
26027              {
26028                char c = i;
26029                wchar_t wc;
26030                mbstate_t mbs = { 0, };
26031                size_t ss = mbrtowc (&wc, &c, 1, &mbs);
26032                if (1 < ss)
26033                  return 3;
26034              }
26035            return 0;
26036
26037  ;
26038  return 0;
26039}
26040_ACEOF
26041if ac_fn_c_try_run "$LINENO"; then :
26042  gl_cv_C_locale_sans_EILSEQ=yes
26043else
26044  gl_cv_C_locale_sans_EILSEQ=no
26045fi
26046rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26047  conftest.$ac_objext conftest.beam conftest.$ac_ext
26048fi
26049
26050fi
26051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
26052$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
26053
26054      case "$gl_cv_func_mbrtowc_null_arg1" in
26055        *yes) ;;
26056        *)
26057$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
26058
26059           REPLACE_MBRTOWC=1
26060           ;;
26061      esac
26062      case "$gl_cv_func_mbrtowc_null_arg2" in
26063        *yes) ;;
26064        *)
26065$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
26066
26067           REPLACE_MBRTOWC=1
26068           ;;
26069      esac
26070      case "$gl_cv_func_mbrtowc_retval" in
26071        *yes) ;;
26072        *)
26073$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
26074
26075           REPLACE_MBRTOWC=1
26076           ;;
26077      esac
26078      case "$gl_cv_func_mbrtowc_nul_retval" in
26079        *yes) ;;
26080        *)
26081$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
26082
26083           REPLACE_MBRTOWC=1
26084           ;;
26085      esac
26086      case "$gl_cv_func_mbrtowc_empty_input" in
26087        *yes) ;;
26088        *)
26089$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
26090
26091           REPLACE_MBRTOWC=1
26092           ;;
26093      esac
26094      case $gl_cv_C_locale_sans_EILSEQ in
26095        *yes) ;;
26096        *)
26097$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
26098
26099           REPLACE_MBRTOWC=1
26100           ;;
26101      esac
26102    fi
26103  fi
26104
26105  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
26106
26107
26108
26109
26110
26111
26112
26113
26114  gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
26115
26116
26117  :
26118
26119  fi
26120
26121
26122
26123
26124
26125          GNULIB_MBRTOWC=1
26126
26127
26128
26129
26130
26131$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
26132
26133
26134
26135
26136
26137
26138
26139
26140
26141
26142
26143
26144
26145
26146  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
26147
26148
26149
26150     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
26151$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
26152if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
26153  $as_echo_n "(cached) " >&6
26154else
26155
26156                  case "$host_os" in
26157                     # Guess no on AIX and OSF/1.
26158        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
26159                     # Guess yes otherwise.
26160        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
26161      esac
26162      if test $LOCALE_JA != none; then
26163        if test "$cross_compiling" = yes; then :
26164  :
26165else
26166  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26167/* end confdefs.h.  */
26168
26169#include <locale.h>
26170#include <string.h>
26171/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26172   <wchar.h>.
26173   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26174   included before <wchar.h>.  */
26175#include <stddef.h>
26176#include <stdio.h>
26177#include <time.h>
26178#include <wchar.h>
26179int main ()
26180{
26181  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
26182    {
26183      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
26184      mbstate_t state;
26185      wchar_t wc;
26186
26187      memset (&state, '\0', sizeof (mbstate_t));
26188      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
26189        if (mbsinit (&state))
26190          return 2;
26191    }
26192  return 0;
26193}
26194_ACEOF
26195if ac_fn_c_try_run "$LINENO"; then :
26196  gl_cv_func_mbrtowc_incomplete_state=yes
26197else
26198  gl_cv_func_mbrtowc_incomplete_state=no
26199fi
26200rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26201  conftest.$ac_objext conftest.beam conftest.$ac_ext
26202fi
26203
26204      fi
26205
26206fi
26207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
26208$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
26209
26210
26211
26212
26213     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
26214$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
26215if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
26216  $as_echo_n "(cached) " >&6
26217else
26218
26219                  case "$host_os" in
26220                    # Guess no on Solaris 8.
26221        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
26222                    # Guess yes otherwise.
26223        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
26224      esac
26225      if test $LOCALE_ZH_CN != none; then
26226        if test "$cross_compiling" = yes; then :
26227  :
26228else
26229  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26230/* end confdefs.h.  */
26231
26232#include <locale.h>
26233#include <stdlib.h>
26234#include <string.h>
26235/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26236   <wchar.h>.
26237   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26238   included before <wchar.h>.  */
26239#include <stddef.h>
26240#include <stdio.h>
26241#include <time.h>
26242#include <wchar.h>
26243int main ()
26244{
26245  /* This fails on Solaris 8:
26246     mbrtowc returns 2, and sets wc to 0x00F0.
26247     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
26248  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
26249    {
26250      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
26251      mbstate_t state;
26252      wchar_t wc;
26253
26254      memset (&state, '\0', sizeof (mbstate_t));
26255      if (mbrtowc (&wc, input + 3, 6, &state) != 4
26256          && mbtowc (&wc, input + 3, 6) == 4)
26257        return 2;
26258    }
26259  return 0;
26260}
26261_ACEOF
26262if ac_fn_c_try_run "$LINENO"; then :
26263  gl_cv_func_mbrtowc_sanitycheck=yes
26264else
26265  gl_cv_func_mbrtowc_sanitycheck=no
26266fi
26267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26268  conftest.$ac_objext conftest.beam conftest.$ac_ext
26269fi
26270
26271      fi
26272
26273fi
26274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
26275$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
26276
26277    REPLACE_MBSTATE_T=0
26278    case "$gl_cv_func_mbrtowc_incomplete_state" in
26279      *yes) ;;
26280      *) REPLACE_MBSTATE_T=1 ;;
26281    esac
26282    case "$gl_cv_func_mbrtowc_sanitycheck" in
26283      *yes) ;;
26284      *) REPLACE_MBSTATE_T=1 ;;
26285    esac
26286  else
26287    REPLACE_MBSTATE_T=1
26288  fi
26289
26290
26291
26292  if test $ac_cv_func_mbsinit = no; then
26293    HAVE_MBSINIT=0
26294    ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
26295/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26296   <wchar.h>.
26297   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26298   included before <wchar.h>.  */
26299#include <stddef.h>
26300#include <stdio.h>
26301#include <time.h>
26302#include <wchar.h>
26303
26304"
26305if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
26306  ac_have_decl=1
26307else
26308  ac_have_decl=0
26309fi
26310
26311cat >>confdefs.h <<_ACEOF
26312#define HAVE_DECL_MBSINIT $ac_have_decl
26313_ACEOF
26314
26315    if test $ac_cv_have_decl_mbsinit = yes; then
26316                        REPLACE_MBSINIT=1
26317    fi
26318  else
26319    if test $REPLACE_MBSTATE_T = 1; then
26320      REPLACE_MBSINIT=1
26321    else
26322                        case "$host_os" in
26323        mingw*) REPLACE_MBSINIT=1 ;;
26324      esac
26325    fi
26326  fi
26327
26328  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
26329
26330
26331
26332
26333
26334
26335
26336
26337  gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
26338
26339
26340  :
26341
26342  fi
26343
26344
26345
26346
26347
26348          GNULIB_MBSINIT=1
26349
26350
26351
26352
26353
26354$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
26355
26356
26357
26358
26359
26360
26361  if false; then
26362    REPLACE_MBTOWC=1
26363  fi
26364
26365  if test $REPLACE_MBTOWC = 1; then
26366
26367
26368
26369
26370
26371
26372
26373
26374  gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
26375
26376
26377  :
26378
26379  fi
26380
26381
26382
26383
26384
26385          GNULIB_MBTOWC=1
26386
26387
26388
26389
26390
26391$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
26392
26393
26394
26395
26396  if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
26397
26398
26399
26400
26401
26402
26403
26404
26405  gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
26406
26407
26408  for ac_header in bp-sym.h
26409do :
26410  ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
26411if test "x$ac_cv_header_bp_sym_h" = xyes; then :
26412  cat >>confdefs.h <<_ACEOF
26413#define HAVE_BP_SYM_H 1
26414_ACEOF
26415
26416fi
26417
26418done
26419
26420
26421  fi
26422
26423
26424
26425
26426
26427          GNULIB_MEMCHR=1
26428
26429
26430
26431
26432
26433$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443  if test $ac_cv_func_mkostemp != yes; then
26444    HAVE_MKOSTEMP=0
26445  fi
26446
26447  if test $HAVE_MKOSTEMP = 0; then
26448
26449
26450
26451
26452
26453
26454
26455
26456  gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
26457
26458
26459
26460  fi
26461
26462
26463cat >>confdefs.h <<_ACEOF
26464#define GNULIB_MKOSTEMP 1
26465_ACEOF
26466
26467
26468
26469
26470
26471
26472
26473          GNULIB_MKOSTEMP=1
26474
26475
26476
26477
26478
26479$as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
26480
26481
26482
26483
26484  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26485
26486
26487
26488
26489
26490
26491
26492
26493  gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
26494
26495  fi
26496
26497  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26498
26499
26500
26501
26502
26503
26504
26505
26506  gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
26507
26508  fi
26509
26510
26511
26512
26513
26514     if test $ac_cv_func_nl_langinfo = yes; then
26515    # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
26516    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
26517$as_echo_n "checking whether YESEXPR works... " >&6; }
26518if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
26519  $as_echo_n "(cached) " >&6
26520else
26521  if test "$cross_compiling" = yes; then :
26522
26523         case "$host_os" in
26524                   # Guess no on irix systems.
26525           irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
26526                   # Guess yes elsewhere.
26527           *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
26528         esac
26529
26530else
26531  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26532/* end confdefs.h.  */
26533#include <langinfo.h>
26534
26535int
26536main ()
26537{
26538return !*nl_langinfo(YESEXPR);
26539
26540  ;
26541  return 0;
26542}
26543_ACEOF
26544if ac_fn_c_try_run "$LINENO"; then :
26545  gl_cv_func_nl_langinfo_yesexpr_works=yes
26546else
26547  gl_cv_func_nl_langinfo_yesexpr_works=no
26548fi
26549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26550  conftest.$ac_objext conftest.beam conftest.$ac_ext
26551fi
26552
26553
26554fi
26555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
26556$as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
26557    case $gl_cv_func_nl_langinfo_yesexpr_works in
26558      *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
26559      *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
26560    esac
26561
26562cat >>confdefs.h <<_ACEOF
26563#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
26564_ACEOF
26565
26566    if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
26567        && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
26568      :
26569    else
26570      REPLACE_NL_LANGINFO=1
26571
26572$as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
26573
26574    fi
26575  else
26576    HAVE_NL_LANGINFO=0
26577  fi
26578
26579  if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
26580
26581
26582
26583
26584
26585
26586
26587
26588  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
26589
26590  fi
26591
26592
26593
26594
26595
26596          GNULIB_NL_LANGINFO=1
26597
26598
26599
26600
26601
26602$as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
26603
26604
26605
26606
26607
26608  case "$host_os" in
26609    mingw* | pw*)
26610      REPLACE_OPEN=1
26611      ;;
26612    *)
26613
26614      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
26615$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
26616if ${gl_cv_func_open_slash+:} false; then :
26617  $as_echo_n "(cached) " >&6
26618else
26619  # Assume that if we have lstat, we can also check symlinks.
26620          if test $ac_cv_func_lstat = yes; then
26621            touch conftest.tmp
26622            ln -s conftest.tmp conftest.lnk
26623          fi
26624          if test "$cross_compiling" = yes; then :
26625
26626             case "$host_os" in
26627               freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
26628                 gl_cv_func_open_slash="guessing no" ;;
26629               *)
26630                 gl_cv_func_open_slash="guessing yes" ;;
26631             esac
26632
26633else
26634  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26635/* end confdefs.h.  */
26636
26637#include <fcntl.h>
26638#if HAVE_UNISTD_H
26639# include <unistd.h>
26640#endif
26641int main ()
26642{
26643  int result = 0;
26644#if HAVE_LSTAT
26645  if (open ("conftest.lnk/", O_RDONLY) != -1)
26646    result |= 1;
26647#endif
26648  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
26649    result |= 2;
26650  return result;
26651}
26652_ACEOF
26653if ac_fn_c_try_run "$LINENO"; then :
26654  gl_cv_func_open_slash=yes
26655else
26656  gl_cv_func_open_slash=no
26657fi
26658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26659  conftest.$ac_objext conftest.beam conftest.$ac_ext
26660fi
26661
26662          rm -f conftest.sl conftest.tmp conftest.lnk
26663
26664fi
26665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
26666$as_echo "$gl_cv_func_open_slash" >&6; }
26667      case "$gl_cv_func_open_slash" in
26668        *no)
26669
26670$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
26671
26672          REPLACE_OPEN=1
26673          ;;
26674      esac
26675      ;;
26676  esac
26677
26678
26679
26680  if test $REPLACE_OPEN = 1; then
26681
26682
26683
26684
26685
26686
26687
26688
26689  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
26690
26691
26692
26693  :
26694
26695  fi
26696
26697
26698
26699
26700
26701          GNULIB_OPEN=1
26702
26703
26704
26705
26706
26707$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
26708
26709
26710
26711
26712
26713
26714
26715
26716
26717
26718
26719          if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
26720            REPLACE_PERROR=1
26721  fi
26722  case ${gl_cv_func_strerror_r_works-unset} in
26723    unset|*yes)
26724      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
26725$as_echo_n "checking whether perror matches strerror... " >&6; }
26726if ${gl_cv_func_perror_works+:} false; then :
26727  $as_echo_n "(cached) " >&6
26728else
26729  if test "$cross_compiling" = yes; then :
26730              gl_cv_func_perror_works="guessing no"
26731
26732else
26733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26734/* end confdefs.h.  */
26735#include <errno.h>
26736                #include <stdio.h>
26737                #include <stdlib.h>
26738                #include <string.h>
26739
26740int
26741main ()
26742{
26743char *str = strerror (-1);
26744                if (!getenv("CONFTEST_OUTPUT")) return 0;
26745                if (!str) str = "";
26746                puts (str);
26747                errno = -1;
26748                perror ("");
26749                return 0;
26750
26751  ;
26752  return 0;
26753}
26754_ACEOF
26755if ac_fn_c_try_run "$LINENO"; then :
26756  if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
26757               && cmp conftest.txt1 conftest.txt2 >/dev/null; then
26758              gl_cv_func_perror_works=yes
26759            else
26760              gl_cv_func_perror_works=no
26761            fi
26762            rm -rf conftest.txt1 conftest.txt2
26763else
26764  gl_cv_func_perror_works=no
26765fi
26766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26767  conftest.$ac_objext conftest.beam conftest.$ac_ext
26768fi
26769
26770
26771fi
26772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
26773$as_echo "$gl_cv_func_perror_works" >&6; }
26774      if test "$gl_cv_func_perror_works" != yes; then
26775        REPLACE_PERROR=1
26776      fi
26777      ;;
26778    *)
26779                  REPLACE_PERROR=1
26780      ;;
26781  esac
26782
26783  if test $REPLACE_PERROR = 1; then
26784
26785
26786
26787
26788
26789
26790
26791
26792  gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
26793
26794  fi
26795
26796
26797
26798
26799
26800          GNULIB_PERROR=1
26801
26802
26803
26804
26805
26806$as_echo "#define GNULIB_TEST_PERROR 1" >>confdefs.h
26807
26808
26809
26810
26811
26812
26813
26814
26815
26816  if test $ac_cv_func_pipe2 != yes; then
26817    HAVE_PIPE2=0
26818  fi
26819
26820
26821
26822
26823
26824
26825          GNULIB_PIPE2=1
26826
26827
26828
26829
26830
26831$as_echo "#define GNULIB_TEST_PIPE2 1" >>confdefs.h
26832
26833
26834
26835
26836
26837cat >>confdefs.h <<_ACEOF
26838#define GNULIB_PIPE2_SAFER 1
26839_ACEOF
26840
26841
26842
26843
26844
26845
26846
26847
26848  if test $REPLACE_POSIX_SPAWN = 1; then
26849    REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
26850  else
26851            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addclose works" >&5
26852$as_echo_n "checking whether posix_spawn_file_actions_addclose works... " >&6; }
26853if ${gl_cv_func_posix_spawn_file_actions_addclose_works+:} false; then :
26854  $as_echo_n "(cached) " >&6
26855else
26856  if test "$cross_compiling" = yes; then :
26857  # Guess no on Solaris, yes otherwise.
26858          case "$host_os" in
26859            solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no";;
26860            *)        gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes";;
26861          esac
26862
26863else
26864  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26865/* end confdefs.h.  */
26866
26867#include <spawn.h>
26868int main ()
26869{
26870  posix_spawn_file_actions_t actions;
26871  if (posix_spawn_file_actions_init (&actions) != 0)
26872    return 1;
26873  if (posix_spawn_file_actions_addclose (&actions, 10000000) == 0)
26874    return 2;
26875  return 0;
26876}
26877_ACEOF
26878if ac_fn_c_try_run "$LINENO"; then :
26879  gl_cv_func_posix_spawn_file_actions_addclose_works=yes
26880else
26881  gl_cv_func_posix_spawn_file_actions_addclose_works=no
26882fi
26883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26884  conftest.$ac_objext conftest.beam conftest.$ac_ext
26885fi
26886
26887
26888fi
26889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addclose_works" >&5
26890$as_echo "$gl_cv_func_posix_spawn_file_actions_addclose_works" >&6; }
26891    case "$gl_cv_func_posix_spawn_file_actions_addclose_works" in
26892      *yes) ;;
26893      *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;;
26894    esac
26895  fi
26896
26897  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then
26898
26899
26900
26901
26902
26903
26904
26905
26906  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addclose.$ac_objext"
26907
26908  fi
26909
26910
26911
26912
26913
26914          GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
26915
26916
26917
26918
26919
26920$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
26921
26922
26923
26924
26925
26926
26927
26928
26929
26930  if test $REPLACE_POSIX_SPAWN = 1; then
26931    REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
26932  else
26933            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_adddup2 works" >&5
26934$as_echo_n "checking whether posix_spawn_file_actions_adddup2 works... " >&6; }
26935if ${gl_cv_func_posix_spawn_file_actions_adddup2_works+:} false; then :
26936  $as_echo_n "(cached) " >&6
26937else
26938  if test "$cross_compiling" = yes; then :
26939  # Guess no on Solaris, yes otherwise.
26940          case "$host_os" in
26941            solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
26942            *)        gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";;
26943          esac
26944
26945else
26946  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26947/* end confdefs.h.  */
26948
26949#include <spawn.h>
26950int main ()
26951{
26952  posix_spawn_file_actions_t actions;
26953  if (posix_spawn_file_actions_init (&actions) != 0)
26954    return 1;
26955  if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0)
26956    return 2;
26957  return 0;
26958}
26959_ACEOF
26960if ac_fn_c_try_run "$LINENO"; then :
26961  gl_cv_func_posix_spawn_file_actions_adddup2_works=yes
26962else
26963  gl_cv_func_posix_spawn_file_actions_adddup2_works=no
26964fi
26965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26966  conftest.$ac_objext conftest.beam conftest.$ac_ext
26967fi
26968
26969
26970fi
26971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_adddup2_works" >&5
26972$as_echo "$gl_cv_func_posix_spawn_file_actions_adddup2_works" >&6; }
26973    case "$gl_cv_func_posix_spawn_file_actions_adddup2_works" in
26974      *yes) ;;
26975      *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;;
26976    esac
26977  fi
26978
26979  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then
26980
26981
26982
26983
26984
26985
26986
26987
26988  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_adddup2.$ac_objext"
26989
26990  fi
26991
26992
26993
26994
26995
26996          GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
26997
26998
26999
27000
27001
27002$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
27003
27004
27005
27006
27007
27008
27009
27010
27011
27012  if test $REPLACE_POSIX_SPAWN = 1; then
27013    REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
27014  else
27015            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addopen works" >&5
27016$as_echo_n "checking whether posix_spawn_file_actions_addopen works... " >&6; }
27017if ${gl_cv_func_posix_spawn_file_actions_addopen_works+:} false; then :
27018  $as_echo_n "(cached) " >&6
27019else
27020  if test "$cross_compiling" = yes; then :
27021  # Guess no on Solaris, yes otherwise.
27022          case "$host_os" in
27023            solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
27024            *)        gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";;
27025          esac
27026
27027else
27028  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27029/* end confdefs.h.  */
27030
27031#include <spawn.h>
27032#include <fcntl.h>
27033int main ()
27034{
27035  posix_spawn_file_actions_t actions;
27036  if (posix_spawn_file_actions_init (&actions) != 0)
27037    return 1;
27038  if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY)
27039      == 0)
27040    return 2;
27041  return 0;
27042}
27043_ACEOF
27044if ac_fn_c_try_run "$LINENO"; then :
27045  gl_cv_func_posix_spawn_file_actions_addopen_works=yes
27046else
27047  gl_cv_func_posix_spawn_file_actions_addopen_works=no
27048fi
27049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27050  conftest.$ac_objext conftest.beam conftest.$ac_ext
27051fi
27052
27053
27054fi
27055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addopen_works" >&5
27056$as_echo "$gl_cv_func_posix_spawn_file_actions_addopen_works" >&6; }
27057    case "$gl_cv_func_posix_spawn_file_actions_addopen_works" in
27058      *yes) ;;
27059      *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;;
27060    esac
27061  fi
27062
27063  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then
27064
27065
27066
27067
27068
27069
27070
27071
27072  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addopen.$ac_objext"
27073
27074  fi
27075
27076
27077
27078
27079
27080          GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
27081
27082
27083
27084
27085
27086$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
27087
27088
27089
27090
27091
27092
27093  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27094
27095
27096
27097
27098
27099
27100
27101
27102  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_destroy.$ac_objext"
27103
27104  fi
27105
27106
27107
27108
27109
27110          GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
27111
27112
27113
27114
27115
27116$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
27117
27118
27119
27120
27121
27122
27123  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27124
27125
27126
27127
27128
27129
27130
27131
27132  gl_LIBOBJS="$gl_LIBOBJS spawn_faction_init.$ac_objext"
27133
27134  fi
27135
27136
27137
27138
27139
27140          GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
27141
27142
27143
27144
27145
27146$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
27147
27148
27149
27150
27151
27152
27153  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27154
27155
27156
27157
27158
27159
27160
27161
27162  gl_LIBOBJS="$gl_LIBOBJS spawnattr_destroy.$ac_objext"
27163
27164  fi
27165
27166
27167
27168
27169
27170          GNULIB_POSIX_SPAWNATTR_DESTROY=1
27171
27172
27173
27174
27175
27176$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
27177
27178
27179
27180
27181
27182
27183  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27184
27185
27186
27187
27188
27189
27190
27191
27192  gl_LIBOBJS="$gl_LIBOBJS spawnattr_init.$ac_objext"
27193
27194  fi
27195
27196
27197
27198
27199
27200          GNULIB_POSIX_SPAWNATTR_INIT=1
27201
27202
27203
27204
27205
27206$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
27207
27208
27209
27210
27211
27212
27213  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27214
27215
27216
27217
27218
27219
27220
27221
27222  gl_LIBOBJS="$gl_LIBOBJS spawnattr_setflags.$ac_objext"
27223
27224  fi
27225
27226
27227
27228
27229
27230          GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
27231
27232
27233
27234
27235
27236$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
27237
27238
27239
27240
27241
27242
27243  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27244
27245
27246
27247
27248
27249
27250
27251
27252  gl_LIBOBJS="$gl_LIBOBJS spawnattr_setsigmask.$ac_objext"
27253
27254  fi
27255
27256
27257
27258
27259
27260          GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
27261
27262
27263
27264
27265
27266$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
27267
27268
27269
27270
27271
27272
27273  if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
27274
27275
27276
27277
27278
27279
27280
27281
27282  gl_LIBOBJS="$gl_LIBOBJS spawnp.$ac_objext"
27283
27284
27285
27286
27287
27288
27289
27290
27291
27292  gl_LIBOBJS="$gl_LIBOBJS spawni.$ac_objext"
27293
27294
27295  for ac_header in paths.h
27296do :
27297  ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
27298if test "x$ac_cv_header_paths_h" = xyes; then :
27299  cat >>confdefs.h <<_ACEOF
27300#define HAVE_PATHS_H 1
27301_ACEOF
27302
27303fi
27304
27305done
27306
27307  for ac_func in confstr sched_setparam sched_setscheduler setegid seteuid vfork
27308do :
27309  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
27310ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
27311if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
27312  cat >>confdefs.h <<_ACEOF
27313#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
27314_ACEOF
27315
27316fi
27317done
27318
27319
27320  fi
27321
27322
27323
27324
27325
27326          GNULIB_POSIX_SPAWNP=1
27327
27328
27329
27330
27331
27332$as_echo "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
27333
27334
27335
27336
27337
27338     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
27339$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
27340if ${gl_cv_func_svid_putenv+:} false; then :
27341  $as_echo_n "(cached) " >&6
27342else
27343  if test "$cross_compiling" = yes; then :
27344               case "$host_os" in
27345                        # Guess yes on glibc systems.
27346                *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
27347                        # If we don't know, assume the worst.
27348                *)      gl_cv_func_svid_putenv="guessing no" ;;
27349              esac
27350
27351else
27352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27353/* end confdefs.h.  */
27354$ac_includes_default
27355int
27356main ()
27357{
27358
27359    /* Put it in env.  */
27360    if (putenv ("CONFTEST_putenv=val"))
27361      return 1;
27362
27363    /* Try to remove it.  */
27364    if (putenv ("CONFTEST_putenv"))
27365      return 2;
27366
27367    /* Make sure it was deleted.  */
27368    if (getenv ("CONFTEST_putenv") != 0)
27369      return 3;
27370
27371    return 0;
27372
27373  ;
27374  return 0;
27375}
27376_ACEOF
27377if ac_fn_c_try_run "$LINENO"; then :
27378  gl_cv_func_svid_putenv=yes
27379else
27380  gl_cv_func_svid_putenv=no
27381fi
27382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27383  conftest.$ac_objext conftest.beam conftest.$ac_ext
27384fi
27385
27386
27387fi
27388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
27389$as_echo "$gl_cv_func_svid_putenv" >&6; }
27390  case "$gl_cv_func_svid_putenv" in
27391    *yes) ;;
27392    *)
27393      REPLACE_PUTENV=1
27394      ;;
27395  esac
27396
27397  if test $REPLACE_PUTENV = 1; then
27398
27399
27400
27401
27402
27403
27404
27405
27406  gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
27407
27408
27409  ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
27410if test "x$ac_cv_have_decl__putenv" = xyes; then :
27411  ac_have_decl=1
27412else
27413  ac_have_decl=0
27414fi
27415
27416cat >>confdefs.h <<_ACEOF
27417#define HAVE_DECL__PUTENV $ac_have_decl
27418_ACEOF
27419
27420
27421  fi
27422
27423
27424
27425
27426
27427          GNULIB_PUTENV=1
27428
27429
27430
27431
27432
27433$as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
27434
27435
27436
27437
27438
27439
27440
27441  for ac_func in raise
27442do :
27443  ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
27444if test "x$ac_cv_func_raise" = xyes; then :
27445  cat >>confdefs.h <<_ACEOF
27446#define HAVE_RAISE 1
27447_ACEOF
27448
27449fi
27450done
27451
27452  if test $ac_cv_func_raise = no; then
27453    HAVE_RAISE=0
27454  else
27455    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
27456      REPLACE_RAISE=1
27457    fi
27458
27459
27460
27461
27462  if test $gl_cv_type_sigset_t = yes; then
27463    ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
27464if test "x$ac_cv_func_sigprocmask" = xyes; then :
27465  gl_cv_func_sigprocmask=1
27466fi
27467
27468  fi
27469  if test -z "$gl_cv_func_sigprocmask"; then
27470    HAVE_POSIX_SIGNALBLOCKING=0
27471  fi
27472
27473      if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
27474        :
27475      fi
27476
27477  fi
27478
27479  if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
27480
27481
27482
27483
27484
27485
27486
27487
27488  gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
27489
27490    :
27491  fi
27492
27493
27494
27495
27496
27497          GNULIB_RAISE=1
27498
27499
27500
27501
27502
27503$as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
27504
27505
27506
27507
27508
27509
27510
27511  for ac_func in rawmemchr
27512do :
27513  ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
27514if test "x$ac_cv_func_rawmemchr" = xyes; then :
27515  cat >>confdefs.h <<_ACEOF
27516#define HAVE_RAWMEMCHR 1
27517_ACEOF
27518
27519fi
27520done
27521
27522  if test $ac_cv_func_rawmemchr = no; then
27523    HAVE_RAWMEMCHR=0
27524  fi
27525
27526  if test $HAVE_RAWMEMCHR = 0; then
27527
27528
27529
27530
27531
27532
27533
27534
27535  gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
27536
27537    :
27538  fi
27539
27540
27541
27542
27543
27544          GNULIB_RAWMEMCHR=1
27545
27546
27547
27548
27549
27550$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
27551
27552
27553
27554
27555
27556
27557      for ac_header in stdlib.h
27558do :
27559  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
27560if test "x$ac_cv_header_stdlib_h" = xyes; then :
27561  cat >>confdefs.h <<_ACEOF
27562#define HAVE_STDLIB_H 1
27563_ACEOF
27564
27565fi
27566
27567done
27568
27569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
27570$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
27571if ${ac_cv_func_realloc_0_nonnull+:} false; then :
27572  $as_echo_n "(cached) " >&6
27573else
27574  if test "$cross_compiling" = yes; then :
27575  case "$host_os" in
27576          # Guess yes on platforms where we know the result.
27577          *-gnu* | freebsd* | netbsd* | openbsd* \
27578          | hpux* | solaris* | cygwin* | mingw*)
27579            ac_cv_func_realloc_0_nonnull=yes ;;
27580          # If we don't know, assume the worst.
27581          *) ac_cv_func_realloc_0_nonnull=no ;;
27582        esac
27583
27584else
27585  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27586/* end confdefs.h.  */
27587#if defined STDC_HEADERS || defined HAVE_STDLIB_H
27588            # include <stdlib.h>
27589            #else
27590            char *realloc ();
27591            #endif
27592
27593int
27594main ()
27595{
27596char *p = realloc (0, 0);
27597            int result = !p;
27598            free (p);
27599            return result;
27600  ;
27601  return 0;
27602}
27603
27604_ACEOF
27605if ac_fn_c_try_run "$LINENO"; then :
27606  ac_cv_func_realloc_0_nonnull=yes
27607else
27608  ac_cv_func_realloc_0_nonnull=no
27609fi
27610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27611  conftest.$ac_objext conftest.beam conftest.$ac_ext
27612fi
27613
27614
27615fi
27616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
27617$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
27618  if test $ac_cv_func_realloc_0_nonnull = yes; then :
27619
27620$as_echo "#define HAVE_REALLOC_GNU 1" >>confdefs.h
27621
27622else
27623  $as_echo "#define HAVE_REALLOC_GNU 0" >>confdefs.h
27624
27625     REPLACE_REALLOC=1
27626
27627fi
27628
27629
27630  if test $REPLACE_REALLOC = 1; then
27631
27632
27633
27634
27635
27636
27637
27638
27639  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
27640
27641  fi
27642
27643
27644cat >>confdefs.h <<_ACEOF
27645#define GNULIB_REALLOC_GNU 1
27646_ACEOF
27647
27648
27649
27650
27651
27652  if test $gl_cv_func_malloc_posix = yes; then
27653
27654$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
27655
27656  else
27657    REPLACE_REALLOC=1
27658  fi
27659
27660  if test $REPLACE_REALLOC = 1; then
27661
27662
27663
27664
27665
27666
27667
27668
27669  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
27670
27671  fi
27672
27673
27674
27675
27676
27677          GNULIB_REALLOC_POSIX=1
27678
27679
27680
27681
27682
27683$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
27684
27685
27686
27687
27688
27689# Check whether --with-included-regex was given.
27690if test "${with_included_regex+set}" = set; then :
27691  withval=$with_included_regex;
27692fi
27693
27694
27695  case $with_included_regex in #(
27696  yes|no) ac_use_included_regex=$with_included_regex
27697        ;;
27698  '')
27699    # If the system regex support is good enough that it passes the
27700    # following run test, then default to *not* using the included regex.c.
27701    # If cross compiling, assume the test would fail and use the included
27702    # regex.c.
27703
27704
27705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
27706$as_echo_n "checking for working re_compile_pattern... " >&6; }
27707if ${gl_cv_func_re_compile_pattern_working+:} false; then :
27708  $as_echo_n "(cached) " >&6
27709else
27710  if test "$cross_compiling" = yes; then :
27711         gl_cv_func_re_compile_pattern_working=no
27712else
27713  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27714/* end confdefs.h.  */
27715#include <regex.h>
27716
27717            #include <locale.h>
27718            #include <limits.h>
27719            #include <string.h>
27720
27721            #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
27722            # include <signal.h>
27723            # include <unistd.h>
27724            #endif
27725
27726            #if HAVE_MALLOC_H
27727            # include <malloc.h>
27728            #endif
27729
27730            #ifdef M_CHECK_ACTION
27731            /* Exit with distinguishable exit code.  */
27732            static void sigabrt_no_core (int sig) { raise (SIGTERM); }
27733            #endif
27734
27735int
27736main ()
27737{
27738int result = 0;
27739            static struct re_pattern_buffer regex;
27740            unsigned char folded_chars[UCHAR_MAX + 1];
27741            int i;
27742            const char *s;
27743            struct re_registers regs;
27744
27745            /* Some builds of glibc go into an infinite loop on this
27746               test.  Use alarm to force death, and mallopt to avoid
27747               malloc recursion in diagnosing the corrupted heap. */
27748#if HAVE_DECL_ALARM
27749            signal (SIGALRM, SIG_DFL);
27750            alarm (2);
27751#endif
27752#ifdef M_CHECK_ACTION
27753            signal (SIGABRT, sigabrt_no_core);
27754            mallopt (M_CHECK_ACTION, 2);
27755#endif
27756
27757            if (setlocale (LC_ALL, "en_US.UTF-8"))
27758              {
27759                {
27760                  /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
27761                     This test needs valgrind to catch the bug on Debian
27762                     GNU/Linux 3.1 x86, but it might catch the bug better
27763                     on other platforms and it shouldn't hurt to try the
27764                     test here.  */
27765                  static char const pat[] = "insert into";
27766                  static char const data[] =
27767                    "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
27768                  re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
27769                                 | RE_ICASE);
27770                  memset (&regex, 0, sizeof regex);
27771                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
27772                  if (s)
27773                    result |= 1;
27774                  else if (re_search (&regex, data, sizeof data - 1,
27775                                      0, sizeof data - 1, &regs)
27776                           != -1)
27777                    result |= 1;
27778                  regfree (&regex);
27779                }
27780
27781                {
27782                  /* This test is from glibc bug 15078.
27783                     The test case is from Andreas Schwab in
27784                     <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
27785                     */
27786                  static char const pat[] = "[^x]x";
27787                  static char const data[] =
27788                    /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
27789                    "\xe1\x80\x80"
27790                    "\xe1\x80\xbb"
27791                    "\xe1\x80\xbd"
27792                    "\xe1\x80\x94"
27793                    "\xe1\x80\xba"
27794                    "\xe1\x80\xaf"
27795                    "\xe1\x80\x95"
27796                    "\xe1\x80\xba"
27797                    "x";
27798                  re_set_syntax (0);
27799                  memset (&regex, 0, sizeof regex);
27800                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
27801                  if (s)
27802                    result |= 1;
27803                  else
27804                    {
27805                      i = re_search (&regex, data, sizeof data - 1,
27806                                     0, sizeof data - 1, 0);
27807                      if (i != 0 && i != 21)
27808                        result |= 1;
27809                    }
27810                  regfree (&regex);
27811                }
27812
27813                if (! setlocale (LC_ALL, "C"))
27814                  return 1;
27815              }
27816
27817            /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
27818            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
27819            memset (&regex, 0, sizeof regex);
27820            s = re_compile_pattern ("a[^x]b", 6, &regex);
27821            if (s)
27822              result |= 2;
27823            /* This should fail, but succeeds for glibc-2.5.  */
27824            else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
27825              result |= 2;
27826
27827            /* This regular expression is from Spencer ere test number 75
27828               in grep-2.3.  */
27829            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
27830            memset (&regex, 0, sizeof regex);
27831            for (i = 0; i <= UCHAR_MAX; i++)
27832              folded_chars[i] = i;
27833            regex.translate = folded_chars;
27834            s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
27835            /* This should fail with _Invalid character class name_ error.  */
27836            if (!s)
27837              result |= 4;
27838
27839            /* Ensure that [b-a] is diagnosed as invalid, when
27840               using RE_NO_EMPTY_RANGES. */
27841            re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
27842            memset (&regex, 0, sizeof regex);
27843            s = re_compile_pattern ("a[b-a]", 6, &regex);
27844            if (s == 0)
27845              result |= 8;
27846
27847            /* This should succeed, but does not for glibc-2.1.3.  */
27848            memset (&regex, 0, sizeof regex);
27849            s = re_compile_pattern ("{1", 2, &regex);
27850            if (s)
27851              result |= 8;
27852
27853            /* The following example is derived from a problem report
27854               against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
27855            memset (&regex, 0, sizeof regex);
27856            s = re_compile_pattern ("[an\371]*n", 7, &regex);
27857            if (s)
27858              result |= 8;
27859            /* This should match, but does not for glibc-2.2.1.  */
27860            else if (re_match (&regex, "an", 2, 0, &regs) != 2)
27861              result |= 8;
27862
27863            memset (&regex, 0, sizeof regex);
27864            s = re_compile_pattern ("x", 1, &regex);
27865            if (s)
27866              result |= 8;
27867            /* glibc-2.2.93 does not work with a negative RANGE argument.  */
27868            else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
27869              result |= 8;
27870
27871            /* The version of regex.c in older versions of gnulib
27872               ignored RE_ICASE.  Detect that problem too.  */
27873            re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
27874            memset (&regex, 0, sizeof regex);
27875            s = re_compile_pattern ("x", 1, &regex);
27876            if (s)
27877              result |= 16;
27878            else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
27879              result |= 16;
27880
27881            /* Catch a bug reported by Vin Shelton in
27882               http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
27883               */
27884            re_set_syntax (RE_SYNTAX_POSIX_BASIC
27885                           & ~RE_CONTEXT_INVALID_DUP
27886                           & ~RE_NO_EMPTY_RANGES);
27887            memset (&regex, 0, sizeof regex);
27888            s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
27889            if (s)
27890              result |= 32;
27891
27892            /* REG_STARTEND was added to glibc on 2004-01-15.
27893               Reject older versions.  */
27894            if (! REG_STARTEND)
27895              result |= 64;
27896
27897#if 0
27898            /* It would be nice to reject hosts whose regoff_t values are too
27899               narrow (including glibc on hosts with 64-bit ptrdiff_t and
27900               32-bit int), but we should wait until glibc implements this
27901               feature.  Otherwise, support for equivalence classes and
27902               multibyte collation symbols would always be broken except
27903               when compiling --without-included-regex.   */
27904            if (sizeof (regoff_t) < sizeof (ptrdiff_t)
27905                || sizeof (regoff_t) < sizeof (ssize_t))
27906              result |= 64;
27907#endif
27908
27909            return result;
27910
27911  ;
27912  return 0;
27913}
27914_ACEOF
27915if ac_fn_c_try_run "$LINENO"; then :
27916  gl_cv_func_re_compile_pattern_working=yes
27917else
27918  gl_cv_func_re_compile_pattern_working=no
27919fi
27920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27921  conftest.$ac_objext conftest.beam conftest.$ac_ext
27922fi
27923
27924fi
27925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
27926$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
27927    case $gl_cv_func_re_compile_pattern_working in #(
27928    yes) ac_use_included_regex=no;; #(
27929    no) ac_use_included_regex=yes;;
27930    esac
27931    ;;
27932  *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
27933    ;;
27934  esac
27935
27936  if test $ac_use_included_regex = yes; then
27937
27938$as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
27939
27940
27941$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
27942
27943
27944$as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
27945
27946
27947$as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
27948
27949
27950$as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
27951
27952
27953$as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
27954
27955
27956$as_echo "#define re_search rpl_re_search" >>confdefs.h
27957
27958
27959$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
27960
27961
27962$as_echo "#define re_match rpl_re_match" >>confdefs.h
27963
27964
27965$as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
27966
27967
27968$as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
27969
27970
27971$as_echo "#define re_comp rpl_re_comp" >>confdefs.h
27972
27973
27974$as_echo "#define re_exec rpl_re_exec" >>confdefs.h
27975
27976
27977$as_echo "#define regcomp rpl_regcomp" >>confdefs.h
27978
27979
27980$as_echo "#define regexec rpl_regexec" >>confdefs.h
27981
27982
27983$as_echo "#define regerror rpl_regerror" >>confdefs.h
27984
27985
27986$as_echo "#define regfree rpl_regfree" >>confdefs.h
27987
27988  fi
27989
27990  if test $ac_use_included_regex = yes; then
27991
27992
27993
27994
27995
27996
27997
27998
27999  gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
28000
28001
28002
28003
28004
28005
28006
28007
28008  for ac_header in libintl.h
28009do :
28010  ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
28011if test "x$ac_cv_header_libintl_h" = xyes; then :
28012  cat >>confdefs.h <<_ACEOF
28013#define HAVE_LIBINTL_H 1
28014_ACEOF
28015
28016fi
28017
28018done
28019
28020
28021  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
28022"
28023if test "x$ac_cv_have_decl_isblank" = xyes; then :
28024  ac_have_decl=1
28025else
28026  ac_have_decl=0
28027fi
28028
28029cat >>confdefs.h <<_ACEOF
28030#define HAVE_DECL_ISBLANK $ac_have_decl
28031_ACEOF
28032
28033
28034  fi
28035
28036
28037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28038/* end confdefs.h.  */
28039
28040       #include <sched.h>
28041       struct sched_param a;
28042       int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
28043       pid_t t1;
28044
28045int
28046main ()
28047{
28048
28049  ;
28050  return 0;
28051}
28052_ACEOF
28053if ac_fn_c_try_compile "$LINENO"; then :
28054  SCHED_H=''
28055else
28056  SCHED_H='sched.h'
28057     for ac_header in sched.h
28058do :
28059  ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "#if HAVE_SYS_CDEFS_H
28060          #include <sys/cdefs.h>
28061         #endif
28062
28063"
28064if test "x$ac_cv_header_sched_h" = xyes; then :
28065  cat >>confdefs.h <<_ACEOF
28066#define HAVE_SCHED_H 1
28067_ACEOF
28068
28069fi
28070
28071done
28072
28073
28074
28075
28076
28077
28078
28079
28080
28081     if test $gl_cv_have_include_next = yes; then
28082       gl_cv_next_sched_h='<'sched.h'>'
28083     else
28084       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
28085$as_echo_n "checking absolute name of <sched.h>... " >&6; }
28086if ${gl_cv_next_sched_h+:} false; then :
28087  $as_echo_n "(cached) " >&6
28088else
28089
28090
28091
28092  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28093/* end confdefs.h.  */
28094#include <sched.h>
28095_ACEOF
28096                case "$host_os" in
28097    aix*) gl_absname_cpp="$ac_cpp -C" ;;
28098    *)    gl_absname_cpp="$ac_cpp" ;;
28099  esac
28100
28101  case "$host_os" in
28102    mingw*)
28103                                          gl_dirsep_regex='[/\\]'
28104      ;;
28105    *)
28106      gl_dirsep_regex='\/'
28107      ;;
28108  esac
28109      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28110  gl_header_literal_regex=`echo 'sched.h' \
28111                           | sed -e "$gl_make_literal_regex_sed"`
28112  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28113      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28114      s|^/[^/]|//&|
28115      p
28116      q
28117    }'
28118
28119        gl_cv_absolute_sched_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28120  sed -n "$gl_absolute_header_sed"`
28121
28122           gl_header=$gl_cv_absolute_sched_h
28123           gl_cv_next_sched_h='"'$gl_header'"'
28124
28125
28126fi
28127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
28128$as_echo "$gl_cv_next_sched_h" >&6; }
28129     fi
28130     NEXT_SCHED_H=$gl_cv_next_sched_h
28131
28132     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28133       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28134       gl_next_as_first_directive='<'sched.h'>'
28135     else
28136       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28137       gl_next_as_first_directive=$gl_cv_next_sched_h
28138     fi
28139     NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
28140
28141
28142
28143
28144
28145     if test "$ac_cv_header_sched_h" = yes; then
28146       HAVE_SCHED_H=1
28147     else
28148       HAVE_SCHED_H=0
28149     fi
28150
28151
28152     if test "$HAVE_SCHED_H" = 1; then
28153       ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#if HAVE_SYS_CDEFS_H
28154            #include <sys/cdefs.h>
28155           #endif
28156           #include <sched.h>
28157
28158"
28159if test "x$ac_cv_type_struct_sched_param" = xyes; then :
28160  HAVE_STRUCT_SCHED_PARAM=1
28161else
28162  HAVE_STRUCT_SCHED_PARAM=0
28163fi
28164
28165     else
28166              ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <spawn.h>
28167"
28168if test "x$ac_cv_type_struct_sched_param" = xyes; then :
28169  HAVE_STRUCT_SCHED_PARAM=1
28170else
28171  HAVE_STRUCT_SCHED_PARAM=0
28172fi
28173
28174     fi
28175
28176
28177     if test "$ac_cv_header_sys_cdefs_h" = yes; then
28178       HAVE_SYS_CDEFS_H=1
28179     else
28180       HAVE_SYS_CDEFS_H=0
28181     fi
28182
28183
28184
28185
28186fi
28187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28188
28189   if test -n "$SCHED_H"; then
28190  GL_GENERATE_SCHED_H_TRUE=
28191  GL_GENERATE_SCHED_H_FALSE='#'
28192else
28193  GL_GENERATE_SCHED_H_TRUE='#'
28194  GL_GENERATE_SCHED_H_FALSE=
28195fi
28196
28197
28198
28199
28200
28201
28202
28203  if test $ac_cv_func_secure_getenv = no; then
28204    HAVE_SECURE_GETENV=0
28205  fi
28206
28207  if test $HAVE_SECURE_GETENV = 0; then
28208
28209
28210
28211
28212
28213
28214
28215
28216  gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
28217
28218
28219  for ac_func in __secure_getenv
28220do :
28221  ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
28222if test "x$ac_cv_func___secure_getenv" = xyes; then :
28223  cat >>confdefs.h <<_ACEOF
28224#define HAVE___SECURE_GETENV 1
28225_ACEOF
28226
28227fi
28228done
28229
28230  if test $ac_cv_func___secure_getenv = no; then
28231    for ac_func in issetugid
28232do :
28233  ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
28234if test "x$ac_cv_func_issetugid" = xyes; then :
28235  cat >>confdefs.h <<_ACEOF
28236#define HAVE_ISSETUGID 1
28237_ACEOF
28238
28239fi
28240done
28241
28242  fi
28243
28244
28245  fi
28246
28247
28248
28249
28250
28251          GNULIB_SECURE_GETENV=1
28252
28253
28254
28255
28256
28257$as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
28258
28259
28260
28261
28262
28263
28264  if test $ac_cv_func_sigaction = yes; then
28265    ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
28266"
28267if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes; then :
28268
28269cat >>confdefs.h <<_ACEOF
28270#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
28271_ACEOF
28272
28273
28274fi
28275
28276    if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
28277      HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
28278    fi
28279  else
28280    HAVE_SIGACTION=0
28281  fi
28282
28283  if test $HAVE_SIGACTION = 0; then
28284
28285
28286
28287
28288
28289
28290
28291
28292  gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext"
28293
28294
28295
28296
28297
28298
28299
28300  ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
28301#include <signal.h>
28302
28303"
28304if test "x$ac_cv_type_siginfo_t" = xyes; then :
28305
28306cat >>confdefs.h <<_ACEOF
28307#define HAVE_SIGINFO_T 1
28308_ACEOF
28309
28310
28311fi
28312
28313  if test $ac_cv_type_siginfo_t = no; then
28314    HAVE_SIGINFO_T=0
28315  fi
28316
28317  fi
28318
28319
28320
28321
28322
28323          GNULIB_SIGACTION=1
28324
28325
28326
28327
28328
28329$as_echo "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342
28343
28344     if test $gl_cv_have_include_next = yes; then
28345       gl_cv_next_signal_h='<'signal.h'>'
28346     else
28347       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
28348$as_echo_n "checking absolute name of <signal.h>... " >&6; }
28349if ${gl_cv_next_signal_h+:} false; then :
28350  $as_echo_n "(cached) " >&6
28351else
28352
28353
28354
28355  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28356/* end confdefs.h.  */
28357#include <signal.h>
28358_ACEOF
28359                case "$host_os" in
28360    aix*) gl_absname_cpp="$ac_cpp -C" ;;
28361    *)    gl_absname_cpp="$ac_cpp" ;;
28362  esac
28363
28364  case "$host_os" in
28365    mingw*)
28366                                          gl_dirsep_regex='[/\\]'
28367      ;;
28368    *)
28369      gl_dirsep_regex='\/'
28370      ;;
28371  esac
28372      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28373  gl_header_literal_regex=`echo 'signal.h' \
28374                           | sed -e "$gl_make_literal_regex_sed"`
28375  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28376      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28377      s|^/[^/]|//&|
28378      p
28379      q
28380    }'
28381
28382        gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28383  sed -n "$gl_absolute_header_sed"`
28384
28385           gl_header=$gl_cv_absolute_signal_h
28386           gl_cv_next_signal_h='"'$gl_header'"'
28387
28388
28389fi
28390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
28391$as_echo "$gl_cv_next_signal_h" >&6; }
28392     fi
28393     NEXT_SIGNAL_H=$gl_cv_next_signal_h
28394
28395     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28396       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28397       gl_next_as_first_directive='<'signal.h'>'
28398     else
28399       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28400       gl_next_as_first_directive=$gl_cv_next_signal_h
28401     fi
28402     NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
28403
28404
28405
28406
28407
28408# AIX declares sig_atomic_t to already include volatile, and C89 compilers
28409# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
28410  ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
28411#include <signal.h>
28412
28413"
28414if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
28415
28416else
28417  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
28418fi
28419
28420
28421
28422
28423
28424
28425
28426  ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
28427#include <signal.h>
28428
28429"
28430if test "x$ac_cv_type_sighandler_t" = xyes; then :
28431
28432else
28433  HAVE_SIGHANDLER_T=0
28434fi
28435
28436
28437
28438    for gl_func in pthread_sigmask sigaction     sigaddset sigdelset sigemptyset sigfillset sigismember     sigpending sigprocmask; do
28439    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28441$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28442if eval \${$as_gl_Symbol+:} false; then :
28443  $as_echo_n "(cached) " >&6
28444else
28445  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28446/* end confdefs.h.  */
28447#include <signal.h>
28448
28449int
28450main ()
28451{
28452#undef $gl_func
28453  (void) $gl_func;
28454  ;
28455  return 0;
28456}
28457_ACEOF
28458if ac_fn_c_try_compile "$LINENO"; then :
28459  eval "$as_gl_Symbol=yes"
28460else
28461  eval "$as_gl_Symbol=no"
28462fi
28463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28464fi
28465eval ac_res=\$$as_gl_Symbol
28466	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28467$as_echo "$ac_res" >&6; }
28468    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28469  cat >>confdefs.h <<_ACEOF
28470#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28471_ACEOF
28472
28473                     eval ac_cv_have_decl_$gl_func=yes
28474fi
28475      done
28476
28477
28478
28479
28480
28481  if test $gl_cv_type_sigset_t = yes; then
28482    ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
28483if test "x$ac_cv_func_sigprocmask" = xyes; then :
28484  gl_cv_func_sigprocmask=1
28485fi
28486
28487  fi
28488  if test -z "$gl_cv_func_sigprocmask"; then
28489    HAVE_POSIX_SIGNALBLOCKING=0
28490  fi
28491
28492  if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
28493
28494
28495
28496
28497
28498
28499
28500
28501  gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
28502
28503    :
28504  fi
28505
28506
28507
28508
28509
28510          GNULIB_SIGPROCMASK=1
28511
28512
28513
28514
28515
28516$as_echo "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
28517
28518
28519
28520
28521
28522
28523
28524  SIN_LIBM="$POW_LIBM"
28525
28526
28527
28528
28529     ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
28530/* <sys/types.h> is not needed according to POSIX, but the
28531   <sys/socket.h> in i386-unknown-freebsd4.10 and
28532   powerpc-apple-darwin5.5 required it. */
28533#include <sys/types.h>
28534#if HAVE_SYS_SOCKET_H
28535# include <sys/socket.h>
28536#elif HAVE_WS2TCPIP_H
28537# include <ws2tcpip.h>
28538#endif
28539
28540"
28541if test "x$ac_cv_type_socklen_t" = xyes; then :
28542
28543else
28544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
28545$as_echo_n "checking for socklen_t equivalent... " >&6; }
28546      if ${gl_cv_socklen_t_equiv+:} false; then :
28547  $as_echo_n "(cached) " >&6
28548else
28549  # Systems have either "struct sockaddr *" or
28550         # "void *" as the second argument to getpeername
28551         gl_cv_socklen_t_equiv=
28552         for arg2 in "struct sockaddr" void; do
28553           for t in int size_t "unsigned int" "long int" "unsigned long int"; do
28554             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28555/* end confdefs.h.  */
28556#include <sys/types.h>
28557                   #include <sys/socket.h>
28558
28559                   int getpeername (int, $arg2 *, $t *);
28560int
28561main ()
28562{
28563$t len;
28564                  getpeername (0, 0, &len);
28565  ;
28566  return 0;
28567}
28568_ACEOF
28569if ac_fn_c_try_compile "$LINENO"; then :
28570  gl_cv_socklen_t_equiv="$t"
28571fi
28572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28573             test "$gl_cv_socklen_t_equiv" != "" && break
28574           done
28575           test "$gl_cv_socklen_t_equiv" != "" && break
28576         done
28577
28578fi
28579
28580      if test "$gl_cv_socklen_t_equiv" = ""; then
28581        as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
28582      fi
28583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
28584$as_echo "$gl_cv_socklen_t_equiv" >&6; }
28585
28586cat >>confdefs.h <<_ACEOF
28587#define socklen_t $gl_cv_socklen_t_equiv
28588_ACEOF
28589
28590fi
28591
28592
28593
28594
28595
28596
28597
28598
28599
28600
28601
28602
28603
28604     if test $gl_cv_have_include_next = yes; then
28605       gl_cv_next_spawn_h='<'spawn.h'>'
28606     else
28607       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
28608$as_echo_n "checking absolute name of <spawn.h>... " >&6; }
28609if ${gl_cv_next_spawn_h+:} false; then :
28610  $as_echo_n "(cached) " >&6
28611else
28612
28613             if test $ac_cv_header_spawn_h = yes; then
28614
28615
28616
28617
28618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28619/* end confdefs.h.  */
28620#include <spawn.h>
28621_ACEOF
28622                case "$host_os" in
28623    aix*) gl_absname_cpp="$ac_cpp -C" ;;
28624    *)    gl_absname_cpp="$ac_cpp" ;;
28625  esac
28626
28627  case "$host_os" in
28628    mingw*)
28629                                          gl_dirsep_regex='[/\\]'
28630      ;;
28631    *)
28632      gl_dirsep_regex='\/'
28633      ;;
28634  esac
28635      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28636  gl_header_literal_regex=`echo 'spawn.h' \
28637                           | sed -e "$gl_make_literal_regex_sed"`
28638  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28639      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28640      s|^/[^/]|//&|
28641      p
28642      q
28643    }'
28644
28645        gl_cv_absolute_spawn_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28646  sed -n "$gl_absolute_header_sed"`
28647
28648           gl_header=$gl_cv_absolute_spawn_h
28649           gl_cv_next_spawn_h='"'$gl_header'"'
28650          else
28651               gl_cv_next_spawn_h='<'spawn.h'>'
28652             fi
28653
28654
28655fi
28656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
28657$as_echo "$gl_cv_next_spawn_h" >&6; }
28658     fi
28659     NEXT_SPAWN_H=$gl_cv_next_spawn_h
28660
28661     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28662       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28663       gl_next_as_first_directive='<'spawn.h'>'
28664     else
28665       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28666       gl_next_as_first_directive=$gl_cv_next_spawn_h
28667     fi
28668     NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
28669
28670
28671
28672
28673
28674  if test $ac_cv_header_spawn_h = yes; then
28675    HAVE_SPAWN_H=1
28676    ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
28677#include <spawn.h>
28678
28679"
28680if test "x$ac_cv_type_posix_spawnattr_t" = xyes; then :
28681
28682cat >>confdefs.h <<_ACEOF
28683#define HAVE_POSIX_SPAWNATTR_T 1
28684_ACEOF
28685
28686
28687else
28688  HAVE_POSIX_SPAWNATTR_T=0
28689fi
28690
28691    ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
28692#include <spawn.h>
28693
28694"
28695if test "x$ac_cv_type_posix_spawn_file_actions_t" = xyes; then :
28696
28697cat >>confdefs.h <<_ACEOF
28698#define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1
28699_ACEOF
28700
28701
28702else
28703  HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
28704fi
28705
28706  else
28707    HAVE_SPAWN_H=0
28708    HAVE_POSIX_SPAWNATTR_T=0
28709    HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
28710  fi
28711
28712
28713
28714
28715
28716
28717
28718
28719
28720
28721
28722    for gl_func in posix_spawn posix_spawnp posix_spawnattr_init posix_spawnattr_destroy     posix_spawnattr_getsigdefault posix_spawnattr_setsigdefault     posix_spawnattr_getsigmask posix_spawnattr_setsigmask     posix_spawnattr_getflags posix_spawnattr_setflags     posix_spawnattr_getpgroup posix_spawnattr_setpgroup     posix_spawnattr_getschedpolicy posix_spawnattr_setschedpolicy     posix_spawnattr_getschedparam posix_spawnattr_setschedparam     posix_spawn_file_actions_init posix_spawn_file_actions_destroy     posix_spawn_file_actions_addopen posix_spawn_file_actions_addclose     posix_spawn_file_actions_adddup2; do
28723    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28725$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28726if eval \${$as_gl_Symbol+:} false; then :
28727  $as_echo_n "(cached) " >&6
28728else
28729  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28730/* end confdefs.h.  */
28731#include <spawn.h>
28732
28733int
28734main ()
28735{
28736#undef $gl_func
28737  (void) $gl_func;
28738  ;
28739  return 0;
28740}
28741_ACEOF
28742if ac_fn_c_try_compile "$LINENO"; then :
28743  eval "$as_gl_Symbol=yes"
28744else
28745  eval "$as_gl_Symbol=no"
28746fi
28747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28748fi
28749eval ac_res=\$$as_gl_Symbol
28750	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28751$as_echo "$ac_res" >&6; }
28752    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28753  cat >>confdefs.h <<_ACEOF
28754#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28755_ACEOF
28756
28757                     eval ac_cv_have_decl_$gl_func=yes
28758fi
28759      done
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769  SQRT_LIBM="$POW_LIBM"
28770
28771
28772
28773
28774
28775  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
28776$as_echo_n "checking for ssize_t... " >&6; }
28777if ${gt_cv_ssize_t+:} false; then :
28778  $as_echo_n "(cached) " >&6
28779else
28780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28781/* end confdefs.h.  */
28782#include <sys/types.h>
28783int
28784main ()
28785{
28786int x = sizeof (ssize_t *) + sizeof (ssize_t);
28787            return !x;
28788  ;
28789  return 0;
28790}
28791_ACEOF
28792if ac_fn_c_try_compile "$LINENO"; then :
28793  gt_cv_ssize_t=yes
28794else
28795  gt_cv_ssize_t=no
28796fi
28797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28798fi
28799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
28800$as_echo "$gt_cv_ssize_t" >&6; }
28801  if test $gt_cv_ssize_t = no; then
28802
28803$as_echo "#define ssize_t int" >>confdefs.h
28804
28805  fi
28806
28807
28808
28809
28810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
28811$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
28812if ${gl_cv_func_stat_dir_slash+:} false; then :
28813  $as_echo_n "(cached) " >&6
28814else
28815  if test "$cross_compiling" = yes; then :
28816  case $host_os in
28817            mingw*) gl_cv_func_stat_dir_slash="guessing no";;
28818            *) gl_cv_func_stat_dir_slash="guessing yes";;
28819          esac
28820else
28821  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28822/* end confdefs.h.  */
28823#include <sys/stat.h>
28824
28825int
28826main ()
28827{
28828struct stat st; return stat (".", &st) != stat ("./", &st);
28829  ;
28830  return 0;
28831}
28832_ACEOF
28833if ac_fn_c_try_run "$LINENO"; then :
28834  gl_cv_func_stat_dir_slash=yes
28835else
28836  gl_cv_func_stat_dir_slash=no
28837fi
28838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28839  conftest.$ac_objext conftest.beam conftest.$ac_ext
28840fi
28841
28842fi
28843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
28844$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
28845        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28846$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28847if ${gl_cv_func_stat_file_slash+:} false; then :
28848  $as_echo_n "(cached) " >&6
28849else
28850  touch conftest.tmp
28851       # Assume that if we have lstat, we can also check symlinks.
28852       if test $ac_cv_func_lstat = yes; then
28853         ln -s conftest.tmp conftest.lnk
28854       fi
28855       if test "$cross_compiling" = yes; then :
28856  case "$host_os" in
28857                    # Guess yes on glibc systems.
28858            *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28859                    # If we don't know, assume the worst.
28860            *)      gl_cv_func_stat_file_slash="guessing no" ;;
28861          esac
28862
28863else
28864  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28865/* end confdefs.h.  */
28866#include <sys/stat.h>
28867
28868int
28869main ()
28870{
28871int result = 0;
28872      struct stat st;
28873      if (!stat ("conftest.tmp/", &st))
28874        result |= 1;
28875#if HAVE_LSTAT
28876      if (!stat ("conftest.lnk/", &st))
28877        result |= 2;
28878#endif
28879      return result;
28880
28881  ;
28882  return 0;
28883}
28884_ACEOF
28885if ac_fn_c_try_run "$LINENO"; then :
28886  gl_cv_func_stat_file_slash=yes
28887else
28888  gl_cv_func_stat_file_slash=no
28889fi
28890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28891  conftest.$ac_objext conftest.beam conftest.$ac_ext
28892fi
28893
28894       rm -f conftest.tmp conftest.lnk
28895fi
28896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28897$as_echo "$gl_cv_func_stat_file_slash" >&6; }
28898  case $gl_cv_func_stat_dir_slash in
28899    *no) REPLACE_STAT=1
28900
28901$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28902;;
28903  esac
28904  case $gl_cv_func_stat_file_slash in
28905    *no) REPLACE_STAT=1
28906
28907$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28908;;
28909  esac
28910
28911  if test $REPLACE_STAT = 1; then
28912
28913
28914
28915
28916
28917
28918
28919
28920  gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
28921
28922    :
28923  fi
28924
28925
28926
28927
28928
28929          GNULIB_STAT=1
28930
28931
28932
28933
28934
28935$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
28936
28937
28938
28939
28940  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
28941$as_echo_n "checking for working stdalign.h... " >&6; }
28942if ${gl_cv_header_working_stdalign_h+:} false; then :
28943  $as_echo_n "(cached) " >&6
28944else
28945  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28946/* end confdefs.h.  */
28947#include <stdalign.h>
28948            #include <stddef.h>
28949
28950            /* Test that alignof yields a result consistent with offsetof.
28951               This catches GCC bug 52023
28952               <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
28953            #ifdef __cplusplus
28954               template <class t> struct alignof_helper { char a; t b; };
28955            # define ao(type) offsetof (alignof_helper<type>, b)
28956            #else
28957            # define ao(type) offsetof (struct { char a; type b; }, b)
28958            #endif
28959            char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
28960            char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
28961            char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
28962
28963            /* Test _Alignas only on platforms where gnulib can help.  */
28964            #if \
28965                ((defined __cplusplus && 201103 <= __cplusplus) \
28966                 || (defined __APPLE__ && defined __MACH__ \
28967                     ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
28968                     : __GNUC__) \
28969                 || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
28970                 || __ICC || 0x5110 <= __SUNPRO_C \
28971                 || 1300 <= _MSC_VER)
28972              struct alignas_test { char c; char alignas (8) alignas_8; };
28973              char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
28974                                ? 1 : -1];
28975            #endif
28976
28977int
28978main ()
28979{
28980
28981  ;
28982  return 0;
28983}
28984_ACEOF
28985if ac_fn_c_try_compile "$LINENO"; then :
28986  gl_cv_header_working_stdalign_h=yes
28987else
28988  gl_cv_header_working_stdalign_h=no
28989fi
28990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28991fi
28992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
28993$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
28994
28995  if test $gl_cv_header_working_stdalign_h = yes; then
28996    STDALIGN_H=''
28997  else
28998    STDALIGN_H='stdalign.h'
28999  fi
29000
29001
29002   if test -n "$STDALIGN_H"; then
29003  GL_GENERATE_STDALIGN_H_TRUE=
29004  GL_GENERATE_STDALIGN_H_FALSE='#'
29005else
29006  GL_GENERATE_STDALIGN_H_TRUE='#'
29007  GL_GENERATE_STDALIGN_H_FALSE=
29008fi
29009
29010
29011
29012
29013
29014  # Define two additional variables used in the Makefile substitution.
29015
29016  if test "$ac_cv_header_stdbool_h" = yes; then
29017    STDBOOL_H=''
29018  else
29019    STDBOOL_H='stdbool.h'
29020  fi
29021
29022   if test -n "$STDBOOL_H"; then
29023  GL_GENERATE_STDBOOL_H_TRUE=
29024  GL_GENERATE_STDBOOL_H_FALSE='#'
29025else
29026  GL_GENERATE_STDBOOL_H_TRUE='#'
29027  GL_GENERATE_STDBOOL_H_FALSE=
29028fi
29029
29030
29031  if test "$ac_cv_type__Bool" = yes; then
29032    HAVE__BOOL=1
29033  else
29034    HAVE__BOOL=0
29035  fi
29036
29037
29038
29039
29040
29041  STDDEF_H=
29042  ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
29043
29044"
29045if test "x$ac_cv_type_max_align_t" = xyes; then :
29046
29047else
29048  HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
29049fi
29050
29051  if test $gt_cv_c_wchar_t = no; then
29052    HAVE_WCHAR_T=0
29053    STDDEF_H=stddef.h
29054  fi
29055  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
29056$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
29057if ${gl_cv_decl_null_works+:} false; then :
29058  $as_echo_n "(cached) " >&6
29059else
29060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29061/* end confdefs.h.  */
29062#include <stddef.h>
29063      int test[2 * (sizeof NULL == sizeof (void *)) -1];
29064
29065int
29066main ()
29067{
29068
29069  ;
29070  return 0;
29071}
29072_ACEOF
29073if ac_fn_c_try_compile "$LINENO"; then :
29074  gl_cv_decl_null_works=yes
29075else
29076  gl_cv_decl_null_works=no
29077fi
29078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29079fi
29080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
29081$as_echo "$gl_cv_decl_null_works" >&6; }
29082  if test $gl_cv_decl_null_works = no; then
29083    REPLACE_NULL=1
29084    STDDEF_H=stddef.h
29085  fi
29086
29087   if test -n "$STDDEF_H"; then
29088  GL_GENERATE_STDDEF_H_TRUE=
29089  GL_GENERATE_STDDEF_H_FALSE='#'
29090else
29091  GL_GENERATE_STDDEF_H_TRUE='#'
29092  GL_GENERATE_STDDEF_H_FALSE=
29093fi
29094
29095  if test -n "$STDDEF_H"; then
29096
29097
29098
29099
29100
29101
29102
29103
29104     if test $gl_cv_have_include_next = yes; then
29105       gl_cv_next_stddef_h='<'stddef.h'>'
29106     else
29107       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
29108$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
29109if ${gl_cv_next_stddef_h+:} false; then :
29110  $as_echo_n "(cached) " >&6
29111else
29112
29113
29114
29115  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29116/* end confdefs.h.  */
29117#include <stddef.h>
29118_ACEOF
29119                case "$host_os" in
29120    aix*) gl_absname_cpp="$ac_cpp -C" ;;
29121    *)    gl_absname_cpp="$ac_cpp" ;;
29122  esac
29123
29124  case "$host_os" in
29125    mingw*)
29126                                          gl_dirsep_regex='[/\\]'
29127      ;;
29128    *)
29129      gl_dirsep_regex='\/'
29130      ;;
29131  esac
29132      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29133  gl_header_literal_regex=`echo 'stddef.h' \
29134                           | sed -e "$gl_make_literal_regex_sed"`
29135  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29136      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29137      s|^/[^/]|//&|
29138      p
29139      q
29140    }'
29141
29142        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29143  sed -n "$gl_absolute_header_sed"`
29144
29145           gl_header=$gl_cv_absolute_stddef_h
29146           gl_cv_next_stddef_h='"'$gl_header'"'
29147
29148
29149fi
29150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
29151$as_echo "$gl_cv_next_stddef_h" >&6; }
29152     fi
29153     NEXT_STDDEF_H=$gl_cv_next_stddef_h
29154
29155     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29156       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29157       gl_next_as_first_directive='<'stddef.h'>'
29158     else
29159       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29160       gl_next_as_first_directive=$gl_cv_next_stddef_h
29161     fi
29162     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
29163
29164
29165
29166
29167  fi
29168
29169
29170
29171
29172  $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183     if test $gl_cv_have_include_next = yes; then
29184       gl_cv_next_stdio_h='<'stdio.h'>'
29185     else
29186       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
29187$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
29188if ${gl_cv_next_stdio_h+:} false; then :
29189  $as_echo_n "(cached) " >&6
29190else
29191
29192
29193
29194  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29195/* end confdefs.h.  */
29196#include <stdio.h>
29197_ACEOF
29198                case "$host_os" in
29199    aix*) gl_absname_cpp="$ac_cpp -C" ;;
29200    *)    gl_absname_cpp="$ac_cpp" ;;
29201  esac
29202
29203  case "$host_os" in
29204    mingw*)
29205                                          gl_dirsep_regex='[/\\]'
29206      ;;
29207    *)
29208      gl_dirsep_regex='\/'
29209      ;;
29210  esac
29211      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29212  gl_header_literal_regex=`echo 'stdio.h' \
29213                           | sed -e "$gl_make_literal_regex_sed"`
29214  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29215      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29216      s|^/[^/]|//&|
29217      p
29218      q
29219    }'
29220
29221        gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29222  sed -n "$gl_absolute_header_sed"`
29223
29224           gl_header=$gl_cv_absolute_stdio_h
29225           gl_cv_next_stdio_h='"'$gl_header'"'
29226
29227
29228fi
29229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
29230$as_echo "$gl_cv_next_stdio_h" >&6; }
29231     fi
29232     NEXT_STDIO_H=$gl_cv_next_stdio_h
29233
29234     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29235       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29236       gl_next_as_first_directive='<'stdio.h'>'
29237     else
29238       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29239       gl_next_as_first_directive=$gl_cv_next_stdio_h
29240     fi
29241     NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
29242
29243
29244
29245
29246
29247        { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
29248$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
29249if ${gl_cv_func_printf_attribute_flavor+:} false; then :
29250  $as_echo_n "(cached) " >&6
29251else
29252  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29253/* end confdefs.h.  */
29254
29255       #define __STDC_FORMAT_MACROS 1
29256       #include <stdio.h>
29257       #include <inttypes.h>
29258       /* For non-mingw systems, compilation will trivially succeed.
29259          For mingw, compilation will succeed for older mingw (system
29260          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
29261       #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
29262         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
29263       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
29264       #endif
29265
29266int
29267main ()
29268{
29269
29270  ;
29271  return 0;
29272}
29273_ACEOF
29274if ac_fn_c_try_compile "$LINENO"; then :
29275  gl_cv_func_printf_attribute_flavor=system
29276else
29277  gl_cv_func_printf_attribute_flavor=gnu
29278fi
29279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29280fi
29281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
29282$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
29283  if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
29284
29285$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
29286
29287  fi
29288
29289      GNULIB_FSCANF=1
29290
29291
29292cat >>confdefs.h <<_ACEOF
29293#define GNULIB_FSCANF 1
29294_ACEOF
29295
29296
29297  GNULIB_SCANF=1
29298
29299
29300cat >>confdefs.h <<_ACEOF
29301#define GNULIB_SCANF 1
29302_ACEOF
29303
29304
29305  GNULIB_FGETC=1
29306  GNULIB_GETC=1
29307  GNULIB_GETCHAR=1
29308  GNULIB_FGETS=1
29309  GNULIB_FREAD=1
29310
29311
29312      GNULIB_FPRINTF=1
29313  GNULIB_PRINTF=1
29314  GNULIB_VFPRINTF=1
29315  GNULIB_VPRINTF=1
29316  GNULIB_FPUTC=1
29317  GNULIB_PUTC=1
29318  GNULIB_PUTCHAR=1
29319  GNULIB_FPUTS=1
29320  GNULIB_PUTS=1
29321  GNULIB_FWRITE=1
29322
29323
29324
29325
29326    for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen     renameat snprintf tmpfile vdprintf vsnprintf; do
29327    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29328    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29329$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29330if eval \${$as_gl_Symbol+:} false; then :
29331  $as_echo_n "(cached) " >&6
29332else
29333  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29334/* end confdefs.h.  */
29335#include <stdio.h>
29336
29337int
29338main ()
29339{
29340#undef $gl_func
29341  (void) $gl_func;
29342  ;
29343  return 0;
29344}
29345_ACEOF
29346if ac_fn_c_try_compile "$LINENO"; then :
29347  eval "$as_gl_Symbol=yes"
29348else
29349  eval "$as_gl_Symbol=no"
29350fi
29351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29352fi
29353eval ac_res=\$$as_gl_Symbol
29354	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29355$as_echo "$ac_res" >&6; }
29356    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29357  cat >>confdefs.h <<_ACEOF
29358#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29359_ACEOF
29360
29361                     eval ac_cv_have_decl_$gl_func=yes
29362fi
29363      done
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376     if test $gl_cv_have_include_next = yes; then
29377       gl_cv_next_stdlib_h='<'stdlib.h'>'
29378     else
29379       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
29380$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
29381if ${gl_cv_next_stdlib_h+:} false; then :
29382  $as_echo_n "(cached) " >&6
29383else
29384
29385
29386
29387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29388/* end confdefs.h.  */
29389#include <stdlib.h>
29390_ACEOF
29391                case "$host_os" in
29392    aix*) gl_absname_cpp="$ac_cpp -C" ;;
29393    *)    gl_absname_cpp="$ac_cpp" ;;
29394  esac
29395
29396  case "$host_os" in
29397    mingw*)
29398                                          gl_dirsep_regex='[/\\]'
29399      ;;
29400    *)
29401      gl_dirsep_regex='\/'
29402      ;;
29403  esac
29404      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29405  gl_header_literal_regex=`echo 'stdlib.h' \
29406                           | sed -e "$gl_make_literal_regex_sed"`
29407  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29408      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29409      s|^/[^/]|//&|
29410      p
29411      q
29412    }'
29413
29414        gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29415  sed -n "$gl_absolute_header_sed"`
29416
29417           gl_header=$gl_cv_absolute_stdlib_h
29418           gl_cv_next_stdlib_h='"'$gl_header'"'
29419
29420
29421fi
29422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
29423$as_echo "$gl_cv_next_stdlib_h" >&6; }
29424     fi
29425     NEXT_STDLIB_H=$gl_cv_next_stdlib_h
29426
29427     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29428       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29429       gl_next_as_first_directive='<'stdlib.h'>'
29430     else
29431       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29432       gl_next_as_first_directive=$gl_cv_next_stdlib_h
29433     fi
29434     NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
29435
29436
29437
29438
29439
29440
29441    for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt     initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps     posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch     secure_getenv setenv setstate setstate_r srandom srandom_r     strtod strtoll strtoull unlockpt unsetenv; do
29442    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29443    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29444$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29445if eval \${$as_gl_Symbol+:} false; then :
29446  $as_echo_n "(cached) " >&6
29447else
29448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29449/* end confdefs.h.  */
29450#include <stdlib.h>
29451#if HAVE_SYS_LOADAVG_H
29452# include <sys/loadavg.h>
29453#endif
29454#if HAVE_RANDOM_H
29455# include <random.h>
29456#endif
29457
29458int
29459main ()
29460{
29461#undef $gl_func
29462  (void) $gl_func;
29463  ;
29464  return 0;
29465}
29466_ACEOF
29467if ac_fn_c_try_compile "$LINENO"; then :
29468  eval "$as_gl_Symbol=yes"
29469else
29470  eval "$as_gl_Symbol=no"
29471fi
29472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29473fi
29474eval ac_res=\$$as_gl_Symbol
29475	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29476$as_echo "$ac_res" >&6; }
29477    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29478  cat >>confdefs.h <<_ACEOF
29479#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29480_ACEOF
29481
29482                     eval ac_cv_have_decl_$gl_func=yes
29483fi
29484      done
29485
29486
29487
29488
29489
29490
29491  for ac_func in strchrnul
29492do :
29493  ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
29494if test "x$ac_cv_func_strchrnul" = xyes; then :
29495  cat >>confdefs.h <<_ACEOF
29496#define HAVE_STRCHRNUL 1
29497_ACEOF
29498
29499fi
29500done
29501
29502  if test $ac_cv_func_strchrnul = no; then
29503    HAVE_STRCHRNUL=0
29504  else
29505    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
29506$as_echo_n "checking whether strchrnul works... " >&6; }
29507if ${gl_cv_func_strchrnul_works+:} false; then :
29508  $as_echo_n "(cached) " >&6
29509else
29510  if test "$cross_compiling" = yes; then :
29511           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29512/* end confdefs.h.  */
29513
29514#if defined __CYGWIN__
29515 #include <cygwin/version.h>
29516 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
29517  Lucky user
29518 #endif
29519#else
29520  Lucky user
29521#endif
29522
29523_ACEOF
29524if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29525  $EGREP "Lucky user" >/dev/null 2>&1; then :
29526  gl_cv_func_strchrnul_works="guessing yes"
29527else
29528  gl_cv_func_strchrnul_works="guessing no"
29529fi
29530rm -f conftest*
29531
29532
29533else
29534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29535/* end confdefs.h.  */
29536
29537#include <string.h> /* for strchrnul */
29538
29539int
29540main ()
29541{
29542const char *buf = "a";
29543      return strchrnul (buf, 'b') != buf + 1;
29544
29545  ;
29546  return 0;
29547}
29548_ACEOF
29549if ac_fn_c_try_run "$LINENO"; then :
29550  gl_cv_func_strchrnul_works=yes
29551else
29552  gl_cv_func_strchrnul_works=no
29553fi
29554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29555  conftest.$ac_objext conftest.beam conftest.$ac_ext
29556fi
29557
29558
29559fi
29560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
29561$as_echo "$gl_cv_func_strchrnul_works" >&6; }
29562    case "$gl_cv_func_strchrnul_works" in
29563      *yes) ;;
29564      *) REPLACE_STRCHRNUL=1 ;;
29565    esac
29566  fi
29567
29568  if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
29569
29570
29571
29572
29573
29574
29575
29576
29577  gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
29578
29579    :
29580  fi
29581
29582
29583
29584
29585
29586          GNULIB_STRCHRNUL=1
29587
29588
29589
29590
29591
29592$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
29593
29594
29595
29596
29597  for ac_func in strcspn
29598do :
29599  ac_fn_c_check_func "$LINENO" "strcspn" "ac_cv_func_strcspn"
29600if test "x$ac_cv_func_strcspn" = xyes; then :
29601  cat >>confdefs.h <<_ACEOF
29602#define HAVE_STRCSPN 1
29603_ACEOF
29604
29605fi
29606done
29607
29608
29609  if test $ac_cv_func_strcspn = no; then
29610
29611
29612
29613
29614
29615
29616
29617
29618  gl_LIBOBJS="$gl_LIBOBJS strcspn.$ac_objext"
29619
29620    :
29621  fi
29622
29623
29624
29625
29626  if test $ac_cv_func_strdup = yes; then
29627    if test $gl_cv_func_malloc_posix != yes; then
29628      REPLACE_STRDUP=1
29629    fi
29630  fi
29631
29632  if test $ac_cv_have_decl_strdup = no; then
29633    HAVE_DECL_STRDUP=0
29634  fi
29635
29636  if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
29637
29638
29639
29640
29641
29642
29643
29644
29645  gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
29646
29647    :
29648  fi
29649
29650
29651
29652
29653
29654          GNULIB_STRDUP=1
29655
29656
29657
29658
29659
29660$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
29661
29662
29663
29664
29665
29666
29667
29668
29669
29670
29671  if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
29672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
29673$as_echo_n "checking for working strerror function... " >&6; }
29674if ${gl_cv_func_working_strerror+:} false; then :
29675  $as_echo_n "(cached) " >&6
29676else
29677  if test "$cross_compiling" = yes; then :
29678  case "$host_os" in
29679                   # Guess yes on glibc systems.
29680           *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
29681                   # If we don't know, assume the worst.
29682           *)      gl_cv_func_working_strerror="guessing no" ;;
29683         esac
29684
29685else
29686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29687/* end confdefs.h.  */
29688#include <string.h>
29689
29690int
29691main ()
29692{
29693if (!*strerror (-2)) return 1;
29694  ;
29695  return 0;
29696}
29697_ACEOF
29698if ac_fn_c_try_run "$LINENO"; then :
29699  gl_cv_func_working_strerror=yes
29700else
29701  gl_cv_func_working_strerror=no
29702fi
29703rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29704  conftest.$ac_objext conftest.beam conftest.$ac_ext
29705fi
29706
29707
29708fi
29709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
29710$as_echo "$gl_cv_func_working_strerror" >&6; }
29711    case "$gl_cv_func_working_strerror" in
29712      *yes) ;;
29713      *)
29714                        REPLACE_STRERROR=1
29715        ;;
29716    esac
29717
29718                  case "$gl_cv_func_strerror_r_works" in
29719        *no) REPLACE_STRERROR=1 ;;
29720      esac
29721
29722  else
29723            REPLACE_STRERROR=1
29724  fi
29725
29726  if test $REPLACE_STRERROR = 1; then
29727
29728
29729
29730
29731
29732
29733
29734
29735  gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
29736
29737  fi
29738
29739
29740cat >>confdefs.h <<_ACEOF
29741#define GNULIB_STRERROR 1
29742_ACEOF
29743
29744
29745
29746
29747
29748
29749
29750          GNULIB_STRERROR=1
29751
29752
29753
29754
29755
29756$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
29757
29758
29759
29760
29761
29762  if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
29763
29764
29765
29766
29767
29768
29769
29770
29771  gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
29772
29773
29774
29775
29776
29777  if test $ac_cv_header_sys_socket_h != yes; then
29778                    for ac_header in winsock2.h
29779do :
29780  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
29781if test "x$ac_cv_header_winsock2_h" = xyes; then :
29782  cat >>confdefs.h <<_ACEOF
29783#define HAVE_WINSOCK2_H 1
29784_ACEOF
29785
29786fi
29787
29788done
29789
29790  fi
29791  if test "$ac_cv_header_winsock2_h" = yes; then
29792    HAVE_WINSOCK2_H=1
29793    UNISTD_H_HAVE_WINSOCK2_H=1
29794    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
29795  else
29796    HAVE_WINSOCK2_H=0
29797  fi
29798
29799
29800  fi
29801
29802
29803
29804
29805
29806
29807      ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
29808if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
29809  HAVE_DECL_STRERROR_R=1
29810else
29811  HAVE_DECL_STRERROR_R=0
29812fi
29813
29814
29815cat >>confdefs.h <<_ACEOF
29816#define HAVE_DECL_STRERROR_R_ORIG $HAVE_DECL_STRERROR_R
29817_ACEOF
29818
29819
29820  if test $ac_cv_func_strerror_r = yes; then
29821    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
29822      if test $gl_cv_func_strerror_r_posix_signature = yes; then
29823        case "$gl_cv_func_strerror_r_works" in
29824                    *no) REPLACE_STRERROR_R=1 ;;
29825        esac
29826      else
29827                REPLACE_STRERROR_R=1
29828      fi
29829    else
29830                  REPLACE_STRERROR_R=1
29831    fi
29832  fi
29833
29834  # Overwrite the findings of AC_FUNC_STRERROR_R (for code that uses that).
29835
29836
29837  if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
29838
29839
29840
29841
29842
29843
29844
29845
29846  gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
29847
29848
29849
29850
29851
29852
29853  fi
29854
29855
29856
29857
29858
29859          GNULIB_STRERROR_R=1
29860
29861
29862
29863
29864
29865$as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877  if test $REPLACE_STRSTR = 0; then
29878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
29879$as_echo_n "checking whether strstr works in linear time... " >&6; }
29880if ${gl_cv_func_strstr_linear+:} false; then :
29881  $as_echo_n "(cached) " >&6
29882else
29883  if test "$cross_compiling" = yes; then :
29884                             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29885/* end confdefs.h.  */
29886
29887#include <features.h>
29888#ifdef __GNU_LIBRARY__
29889 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
29890     && !(defined __i386__ || defined __x86_64__) \
29891     && !defined __UCLIBC__
29892  Lucky user
29893 #endif
29894#endif
29895#ifdef __CYGWIN__
29896 #include <cygwin/version.h>
29897 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
29898  Lucky user
29899 #endif
29900#endif
29901
29902_ACEOF
29903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29904  $EGREP "Lucky user" >/dev/null 2>&1; then :
29905  gl_cv_func_strstr_linear="guessing yes"
29906else
29907  gl_cv_func_strstr_linear="guessing no"
29908fi
29909rm -f conftest*
29910
29911
29912else
29913  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29914/* end confdefs.h.  */
29915
29916#ifdef __MVS__
29917/* z/OS does not deliver signals while strstr() is running (thanks to
29918   restrictions on its LE runtime), which prevents us from limiting the
29919   running time of this test.  */
29920# error "This test does not work properly on z/OS"
29921#endif
29922#include <signal.h> /* for signal */
29923#include <string.h> /* for strstr */
29924#include <stdlib.h> /* for malloc */
29925#include <unistd.h> /* for alarm */
29926static void quit (int sig) { _exit (sig + 128); }
29927
29928int
29929main ()
29930{
29931
29932    int result = 0;
29933    size_t m = 1000000;
29934    char *haystack = (char *) malloc (2 * m + 2);
29935    char *needle = (char *) malloc (m + 2);
29936    /* Failure to compile this test due to missing alarm is okay,
29937       since all such platforms (mingw) also have quadratic strstr.  */
29938    signal (SIGALRM, quit);
29939    alarm (5);
29940    /* Check for quadratic performance.  */
29941    if (haystack && needle)
29942      {
29943        memset (haystack, 'A', 2 * m);
29944        haystack[2 * m] = 'B';
29945        haystack[2 * m + 1] = 0;
29946        memset (needle, 'A', m);
29947        needle[m] = 'B';
29948        needle[m + 1] = 0;
29949        if (!strstr (haystack, needle))
29950          result |= 1;
29951      }
29952    return result;
29953
29954  ;
29955  return 0;
29956}
29957_ACEOF
29958if ac_fn_c_try_run "$LINENO"; then :
29959  gl_cv_func_strstr_linear=yes
29960else
29961  gl_cv_func_strstr_linear=no
29962fi
29963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29964  conftest.$ac_objext conftest.beam conftest.$ac_ext
29965fi
29966
29967
29968fi
29969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
29970$as_echo "$gl_cv_func_strstr_linear" >&6; }
29971    case "$gl_cv_func_strstr_linear" in
29972      *yes) ;;
29973      *)
29974        REPLACE_STRSTR=1
29975        ;;
29976    esac
29977  fi
29978
29979  if test $REPLACE_STRSTR = 1; then
29980
29981
29982
29983
29984
29985
29986
29987
29988  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
29989
29990  fi
29991
29992
29993
29994  if test "$gl_cv_func_memchr_works" != yes; then
29995    REPLACE_STRSTR=1
29996  else
29997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
29998$as_echo_n "checking whether strstr works... " >&6; }
29999if ${gl_cv_func_strstr_works_always+:} false; then :
30000  $as_echo_n "(cached) " >&6
30001else
30002  if test "$cross_compiling" = yes; then :
30003                                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30004/* end confdefs.h.  */
30005
30006#ifdef __GNU_LIBRARY__
30007 #include <features.h>
30008 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
30009     || defined __UCLIBC__
30010  Lucky user
30011 #endif
30012#elif defined __CYGWIN__
30013 #include <cygwin/version.h>
30014 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
30015  Lucky user
30016 #endif
30017#else
30018  Lucky user
30019#endif
30020
30021_ACEOF
30022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30023  $EGREP "Lucky user" >/dev/null 2>&1; then :
30024  gl_cv_func_strstr_works_always="guessing yes"
30025else
30026  gl_cv_func_strstr_works_always="guessing no"
30027fi
30028rm -f conftest*
30029
30030
30031else
30032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30033/* end confdefs.h.  */
30034
30035#include <string.h> /* for strstr */
30036#define P "_EF_BF_BD"
30037#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
30038#define NEEDLE P P P P P
30039
30040int
30041main ()
30042{
30043return !!strstr (HAYSTACK, NEEDLE);
30044
30045  ;
30046  return 0;
30047}
30048_ACEOF
30049if ac_fn_c_try_run "$LINENO"; then :
30050  gl_cv_func_strstr_works_always=yes
30051else
30052  gl_cv_func_strstr_works_always=no
30053fi
30054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30055  conftest.$ac_objext conftest.beam conftest.$ac_ext
30056fi
30057
30058
30059fi
30060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
30061$as_echo "$gl_cv_func_strstr_works_always" >&6; }
30062    case "$gl_cv_func_strstr_works_always" in
30063      *yes) ;;
30064      *)
30065        REPLACE_STRSTR=1
30066        ;;
30067    esac
30068  fi
30069
30070  if test $REPLACE_STRSTR = 1; then
30071
30072
30073
30074
30075
30076
30077
30078
30079  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
30080
30081  fi
30082
30083
30084
30085
30086
30087          GNULIB_STRSTR=1
30088
30089
30090
30091
30092
30093$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
30094
30095
30096
30097
30098  for ac_func in strtol
30099do :
30100  ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
30101if test "x$ac_cv_func_strtol" = xyes; then :
30102  cat >>confdefs.h <<_ACEOF
30103#define HAVE_STRTOL 1
30104_ACEOF
30105
30106fi
30107done
30108
30109
30110  if test $ac_cv_func_strtol = no; then
30111
30112
30113
30114
30115
30116
30117
30118
30119  gl_LIBOBJS="$gl_LIBOBJS strtol.$ac_objext"
30120
30121  fi
30122
30123
30124
30125
30126  if test $ac_cv_header_sys_ioctl_h = yes; then
30127    HAVE_SYS_IOCTL_H=1
30128            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
30129$as_echo_n "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
30130if ${gl_cv_decl_ioctl_in_sys_ioctl_h+:} false; then :
30131  $as_echo_n "(cached) " >&6
30132else
30133         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30134/* end confdefs.h.  */
30135#include <sys/ioctl.h>
30136
30137int
30138main ()
30139{
30140(void) ioctl;
30141  ;
30142  return 0;
30143}
30144_ACEOF
30145if ac_fn_c_try_compile "$LINENO"; then :
30146  gl_cv_decl_ioctl_in_sys_ioctl_h=yes
30147else
30148  gl_cv_decl_ioctl_in_sys_ioctl_h=no
30149fi
30150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30151
30152fi
30153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
30154$as_echo "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
30155  else
30156    HAVE_SYS_IOCTL_H=0
30157  fi
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168     if test $gl_cv_have_include_next = yes; then
30169       gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
30170     else
30171       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
30172$as_echo_n "checking absolute name of <sys/ioctl.h>... " >&6; }
30173if ${gl_cv_next_sys_ioctl_h+:} false; then :
30174  $as_echo_n "(cached) " >&6
30175else
30176
30177             if test $ac_cv_header_sys_ioctl_h = yes; then
30178
30179
30180
30181
30182  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30183/* end confdefs.h.  */
30184#include <sys/ioctl.h>
30185_ACEOF
30186                case "$host_os" in
30187    aix*) gl_absname_cpp="$ac_cpp -C" ;;
30188    *)    gl_absname_cpp="$ac_cpp" ;;
30189  esac
30190
30191  case "$host_os" in
30192    mingw*)
30193                                          gl_dirsep_regex='[/\\]'
30194      ;;
30195    *)
30196      gl_dirsep_regex='\/'
30197      ;;
30198  esac
30199      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30200  gl_header_literal_regex=`echo 'sys/ioctl.h' \
30201                           | sed -e "$gl_make_literal_regex_sed"`
30202  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30203      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30204      s|^/[^/]|//&|
30205      p
30206      q
30207    }'
30208
30209        gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30210  sed -n "$gl_absolute_header_sed"`
30211
30212           gl_header=$gl_cv_absolute_sys_ioctl_h
30213           gl_cv_next_sys_ioctl_h='"'$gl_header'"'
30214          else
30215               gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
30216             fi
30217
30218
30219fi
30220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
30221$as_echo "$gl_cv_next_sys_ioctl_h" >&6; }
30222     fi
30223     NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
30224
30225     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30226       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30227       gl_next_as_first_directive='<'sys/ioctl.h'>'
30228     else
30229       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30230       gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
30231     fi
30232     NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
30233
30234
30235
30236
30237
30238
30239    for gl_func in ioctl; do
30240    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
30241    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
30242$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
30243if eval \${$as_gl_Symbol+:} false; then :
30244  $as_echo_n "(cached) " >&6
30245else
30246  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30247/* end confdefs.h.  */
30248#include <sys/ioctl.h>
30249/* Some platforms declare ioctl in the wrong header.  */
30250#if !(defined __GLIBC__ && !defined __UCLIBC__)
30251# include <unistd.h>
30252#endif
30253
30254int
30255main ()
30256{
30257#undef $gl_func
30258  (void) $gl_func;
30259  ;
30260  return 0;
30261}
30262_ACEOF
30263if ac_fn_c_try_compile "$LINENO"; then :
30264  eval "$as_gl_Symbol=yes"
30265else
30266  eval "$as_gl_Symbol=no"
30267fi
30268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30269fi
30270eval ac_res=\$$as_gl_Symbol
30271	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30272$as_echo "$ac_res" >&6; }
30273    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
30274  cat >>confdefs.h <<_ACEOF
30275#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
30276_ACEOF
30277
30278                     eval ac_cv_have_decl_$gl_func=yes
30279fi
30280      done
30281
30282
30283
30284
30285
30286
30287
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300     if test $gl_cv_have_include_next = yes; then
30301       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
30302     else
30303       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
30304$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
30305if ${gl_cv_next_sys_stat_h+:} false; then :
30306  $as_echo_n "(cached) " >&6
30307else
30308
30309             if test $ac_cv_header_sys_stat_h = yes; then
30310
30311
30312
30313
30314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30315/* end confdefs.h.  */
30316#include <sys/stat.h>
30317_ACEOF
30318                case "$host_os" in
30319    aix*) gl_absname_cpp="$ac_cpp -C" ;;
30320    *)    gl_absname_cpp="$ac_cpp" ;;
30321  esac
30322
30323  case "$host_os" in
30324    mingw*)
30325                                          gl_dirsep_regex='[/\\]'
30326      ;;
30327    *)
30328      gl_dirsep_regex='\/'
30329      ;;
30330  esac
30331      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30332  gl_header_literal_regex=`echo 'sys/stat.h' \
30333                           | sed -e "$gl_make_literal_regex_sed"`
30334  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30335      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30336      s|^/[^/]|//&|
30337      p
30338      q
30339    }'
30340
30341        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30342  sed -n "$gl_absolute_header_sed"`
30343
30344           gl_header=$gl_cv_absolute_sys_stat_h
30345           gl_cv_next_sys_stat_h='"'$gl_header'"'
30346          else
30347               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
30348             fi
30349
30350
30351fi
30352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
30353$as_echo "$gl_cv_next_sys_stat_h" >&6; }
30354     fi
30355     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
30356
30357     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30358       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30359       gl_next_as_first_directive='<'sys/stat.h'>'
30360     else
30361       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30362       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
30363     fi
30364     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
30365
30366
30367
30368
30369
30370
30371
30372
30373
30374
30375
30376  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
30377
30378$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
30379
30380  fi
30381
30382      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
30383     #include <sys/stat.h>
30384"
30385if test "x$ac_cv_type_nlink_t" = xyes; then :
30386
30387else
30388
30389$as_echo "#define nlink_t int" >>confdefs.h
30390
30391fi
30392
30393
30394
30395    for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
30396    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
30397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
30398$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
30399if eval \${$as_gl_Symbol+:} false; then :
30400  $as_echo_n "(cached) " >&6
30401else
30402  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30403/* end confdefs.h.  */
30404#include <sys/stat.h>
30405
30406int
30407main ()
30408{
30409#undef $gl_func
30410  (void) $gl_func;
30411  ;
30412  return 0;
30413}
30414_ACEOF
30415if ac_fn_c_try_compile "$LINENO"; then :
30416  eval "$as_gl_Symbol=yes"
30417else
30418  eval "$as_gl_Symbol=no"
30419fi
30420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30421fi
30422eval ac_res=\$$as_gl_Symbol
30423	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30424$as_echo "$ac_res" >&6; }
30425    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
30426  cat >>confdefs.h <<_ACEOF
30427#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
30428_ACEOF
30429
30430                     eval ac_cv_have_decl_$gl_func=yes
30431fi
30432      done
30433
30434
30435
30436
30437
30438
30439
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449
30450
30451
30452
30453     if test $gl_cv_have_include_next = yes; then
30454       gl_cv_next_sys_uio_h='<'sys/uio.h'>'
30455     else
30456       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
30457$as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
30458if ${gl_cv_next_sys_uio_h+:} false; then :
30459  $as_echo_n "(cached) " >&6
30460else
30461
30462             if test $ac_cv_header_sys_uio_h = yes; then
30463
30464
30465
30466
30467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30468/* end confdefs.h.  */
30469#include <sys/uio.h>
30470_ACEOF
30471                case "$host_os" in
30472    aix*) gl_absname_cpp="$ac_cpp -C" ;;
30473    *)    gl_absname_cpp="$ac_cpp" ;;
30474  esac
30475
30476  case "$host_os" in
30477    mingw*)
30478                                          gl_dirsep_regex='[/\\]'
30479      ;;
30480    *)
30481      gl_dirsep_regex='\/'
30482      ;;
30483  esac
30484      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30485  gl_header_literal_regex=`echo 'sys/uio.h' \
30486                           | sed -e "$gl_make_literal_regex_sed"`
30487  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30488      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30489      s|^/[^/]|//&|
30490      p
30491      q
30492    }'
30493
30494        gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30495  sed -n "$gl_absolute_header_sed"`
30496
30497           gl_header=$gl_cv_absolute_sys_uio_h
30498           gl_cv_next_sys_uio_h='"'$gl_header'"'
30499          else
30500               gl_cv_next_sys_uio_h='<'sys/uio.h'>'
30501             fi
30502
30503
30504fi
30505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
30506$as_echo "$gl_cv_next_sys_uio_h" >&6; }
30507     fi
30508     NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
30509
30510     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30511       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30512       gl_next_as_first_directive='<'sys/uio.h'>'
30513     else
30514       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30515       gl_next_as_first_directive=$gl_cv_next_sys_uio_h
30516     fi
30517     NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
30518
30519
30520
30521
30522  if test $ac_cv_header_sys_uio_h = yes; then
30523    HAVE_SYS_UIO_H=1
30524  else
30525    HAVE_SYS_UIO_H=0
30526  fi
30527
30528
30529
30530
30531
30532
30533
30534
30535
30536
30537
30538
30539
30540
30541
30542     if test $gl_cv_have_include_next = yes; then
30543       gl_cv_next_sys_wait_h='<'sys/wait.h'>'
30544     else
30545       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
30546$as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
30547if ${gl_cv_next_sys_wait_h+:} false; then :
30548  $as_echo_n "(cached) " >&6
30549else
30550
30551             if test $ac_cv_header_sys_wait_h = yes; then
30552
30553
30554
30555
30556  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30557/* end confdefs.h.  */
30558#include <sys/wait.h>
30559_ACEOF
30560                case "$host_os" in
30561    aix*) gl_absname_cpp="$ac_cpp -C" ;;
30562    *)    gl_absname_cpp="$ac_cpp" ;;
30563  esac
30564
30565  case "$host_os" in
30566    mingw*)
30567                                          gl_dirsep_regex='[/\\]'
30568      ;;
30569    *)
30570      gl_dirsep_regex='\/'
30571      ;;
30572  esac
30573      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30574  gl_header_literal_regex=`echo 'sys/wait.h' \
30575                           | sed -e "$gl_make_literal_regex_sed"`
30576  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30577      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30578      s|^/[^/]|//&|
30579      p
30580      q
30581    }'
30582
30583        gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30584  sed -n "$gl_absolute_header_sed"`
30585
30586           gl_header=$gl_cv_absolute_sys_wait_h
30587           gl_cv_next_sys_wait_h='"'$gl_header'"'
30588          else
30589               gl_cv_next_sys_wait_h='<'sys/wait.h'>'
30590             fi
30591
30592
30593fi
30594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
30595$as_echo "$gl_cv_next_sys_wait_h" >&6; }
30596     fi
30597     NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
30598
30599     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30600       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30601       gl_next_as_first_directive='<'sys/wait.h'>'
30602     else
30603       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30604       gl_next_as_first_directive=$gl_cv_next_sys_wait_h
30605     fi
30606     NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
30607
30608
30609
30610
30611
30612
30613
30614
30615    for gl_func in waitpid; do
30616    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
30617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
30618$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
30619if eval \${$as_gl_Symbol+:} false; then :
30620  $as_echo_n "(cached) " >&6
30621else
30622  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30623/* end confdefs.h.  */
30624#include <sys/wait.h>
30625int
30626main ()
30627{
30628#undef $gl_func
30629  (void) $gl_func;
30630  ;
30631  return 0;
30632}
30633_ACEOF
30634if ac_fn_c_try_compile "$LINENO"; then :
30635  eval "$as_gl_Symbol=yes"
30636else
30637  eval "$as_gl_Symbol=no"
30638fi
30639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30640fi
30641eval ac_res=\$$as_gl_Symbol
30642	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30643$as_echo "$ac_res" >&6; }
30644    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
30645  cat >>confdefs.h <<_ACEOF
30646#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
30647_ACEOF
30648
30649                     eval ac_cv_have_decl_$gl_func=yes
30650fi
30651      done
30652
30653
30654
30655
30656
30657
30658
30659  TAN_LIBM="$POW_LIBM"
30660
30661
30662
30663
30664
30665
30666  :
30667
30668
30669
30670
30671
30672
30673
30674
30675
30676  :
30677
30678
30679
30680
30681
30682
30683
30684
30685
30686
30687
30688
30689     if test $gl_cv_have_include_next = yes; then
30690       gl_cv_next_unistd_h='<'unistd.h'>'
30691     else
30692       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
30693$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
30694if ${gl_cv_next_unistd_h+:} false; then :
30695  $as_echo_n "(cached) " >&6
30696else
30697
30698             if test $ac_cv_header_unistd_h = yes; then
30699
30700
30701
30702
30703  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30704/* end confdefs.h.  */
30705#include <unistd.h>
30706_ACEOF
30707                case "$host_os" in
30708    aix*) gl_absname_cpp="$ac_cpp -C" ;;
30709    *)    gl_absname_cpp="$ac_cpp" ;;
30710  esac
30711
30712  case "$host_os" in
30713    mingw*)
30714                                          gl_dirsep_regex='[/\\]'
30715      ;;
30716    *)
30717      gl_dirsep_regex='\/'
30718      ;;
30719  esac
30720      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30721  gl_header_literal_regex=`echo 'unistd.h' \
30722                           | sed -e "$gl_make_literal_regex_sed"`
30723  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30724      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30725      s|^/[^/]|//&|
30726      p
30727      q
30728    }'
30729
30730        gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30731  sed -n "$gl_absolute_header_sed"`
30732
30733           gl_header=$gl_cv_absolute_unistd_h
30734           gl_cv_next_unistd_h='"'$gl_header'"'
30735          else
30736               gl_cv_next_unistd_h='<'unistd.h'>'
30737             fi
30738
30739
30740fi
30741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
30742$as_echo "$gl_cv_next_unistd_h" >&6; }
30743     fi
30744     NEXT_UNISTD_H=$gl_cv_next_unistd_h
30745
30746     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30747       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30748       gl_next_as_first_directive='<'unistd.h'>'
30749     else
30750       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30751       gl_next_as_first_directive=$gl_cv_next_unistd_h
30752     fi
30753     NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
30754
30755
30756
30757
30758  if test $ac_cv_header_unistd_h = yes; then
30759    HAVE_UNISTD_H=1
30760  else
30761    HAVE_UNISTD_H=0
30762  fi
30763
30764
30765
30766
30767
30768
30769
30770    for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat     fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups     gethostname getlogin getlogin_r getpagesize     getusershell setusershell endusershell     group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite     readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r     unlink unlinkat usleep; do
30771    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
30772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
30773$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
30774if eval \${$as_gl_Symbol+:} false; then :
30775  $as_echo_n "(cached) " >&6
30776else
30777  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30778/* end confdefs.h.  */
30779
30780#if HAVE_UNISTD_H
30781# include <unistd.h>
30782#endif
30783/* Some systems declare various items in the wrong headers.  */
30784#if !(defined __GLIBC__ && !defined __UCLIBC__)
30785# include <fcntl.h>
30786# include <stdio.h>
30787# include <stdlib.h>
30788# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
30789#  include <io.h>
30790# endif
30791#endif
30792
30793int
30794main ()
30795{
30796#undef $gl_func
30797  (void) $gl_func;
30798  ;
30799  return 0;
30800}
30801_ACEOF
30802if ac_fn_c_try_compile "$LINENO"; then :
30803  eval "$as_gl_Symbol=yes"
30804else
30805  eval "$as_gl_Symbol=no"
30806fi
30807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30808fi
30809eval ac_res=\$$as_gl_Symbol
30810	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30811$as_echo "$ac_res" >&6; }
30812    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
30813  cat >>confdefs.h <<_ACEOF
30814#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
30815_ACEOF
30816
30817                     eval ac_cv_have_decl_$gl_func=yes
30818fi
30819      done
30820
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
30831$as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
30832if ${gl_cv_func_unlink_honors_slashes+:} false; then :
30833  $as_echo_n "(cached) " >&6
30834else
30835  touch conftest.file
30836     # Assume that if we have lstat, we can also check symlinks.
30837     if test $ac_cv_func_lstat = yes; then
30838       ln -s conftest.file conftest.lnk
30839     fi
30840     if test "$cross_compiling" = yes; then :
30841  case "$host_os" in
30842                 # Guess yes on glibc systems.
30843         *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
30844                 # If we don't know, assume the worst.
30845         *)      gl_cv_func_unlink_honors_slashes="guessing no" ;;
30846       esac
30847
30848else
30849  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30850/* end confdefs.h.  */
30851#if HAVE_UNISTD_H
30852           # include <unistd.h>
30853           #else /* on Windows with MSVC */
30854           # include <io.h>
30855           #endif
30856           #include <errno.h>
30857
30858int
30859main ()
30860{
30861int result = 0;
30862           if (!unlink ("conftest.file/"))
30863             result |= 1;
30864           else if (errno != ENOTDIR)
30865             result |= 2;
30866#if HAVE_LSTAT
30867           if (!unlink ("conftest.lnk/"))
30868             result |= 4;
30869           else if (errno != ENOTDIR)
30870             result |= 8;
30871#endif
30872           return result;
30873
30874  ;
30875  return 0;
30876}
30877_ACEOF
30878if ac_fn_c_try_run "$LINENO"; then :
30879  gl_cv_func_unlink_honors_slashes=yes
30880else
30881  gl_cv_func_unlink_honors_slashes=no
30882fi
30883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30884  conftest.$ac_objext conftest.beam conftest.$ac_ext
30885fi
30886
30887     rm -f conftest.file conftest.lnk
30888fi
30889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
30890$as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
30891  case "$gl_cv_func_unlink_honors_slashes" in
30892    *no)
30893      REPLACE_UNLINK=1
30894      ;;
30895  esac
30896
30897      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
30898$as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
30899if ${gl_cv_func_unlink_parent_fails+:} false; then :
30900  $as_echo_n "(cached) " >&6
30901else
30902  case "$host_os" in
30903       darwin*)
30904                                                      if {
30905              # Use the mktemp program if available. If not available, hide the error
30906              # message.
30907              tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
30908              test -n "$tmp" && test -d "$tmp"
30909            } ||
30910            {
30911              # Use a simple mkdir command. It is guaranteed to fail if the directory
30912              # already exists.  $RANDOM is bash specific and expands to empty in shells
30913              # other than bash, ksh and zsh.  Its use does not increase security;
30914              # rather, it minimizes the probability of failure in a very cluttered /tmp
30915              # directory.
30916              tmp=/tmp/gt$$-$RANDOM
30917              (umask 077 && mkdir "$tmp")
30918            }; then
30919           mkdir "$tmp/subdir"
30920           GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
30921           export GL_SUBDIR_FOR_UNLINK
30922           if test "$cross_compiling" = yes; then :
30923  # If we don't know, assume the worst.
30924              gl_cv_func_unlink_parent_fails="guessing no"
30925
30926else
30927  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30928/* end confdefs.h.  */
30929
30930                #include <stdlib.h>
30931                #if HAVE_UNISTD_H
30932                # include <unistd.h>
30933                #else /* on Windows with MSVC */
30934                # include <direct.h>
30935                # include <io.h>
30936                #endif
30937                int main ()
30938                {
30939                  int result = 0;
30940                  if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
30941                    result |= 1;
30942                  else if (unlink ("..") == 0)
30943                    result |= 2;
30944                  return result;
30945                }
30946
30947_ACEOF
30948if ac_fn_c_try_run "$LINENO"; then :
30949  gl_cv_func_unlink_parent_fails=yes
30950else
30951  gl_cv_func_unlink_parent_fails=no
30952fi
30953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30954  conftest.$ac_objext conftest.beam conftest.$ac_ext
30955fi
30956
30957           unset GL_SUBDIR_FOR_UNLINK
30958           rm -rf "$tmp"
30959         else
30960           gl_cv_func_unlink_parent_fails="guessing no"
30961         fi
30962         ;;
30963       *)
30964         gl_cv_func_unlink_parent_fails="guessing yes"
30965         ;;
30966     esac
30967
30968fi
30969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
30970$as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
30971  case "$gl_cv_func_unlink_parent_fails" in
30972    *no)
30973      REPLACE_UNLINK=1
30974
30975$as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
30976
30977      ;;
30978  esac
30979
30980  if test $REPLACE_UNLINK = 1; then
30981
30982
30983
30984
30985
30986
30987
30988
30989  gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
30990
30991  fi
30992
30993
30994
30995
30996
30997          GNULIB_UNLINK=1
30998
30999
31000
31001
31002
31003$as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
31004
31005
31006
31007
31008
31009  for ac_func in waitid
31010do :
31011  ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
31012if test "x$ac_cv_func_waitid" = xyes; then :
31013  cat >>confdefs.h <<_ACEOF
31014#define HAVE_WAITID 1
31015_ACEOF
31016
31017fi
31018done
31019
31020
31021
31022
31023  HAVE_WAITPID=1
31024  case $host_os in
31025    mingw*) HAVE_WAITPID=0 ;;
31026  esac
31027
31028  if test $HAVE_WAITPID = 0; then
31029
31030
31031
31032
31033
31034
31035
31036
31037  gl_LIBOBJS="$gl_LIBOBJS waitpid.$ac_objext"
31038
31039  fi
31040
31041
31042
31043
31044
31045          GNULIB_WAITPID=1
31046
31047
31048
31049
31050
31051$as_echo "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
31052
31053
31054
31055
31056
31057
31058
31059
31060
31061
31062
31063
31064
31065
31066
31067     if test $gl_cv_have_include_next = yes; then
31068       gl_cv_next_wchar_h='<'wchar.h'>'
31069     else
31070       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
31071$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
31072if ${gl_cv_next_wchar_h+:} false; then :
31073  $as_echo_n "(cached) " >&6
31074else
31075
31076             if test $ac_cv_header_wchar_h = yes; then
31077
31078
31079
31080
31081  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31082/* end confdefs.h.  */
31083#include <wchar.h>
31084_ACEOF
31085                case "$host_os" in
31086    aix*) gl_absname_cpp="$ac_cpp -C" ;;
31087    *)    gl_absname_cpp="$ac_cpp" ;;
31088  esac
31089
31090  case "$host_os" in
31091    mingw*)
31092                                          gl_dirsep_regex='[/\\]'
31093      ;;
31094    *)
31095      gl_dirsep_regex='\/'
31096      ;;
31097  esac
31098      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31099  gl_header_literal_regex=`echo 'wchar.h' \
31100                           | sed -e "$gl_make_literal_regex_sed"`
31101  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31102      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31103      s|^/[^/]|//&|
31104      p
31105      q
31106    }'
31107
31108        gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31109  sed -n "$gl_absolute_header_sed"`
31110
31111           gl_header=$gl_cv_absolute_wchar_h
31112           gl_cv_next_wchar_h='"'$gl_header'"'
31113          else
31114               gl_cv_next_wchar_h='<'wchar.h'>'
31115             fi
31116
31117
31118fi
31119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
31120$as_echo "$gl_cv_next_wchar_h" >&6; }
31121     fi
31122     NEXT_WCHAR_H=$gl_cv_next_wchar_h
31123
31124     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31125       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31126       gl_next_as_first_directive='<'wchar.h'>'
31127     else
31128       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31129       gl_next_as_first_directive=$gl_cv_next_wchar_h
31130     fi
31131     NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
31132
31133
31134
31135
31136  if test $ac_cv_header_wchar_h = yes; then
31137    HAVE_WCHAR_H=1
31138  else
31139    HAVE_WCHAR_H=0
31140  fi
31141
31142
31143
31144
31145
31146  if test $gt_cv_c_wint_t = yes; then
31147    HAVE_WINT_T=1
31148  else
31149    HAVE_WINT_T=0
31150  fi
31151
31152
31153
31154    for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb      wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset      wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp      wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr      wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth     ; do
31155    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
31156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
31157$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
31158if eval \${$as_gl_Symbol+:} false; then :
31159  $as_echo_n "(cached) " >&6
31160else
31161  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31162/* end confdefs.h.  */
31163
31164/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31165   <wchar.h>.
31166   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31167   included before <wchar.h>.  */
31168#if !(defined __GLIBC__ && !defined __UCLIBC__)
31169# include <stddef.h>
31170# include <stdio.h>
31171# include <time.h>
31172#endif
31173#include <wchar.h>
31174
31175int
31176main ()
31177{
31178#undef $gl_func
31179  (void) $gl_func;
31180  ;
31181  return 0;
31182}
31183_ACEOF
31184if ac_fn_c_try_compile "$LINENO"; then :
31185  eval "$as_gl_Symbol=yes"
31186else
31187  eval "$as_gl_Symbol=no"
31188fi
31189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31190fi
31191eval ac_res=\$$as_gl_Symbol
31192	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31193$as_echo "$ac_res" >&6; }
31194    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31195  cat >>confdefs.h <<_ACEOF
31196#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31197_ACEOF
31198
31199                     eval ac_cv_have_decl_$gl_func=yes
31200fi
31201      done
31202
31203
31204
31205
31206
31207
31208
31209
31210
31211
31212
31213
31214  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
31215
31216
31217
31218     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
31219$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
31220if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
31221  $as_echo_n "(cached) " >&6
31222else
31223
31224                  case "$host_os" in
31225                     # Guess no on AIX and OSF/1.
31226        aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
31227                     # Guess yes otherwise.
31228        *)           gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
31229      esac
31230      if test $LOCALE_JA != none; then
31231        if test "$cross_compiling" = yes; then :
31232  :
31233else
31234  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31235/* end confdefs.h.  */
31236
31237#include <locale.h>
31238#include <string.h>
31239/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31240   <wchar.h>.
31241   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31242   included before <wchar.h>.  */
31243#include <stddef.h>
31244#include <stdio.h>
31245#include <time.h>
31246#include <wchar.h>
31247int main ()
31248{
31249  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
31250    {
31251      const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
31252      mbstate_t state;
31253      wchar_t wc;
31254
31255      memset (&state, '\0', sizeof (mbstate_t));
31256      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
31257        if (mbsinit (&state))
31258          return 2;
31259    }
31260  return 0;
31261}
31262_ACEOF
31263if ac_fn_c_try_run "$LINENO"; then :
31264  gl_cv_func_mbrtowc_incomplete_state=yes
31265else
31266  gl_cv_func_mbrtowc_incomplete_state=no
31267fi
31268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31269  conftest.$ac_objext conftest.beam conftest.$ac_ext
31270fi
31271
31272      fi
31273
31274fi
31275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
31276$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
31277
31278
31279
31280
31281     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
31282$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
31283if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
31284  $as_echo_n "(cached) " >&6
31285else
31286
31287                  case "$host_os" in
31288                    # Guess no on Solaris 8.
31289        solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
31290                    # Guess yes otherwise.
31291        *)          gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
31292      esac
31293      if test $LOCALE_ZH_CN != none; then
31294        if test "$cross_compiling" = yes; then :
31295  :
31296else
31297  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31298/* end confdefs.h.  */
31299
31300#include <locale.h>
31301#include <stdlib.h>
31302#include <string.h>
31303/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31304   <wchar.h>.
31305   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31306   included before <wchar.h>.  */
31307#include <stddef.h>
31308#include <stdio.h>
31309#include <time.h>
31310#include <wchar.h>
31311int main ()
31312{
31313  /* This fails on Solaris 8:
31314     mbrtowc returns 2, and sets wc to 0x00F0.
31315     mbtowc returns 4 (correct) and sets wc to 0x5EDC.  */
31316  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
31317    {
31318      char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
31319      mbstate_t state;
31320      wchar_t wc;
31321
31322      memset (&state, '\0', sizeof (mbstate_t));
31323      if (mbrtowc (&wc, input + 3, 6, &state) != 4
31324          && mbtowc (&wc, input + 3, 6) == 4)
31325        return 2;
31326    }
31327  return 0;
31328}
31329_ACEOF
31330if ac_fn_c_try_run "$LINENO"; then :
31331  gl_cv_func_mbrtowc_sanitycheck=yes
31332else
31333  gl_cv_func_mbrtowc_sanitycheck=no
31334fi
31335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31336  conftest.$ac_objext conftest.beam conftest.$ac_ext
31337fi
31338
31339      fi
31340
31341fi
31342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
31343$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
31344
31345    REPLACE_MBSTATE_T=0
31346    case "$gl_cv_func_mbrtowc_incomplete_state" in
31347      *yes) ;;
31348      *) REPLACE_MBSTATE_T=1 ;;
31349    esac
31350    case "$gl_cv_func_mbrtowc_sanitycheck" in
31351      *yes) ;;
31352      *) REPLACE_MBSTATE_T=1 ;;
31353    esac
31354  else
31355    REPLACE_MBSTATE_T=1
31356  fi
31357
31358
31359
31360  if test $ac_cv_func_wcrtomb = no; then
31361    HAVE_WCRTOMB=0
31362    ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
31363/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31364   <wchar.h>.
31365   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31366   included before <wchar.h>.  */
31367#include <stddef.h>
31368#include <stdio.h>
31369#include <time.h>
31370#include <wchar.h>
31371
31372"
31373if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
31374  ac_have_decl=1
31375else
31376  ac_have_decl=0
31377fi
31378
31379cat >>confdefs.h <<_ACEOF
31380#define HAVE_DECL_WCRTOMB $ac_have_decl
31381_ACEOF
31382
31383    if test $ac_cv_have_decl_wcrtomb = yes; then
31384                        REPLACE_WCRTOMB=1
31385    fi
31386  else
31387    if test $REPLACE_MBSTATE_T = 1; then
31388      REPLACE_WCRTOMB=1
31389    else
31390
31391
31392
31393
31394
31395             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
31396$as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
31397if ${gl_cv_func_wcrtomb_retval+:} false; then :
31398  $as_echo_n "(cached) " >&6
31399else
31400
31401                              case "$host_os" in
31402                                     # Guess no on AIX 4, OSF/1 and Solaris.
31403            aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
31404                                     # Guess yes otherwise.
31405            *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
31406          esac
31407          if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
31408            if test "$cross_compiling" = yes; then :
31409  :
31410else
31411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31412/* end confdefs.h.  */
31413
31414#include <locale.h>
31415#include <string.h>
31416/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31417   <wchar.h>.
31418   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31419   included before <wchar.h>.  */
31420#include <stddef.h>
31421#include <stdio.h>
31422#include <time.h>
31423#include <wchar.h>
31424int main ()
31425{
31426  int result = 0;
31427  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
31428    {
31429      if (wcrtomb (NULL, 0, NULL) != 1)
31430        result |= 1;
31431    }
31432  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
31433    {
31434      if (wcrtomb (NULL, 0, NULL) != 1)
31435        result |= 2;
31436    }
31437  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
31438    {
31439      if (wcrtomb (NULL, 0, NULL) != 1)
31440        result |= 4;
31441    }
31442  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
31443    {
31444      if (wcrtomb (NULL, 0, NULL) != 1)
31445        result |= 8;
31446    }
31447  return result;
31448}
31449_ACEOF
31450if ac_fn_c_try_run "$LINENO"; then :
31451  gl_cv_func_wcrtomb_retval=yes
31452else
31453  gl_cv_func_wcrtomb_retval=no
31454fi
31455rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31456  conftest.$ac_objext conftest.beam conftest.$ac_ext
31457fi
31458
31459          fi
31460
31461fi
31462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
31463$as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
31464      case "$gl_cv_func_wcrtomb_retval" in
31465        *yes) ;;
31466        *) REPLACE_WCRTOMB=1 ;;
31467      esac
31468    fi
31469  fi
31470
31471  if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
31472
31473
31474
31475
31476
31477
31478
31479
31480  gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
31481
31482
31483  :
31484
31485  fi
31486
31487
31488
31489
31490
31491          GNULIB_WCRTOMB=1
31492
31493
31494
31495
31496
31497$as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
31498
31499
31500
31501
31502
31503
31504
31505
31506  if test $ac_cv_func_iswcntrl = yes; then
31507    HAVE_ISWCNTRL=1
31508  else
31509    HAVE_ISWCNTRL=0
31510  fi
31511
31512
31513
31514  if test $gt_cv_c_wint_t = yes; then
31515    HAVE_WINT_T=1
31516  else
31517    HAVE_WINT_T=0
31518  fi
31519
31520
31521
31522
31523
31524
31525
31526
31527
31528
31529
31530     if test $gl_cv_have_include_next = yes; then
31531       gl_cv_next_wctype_h='<'wctype.h'>'
31532     else
31533       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
31534$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
31535if ${gl_cv_next_wctype_h+:} false; then :
31536  $as_echo_n "(cached) " >&6
31537else
31538
31539             if test $ac_cv_header_wctype_h = yes; then
31540
31541
31542
31543
31544  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31545/* end confdefs.h.  */
31546#include <wctype.h>
31547_ACEOF
31548                case "$host_os" in
31549    aix*) gl_absname_cpp="$ac_cpp -C" ;;
31550    *)    gl_absname_cpp="$ac_cpp" ;;
31551  esac
31552
31553  case "$host_os" in
31554    mingw*)
31555                                          gl_dirsep_regex='[/\\]'
31556      ;;
31557    *)
31558      gl_dirsep_regex='\/'
31559      ;;
31560  esac
31561      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31562  gl_header_literal_regex=`echo 'wctype.h' \
31563                           | sed -e "$gl_make_literal_regex_sed"`
31564  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31565      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31566      s|^/[^/]|//&|
31567      p
31568      q
31569    }'
31570
31571        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31572  sed -n "$gl_absolute_header_sed"`
31573
31574           gl_header=$gl_cv_absolute_wctype_h
31575           gl_cv_next_wctype_h='"'$gl_header'"'
31576          else
31577               gl_cv_next_wctype_h='<'wctype.h'>'
31578             fi
31579
31580
31581fi
31582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
31583$as_echo "$gl_cv_next_wctype_h" >&6; }
31584     fi
31585     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
31586
31587     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31588       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31589       gl_next_as_first_directive='<'wctype.h'>'
31590     else
31591       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31592       gl_next_as_first_directive=$gl_cv_next_wctype_h
31593     fi
31594     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
31595
31596
31597
31598
31599  if test $ac_cv_header_wctype_h = yes; then
31600    if test $ac_cv_func_iswcntrl = yes; then
31601                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
31602$as_echo_n "checking whether iswcntrl works... " >&6; }
31603if ${gl_cv_func_iswcntrl_works+:} false; then :
31604  $as_echo_n "(cached) " >&6
31605else
31606
31607          if test "$cross_compiling" = yes; then :
31608  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31609/* end confdefs.h.  */
31610#include <stdlib.h>
31611                          #if __GNU_LIBRARY__ == 1
31612                          Linux libc5 i18n is broken.
31613                          #endif
31614int
31615main ()
31616{
31617
31618  ;
31619  return 0;
31620}
31621_ACEOF
31622if ac_fn_c_try_compile "$LINENO"; then :
31623  gl_cv_func_iswcntrl_works="guessing yes"
31624else
31625  gl_cv_func_iswcntrl_works="guessing no"
31626fi
31627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31628
31629else
31630  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31631/* end confdefs.h.  */
31632
31633               /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
31634                  included before <wchar.h>.
31635                  BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
31636                  must be included before <wchar.h>.  */
31637               #include <stddef.h>
31638               #include <stdio.h>
31639               #include <time.h>
31640               #include <wchar.h>
31641               #include <wctype.h>
31642               int main () { return iswprint ('x') == 0; }
31643
31644_ACEOF
31645if ac_fn_c_try_run "$LINENO"; then :
31646  gl_cv_func_iswcntrl_works=yes
31647else
31648  gl_cv_func_iswcntrl_works=no
31649fi
31650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31651  conftest.$ac_objext conftest.beam conftest.$ac_ext
31652fi
31653
31654
31655fi
31656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
31657$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
31658    fi
31659    HAVE_WCTYPE_H=1
31660  else
31661    HAVE_WCTYPE_H=0
31662  fi
31663
31664
31665  case "$gl_cv_func_iswcntrl_works" in
31666    *yes) REPLACE_ISWCNTRL=0 ;;
31667    *)    REPLACE_ISWCNTRL=1 ;;
31668  esac
31669
31670
31671  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
31672        :
31673  fi
31674
31675  if test $REPLACE_ISWCNTRL = 1; then
31676    REPLACE_TOWLOWER=1
31677  else
31678    for ac_func in towlower
31679do :
31680  ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
31681if test "x$ac_cv_func_towlower" = xyes; then :
31682  cat >>confdefs.h <<_ACEOF
31683#define HAVE_TOWLOWER 1
31684_ACEOF
31685
31686fi
31687done
31688
31689    if test $ac_cv_func_towlower = yes; then
31690      REPLACE_TOWLOWER=0
31691    else
31692      ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
31693             included before <wchar.h>.
31694             BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
31695             must be included before <wchar.h>.  */
31696          #include <stddef.h>
31697          #include <stdio.h>
31698          #include <time.h>
31699          #include <wchar.h>
31700          #if HAVE_WCTYPE_H
31701          # include <wctype.h>
31702          #endif
31703
31704"
31705if test "x$ac_cv_have_decl_towlower" = xyes; then :
31706  ac_have_decl=1
31707else
31708  ac_have_decl=0
31709fi
31710
31711cat >>confdefs.h <<_ACEOF
31712#define HAVE_DECL_TOWLOWER $ac_have_decl
31713_ACEOF
31714
31715      if test $ac_cv_have_decl_towlower = yes; then
31716                                REPLACE_TOWLOWER=1
31717      else
31718        REPLACE_TOWLOWER=0
31719      fi
31720    fi
31721  fi
31722
31723
31724  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
31725        :
31726  fi
31727
31728          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
31729$as_echo_n "checking for wctype_t... " >&6; }
31730if ${gl_cv_type_wctype_t+:} false; then :
31731  $as_echo_n "(cached) " >&6
31732else
31733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31734/* end confdefs.h.  */
31735/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
31736               included before <wchar.h>.
31737               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
31738               must be included before <wchar.h>.  */
31739            #include <stddef.h>
31740            #include <stdio.h>
31741            #include <time.h>
31742            #include <wchar.h>
31743            #if HAVE_WCTYPE_H
31744            # include <wctype.h>
31745            #endif
31746            wctype_t a;
31747
31748int
31749main ()
31750{
31751
31752  ;
31753  return 0;
31754}
31755_ACEOF
31756if ac_fn_c_try_compile "$LINENO"; then :
31757  gl_cv_type_wctype_t=yes
31758else
31759  gl_cv_type_wctype_t=no
31760fi
31761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31762
31763fi
31764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
31765$as_echo "$gl_cv_type_wctype_t" >&6; }
31766  if test $gl_cv_type_wctype_t = no; then
31767    HAVE_WCTYPE_T=0
31768  fi
31769
31770      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
31771$as_echo_n "checking for wctrans_t... " >&6; }
31772if ${gl_cv_type_wctrans_t+:} false; then :
31773  $as_echo_n "(cached) " >&6
31774else
31775  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31776/* end confdefs.h.  */
31777/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
31778               included before <wchar.h>.
31779               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
31780               must be included before <wchar.h>.  */
31781            #include <stddef.h>
31782            #include <stdio.h>
31783            #include <time.h>
31784            #include <wchar.h>
31785            #include <wctype.h>
31786            wctrans_t a;
31787
31788int
31789main ()
31790{
31791
31792  ;
31793  return 0;
31794}
31795_ACEOF
31796if ac_fn_c_try_compile "$LINENO"; then :
31797  gl_cv_type_wctrans_t=yes
31798else
31799  gl_cv_type_wctrans_t=no
31800fi
31801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31802
31803fi
31804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
31805$as_echo "$gl_cv_type_wctrans_t" >&6; }
31806  if test $gl_cv_type_wctrans_t = no; then
31807    HAVE_WCTRANS_T=0
31808  fi
31809
31810
31811    for gl_func in wctype iswctype wctrans towctrans     ; do
31812    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
31813    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
31814$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
31815if eval \${$as_gl_Symbol+:} false; then :
31816  $as_echo_n "(cached) " >&6
31817else
31818  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31819/* end confdefs.h.  */
31820
31821/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31822   <wchar.h>.
31823   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31824   included before <wchar.h>.  */
31825#if !(defined __GLIBC__ && !defined __UCLIBC__)
31826# include <stddef.h>
31827# include <stdio.h>
31828# include <time.h>
31829# include <wchar.h>
31830#endif
31831#include <wctype.h>
31832
31833int
31834main ()
31835{
31836#undef $gl_func
31837  (void) $gl_func;
31838  ;
31839  return 0;
31840}
31841_ACEOF
31842if ac_fn_c_try_compile "$LINENO"; then :
31843  eval "$as_gl_Symbol=yes"
31844else
31845  eval "$as_gl_Symbol=no"
31846fi
31847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31848fi
31849eval ac_res=\$$as_gl_Symbol
31850	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31851$as_echo "$ac_res" >&6; }
31852    if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31853  cat >>confdefs.h <<_ACEOF
31854#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31855_ACEOF
31856
31857                     eval ac_cv_have_decl_$gl_func=yes
31858fi
31859      done
31860
31861
31862
31863
31864
31865  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
31866    REPLACE_WRITE=1
31867  fi
31868
31869
31870
31871  if test $REPLACE_WRITE = 1; then
31872
31873
31874
31875
31876
31877
31878
31879
31880  gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
31881
31882    :
31883  fi
31884
31885
31886
31887
31888
31889          GNULIB_WRITE=1
31890
31891
31892
31893
31894
31895$as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
31896
31897
31898
31899  :
31900  # End of code from modules
31901
31902
31903
31904
31905
31906
31907
31908
31909
31910  gltests_libdeps=
31911  gltests_ltlibdeps=
31912
31913
31914
31915
31916
31917
31918
31919
31920
31921  gl_source_base='tests'
31922  gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
31923
31924  gl_module_indicator_condition=$gltests_WITNESS
31925
31926
31927
31928
31929
31930
31931
31932
31933
31934  LIBGNU_LIBDEPS="$gl_libdeps"
31935
31936  LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
31937
31938
31939
31940if test -s "$srcdir/doc/mks1sed.in"; then
31941  sed -e '/^#.*[^\\]$/d' -e '/^#$/d' $srcdir/doc/mks1sed.in > $srcdir/doc/mksamp-1.sed
31942fi
31943if test -s "$srcdir/doc/mks2sed.in"; then
31944  sed -e '/^#.*[^\\]$/d' -e '/^#$/d' $srcdir/doc/mks2sed.in > $srcdir/doc/mksamp-2.sed
31945fi
31946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
31947$as_echo "" >&6; }
31948
31949ac_config_headers="$ac_config_headers config.h"
31950
31951
31952ac_config_files="$ac_config_files Makefile install-inf data/Makefile doc/Makefile doc/en/Makefile doc/en/examples/Makefile doc/mksamp lib/Makefile misc/Makefile misc/daily/daily misc/ddiff/ddiff misc/ddiff/ddiffdrv misc/dst/dst misc/gcalltx/gcalltx misc/gcalltx/gcalltxp misc/moon/moon misc/mrms/mrms misc/srss/srss misc/wloc/wlocdrv po/Makefile.in src/Makefile"
31953
31954cat >confcache <<\_ACEOF
31955# This file is a shell script that caches the results of configure
31956# tests run on this system so they can be shared between configure
31957# scripts and configure runs, see configure's option --config-cache.
31958# It is not useful on other systems.  If it contains results you don't
31959# want to keep, you may remove or edit it.
31960#
31961# config.status only pays attention to the cache file if you give it
31962# the --recheck option to rerun configure.
31963#
31964# `ac_cv_env_foo' variables (set or unset) will be overridden when
31965# loading this file, other *unset* `ac_cv_foo' will be assigned the
31966# following values.
31967
31968_ACEOF
31969
31970# The following way of writing the cache mishandles newlines in values,
31971# but we know of no workaround that is simple, portable, and efficient.
31972# So, we kill variables containing newlines.
31973# Ultrix sh set writes to stderr and can't be redirected directly,
31974# and sets the high bit in the cache file unless we assign to the vars.
31975(
31976  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31977    eval ac_val=\$$ac_var
31978    case $ac_val in #(
31979    *${as_nl}*)
31980      case $ac_var in #(
31981      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31982$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31983      esac
31984      case $ac_var in #(
31985      _ | IFS | as_nl) ;; #(
31986      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31987      *) { eval $ac_var=; unset $ac_var;} ;;
31988      esac ;;
31989    esac
31990  done
31991
31992  (set) 2>&1 |
31993    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31994    *${as_nl}ac_space=\ *)
31995      # `set' does not quote correctly, so add quotes: double-quote
31996      # substitution turns \\\\ into \\, and sed turns \\ into \.
31997      sed -n \
31998	"s/'/'\\\\''/g;
31999	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
32000      ;; #(
32001    *)
32002      # `set' quotes correctly as required by POSIX, so do not add quotes.
32003      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
32004      ;;
32005    esac |
32006    sort
32007) |
32008  sed '
32009     /^ac_cv_env_/b end
32010     t clear
32011     :clear
32012     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
32013     t end
32014     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
32015     :end' >>confcache
32016if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
32017  if test -w "$cache_file"; then
32018    if test "x$cache_file" != "x/dev/null"; then
32019      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
32020$as_echo "$as_me: updating cache $cache_file" >&6;}
32021      if test ! -f "$cache_file" || test -h "$cache_file"; then
32022	cat confcache >"$cache_file"
32023      else
32024        case $cache_file in #(
32025        */* | ?:*)
32026	  mv -f confcache "$cache_file"$$ &&
32027	  mv -f "$cache_file"$$ "$cache_file" ;; #(
32028        *)
32029	  mv -f confcache "$cache_file" ;;
32030	esac
32031      fi
32032    fi
32033  else
32034    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
32035$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
32036  fi
32037fi
32038rm -f confcache
32039
32040test "x$prefix" = xNONE && prefix=$ac_default_prefix
32041# Let make expand exec_prefix.
32042test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
32043
32044DEFS=-DHAVE_CONFIG_H
32045
32046ac_libobjs=
32047ac_ltlibobjs=
32048U=
32049for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
32050  # 1. Remove the extension, and $U if already installed.
32051  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
32052  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
32053  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
32054  #    will be set to the directory where LIBOBJS objects are built.
32055  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
32056  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
32057done
32058LIBOBJS=$ac_libobjs
32059
32060LTLIBOBJS=$ac_ltlibobjs
32061
32062
32063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
32064$as_echo_n "checking that generated files are newer than configure... " >&6; }
32065   if test -n "$am_sleep_pid"; then
32066     # Hide warnings about reused PIDs.
32067     wait $am_sleep_pid 2>/dev/null
32068   fi
32069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
32070$as_echo "done" >&6; }
32071 if test -n "$EXEEXT"; then
32072  am__EXEEXT_TRUE=
32073  am__EXEEXT_FALSE='#'
32074else
32075  am__EXEEXT_TRUE='#'
32076  am__EXEEXT_FALSE=
32077fi
32078
32079if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
32080  as_fn_error $? "conditional \"AMDEP\" was never defined.
32081Usually this means the macro was only invoked conditionally." "$LINENO" 5
32082fi
32083if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
32084  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
32085Usually this means the macro was only invoked conditionally." "$LINENO" 5
32086fi
32087if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
32088  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
32089Usually this means the macro was only invoked conditionally." "$LINENO" 5
32090fi
32091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
32092$as_echo_n "checking that generated files are newer than configure... " >&6; }
32093   if test -n "$am_sleep_pid"; then
32094     # Hide warnings about reused PIDs.
32095     wait $am_sleep_pid 2>/dev/null
32096   fi
32097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
32098$as_echo "done" >&6; }
32099if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
32100  as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
32101Usually this means the macro was only invoked conditionally." "$LINENO" 5
32102fi
32103if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
32104  as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
32105Usually this means the macro was only invoked conditionally." "$LINENO" 5
32106fi
32107if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
32108  as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
32109Usually this means the macro was only invoked conditionally." "$LINENO" 5
32110fi
32111if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
32112  as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
32113Usually this means the macro was only invoked conditionally." "$LINENO" 5
32114fi
32115if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
32116  as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
32117Usually this means the macro was only invoked conditionally." "$LINENO" 5
32118fi
32119if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
32120  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
32121Usually this means the macro was only invoked conditionally." "$LINENO" 5
32122fi
32123if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
32124  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
32125Usually this means the macro was only invoked conditionally." "$LINENO" 5
32126fi
32127CONFIG_INCLUDE=config.h
32128
32129if test -z "${GL_GENERATE_SCHED_H_TRUE}" && test -z "${GL_GENERATE_SCHED_H_FALSE}"; then
32130  as_fn_error $? "conditional \"GL_GENERATE_SCHED_H\" was never defined.
32131Usually this means the macro was only invoked conditionally." "$LINENO" 5
32132fi
32133if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
32134  as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
32135Usually this means the macro was only invoked conditionally." "$LINENO" 5
32136fi
32137if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
32138  as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
32139Usually this means the macro was only invoked conditionally." "$LINENO" 5
32140fi
32141if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
32142  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
32143Usually this means the macro was only invoked conditionally." "$LINENO" 5
32144fi
32145if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
32146  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
32147Usually this means the macro was only invoked conditionally." "$LINENO" 5
32148fi
32149if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
32150  as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
32151Usually this means the macro was only invoked conditionally." "$LINENO" 5
32152fi
32153
32154    gl_libobjs=
32155    gl_ltlibobjs=
32156    if test -n "$gl_LIBOBJS"; then
32157      # Remove the extension.
32158      sed_drop_objext='s/\.o$//;s/\.obj$//'
32159      for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
32160        gl_libobjs="$gl_libobjs $i.$ac_objext"
32161        gl_ltlibobjs="$gl_ltlibobjs $i.lo"
32162      done
32163    fi
32164    gl_LIBOBJS=$gl_libobjs
32165
32166    gl_LTLIBOBJS=$gl_ltlibobjs
32167
32168
32169
32170    gltests_libobjs=
32171    gltests_ltlibobjs=
32172    if test -n "$gltests_LIBOBJS"; then
32173      # Remove the extension.
32174      sed_drop_objext='s/\.o$//;s/\.obj$//'
32175      for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
32176        gltests_libobjs="$gltests_libobjs $i.$ac_objext"
32177        gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
32178      done
32179    fi
32180    gltests_LIBOBJS=$gltests_libobjs
32181
32182    gltests_LTLIBOBJS=$gltests_ltlibobjs
32183
32184
32185
32186: "${CONFIG_STATUS=./config.status}"
32187ac_write_fail=0
32188ac_clean_files_save=$ac_clean_files
32189ac_clean_files="$ac_clean_files $CONFIG_STATUS"
32190{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
32191$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
32192as_write_fail=0
32193cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
32194#! $SHELL
32195# Generated by $as_me.
32196# Run this file to recreate the current configuration.
32197# Compiler output produced by configure, useful for debugging
32198# configure, is in config.log if it exists.
32199
32200debug=false
32201ac_cs_recheck=false
32202ac_cs_silent=false
32203
32204SHELL=\${CONFIG_SHELL-$SHELL}
32205export SHELL
32206_ASEOF
32207cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
32208## -------------------- ##
32209## M4sh Initialization. ##
32210## -------------------- ##
32211
32212# Be more Bourne compatible
32213DUALCASE=1; export DUALCASE # for MKS sh
32214if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
32215  emulate sh
32216  NULLCMD=:
32217  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
32218  # is contrary to our usage.  Disable this feature.
32219  alias -g '${1+"$@"}'='"$@"'
32220  setopt NO_GLOB_SUBST
32221else
32222  case `(set -o) 2>/dev/null` in #(
32223  *posix*) :
32224    set -o posix ;; #(
32225  *) :
32226     ;;
32227esac
32228fi
32229
32230
32231as_nl='
32232'
32233export as_nl
32234# Printing a long string crashes Solaris 7 /usr/bin/printf.
32235as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
32236as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
32237as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
32238# Prefer a ksh shell builtin over an external printf program on Solaris,
32239# but without wasting forks for bash or zsh.
32240if test -z "$BASH_VERSION$ZSH_VERSION" \
32241    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32242  as_echo='print -r --'
32243  as_echo_n='print -rn --'
32244elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32245  as_echo='printf %s\n'
32246  as_echo_n='printf %s'
32247else
32248  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32249    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32250    as_echo_n='/usr/ucb/echo -n'
32251  else
32252    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32253    as_echo_n_body='eval
32254      arg=$1;
32255      case $arg in #(
32256      *"$as_nl"*)
32257	expr "X$arg" : "X\\(.*\\)$as_nl";
32258	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32259      esac;
32260      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32261    '
32262    export as_echo_n_body
32263    as_echo_n='sh -c $as_echo_n_body as_echo'
32264  fi
32265  export as_echo_body
32266  as_echo='sh -c $as_echo_body as_echo'
32267fi
32268
32269# The user is always right.
32270if test "${PATH_SEPARATOR+set}" != set; then
32271  PATH_SEPARATOR=:
32272  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32273    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32274      PATH_SEPARATOR=';'
32275  }
32276fi
32277
32278
32279# IFS
32280# We need space, tab and new line, in precisely that order.  Quoting is
32281# there to prevent editors from complaining about space-tab.
32282# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32283# splitting by setting IFS to empty value.)
32284IFS=" ""	$as_nl"
32285
32286# Find who we are.  Look in the path if we contain no directory separator.
32287as_myself=
32288case $0 in #((
32289  *[\\/]* ) as_myself=$0 ;;
32290  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32291for as_dir in $PATH
32292do
32293  IFS=$as_save_IFS
32294  test -z "$as_dir" && as_dir=.
32295    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32296  done
32297IFS=$as_save_IFS
32298
32299     ;;
32300esac
32301# We did not find ourselves, most probably we were run as `sh COMMAND'
32302# in which case we are not to be found in the path.
32303if test "x$as_myself" = x; then
32304  as_myself=$0
32305fi
32306if test ! -f "$as_myself"; then
32307  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32308  exit 1
32309fi
32310
32311# Unset variables that we do not need and which cause bugs (e.g. in
32312# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32313# suppresses any "Segmentation fault" message there.  '((' could
32314# trigger a bug in pdksh 5.2.14.
32315for as_var in BASH_ENV ENV MAIL MAILPATH
32316do eval test x\${$as_var+set} = xset \
32317  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32318done
32319PS1='$ '
32320PS2='> '
32321PS4='+ '
32322
32323# NLS nuisances.
32324LC_ALL=C
32325export LC_ALL
32326LANGUAGE=C
32327export LANGUAGE
32328
32329# CDPATH.
32330(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32331
32332
32333# as_fn_error STATUS ERROR [LINENO LOG_FD]
32334# ----------------------------------------
32335# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32336# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32337# script with STATUS, using 1 if that was 0.
32338as_fn_error ()
32339{
32340  as_status=$1; test $as_status -eq 0 && as_status=1
32341  if test "$4"; then
32342    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32343    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32344  fi
32345  $as_echo "$as_me: error: $2" >&2
32346  as_fn_exit $as_status
32347} # as_fn_error
32348
32349
32350# as_fn_set_status STATUS
32351# -----------------------
32352# Set $? to STATUS, without forking.
32353as_fn_set_status ()
32354{
32355  return $1
32356} # as_fn_set_status
32357
32358# as_fn_exit STATUS
32359# -----------------
32360# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32361as_fn_exit ()
32362{
32363  set +e
32364  as_fn_set_status $1
32365  exit $1
32366} # as_fn_exit
32367
32368# as_fn_unset VAR
32369# ---------------
32370# Portably unset VAR.
32371as_fn_unset ()
32372{
32373  { eval $1=; unset $1;}
32374}
32375as_unset=as_fn_unset
32376# as_fn_append VAR VALUE
32377# ----------------------
32378# Append the text in VALUE to the end of the definition contained in VAR. Take
32379# advantage of any shell optimizations that allow amortized linear growth over
32380# repeated appends, instead of the typical quadratic growth present in naive
32381# implementations.
32382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32383  eval 'as_fn_append ()
32384  {
32385    eval $1+=\$2
32386  }'
32387else
32388  as_fn_append ()
32389  {
32390    eval $1=\$$1\$2
32391  }
32392fi # as_fn_append
32393
32394# as_fn_arith ARG...
32395# ------------------
32396# Perform arithmetic evaluation on the ARGs, and store the result in the
32397# global $as_val. Take advantage of shells that can avoid forks. The arguments
32398# must be portable across $(()) and expr.
32399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32400  eval 'as_fn_arith ()
32401  {
32402    as_val=$(( $* ))
32403  }'
32404else
32405  as_fn_arith ()
32406  {
32407    as_val=`expr "$@" || test $? -eq 1`
32408  }
32409fi # as_fn_arith
32410
32411
32412if expr a : '\(a\)' >/dev/null 2>&1 &&
32413   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32414  as_expr=expr
32415else
32416  as_expr=false
32417fi
32418
32419if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32420  as_basename=basename
32421else
32422  as_basename=false
32423fi
32424
32425if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32426  as_dirname=dirname
32427else
32428  as_dirname=false
32429fi
32430
32431as_me=`$as_basename -- "$0" ||
32432$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32433	 X"$0" : 'X\(//\)$' \| \
32434	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32435$as_echo X/"$0" |
32436    sed '/^.*\/\([^/][^/]*\)\/*$/{
32437	    s//\1/
32438	    q
32439	  }
32440	  /^X\/\(\/\/\)$/{
32441	    s//\1/
32442	    q
32443	  }
32444	  /^X\/\(\/\).*/{
32445	    s//\1/
32446	    q
32447	  }
32448	  s/.*/./; q'`
32449
32450# Avoid depending upon Character Ranges.
32451as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32452as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32453as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32454as_cr_digits='0123456789'
32455as_cr_alnum=$as_cr_Letters$as_cr_digits
32456
32457ECHO_C= ECHO_N= ECHO_T=
32458case `echo -n x` in #(((((
32459-n*)
32460  case `echo 'xy\c'` in
32461  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32462  xy)  ECHO_C='\c';;
32463  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32464       ECHO_T='	';;
32465  esac;;
32466*)
32467  ECHO_N='-n';;
32468esac
32469
32470rm -f conf$$ conf$$.exe conf$$.file
32471if test -d conf$$.dir; then
32472  rm -f conf$$.dir/conf$$.file
32473else
32474  rm -f conf$$.dir
32475  mkdir conf$$.dir 2>/dev/null
32476fi
32477if (echo >conf$$.file) 2>/dev/null; then
32478  if ln -s conf$$.file conf$$ 2>/dev/null; then
32479    as_ln_s='ln -s'
32480    # ... but there are two gotchas:
32481    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32482    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32483    # In both cases, we have to default to `cp -pR'.
32484    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32485      as_ln_s='cp -pR'
32486  elif ln conf$$.file conf$$ 2>/dev/null; then
32487    as_ln_s=ln
32488  else
32489    as_ln_s='cp -pR'
32490  fi
32491else
32492  as_ln_s='cp -pR'
32493fi
32494rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32495rmdir conf$$.dir 2>/dev/null
32496
32497
32498# as_fn_mkdir_p
32499# -------------
32500# Create "$as_dir" as a directory, including parents if necessary.
32501as_fn_mkdir_p ()
32502{
32503
32504  case $as_dir in #(
32505  -*) as_dir=./$as_dir;;
32506  esac
32507  test -d "$as_dir" || eval $as_mkdir_p || {
32508    as_dirs=
32509    while :; do
32510      case $as_dir in #(
32511      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32512      *) as_qdir=$as_dir;;
32513      esac
32514      as_dirs="'$as_qdir' $as_dirs"
32515      as_dir=`$as_dirname -- "$as_dir" ||
32516$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32517	 X"$as_dir" : 'X\(//\)[^/]' \| \
32518	 X"$as_dir" : 'X\(//\)$' \| \
32519	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32520$as_echo X"$as_dir" |
32521    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32522	    s//\1/
32523	    q
32524	  }
32525	  /^X\(\/\/\)[^/].*/{
32526	    s//\1/
32527	    q
32528	  }
32529	  /^X\(\/\/\)$/{
32530	    s//\1/
32531	    q
32532	  }
32533	  /^X\(\/\).*/{
32534	    s//\1/
32535	    q
32536	  }
32537	  s/.*/./; q'`
32538      test -d "$as_dir" && break
32539    done
32540    test -z "$as_dirs" || eval "mkdir $as_dirs"
32541  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32542
32543
32544} # as_fn_mkdir_p
32545if mkdir -p . 2>/dev/null; then
32546  as_mkdir_p='mkdir -p "$as_dir"'
32547else
32548  test -d ./-p && rmdir ./-p
32549  as_mkdir_p=false
32550fi
32551
32552
32553# as_fn_executable_p FILE
32554# -----------------------
32555# Test if FILE is an executable regular file.
32556as_fn_executable_p ()
32557{
32558  test -f "$1" && test -x "$1"
32559} # as_fn_executable_p
32560as_test_x='test -x'
32561as_executable_p=as_fn_executable_p
32562
32563# Sed expression to map a string onto a valid CPP name.
32564as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32565
32566# Sed expression to map a string onto a valid variable name.
32567as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32568
32569
32570exec 6>&1
32571## ----------------------------------- ##
32572## Main body of $CONFIG_STATUS script. ##
32573## ----------------------------------- ##
32574_ASEOF
32575test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32576
32577cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32578# Save the log message, to keep $0 and so on meaningful, and to
32579# report actual input values of CONFIG_FILES etc. instead of their
32580# values after options handling.
32581ac_log="
32582This file was extended by gcal $as_me 4.1, which was
32583generated by GNU Autoconf 2.69.  Invocation command line was
32584
32585  CONFIG_FILES    = $CONFIG_FILES
32586  CONFIG_HEADERS  = $CONFIG_HEADERS
32587  CONFIG_LINKS    = $CONFIG_LINKS
32588  CONFIG_COMMANDS = $CONFIG_COMMANDS
32589  $ $0 $@
32590
32591on `(hostname || uname -n) 2>/dev/null | sed 1q`
32592"
32593
32594_ACEOF
32595
32596case $ac_config_files in *"
32597"*) set x $ac_config_files; shift; ac_config_files=$*;;
32598esac
32599
32600case $ac_config_headers in *"
32601"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32602esac
32603
32604
32605cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32606# Files that config.status was made for.
32607config_files="$ac_config_files"
32608config_headers="$ac_config_headers"
32609config_links="$ac_config_links"
32610config_commands="$ac_config_commands"
32611
32612_ACEOF
32613
32614cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32615ac_cs_usage="\
32616\`$as_me' instantiates files and other configuration actions
32617from templates according to the current configuration.  Unless the files
32618and actions are specified as TAGs, all are instantiated by default.
32619
32620Usage: $0 [OPTION]... [TAG]...
32621
32622  -h, --help       print this help, then exit
32623  -V, --version    print version number and configuration settings, then exit
32624      --config     print configuration, then exit
32625  -q, --quiet, --silent
32626                   do not print progress messages
32627  -d, --debug      don't remove temporary files
32628      --recheck    update $as_me by reconfiguring in the same conditions
32629      --file=FILE[:TEMPLATE]
32630                   instantiate the configuration file FILE
32631      --header=FILE[:TEMPLATE]
32632                   instantiate the configuration header FILE
32633
32634Configuration files:
32635$config_files
32636
32637Configuration headers:
32638$config_headers
32639
32640Configuration links:
32641$config_links
32642
32643Configuration commands:
32644$config_commands
32645
32646Report bugs to <bug-gcal@gnu.org>."
32647
32648_ACEOF
32649cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32650ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32651ac_cs_version="\\
32652gcal config.status 4.1
32653configured by $0, generated by GNU Autoconf 2.69,
32654  with options \\"\$ac_cs_config\\"
32655
32656Copyright (C) 2012 Free Software Foundation, Inc.
32657This config.status script is free software; the Free Software Foundation
32658gives unlimited permission to copy, distribute and modify it."
32659
32660ac_pwd='$ac_pwd'
32661srcdir='$srcdir'
32662INSTALL='$INSTALL'
32663MKDIR_P='$MKDIR_P'
32664AWK='$AWK'
32665test -n "\$AWK" || AWK=awk
32666_ACEOF
32667
32668cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32669# The default lists apply if the user does not specify any file.
32670ac_need_defaults=:
32671while test $# != 0
32672do
32673  case $1 in
32674  --*=?*)
32675    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32676    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32677    ac_shift=:
32678    ;;
32679  --*=)
32680    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32681    ac_optarg=
32682    ac_shift=:
32683    ;;
32684  *)
32685    ac_option=$1
32686    ac_optarg=$2
32687    ac_shift=shift
32688    ;;
32689  esac
32690
32691  case $ac_option in
32692  # Handling of the options.
32693  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32694    ac_cs_recheck=: ;;
32695  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32696    $as_echo "$ac_cs_version"; exit ;;
32697  --config | --confi | --conf | --con | --co | --c )
32698    $as_echo "$ac_cs_config"; exit ;;
32699  --debug | --debu | --deb | --de | --d | -d )
32700    debug=: ;;
32701  --file | --fil | --fi | --f )
32702    $ac_shift
32703    case $ac_optarg in
32704    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32705    '') as_fn_error $? "missing file argument" ;;
32706    esac
32707    as_fn_append CONFIG_FILES " '$ac_optarg'"
32708    ac_need_defaults=false;;
32709  --header | --heade | --head | --hea )
32710    $ac_shift
32711    case $ac_optarg in
32712    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32713    esac
32714    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32715    ac_need_defaults=false;;
32716  --he | --h)
32717    # Conflict between --help and --header
32718    as_fn_error $? "ambiguous option: \`$1'
32719Try \`$0 --help' for more information.";;
32720  --help | --hel | -h )
32721    $as_echo "$ac_cs_usage"; exit ;;
32722  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32723  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32724    ac_cs_silent=: ;;
32725
32726  # This is an error.
32727  -*) as_fn_error $? "unrecognized option: \`$1'
32728Try \`$0 --help' for more information." ;;
32729
32730  *) as_fn_append ac_config_targets " $1"
32731     ac_need_defaults=false ;;
32732
32733  esac
32734  shift
32735done
32736
32737ac_configure_extra_args=
32738
32739if $ac_cs_silent; then
32740  exec 6>/dev/null
32741  ac_configure_extra_args="$ac_configure_extra_args --silent"
32742fi
32743
32744_ACEOF
32745cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32746if \$ac_cs_recheck; then
32747  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32748  shift
32749  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32750  CONFIG_SHELL='$SHELL'
32751  export CONFIG_SHELL
32752  exec "\$@"
32753fi
32754
32755_ACEOF
32756cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32757exec 5>>config.log
32758{
32759  echo
32760  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32761## Running $as_me. ##
32762_ASBOX
32763  $as_echo "$ac_log"
32764} >&5
32765
32766_ACEOF
32767cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32768#
32769# INIT-COMMANDS
32770#
32771AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
32772# Capture the value of obsolete ALL_LINGUAS because we need it to compute
32773    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
32774    # from automake < 1.5.
32775    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
32776    # Capture the value of LINGUAS because we need it to compute CATALOGS.
32777    LINGUAS="${LINGUAS-%UNSET%}"
32778
32779GNUmakefile=$GNUmakefile
32780
32781_ACEOF
32782
32783cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32784
32785# Handling of arguments.
32786for ac_config_target in $ac_config_targets
32787do
32788  case $ac_config_target in
32789    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
32790    "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
32791    "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
32792    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
32793    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
32794    "install-inf") CONFIG_FILES="$CONFIG_FILES install-inf" ;;
32795    "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;;
32796    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
32797    "doc/en/Makefile") CONFIG_FILES="$CONFIG_FILES doc/en/Makefile" ;;
32798    "doc/en/examples/Makefile") CONFIG_FILES="$CONFIG_FILES doc/en/examples/Makefile" ;;
32799    "doc/mksamp") CONFIG_FILES="$CONFIG_FILES doc/mksamp" ;;
32800    "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
32801    "misc/Makefile") CONFIG_FILES="$CONFIG_FILES misc/Makefile" ;;
32802    "misc/daily/daily") CONFIG_FILES="$CONFIG_FILES misc/daily/daily" ;;
32803    "misc/ddiff/ddiff") CONFIG_FILES="$CONFIG_FILES misc/ddiff/ddiff" ;;
32804    "misc/ddiff/ddiffdrv") CONFIG_FILES="$CONFIG_FILES misc/ddiff/ddiffdrv" ;;
32805    "misc/dst/dst") CONFIG_FILES="$CONFIG_FILES misc/dst/dst" ;;
32806    "misc/gcalltx/gcalltx") CONFIG_FILES="$CONFIG_FILES misc/gcalltx/gcalltx" ;;
32807    "misc/gcalltx/gcalltxp") CONFIG_FILES="$CONFIG_FILES misc/gcalltx/gcalltxp" ;;
32808    "misc/moon/moon") CONFIG_FILES="$CONFIG_FILES misc/moon/moon" ;;
32809    "misc/mrms/mrms") CONFIG_FILES="$CONFIG_FILES misc/mrms/mrms" ;;
32810    "misc/srss/srss") CONFIG_FILES="$CONFIG_FILES misc/srss/srss" ;;
32811    "misc/wloc/wlocdrv") CONFIG_FILES="$CONFIG_FILES misc/wloc/wlocdrv" ;;
32812    "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
32813    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
32814
32815  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
32816  esac
32817done
32818
32819
32820# If the user did not use the arguments to specify the items to instantiate,
32821# then the envvar interface is used.  Set only those that are not.
32822# We use the long form for the default assignment because of an extremely
32823# bizarre bug on SunOS 4.1.3.
32824if $ac_need_defaults; then
32825  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32826  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32827  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
32828  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
32829fi
32830
32831# Have a temporary directory for convenience.  Make it in the build tree
32832# simply because there is no reason against having it here, and in addition,
32833# creating and moving files from /tmp can sometimes cause problems.
32834# Hook for its removal unless debugging.
32835# Note that there is a small window in which the directory will not be cleaned:
32836# after its creation but before its name has been assigned to `$tmp'.
32837$debug ||
32838{
32839  tmp= ac_tmp=
32840  trap 'exit_status=$?
32841  : "${ac_tmp:=$tmp}"
32842  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
32843' 0
32844  trap 'as_fn_exit 1' 1 2 13 15
32845}
32846# Create a (secure) tmp directory for tmp files.
32847
32848{
32849  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32850  test -d "$tmp"
32851}  ||
32852{
32853  tmp=./conf$$-$RANDOM
32854  (umask 077 && mkdir "$tmp")
32855} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32856ac_tmp=$tmp
32857
32858# Set up the scripts for CONFIG_FILES section.
32859# No need to generate them if there are no CONFIG_FILES.
32860# This happens for instance with `./config.status config.h'.
32861if test -n "$CONFIG_FILES"; then
32862
32863
32864ac_cr=`echo X | tr X '\015'`
32865# On cygwin, bash can eat \r inside `` if the user requested igncr.
32866# But we know of no other shell where ac_cr would be empty at this
32867# point, so we can use a bashism as a fallback.
32868if test "x$ac_cr" = x; then
32869  eval ac_cr=\$\'\\r\'
32870fi
32871ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32872if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32873  ac_cs_awk_cr='\\r'
32874else
32875  ac_cs_awk_cr=$ac_cr
32876fi
32877
32878echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
32879_ACEOF
32880
32881
32882{
32883  echo "cat >conf$$subs.awk <<_ACEOF" &&
32884  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32885  echo "_ACEOF"
32886} >conf$$subs.sh ||
32887  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32888ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32889ac_delim='%!_!# '
32890for ac_last_try in false false false false false :; do
32891  . ./conf$$subs.sh ||
32892    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32893
32894  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32895  if test $ac_delim_n = $ac_delim_num; then
32896    break
32897  elif $ac_last_try; then
32898    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32899  else
32900    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32901  fi
32902done
32903rm -f conf$$subs.sh
32904
32905cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32906cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
32907_ACEOF
32908sed -n '
32909h
32910s/^/S["/; s/!.*/"]=/
32911p
32912g
32913s/^[^!]*!//
32914:repl
32915t repl
32916s/'"$ac_delim"'$//
32917t delim
32918:nl
32919h
32920s/\(.\{148\}\)..*/\1/
32921t more1
32922s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32923p
32924n
32925b repl
32926:more1
32927s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32928p
32929g
32930s/.\{148\}//
32931t nl
32932:delim
32933h
32934s/\(.\{148\}\)..*/\1/
32935t more2
32936s/["\\]/\\&/g; s/^/"/; s/$/"/
32937p
32938b
32939:more2
32940s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32941p
32942g
32943s/.\{148\}//
32944t delim
32945' <conf$$subs.awk | sed '
32946/^[^""]/{
32947  N
32948  s/\n//
32949}
32950' >>$CONFIG_STATUS || ac_write_fail=1
32951rm -f conf$$subs.awk
32952cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32953_ACAWK
32954cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
32955  for (key in S) S_is_set[key] = 1
32956  FS = ""
32957
32958}
32959{
32960  line = $ 0
32961  nfields = split(line, field, "@")
32962  substed = 0
32963  len = length(field[1])
32964  for (i = 2; i < nfields; i++) {
32965    key = field[i]
32966    keylen = length(key)
32967    if (S_is_set[key]) {
32968      value = S[key]
32969      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32970      len += length(value) + length(field[++i])
32971      substed = 1
32972    } else
32973      len += 1 + keylen
32974  }
32975
32976  print line
32977}
32978
32979_ACAWK
32980_ACEOF
32981cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32982if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32983  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32984else
32985  cat
32986fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
32987  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32988_ACEOF
32989
32990# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32991# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32992# trailing colons and then remove the whole line if VPATH becomes empty
32993# (actually we leave an empty line to preserve line numbers).
32994if test "x$srcdir" = x.; then
32995  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32996h
32997s///
32998s/^/:/
32999s/[	 ]*$/:/
33000s/:\$(srcdir):/:/g
33001s/:\${srcdir}:/:/g
33002s/:@srcdir@:/:/g
33003s/^:*//
33004s/:*$//
33005x
33006s/\(=[	 ]*\).*/\1/
33007G
33008s/\n//
33009s/^[^=]*=[	 ]*$//
33010}'
33011fi
33012
33013cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33014fi # test -n "$CONFIG_FILES"
33015
33016# Set up the scripts for CONFIG_HEADERS section.
33017# No need to generate them if there are no CONFIG_HEADERS.
33018# This happens for instance with `./config.status Makefile'.
33019if test -n "$CONFIG_HEADERS"; then
33020cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
33021BEGIN {
33022_ACEOF
33023
33024# Transform confdefs.h into an awk script `defines.awk', embedded as
33025# here-document in config.status, that substitutes the proper values into
33026# config.h.in to produce config.h.
33027
33028# Create a delimiter string that does not exist in confdefs.h, to ease
33029# handling of long lines.
33030ac_delim='%!_!# '
33031for ac_last_try in false false :; do
33032  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
33033  if test -z "$ac_tt"; then
33034    break
33035  elif $ac_last_try; then
33036    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
33037  else
33038    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33039  fi
33040done
33041
33042# For the awk script, D is an array of macro values keyed by name,
33043# likewise P contains macro parameters if any.  Preserve backslash
33044# newline sequences.
33045
33046ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
33047sed -n '
33048s/.\{148\}/&'"$ac_delim"'/g
33049t rset
33050:rset
33051s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
33052t def
33053d
33054:def
33055s/\\$//
33056t bsnl
33057s/["\\]/\\&/g
33058s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33059D["\1"]=" \3"/p
33060s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
33061d
33062:bsnl
33063s/["\\]/\\&/g
33064s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33065D["\1"]=" \3\\\\\\n"\\/p
33066t cont
33067s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
33068t cont
33069d
33070:cont
33071n
33072s/.\{148\}/&'"$ac_delim"'/g
33073t clear
33074:clear
33075s/\\$//
33076t bsnlc
33077s/["\\]/\\&/g; s/^/"/; s/$/"/p
33078d
33079:bsnlc
33080s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
33081b cont
33082' <confdefs.h | sed '
33083s/'"$ac_delim"'/"\\\
33084"/g' >>$CONFIG_STATUS || ac_write_fail=1
33085
33086cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33087  for (key in D) D_is_set[key] = 1
33088  FS = ""
33089}
33090/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
33091  line = \$ 0
33092  split(line, arg, " ")
33093  if (arg[1] == "#") {
33094    defundef = arg[2]
33095    mac1 = arg[3]
33096  } else {
33097    defundef = substr(arg[1], 2)
33098    mac1 = arg[2]
33099  }
33100  split(mac1, mac2, "(") #)
33101  macro = mac2[1]
33102  prefix = substr(line, 1, index(line, defundef) - 1)
33103  if (D_is_set[macro]) {
33104    # Preserve the white space surrounding the "#".
33105    print prefix "define", macro P[macro] D[macro]
33106    next
33107  } else {
33108    # Replace #undef with comments.  This is necessary, for example,
33109    # in the case of _POSIX_SOURCE, which is predefined and required
33110    # on some systems where configure will not decide to define it.
33111    if (defundef == "undef") {
33112      print "/*", prefix defundef, macro, "*/"
33113      next
33114    }
33115  }
33116}
33117{ print }
33118_ACAWK
33119_ACEOF
33120cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33121  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
33122fi # test -n "$CONFIG_HEADERS"
33123
33124
33125eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
33126shift
33127for ac_tag
33128do
33129  case $ac_tag in
33130  :[FHLC]) ac_mode=$ac_tag; continue;;
33131  esac
33132  case $ac_mode$ac_tag in
33133  :[FHL]*:*);;
33134  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
33135  :[FH]-) ac_tag=-:-;;
33136  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
33137  esac
33138  ac_save_IFS=$IFS
33139  IFS=:
33140  set x $ac_tag
33141  IFS=$ac_save_IFS
33142  shift
33143  ac_file=$1
33144  shift
33145
33146  case $ac_mode in
33147  :L) ac_source=$1;;
33148  :[FH])
33149    ac_file_inputs=
33150    for ac_f
33151    do
33152      case $ac_f in
33153      -) ac_f="$ac_tmp/stdin";;
33154      *) # Look for the file first in the build tree, then in the source tree
33155	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
33156	 # because $ac_f cannot contain `:'.
33157	 test -f "$ac_f" ||
33158	   case $ac_f in
33159	   [\\/$]*) false;;
33160	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
33161	   esac ||
33162	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
33163      esac
33164      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
33165      as_fn_append ac_file_inputs " '$ac_f'"
33166    done
33167
33168    # Let's still pretend it is `configure' which instantiates (i.e., don't
33169    # use $as_me), people would be surprised to read:
33170    #    /* config.h.  Generated by config.status.  */
33171    configure_input='Generated from '`
33172	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
33173	`' by configure.'
33174    if test x"$ac_file" != x-; then
33175      configure_input="$ac_file.  $configure_input"
33176      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
33177$as_echo "$as_me: creating $ac_file" >&6;}
33178    fi
33179    # Neutralize special characters interpreted by sed in replacement strings.
33180    case $configure_input in #(
33181    *\&* | *\|* | *\\* )
33182       ac_sed_conf_input=`$as_echo "$configure_input" |
33183       sed 's/[\\\\&|]/\\\\&/g'`;; #(
33184    *) ac_sed_conf_input=$configure_input;;
33185    esac
33186
33187    case $ac_tag in
33188    *:-:* | *:-) cat >"$ac_tmp/stdin" \
33189      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
33190    esac
33191    ;;
33192  esac
33193
33194  ac_dir=`$as_dirname -- "$ac_file" ||
33195$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33196	 X"$ac_file" : 'X\(//\)[^/]' \| \
33197	 X"$ac_file" : 'X\(//\)$' \| \
33198	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
33199$as_echo X"$ac_file" |
33200    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33201	    s//\1/
33202	    q
33203	  }
33204	  /^X\(\/\/\)[^/].*/{
33205	    s//\1/
33206	    q
33207	  }
33208	  /^X\(\/\/\)$/{
33209	    s//\1/
33210	    q
33211	  }
33212	  /^X\(\/\).*/{
33213	    s//\1/
33214	    q
33215	  }
33216	  s/.*/./; q'`
33217  as_dir="$ac_dir"; as_fn_mkdir_p
33218  ac_builddir=.
33219
33220case "$ac_dir" in
33221.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33222*)
33223  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33224  # A ".." for each directory in $ac_dir_suffix.
33225  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33226  case $ac_top_builddir_sub in
33227  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33228  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33229  esac ;;
33230esac
33231ac_abs_top_builddir=$ac_pwd
33232ac_abs_builddir=$ac_pwd$ac_dir_suffix
33233# for backward compatibility:
33234ac_top_builddir=$ac_top_build_prefix
33235
33236case $srcdir in
33237  .)  # We are building in place.
33238    ac_srcdir=.
33239    ac_top_srcdir=$ac_top_builddir_sub
33240    ac_abs_top_srcdir=$ac_pwd ;;
33241  [\\/]* | ?:[\\/]* )  # Absolute name.
33242    ac_srcdir=$srcdir$ac_dir_suffix;
33243    ac_top_srcdir=$srcdir
33244    ac_abs_top_srcdir=$srcdir ;;
33245  *) # Relative name.
33246    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33247    ac_top_srcdir=$ac_top_build_prefix$srcdir
33248    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33249esac
33250ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33251
33252
33253  case $ac_mode in
33254  :F)
33255  #
33256  # CONFIG_FILE
33257  #
33258
33259  case $INSTALL in
33260  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
33261  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
33262  esac
33263  ac_MKDIR_P=$MKDIR_P
33264  case $MKDIR_P in
33265  [\\/$]* | ?:[\\/]* ) ;;
33266  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
33267  esac
33268_ACEOF
33269
33270cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33271# If the template does not know about datarootdir, expand it.
33272# FIXME: This hack should be removed a few years after 2.60.
33273ac_datarootdir_hack=; ac_datarootdir_seen=
33274ac_sed_dataroot='
33275/datarootdir/ {
33276  p
33277  q
33278}
33279/@datadir@/p
33280/@docdir@/p
33281/@infodir@/p
33282/@localedir@/p
33283/@mandir@/p'
33284case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33285*datarootdir*) ac_datarootdir_seen=yes;;
33286*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33287  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33288$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33289_ACEOF
33290cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33291  ac_datarootdir_hack='
33292  s&@datadir@&$datadir&g
33293  s&@docdir@&$docdir&g
33294  s&@infodir@&$infodir&g
33295  s&@localedir@&$localedir&g
33296  s&@mandir@&$mandir&g
33297  s&\\\${datarootdir}&$datarootdir&g' ;;
33298esac
33299_ACEOF
33300
33301# Neutralize VPATH when `$srcdir' = `.'.
33302# Shell code in configure.ac might set extrasub.
33303# FIXME: do we really want to maintain this feature?
33304cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33305ac_sed_extra="$ac_vpsub
33306$extrasub
33307_ACEOF
33308cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33309:t
33310/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33311s|@configure_input@|$ac_sed_conf_input|;t t
33312s&@top_builddir@&$ac_top_builddir_sub&;t t
33313s&@top_build_prefix@&$ac_top_build_prefix&;t t
33314s&@srcdir@&$ac_srcdir&;t t
33315s&@abs_srcdir@&$ac_abs_srcdir&;t t
33316s&@top_srcdir@&$ac_top_srcdir&;t t
33317s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33318s&@builddir@&$ac_builddir&;t t
33319s&@abs_builddir@&$ac_abs_builddir&;t t
33320s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33321s&@INSTALL@&$ac_INSTALL&;t t
33322s&@MKDIR_P@&$ac_MKDIR_P&;t t
33323$ac_datarootdir_hack
33324"
33325eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
33326  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33327
33328test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33329  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
33330  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
33331      "$ac_tmp/out"`; test -z "$ac_out"; } &&
33332  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33333which seems to be undefined.  Please make sure it is defined" >&5
33334$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33335which seems to be undefined.  Please make sure it is defined" >&2;}
33336
33337  rm -f "$ac_tmp/stdin"
33338  case $ac_file in
33339  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
33340  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
33341  esac \
33342  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33343 ;;
33344  :H)
33345  #
33346  # CONFIG_HEADER
33347  #
33348  if test x"$ac_file" != x-; then
33349    {
33350      $as_echo "/* $configure_input  */" \
33351      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
33352    } >"$ac_tmp/config.h" \
33353      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33354    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
33355      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33356$as_echo "$as_me: $ac_file is unchanged" >&6;}
33357    else
33358      rm -f "$ac_file"
33359      mv "$ac_tmp/config.h" "$ac_file" \
33360	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33361    fi
33362  else
33363    $as_echo "/* $configure_input  */" \
33364      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
33365      || as_fn_error $? "could not create -" "$LINENO" 5
33366  fi
33367# Compute "$ac_file"'s index in $config_headers.
33368_am_arg="$ac_file"
33369_am_stamp_count=1
33370for _am_header in $config_headers :; do
33371  case $_am_header in
33372    $_am_arg | $_am_arg:* )
33373      break ;;
33374    * )
33375      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
33376  esac
33377done
33378echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
33379$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33380	 X"$_am_arg" : 'X\(//\)[^/]' \| \
33381	 X"$_am_arg" : 'X\(//\)$' \| \
33382	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
33383$as_echo X"$_am_arg" |
33384    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33385	    s//\1/
33386	    q
33387	  }
33388	  /^X\(\/\/\)[^/].*/{
33389	    s//\1/
33390	    q
33391	  }
33392	  /^X\(\/\/\)$/{
33393	    s//\1/
33394	    q
33395	  }
33396	  /^X\(\/\).*/{
33397	    s//\1/
33398	    q
33399	  }
33400	  s/.*/./; q'`/stamp-h$_am_stamp_count
33401 ;;
33402  :L)
33403  #
33404  # CONFIG_LINK
33405  #
33406
33407  if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
33408    :
33409  else
33410    # Prefer the file from the source tree if names are identical.
33411    if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
33412      ac_source=$srcdir/$ac_source
33413    fi
33414
33415    { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
33416$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
33417
33418    if test ! -r "$ac_source"; then
33419      as_fn_error $? "$ac_source: file not found" "$LINENO" 5
33420    fi
33421    rm -f "$ac_file"
33422
33423    # Try a relative symlink, then a hard link, then a copy.
33424    case $ac_source in
33425    [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
33426	*) ac_rel_source=$ac_top_build_prefix$ac_source ;;
33427    esac
33428    ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
33429      ln "$ac_source" "$ac_file" 2>/dev/null ||
33430      cp -p "$ac_source" "$ac_file" ||
33431      as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
33432  fi
33433 ;;
33434  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
33435$as_echo "$as_me: executing $ac_file commands" >&6;}
33436 ;;
33437  esac
33438
33439
33440  case $ac_file$ac_mode in
33441    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
33442  # Older Autoconf quotes --file arguments for eval, but not when files
33443  # are listed without --file.  Let's play safe and only enable the eval
33444  # if we detect the quoting.
33445  case $CONFIG_FILES in
33446  *\'*) eval set x "$CONFIG_FILES" ;;
33447  *)   set x $CONFIG_FILES ;;
33448  esac
33449  shift
33450  for mf
33451  do
33452    # Strip MF so we end up with the name of the file.
33453    mf=`echo "$mf" | sed -e 's/:.*$//'`
33454    # Check whether this is an Automake generated Makefile or not.
33455    # We used to match only the files named 'Makefile.in', but
33456    # some people rename them; so instead we look at the file content.
33457    # Grep'ing the first line is not enough: some people post-process
33458    # each Makefile.in and add a new line on top of each file to say so.
33459    # Grep'ing the whole file is not good either: AIX grep has a line
33460    # limit of 2048, but all sed's we know have understand at least 4000.
33461    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
33462      dirpart=`$as_dirname -- "$mf" ||
33463$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33464	 X"$mf" : 'X\(//\)[^/]' \| \
33465	 X"$mf" : 'X\(//\)$' \| \
33466	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
33467$as_echo X"$mf" |
33468    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33469	    s//\1/
33470	    q
33471	  }
33472	  /^X\(\/\/\)[^/].*/{
33473	    s//\1/
33474	    q
33475	  }
33476	  /^X\(\/\/\)$/{
33477	    s//\1/
33478	    q
33479	  }
33480	  /^X\(\/\).*/{
33481	    s//\1/
33482	    q
33483	  }
33484	  s/.*/./; q'`
33485    else
33486      continue
33487    fi
33488    # Extract the definition of DEPDIR, am__include, and am__quote
33489    # from the Makefile without running 'make'.
33490    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
33491    test -z "$DEPDIR" && continue
33492    am__include=`sed -n 's/^am__include = //p' < "$mf"`
33493    test -z "$am__include" && continue
33494    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
33495    # Find all dependency output files, they are included files with
33496    # $(DEPDIR) in their names.  We invoke sed twice because it is the
33497    # simplest approach to changing $(DEPDIR) to its actual value in the
33498    # expansion.
33499    for file in `sed -n "
33500      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
33501	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
33502      # Make sure the directory exists.
33503      test -f "$dirpart/$file" && continue
33504      fdir=`$as_dirname -- "$file" ||
33505$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33506	 X"$file" : 'X\(//\)[^/]' \| \
33507	 X"$file" : 'X\(//\)$' \| \
33508	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
33509$as_echo X"$file" |
33510    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33511	    s//\1/
33512	    q
33513	  }
33514	  /^X\(\/\/\)[^/].*/{
33515	    s//\1/
33516	    q
33517	  }
33518	  /^X\(\/\/\)$/{
33519	    s//\1/
33520	    q
33521	  }
33522	  /^X\(\/\).*/{
33523	    s//\1/
33524	    q
33525	  }
33526	  s/.*/./; q'`
33527      as_dir=$dirpart/$fdir; as_fn_mkdir_p
33528      # echo "creating $dirpart/$file"
33529      echo '# dummy' > "$dirpart/$file"
33530    done
33531  done
33532}
33533 ;;
33534    "po-directories":C)
33535    for ac_file in $CONFIG_FILES; do
33536      # Support "outfile[:infile[:infile...]]"
33537      case "$ac_file" in
33538        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
33539      esac
33540      # PO directories have a Makefile.in generated from Makefile.in.in.
33541      case "$ac_file" in */Makefile.in)
33542        # Adjust a relative srcdir.
33543        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
33544        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
33545        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
33546        # In autoconf-2.13 it is called $ac_given_srcdir.
33547        # In autoconf-2.50 it is called $srcdir.
33548        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
33549        case "$ac_given_srcdir" in
33550          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
33551          /*) top_srcdir="$ac_given_srcdir" ;;
33552          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
33553        esac
33554        # Treat a directory as a PO directory if and only if it has a
33555        # POTFILES.in file. This allows packages to have multiple PO
33556        # directories under different names or in different locations.
33557        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
33558          rm -f "$ac_dir/POTFILES"
33559          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
33560          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
33561          POMAKEFILEDEPS="POTFILES.in"
33562          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
33563          # on $ac_dir but don't depend on user-specified configuration
33564          # parameters.
33565          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
33566            # The LINGUAS file contains the set of available languages.
33567            if test -n "$OBSOLETE_ALL_LINGUAS"; then
33568              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
33569            fi
33570            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
33571            # Hide the ALL_LINGUAS assigment from automake < 1.5.
33572            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
33573            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
33574          else
33575            # The set of available languages was given in configure.in.
33576            # Hide the ALL_LINGUAS assigment from automake < 1.5.
33577            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
33578          fi
33579          # Compute POFILES
33580          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
33581          # Compute UPDATEPOFILES
33582          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
33583          # Compute DUMMYPOFILES
33584          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
33585          # Compute GMOFILES
33586          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
33587          case "$ac_given_srcdir" in
33588            .) srcdirpre= ;;
33589            *) srcdirpre='$(srcdir)/' ;;
33590          esac
33591          POFILES=
33592          UPDATEPOFILES=
33593          DUMMYPOFILES=
33594          GMOFILES=
33595          for lang in $ALL_LINGUAS; do
33596            POFILES="$POFILES $srcdirpre$lang.po"
33597            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
33598            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
33599            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
33600          done
33601          # CATALOGS depends on both $ac_dir and the user's LINGUAS
33602          # environment variable.
33603          INST_LINGUAS=
33604          if test -n "$ALL_LINGUAS"; then
33605            for presentlang in $ALL_LINGUAS; do
33606              useit=no
33607              if test "%UNSET%" != "$LINGUAS"; then
33608                desiredlanguages="$LINGUAS"
33609              else
33610                desiredlanguages="$ALL_LINGUAS"
33611              fi
33612              for desiredlang in $desiredlanguages; do
33613                # Use the presentlang catalog if desiredlang is
33614                #   a. equal to presentlang, or
33615                #   b. a variant of presentlang (because in this case,
33616                #      presentlang can be used as a fallback for messages
33617                #      which are not translated in the desiredlang catalog).
33618                case "$desiredlang" in
33619                  "$presentlang"*) useit=yes;;
33620                esac
33621              done
33622              if test $useit = yes; then
33623                INST_LINGUAS="$INST_LINGUAS $presentlang"
33624              fi
33625            done
33626          fi
33627          CATALOGS=
33628          if test -n "$INST_LINGUAS"; then
33629            for lang in $INST_LINGUAS; do
33630              CATALOGS="$CATALOGS $lang.gmo"
33631            done
33632          fi
33633          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
33634          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"
33635          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
33636            if test -f "$f"; then
33637              case "$f" in
33638                *.orig | *.bak | *~) ;;
33639                *) cat "$f" >> "$ac_dir/Makefile" ;;
33640              esac
33641            fi
33642          done
33643        fi
33644        ;;
33645      esac
33646    done ;;
33647
33648  esac
33649done # for ac_tag
33650
33651
33652as_fn_exit 0
33653_ACEOF
33654ac_clean_files=$ac_clean_files_save
33655
33656test $ac_write_fail = 0 ||
33657  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33658
33659
33660# configure is writing to config.log, and then calls config.status.
33661# config.status does its own redirection, appending to config.log.
33662# Unfortunately, on DOS this fails, as config.log is still kept open
33663# by configure, so config.status won't be able to write to it; its
33664# output is simply discarded.  So we exec the FD to /dev/null,
33665# effectively closing config.log, so it can be properly (re)opened and
33666# appended to by config.status.  When coming back to configure, we
33667# need to make the FD available again.
33668if test "$no_create" != yes; then
33669  ac_cs_success=:
33670  ac_config_status_args=
33671  test "$silent" = yes &&
33672    ac_config_status_args="$ac_config_status_args --quiet"
33673  exec 5>/dev/null
33674  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33675  exec 5>>config.log
33676  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33677  # would make configure fail if this is the last instruction.
33678  $ac_cs_success || as_fn_exit 1
33679fi
33680if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33681  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33682$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33683fi
33684
33685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
33686$as_echo "" >&6; }
33687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Bored? Fallen asleep??   All checks done!" >&5
33688$as_echo "Bored? Fallen asleep??   All checks done!" >&6; }
33689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
33690$as_echo "" >&6; }
33691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Perhaps you might want to inspect the created" >&5
33692$as_echo "Perhaps you might want to inspect the created" >&6; }
33693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Makefiles now for tuning some settings..." >&5
33694$as_echo "Makefiles now for tuning some settings..." >&6; }
33695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
33696$as_echo "" >&6; }
33697